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 .
19 #ifndef INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_CONTROLLER_SLSSLOTMANAGER_HXX
20 #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_CONTROLLER_SLSSLOTMANAGER_HXX
22 #include "model/SlsSharedPageDescriptor.hxx"
23 #include <tools/link.hxx>
26 class AbstractSvxNameDialog
;
30 namespace sd
{ namespace slidesorter
{
34 namespace sd
{ namespace slidesorter
{ namespace controller
{
38 /** This manager takes over the work of handling slot calls from the
39 controller of the slide sorter.
44 /** Create a new slot manager that handles slot calls for the controller
47 The controller for which to handle the slot calls.
49 SlotManager (SlideSorter
& rSlideSorter
);
53 void FuTemporary (SfxRequest
& rRequest
);
54 void FuPermanent (SfxRequest
& rRequest
);
55 void FuSupport (SfxRequest
& rRequest
);
56 void GetMenuState (SfxItemSet
&rSet
);
57 void GetClipboardState (SfxItemSet
&rSet
);
58 void GetStatusBarState (SfxItemSet
& rSet
);
59 void ExecCtrl (SfxRequest
& rRequest
);
60 void GetAttrState (SfxItemSet
& rSet
);
62 /** Exclude or include one slide or all selected slides.
64 When the pointer is empty then apply the new state to all
65 selected pages. Otherwise apply the new state to just the
68 void ChangeSlideExclusionState (
69 const model::SharedPageDescriptor
& rpDescriptor
,
70 const bool bExcludeSlide
);
72 /** Call this after a change from normal mode to master mode or back.
73 The affected slots are invalidated.
75 void NotifyEditModeChange();
78 /// The controller for which we manage the slot calls.
79 SlideSorter
& mrSlideSorter
;
81 typedef ::std::queue
<Command
*> CommandQueue
;
82 CommandQueue maCommandQueue
;
84 /** Called by FuTemporary to show the slide show.
86 void ShowSlideShow (SfxRequest
& rRequest
);
88 /** The implementation is a copy of the code for SID_RENAMEPAGE in
92 DECL_LINK(RenameSlideHdl
, AbstractSvxNameDialog
*);
93 bool RenameSlideFromDrawViewShell( sal_uInt16 nPageId
, const OUString
& rName
);
95 /** Handle SID_INSERTPAGE slot calls.
97 void InsertSlide (SfxRequest
& rRequest
);
99 void DuplicateSelectedSlides (SfxRequest
& rRequest
);
101 /** Use one of several ways to determine where to insert a new page.
102 This can be the current selection or the insertion indicator.
104 sal_Int32
GetInsertionPosition();
107 } } } // end of namespace ::sd::slidesorter::controller
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */