1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <PaneChildWindows.hxx>
21 #include <PaneDockingWindow.hxx>
22 #include <ViewShellBase.hxx>
23 #include <framework/FrameworkHelper.hxx>
25 #include <strings.hrc>
26 #include <sdresid.hxx>
28 #include <sfx2/dockwin.hxx>
29 #include <sfx2/bindings.hxx>
30 #include <sfx2/dispatch.hxx>
35 SFX_IMPL_DOCKINGWINDOW_WITHID(LeftPaneImpressChildWindow
, SID_LEFT_PANE_IMPRESS
)
36 SFX_IMPL_DOCKINGWINDOW_WITHID(LeftPaneDrawChildWindow
, SID_LEFT_PANE_DRAW
)
38 //===== PaneChildWindow =======================================================
39 PaneChildWindow::PaneChildWindow (
40 vcl::Window
* pParentWindow
,
42 SfxBindings
* pBindings
,
43 SfxChildWinInfo
* pInfo
,
44 const char* pTitleBarResId
)
45 : SfxChildWindow (pParentWindow
, nId
)
47 SetWindow( VclPtr
<PaneDockingWindow
>::Create(
51 SdResId(pTitleBarResId
)));
52 SetAlignment(SfxChildAlignment::LEFT
);
53 static_cast<SfxDockingWindow
*>(GetWindow())->Initialize(pInfo
);
54 SetHideNotDelete(true);
56 ViewShellBase
* pBase
= ViewShellBase::GetViewShellBase(pBindings
->GetDispatcher()->GetFrame());
59 framework::FrameworkHelper::Instance(*pBase
)->UpdateConfiguration();
63 PaneChildWindow::~PaneChildWindow()
65 ViewShellBase
* pBase
= nullptr;
66 PaneDockingWindow
* pDockingWindow
= dynamic_cast<PaneDockingWindow
*>(GetWindow());
67 if (pDockingWindow
!= nullptr)
68 pBase
= ViewShellBase::GetViewShellBase(
69 pDockingWindow
->GetBindings().GetDispatcher()->GetFrame());
71 framework::FrameworkHelper::Instance(*pBase
)->UpdateConfiguration();
74 //===== LeftPaneImpressChildWindow ============================================
75 LeftPaneImpressChildWindow::LeftPaneImpressChildWindow (
76 vcl::Window
* pParentWindow
,
78 SfxBindings
* pBindings
,
79 SfxChildWinInfo
* pInfo
)
85 STR_LEFT_PANE_IMPRESS_TITLE
)
89 //===== LeftPaneDrawChildWindow ===============================================
90 LeftPaneDrawChildWindow::LeftPaneDrawChildWindow (
91 vcl::Window
* pParentWindow
,
93 SfxBindings
* pBindings
,
94 SfxChildWinInfo
* pInfo
)
100 STR_LEFT_PANE_DRAW_TITLE
)
104 } // end of namespace ::sd
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */