1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AllMasterPagesSelector.hxx,v $
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_ALL_MASTER_PAGES_SELECTOR_HXX
32 #define SD_TOOLPANEL_CONTROLS_ALL_MASTER_PAGES_SELECTOR_HXX
34 #include "MasterPagesSelector.hxx"
38 namespace sd
{ namespace toolpanel
{ namespace controls
{
41 /** Show a list of all available master pages so that the user can assign
44 class AllMasterPagesSelector
45 : public MasterPagesSelector
48 AllMasterPagesSelector (
50 SdDrawDocument
& rDocument
,
52 DrawViewShell
& rViewShell
,
53 const ::boost::shared_ptr
<MasterPageContainer
>& rpContainer
);
54 virtual ~AllMasterPagesSelector (void);
56 /** Scan the set of templates for the ones whose first master pages are
57 shown by this control and store them in the MasterPageContainer.
59 virtual void Fill (ItemList
& rItemList
);
61 virtual void GetState (SfxItemSet
& rItemSet
);
64 virtual void NotifyContainerChangeEvent (const MasterPageContainerChangeEvent
& rEvent
);
67 DrawViewShell
& mrViewShell
;
69 /** The list of master pages displayed by this class.
71 class SortedMasterPageDescriptorList
;
72 ::std::auto_ptr
<SortedMasterPageDescriptorList
> mpSortedMasterPages
;
74 void AddTemplate (const TemplateEntry
& rEntry
);
76 /** This filter returns <TRUE/> when the master page specified by the
77 given file name belongs to the set of Impress master pages.
79 bool FileFilter (const String
& sFileName
);
81 void AddItem (MasterPageContainer::Token aToken
);
83 /** Add all items in the internal master page list into the given list.
85 void UpdatePageSet (ItemList
& rItemList
);
87 /** Update the internal list of master pages that are to show in the
90 void UpdateMasterPageList (void);
92 using sd::toolpanel::controls::MasterPagesSelector::Fill
;
95 } } } // end of namespace ::sd::toolpanel::controls