1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 SD_SIDEBAR_PANELS_CURRENT_MASTER_PAGES_SELECTOR_HXX
21 #define SD_SIDEBAR_PANELS_CURRENT_MASTER_PAGES_SELECTOR_HXX
23 #include "MasterPagesSelector.hxx"
24 #include <com/sun/star/lang/XComponent.hpp>
27 namespace css
= ::com::sun::star
;
28 namespace cssu
= ::com::sun::star::uno
;
31 namespace sd
{ namespace tools
{ class EventMultiplexerEvent
; } }
34 namespace sd
{ namespace sidebar
{
37 /** Show the master pages currently used by a SdDrawDocument.
39 class CurrentMasterPagesSelector
40 : public MasterPagesSelector
,
44 static MasterPagesSelector
* Create (
46 ViewShellBase
& rViewShellBase
,
47 const cssu::Reference
<css::ui::XSidebar
>& rxSidebar
);
49 /** Set the selection so that the master page is selected that is
50 used by the currently selected page of the document in the
53 virtual void UpdateSelection (void);
55 /** Copy all master pages that are to be shown into the given list.
57 virtual void Fill (ItemList
& rItemList
);
59 using MasterPagesSelector::Fill
;
62 virtual ResId
GetContextMenuResId (void) const;
64 virtual void ProcessPopupMenu (Menu
& rMenu
);
65 virtual void ExecuteCommand (const sal_Int32 nCommandId
);
68 cssu::Reference
<css::lang::XComponent
> mxListener
;
70 CurrentMasterPagesSelector (
72 SdDrawDocument
& rDocument
,
74 const ::boost::shared_ptr
<MasterPageContainer
>& rpContainer
,
75 const cssu::Reference
<css::ui::XSidebar
>& rxSidebar
);
76 virtual ~CurrentMasterPagesSelector (void);
78 virtual void LateInit (void);
80 DECL_LINK(EventMultiplexerListener
,sd::tools::EventMultiplexerEvent
*);
81 void NotifyHint (SfxBroadcaster
&, const SfxHint
& rHint
);
84 } } // end of namespace sd::sidebar
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */