1*02c50d82SAndre Fischer /************************************************************** 2*02c50d82SAndre Fischer * 3*02c50d82SAndre Fischer * Licensed to the Apache Software Foundation (ASF) under one 4*02c50d82SAndre Fischer * or more contributor license agreements. See the NOTICE file 5*02c50d82SAndre Fischer * distributed with this work for additional information 6*02c50d82SAndre Fischer * regarding copyright ownership. The ASF licenses this file 7*02c50d82SAndre Fischer * to you under the Apache License, Version 2.0 (the 8*02c50d82SAndre Fischer * "License"); you may not use this file except in compliance 9*02c50d82SAndre Fischer * with the License. You may obtain a copy of the License at 10*02c50d82SAndre Fischer * 11*02c50d82SAndre Fischer * http://www.apache.org/licenses/LICENSE-2.0 12*02c50d82SAndre Fischer * 13*02c50d82SAndre Fischer * Unless required by applicable law or agreed to in writing, 14*02c50d82SAndre Fischer * software distributed under the License is distributed on an 15*02c50d82SAndre Fischer * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*02c50d82SAndre Fischer * KIND, either express or implied. See the License for the 17*02c50d82SAndre Fischer * specific language governing permissions and limitations 18*02c50d82SAndre Fischer * under the License. 19*02c50d82SAndre Fischer * 20*02c50d82SAndre Fischer *************************************************************/ 21*02c50d82SAndre Fischer 22*02c50d82SAndre Fischer 23*02c50d82SAndre Fischer 24*02c50d82SAndre Fischer #ifndef SD_SIDEBAR_PANELS_RECENT_MASTER_PAGES_SELECTOR_HXX 25*02c50d82SAndre Fischer #define SD_SIDEBAR_PANELS_RECENT_MASTER_PAGES_SELECTOR_HXX 26*02c50d82SAndre Fischer 27*02c50d82SAndre Fischer #include "MasterPagesSelector.hxx" 28*02c50d82SAndre Fischer 29*02c50d82SAndre Fischer namespace sd { namespace sidebar { 30*02c50d82SAndre Fischer 31*02c50d82SAndre Fischer 32*02c50d82SAndre Fischer /** Show the recently used master pages (that are not currently used). 33*02c50d82SAndre Fischer */ 34*02c50d82SAndre Fischer class RecentMasterPagesSelector 35*02c50d82SAndre Fischer : public MasterPagesSelector 36*02c50d82SAndre Fischer { 37*02c50d82SAndre Fischer public: 38*02c50d82SAndre Fischer static MasterPagesSelector* Create ( 39*02c50d82SAndre Fischer ::Window* pParent, 40*02c50d82SAndre Fischer ViewShellBase& rViewShellBase, 41*02c50d82SAndre Fischer const cssu::Reference<css::ui::XSidebar>& rxSidebar); 42*02c50d82SAndre Fischer 43*02c50d82SAndre Fischer protected: 44*02c50d82SAndre Fischer DECL_LINK(MasterPageListListener, void*); 45*02c50d82SAndre Fischer virtual void Fill (ItemList& rItemList); 46*02c50d82SAndre Fischer 47*02c50d82SAndre Fischer using sd::sidebar::MasterPagesSelector::Fill; 48*02c50d82SAndre Fischer 49*02c50d82SAndre Fischer /** Forward this call to the base class but save and restore the 50*02c50d82SAndre Fischer currently selected item. 51*02c50d82SAndre Fischer Assign the given master page to the list of pages. 52*02c50d82SAndre Fischer @param pMasterPage 53*02c50d82SAndre Fischer This master page will usually be a member of the list of all 54*02c50d82SAndre Fischer available master pages as provided by the MasterPageContainer. 55*02c50d82SAndre Fischer @param rPageList 56*02c50d82SAndre Fischer The pages to which to assign the master page. These pages may 57*02c50d82SAndre Fischer be slides or master pages themselves. 58*02c50d82SAndre Fischer */ 59*02c50d82SAndre Fischer virtual void AssignMasterPageToPageList ( 60*02c50d82SAndre Fischer SdPage* pMasterPage, 61*02c50d82SAndre Fischer const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList); 62*02c50d82SAndre Fischer 63*02c50d82SAndre Fischer virtual void ProcessPopupMenu (Menu& rMenu); 64*02c50d82SAndre Fischer 65*02c50d82SAndre Fischer private: 66*02c50d82SAndre Fischer RecentMasterPagesSelector ( 67*02c50d82SAndre Fischer ::Window* pParent, 68*02c50d82SAndre Fischer SdDrawDocument& rDocument, 69*02c50d82SAndre Fischer ViewShellBase& rBase, 70*02c50d82SAndre Fischer const ::boost::shared_ptr<MasterPageContainer>& rpContainer, 71*02c50d82SAndre Fischer const cssu::Reference<css::ui::XSidebar>& rxSidebar); 72*02c50d82SAndre Fischer virtual ~RecentMasterPagesSelector (void); 73*02c50d82SAndre Fischer 74*02c50d82SAndre Fischer virtual void LateInit (void); 75*02c50d82SAndre Fischer }; 76*02c50d82SAndre Fischer 77*02c50d82SAndre Fischer } } // end of namespace sd::sidebar 78*02c50d82SAndre Fischer 79*02c50d82SAndre Fischer #endif 80