1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: PaneChildWindows.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sd.hxx"
33 #include "PaneChildWindows.hxx"
34 #include "PaneDockingWindow.hrc"
36 #include "strings.hrc"
37 #include "sdresid.hxx"
38 #include <sfx2/app.hxx>
39 #include <sfx2/dockwin.hxx>
40 #include <sfx2/bindings.hxx>
41 #include <sfx2/dispatch.hxx>
45 SFX_IMPL_DOCKINGWINDOW(LeftPaneImpressChildWindow
, SID_LEFT_PANE_IMPRESS
)
46 SFX_IMPL_DOCKINGWINDOW(LeftPaneDrawChildWindow
, SID_LEFT_PANE_DRAW
)
47 SFX_IMPL_DOCKINGWINDOW(RightPaneChildWindow
, SID_RIGHT_PANE
)
51 #include "PaneDockingWindow.hxx"
52 #include "ViewShellBase.hxx"
53 #include "framework/FrameworkHelper.hxx"
57 //===== PaneChildWindow =======================================================
59 PaneChildWindow::PaneChildWindow (
60 ::Window
* pParentWindow
,
62 SfxBindings
* pBindings
,
63 SfxChildWinInfo
* pInfo
,
65 const ::rtl::OUString
& rsTitle
,
66 SfxChildAlignment eAlignment
)
67 : SfxChildWindow (pParentWindow
, nId
)
69 pWindow
= new PaneDockingWindow (
74 framework::FrameworkHelper::msLeftImpressPaneURL
,
76 eChildAlignment
= eAlignment
;
77 static_cast<SfxDockingWindow
*>(pWindow
)->Initialize(pInfo
);
78 SetHideNotDelete(TRUE
);
80 ViewShellBase
* pBase
= ViewShellBase::GetViewShellBase(pBindings
->GetDispatcher()->GetFrame());
83 framework::FrameworkHelper::Instance(*pBase
)->UpdateConfiguration();
90 PaneChildWindow::~PaneChildWindow (void)
92 ViewShellBase
* pBase
= NULL
;
93 PaneDockingWindow
* pDockingWindow
= dynamic_cast<PaneDockingWindow
*>(pWindow
);
94 if (pDockingWindow
!= NULL
)
95 pBase
= ViewShellBase::GetViewShellBase(
96 pDockingWindow
->GetBindings().GetDispatcher()->GetFrame());
98 framework::FrameworkHelper::Instance(*pBase
)->UpdateConfiguration();
106 //===== LeftPaneImpressChildWindow ============================================
108 LeftPaneImpressChildWindow::LeftPaneImpressChildWindow (
109 ::Window
* pParentWindow
,
111 SfxBindings
* pBindings
,
112 SfxChildWinInfo
* pInfo
)
118 SdResId(FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW
),
119 String(SdResId(STR_LEFT_PANE_IMPRESS_TITLE
)),
127 //===== LeftPaneDrawChildWindow ===============================================
129 LeftPaneDrawChildWindow::LeftPaneDrawChildWindow (
130 ::Window
* pParentWindow
,
132 SfxBindings
* pBindings
,
133 SfxChildWinInfo
* pInfo
)
139 SdResId(FLT_LEFT_PANE_DRAW_DOCKING_WINDOW
),
140 String(SdResId(STR_LEFT_PANE_DRAW_TITLE
)),
148 //===== RightPaneChildWindow ==================================================
150 RightPaneChildWindow::RightPaneChildWindow (
151 ::Window
* pParentWindow
,
153 SfxBindings
* pBindings
,
154 SfxChildWinInfo
* pInfo
)
160 SdResId(FLT_RIGHT_PANE_DOCKING_WINDOW
),
161 String(SdResId(STR_RIGHT_PANE_TITLE
)),
167 } // end of namespace ::sd