masterfix: #i10000# resolve merge problems
[LibreOffice.git] / sd / source / ui / dlg / PaneDockingWindow.cxx
blobc1dedd5d8293594de37c57aef16ad8404d78a922
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_sd.hxx"
31 #include "PaneDockingWindow.hxx"
32 #include "Window.hxx"
33 #include "ViewShellBase.hxx"
34 #include "sdresid.hxx"
35 #include "res_bmp.hrc"
36 #include <sfx2/dispatch.hxx>
37 #include <vcl/toolbox.hxx>
38 #include <vcl/taskpanelist.hxx>
39 #include "framework/FrameworkHelper.hxx"
41 using namespace ::com::sun::star;
42 using namespace ::com::sun::star::uno;
43 using namespace ::com::sun::star::drawing::framework;
44 using ::sfx2::TitledDockingWindow;
46 namespace sd {
48 PaneDockingWindow::PaneDockingWindow(
49 SfxBindings *_pBindings, SfxChildWindow *pChildWindow, ::Window* pParent,
50 const ResId& rResId, const ::rtl::OUString& rsTitle )
51 :TitledDockingWindow( _pBindings, pChildWindow, pParent, rResId )
53 SetTitle( rsTitle );
56 PaneDockingWindow::~PaneDockingWindow (void)
60 void PaneDockingWindow::StateChanged( StateChangedType nType )
62 switch (nType)
64 case STATE_CHANGE_VISIBLE:
65 // The visibility of the docking window has changed. Tell the
66 // ConfigurationController so that it can activate or deactivate
67 // a/the view for the pane.
68 // Without this the side panes remain empty after closing an
69 // in-place slide show.
70 ViewShellBase* pBase = ViewShellBase::GetViewShellBase(
71 GetBindings().GetDispatcher()->GetFrame());
72 if (pBase != NULL)
74 framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration();
76 break;
78 SfxDockingWindow::StateChanged (nType);
81 } // end of namespace ::sd