bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / dlg / PaneChildWindows.cxx
blobd4d4bab39d5dec5003e14ace36015eee76343c16
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
24 #include <app.hrc>
25 #include <strings.hrc>
26 #include <sdresid.hxx>
28 #include <sfx2/dockwin.hxx>
29 #include <sfx2/bindings.hxx>
30 #include <sfx2/dispatch.hxx>
32 namespace sd {
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,
41 sal_uInt16 nId,
42 SfxBindings* pBindings,
43 SfxChildWinInfo* pInfo,
44 const char* pTitleBarResId)
45 : SfxChildWindow (pParentWindow, nId)
47 SetWindow( VclPtr<PaneDockingWindow>::Create(
48 pBindings,
49 this,
50 pParentWindow,
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());
57 if (pBase != nullptr)
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());
70 if (pBase != nullptr)
71 framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration();
74 //===== LeftPaneImpressChildWindow ============================================
75 LeftPaneImpressChildWindow::LeftPaneImpressChildWindow (
76 vcl::Window* pParentWindow,
77 sal_uInt16 nId,
78 SfxBindings* pBindings,
79 SfxChildWinInfo* pInfo)
80 : PaneChildWindow(
81 pParentWindow,
82 nId,
83 pBindings,
84 pInfo,
85 STR_LEFT_PANE_IMPRESS_TITLE)
89 //===== LeftPaneDrawChildWindow ===============================================
90 LeftPaneDrawChildWindow::LeftPaneDrawChildWindow (
91 vcl::Window* pParentWindow,
92 sal_uInt16 nId,
93 SfxBindings* pBindings,
94 SfxChildWinInfo* pInfo)
95 : PaneChildWindow(
96 pParentWindow,
97 nId,
98 pBindings,
99 pInfo,
100 STR_LEFT_PANE_DRAW_TITLE)
104 } // end of namespace ::sd
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */