diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2007-04-03 14:40:28 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2007-04-03 14:40:28 +0000 |
commit | 04982642e7f0a3e426a773defdaf8268cbed2f3d (patch) | |
tree | f781c5e640b981545659e5351cb74a3543ed4093 /sd/source/ui/dlg/PaneChildWindows.cxx | |
parent | 67e2975e91ee1b3b7024dfbea430b4f49e5c249e (diff) |
INTEGRATION: CWS components1 (1.5.200); FILE MERGED
2006/10/13 08:20:41 af 1.5.200.4: #i68075# Create PaneDockingWindow in PaneChildWindow constructor even when ViewShellBase is not yet accessible.
2006/09/25 16:56:42 af 1.5.200.3: RESYNC: (1.5-1.6); FILE MERGED
2006/08/28 14:32:27 af 1.5.200.2: #i68075# Fixed compiler problems.
2006/08/23 11:13:12 af 1.5.200.1: #i68075# Transition to new drawing framework.
Diffstat (limited to 'sd/source/ui/dlg/PaneChildWindows.cxx')
-rw-r--r-- | sd/source/ui/dlg/PaneChildWindows.cxx | 132 |
1 files changed, 73 insertions, 59 deletions
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx index d0438724387f..e022409c705a 100644 --- a/sd/source/ui/dlg/PaneChildWindows.cxx +++ b/sd/source/ui/dlg/PaneChildWindows.cxx @@ -4,9 +4,9 @@ * * $RCSfile: PaneChildWindows.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: obo $ $Date: 2006-09-16 18:34:11 $ + * last change: $Author: rt $ $Date: 2007-04-03 15:40:28 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,9 +36,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" +#ifndef SD_PANE_CHILD_WINDOWS_HXX #include "PaneChildWindows.hxx" +#endif #include "PaneDockingWindow.hrc" #include "app.hrc" +#include "strings.hrc" #include "sdresid.hxx" #include <sfx2/app.hxx> #include <sfx2/dockwin.hxx> @@ -47,50 +50,52 @@ namespace sd { - // We use SID_LEFT_PANE_IMPRESS and SID_LEFT_PANE_IMPRESS_DRAW to have - // separate strings. Internally we use SID_LEFT_PANE_IMPESS for - // controlling the visibility of the left pane. - SFX_IMPL_DOCKINGWINDOW(LeftPaneChildWindow, SID_LEFT_PANE_IMPRESS) + SFX_IMPL_DOCKINGWINDOW(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS) + SFX_IMPL_DOCKINGWINDOW(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW) SFX_IMPL_DOCKINGWINDOW(RightPaneChildWindow, SID_RIGHT_PANE) } #include "PaneDockingWindow.hxx" #include "ViewShellBase.hxx" +#include "framework/FrameworkHelper.hxx" namespace sd { -//===== LeftPaneChildWindow =================================================== +//===== PaneChildWindow ======================================================= -LeftPaneChildWindow::LeftPaneChildWindow ( +PaneChildWindow::PaneChildWindow ( ::Window* pParentWindow, USHORT nId, SfxBindings* pBindings, - SfxChildWinInfo* pInfo) + SfxChildWinInfo* pInfo, + const ResId& rResId, + const ::rtl::OUString& rsTitle, + SfxChildAlignment eAlignment) : SfxChildWindow (pParentWindow, nId) { + pWindow = new PaneDockingWindow ( + pBindings, + this, + pParentWindow, + rResId, + framework::FrameworkHelper::msLeftImpressPaneURL, + rsTitle); + eChildAlignment = eAlignment; + static_cast<SfxDockingWindow*>(pWindow)->Initialize(pInfo); + SetHideNotDelete(TRUE); + ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pBindings->GetDispatcher()->GetFrame()); if (pBase != NULL) { - PaneManager& rPaneManager (pBase->GetPaneManager()); - pWindow = new PaneDockingWindow ( - pBindings, - this, - pParentWindow, - rPaneManager.GetDockingWindowTitle(PaneManager::PT_LEFT), - PaneManager::PT_LEFT, - rPaneManager.GetWindowTitle(PaneManager::PT_LEFT)); - eChildAlignment = SFX_ALIGN_LEFT; - static_cast<SfxDockingWindow*>(pWindow)->Initialize (pInfo); - SetHideNotDelete (TRUE); - rPaneManager.SetWindow(PaneManager::PT_LEFT, pWindow); + framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration(); } } -LeftPaneChildWindow::~LeftPaneChildWindow (void) +PaneChildWindow::~PaneChildWindow (void) { ViewShellBase* pBase = NULL; PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(pWindow); @@ -98,11 +103,7 @@ LeftPaneChildWindow::~LeftPaneChildWindow (void) pBase = ViewShellBase::GetViewShellBase( pDockingWindow->GetBindings().GetDispatcher()->GetFrame()); if (pBase != NULL) - { - // Tell the ViewShellBase that the window of this slide sorter is - // not available anymore. - pBase->GetPaneManager().SetWindow(PaneManager::PT_LEFT, NULL); - } + framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration(); } @@ -110,52 +111,65 @@ LeftPaneChildWindow::~LeftPaneChildWindow (void) -//===== RightPaneChildWindow ================================================== +//===== LeftPaneImpressChildWindow ============================================ -RightPaneChildWindow::RightPaneChildWindow ( +LeftPaneImpressChildWindow::LeftPaneImpressChildWindow ( ::Window* pParentWindow, USHORT nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo) - : SfxChildWindow (pParentWindow, nId) + : PaneChildWindow( + pParentWindow, + nId, + pBindings, + pInfo, + SdResId(FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW), + String(SdResId(STR_LEFT_PANE_IMPRESS_TITLE)), + SFX_ALIGN_LEFT) { - ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pBindings->GetDispatcher()->GetFrame()); - if (pBase != NULL) - { - PaneManager& rPaneManager (pBase->GetPaneManager()); - pWindow = new PaneDockingWindow ( - pBindings, - this, - pParentWindow, - rPaneManager.GetDockingWindowTitle(PaneManager::PT_RIGHT), - PaneManager::PT_RIGHT, - rPaneManager.GetWindowTitle(PaneManager::PT_RIGHT)); - eChildAlignment = SFX_ALIGN_RIGHT; - static_cast<SfxDockingWindow*>(pWindow)->Initialize (pInfo); - SetHideNotDelete (TRUE); - rPaneManager.SetWindow(PaneManager::PT_RIGHT, pWindow); - } -}; +} -RightPaneChildWindow::~RightPaneChildWindow (void) +//===== LeftPaneDrawChildWindow =============================================== + +LeftPaneDrawChildWindow::LeftPaneDrawChildWindow ( + ::Window* pParentWindow, + USHORT nId, + SfxBindings* pBindings, + SfxChildWinInfo* pInfo) + : PaneChildWindow( + pParentWindow, + nId, + pBindings, + pInfo, + SdResId(FLT_LEFT_PANE_DRAW_DOCKING_WINDOW), + String(SdResId(STR_LEFT_PANE_DRAW_TITLE)), + SFX_ALIGN_LEFT) { - ViewShellBase* pBase = NULL; - PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(pWindow); - if (pDockingWindow != NULL) - pBase = ViewShellBase::GetViewShellBase( - pDockingWindow->GetBindings().GetDispatcher()->GetFrame()); - if (pBase != NULL) - { - // Tell the ViewShellBase that the window of this slide sorter is - // not available anymore. - pBase->GetPaneManager().SetWindow(PaneManager::PT_RIGHT, NULL); - } } +//===== RightPaneChildWindow ================================================== + +RightPaneChildWindow::RightPaneChildWindow ( + ::Window* pParentWindow, + USHORT nId, + SfxBindings* pBindings, + SfxChildWinInfo* pInfo) + : PaneChildWindow( + pParentWindow, + nId, + pBindings, + pInfo, + SdResId(FLT_RIGHT_PANE_DOCKING_WINDOW), + String(SdResId(STR_RIGHT_PANE_TITLE)), + SFX_ALIGN_RIGHT) +{ +} + + } // end of namespace ::sd |