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 #ifndef SD_TOOLPANEL_CONTROLS_CURRENT_MASTER_PAGES_SELECTOR_HXX
29 #define SD_TOOLPANEL_CONTROLS_CURRENT_MASTER_PAGES_SELECTOR_HXX
31 #include "MasterPagesSelector.hxx"
32 #include <com/sun/star/lang/XComponent.hpp>
34 namespace sd
{ namespace tools
{ class EventMultiplexerEvent
; } }
37 namespace sd
{ namespace toolpanel
{ namespace controls
{
40 /** Show the master pages currently used by a SdDrawDocument.
42 class CurrentMasterPagesSelector
43 : public MasterPagesSelector
,
47 CurrentMasterPagesSelector (
49 SdDrawDocument
& rDocument
,
51 const ::boost::shared_ptr
<MasterPageContainer
>& rpContainer
);
52 virtual ~CurrentMasterPagesSelector (void);
54 virtual void LateInit (void);
56 /** Set the selection so that the master page is selected that is
57 used by the currently selected page of the document in the
60 virtual void UpdateSelection (void);
62 /** Copy all master pages that are to be shown into the given list.
64 virtual void Fill (ItemList
& rItemList
);
66 using sd::toolpanel::controls::MasterPagesSelector::Fill
;
69 virtual ResId
GetContextMenuResId (void) const;
70 virtual void Execute (SfxRequest
& rRequest
);
71 virtual void GetState (SfxItemSet
& rItemSet
);
74 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>
77 DECL_LINK(EventMultiplexerListener
,sd::tools::EventMultiplexerEvent
*);
78 void Notify (SfxBroadcaster
&, const SfxHint
& rHint
);
81 } } } // end of namespace ::sd::toolpanel::controls