merge the formfield patch from ooo-build
[ooovba.git] / sd / source / ui / toolpanel / controls / CurrentMasterPagesSelector.hxx
bloba756f642e7770b8e32fbb1cbe498d224c6b614bd
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: CurrentMasterPagesSelector.hxx,v $
10 * $Revision: 1.8 $
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 #ifndef SD_TOOLPANEL_CONTROLS_CURRENT_MASTER_PAGES_SELECTOR_HXX
32 #define SD_TOOLPANEL_CONTROLS_CURRENT_MASTER_PAGES_SELECTOR_HXX
34 #include "MasterPagesSelector.hxx"
35 #include <com/sun/star/lang/XComponent.hpp>
37 namespace sd { namespace tools { class EventMultiplexerEvent; } }
40 namespace sd { namespace toolpanel { namespace controls {
43 /** Show the master pages currently used by a SdDrawDocument.
45 class CurrentMasterPagesSelector
46 : public MasterPagesSelector,
47 public SfxListener
49 public:
50 CurrentMasterPagesSelector (
51 TreeNode* pParent,
52 SdDrawDocument& rDocument,
53 ViewShellBase& rBase,
54 const ::boost::shared_ptr<MasterPageContainer>& rpContainer);
55 virtual ~CurrentMasterPagesSelector (void);
57 virtual void LateInit (void);
59 /** Set the selection so that the master page is selected that is
60 used by the currently selected page of the document in the
61 center pane.
63 virtual void UpdateSelection (void);
65 /** Copy all master pages that are to be shown into the given list.
67 virtual void Fill (ItemList& rItemList);
69 using sd::toolpanel::controls::MasterPagesSelector::Fill;
71 protected:
72 virtual ResId GetContextMenuResId (void) const;
73 virtual void Execute (SfxRequest& rRequest);
74 virtual void GetState (SfxItemSet& rItemSet);
76 private:
77 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>
78 mxListener;
80 DECL_LINK(EventMultiplexerListener,sd::tools::EventMultiplexerEvent*);
81 void Notify (SfxBroadcaster&, const SfxHint& rHint);
84 } } } // end of namespace ::sd::toolpanel::controls
86 #endif