CWS-TOOLING: integrate CWS os150
[LibreOffice.git] / sd / source / ui / toolpanel / controls / RecentMasterPagesSelector.hxx
blobadac66187b718c4d88ad2bfbbfdb7cc9292df462
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_RECENT_MASTER_PAGES_SELECTOR_HXX
29 #define SD_TOOLPANEL_CONTROLS_RECENT_MASTER_PAGES_SELECTOR_HXX
31 #include "MasterPagesSelector.hxx"
33 namespace sd { namespace toolpanel { namespace controls {
36 /** Show the recently used master pages (that are not currently used).
38 class RecentMasterPagesSelector
39 : public MasterPagesSelector
41 public:
42 RecentMasterPagesSelector (
43 TreeNode* pParent,
44 SdDrawDocument& rDocument,
45 ViewShellBase& rBase,
46 const ::boost::shared_ptr<MasterPageContainer>& rpContainer);
47 virtual ~RecentMasterPagesSelector (void);
49 virtual void LateInit (void);
51 virtual void GetState (SfxItemSet& rItemSet);
53 protected:
54 DECL_LINK(MasterPageListListener, void*);
55 virtual void Fill (ItemList& rItemList);
57 using sd::toolpanel::controls::MasterPagesSelector::Fill;
59 /** Forward this call to the base class but save and restore the
60 currently selected item.
61 Assign the given master page to the list of pages.
62 @param pMasterPage
63 This master page will usually be a member of the list of all
64 available master pages as provided by the MasterPageContainer.
65 @param rPageList
66 The pages to which to assign the master page. These pages may
67 be slides or master pages themselves.
69 virtual void AssignMasterPageToPageList (
70 SdPage* pMasterPage,
71 const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList);
74 } } } // end of namespace ::sd::toolpanel::controls
76 #endif