Update ooo320-m1
[ooovba.git] / sd / source / ui / toolpanel / controls / RecentMasterPagesSelector.hxx
blobf62cf0cf2a15d8d1413013c37e9b3ffc9c3fb033
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: RecentMasterPagesSelector.hxx,v $
10 * $Revision: 1.9 $
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_RECENT_MASTER_PAGES_SELECTOR_HXX
32 #define SD_TOOLPANEL_CONTROLS_RECENT_MASTER_PAGES_SELECTOR_HXX
34 #include "MasterPagesSelector.hxx"
36 namespace sd { namespace toolpanel { namespace controls {
39 /** Show the recently used master pages (that are not currently used).
41 class RecentMasterPagesSelector
42 : public MasterPagesSelector
44 public:
45 RecentMasterPagesSelector (
46 TreeNode* pParent,
47 SdDrawDocument& rDocument,
48 ViewShellBase& rBase,
49 const ::boost::shared_ptr<MasterPageContainer>& rpContainer);
50 virtual ~RecentMasterPagesSelector (void);
52 virtual void LateInit (void);
54 virtual void GetState (SfxItemSet& rItemSet);
56 protected:
57 DECL_LINK(MasterPageListListener, void*);
58 virtual void Fill (ItemList& rItemList);
60 using sd::toolpanel::controls::MasterPagesSelector::Fill;
62 /** Forward this call to the base class but save and restore the
63 currently selected item.
64 Assign the given master page to the list of pages.
65 @param pMasterPage
66 This master page will usually be a member of the list of all
67 available master pages as provided by the MasterPageContainer.
68 @param rPageList
69 The pages to which to assign the master page. These pages may
70 be slides or master pages themselves.
72 virtual void AssignMasterPageToPageList (
73 SdPage* pMasterPage,
74 const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList);
77 } } } // end of namespace ::sd::toolpanel::controls
79 #endif