summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/PaneDockingWindow.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-05-02 12:17:56 +0000
committerOliver Bolte <obo@openoffice.org>2005-05-02 12:17:56 +0000
commitd08c7a92e78aefd0c189db68084aa7167c114cec (patch)
tree4f04f710a9480d021a68298885f260112335ed0e /sd/source/ui/dlg/PaneDockingWindow.cxx
parent14ae96b377659371669d7ddac1bd1f6876596a79 (diff)
INTEGRATION: CWS impress52 (1.9.44); FILE MERGED
2005/04/27 14:09:57 af 1.9.44.1: #i48263# Added WindowEventListener() link method.
Diffstat (limited to 'sd/source/ui/dlg/PaneDockingWindow.cxx')
-rw-r--r--sd/source/ui/dlg/PaneDockingWindow.cxx40
1 files changed, 38 insertions, 2 deletions
diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx
index d058267edb58..6a84428ffb89 100644
--- a/sd/source/ui/dlg/PaneDockingWindow.cxx
+++ b/sd/source/ui/dlg/PaneDockingWindow.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PaneDockingWindow.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: kz $ $Date: 2005-03-18 16:47:25 $
+ * last change: $Author: obo $ $Date: 2005-05-02 13:17:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -109,6 +109,8 @@ PaneDockingWindow::PaneDockingWindow (
SystemWindow* pSystemWindow = GetSystemWindow();
if (pSystemWindow != NULL)
pSystemWindow->GetTaskPaneList()->AddWindow(this);
+
+ AddEventListener(LINK(this,PaneDockingWindow,WindowEventListener));
}
@@ -116,6 +118,8 @@ PaneDockingWindow::PaneDockingWindow (
PaneDockingWindow::~PaneDockingWindow (void)
{
+ RemoveEventListener(LINK(this,PaneDockingWindow,WindowEventListener));
+
ViewShellBase* pBase = ViewShellBase::GetViewShellBase(
GetBindings().GetDispatcher()->GetFrame());
@@ -410,4 +414,36 @@ void PaneDockingWindow::DataChanged (const DataChangedEvent& rEvent)
}
+
+
+IMPL_LINK(PaneDockingWindow, WindowEventListener, VclSimpleEvent*, pEvent)
+{
+ if (pEvent!=NULL && pEvent->ISA(VclWindowEvent))
+ {
+ ViewShellBase* pBase = ViewShellBase::GetViewShellBase(
+ GetBindings().GetDispatcher()->GetFrame());
+
+ VclWindowEvent* pWindowEvent = static_cast<VclWindowEvent*>(pEvent);
+ switch (pWindowEvent->GetId())
+ {
+ case VCLEVENT_WINDOW_SHOW:
+ if (pBase != NULL)
+ pBase->GetPaneManager().RequestWindowVisibilityChange(
+ mePane,
+ true,
+ PaneManager::CM_ASYNCHRONOUS);
+ break;
+
+ case VCLEVENT_WINDOW_HIDE:
+ if (pBase != NULL)
+ pBase->GetPaneManager().RequestWindowVisibilityChange(
+ mePane,
+ false,
+ PaneManager::CM_ASYNCHRONOUS);
+ break;
+ }
+ }
+ return 1;
+}
+
} // end of namespace ::sd