bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / sidebar / RecentMasterPagesSelector.hxx
blob2a74f1447ada99efc89e22cb778436e6da39b790
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SD_SOURCE_UI_SIDEBAR_RECENTMASTERPAGESSELECTOR_HXX
21 #define INCLUDED_SD_SOURCE_UI_SIDEBAR_RECENTMASTERPAGESSELECTOR_HXX
23 #include "MasterPagesSelector.hxx"
25 namespace sd { namespace sidebar {
27 /** Show the recently used master pages (that are not currently used).
29 class RecentMasterPagesSelector
30 : public MasterPagesSelector
32 friend class VclPtrInstance<RecentMasterPagesSelector>;
33 public:
34 static VclPtr<vcl::Window> Create (
35 vcl::Window* pParent,
36 ViewShellBase& rViewShellBase,
37 const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
39 protected:
40 DECL_LINK(MasterPageListListener, void*);
41 virtual void Fill (ItemList& rItemList) SAL_OVERRIDE;
43 using sd::sidebar::MasterPagesSelector::Fill;
45 /** Forward this call to the base class but save and restore the
46 currently selected item.
47 Assign the given master page to the list of pages.
48 @param pMasterPage
49 This master page will usually be a member of the list of all
50 available master pages as provided by the MasterPageContainer.
51 @param rPageList
52 The pages to which to assign the master page. These pages may
53 be slides or master pages themselves.
55 virtual void AssignMasterPageToPageList (
56 SdPage* pMasterPage,
57 const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList) SAL_OVERRIDE;
59 virtual void ProcessPopupMenu (Menu& rMenu) SAL_OVERRIDE;
61 private:
62 RecentMasterPagesSelector (
63 vcl::Window* pParent,
64 SdDrawDocument& rDocument,
65 ViewShellBase& rBase,
66 const ::boost::shared_ptr<MasterPageContainer>& rpContainer,
67 const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
68 virtual ~RecentMasterPagesSelector();
69 virtual void dispose() SAL_OVERRIDE;
71 virtual void LateInit() SAL_OVERRIDE;
74 } } // end of namespace sd::sidebar
76 #endif
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */