xref: /AOO41X/main/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx (revision 79aad27f7f29270c03e208e3d687e8e3850af11d)
1*5b190011SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*5b190011SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*5b190011SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*5b190011SAndrew Rist  * distributed with this work for additional information
6*5b190011SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*5b190011SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*5b190011SAndrew Rist  * "License"); you may not use this file except in compliance
9*5b190011SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*5b190011SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*5b190011SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*5b190011SAndrew Rist  * software distributed under the License is distributed on an
15*5b190011SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*5b190011SAndrew Rist  * KIND, either express or implied.  See the License for the
17*5b190011SAndrew Rist  * specific language governing permissions and limitations
18*5b190011SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*5b190011SAndrew Rist  *************************************************************/
21*5b190011SAndrew Rist 
22*5b190011SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #include "precompiled_sd.hxx"
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "controller/SlsSelectionManager.hxx"
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include "SlideSorter.hxx"
29cdf0e10cSrcweir #include "SlsCommand.hxx"
30cdf0e10cSrcweir #include "controller/SlideSorterController.hxx"
31cdf0e10cSrcweir #include "controller/SlsAnimator.hxx"
32cdf0e10cSrcweir #include "controller/SlsAnimationFunction.hxx"
33cdf0e10cSrcweir #include "controller/SlsCurrentSlideManager.hxx"
34cdf0e10cSrcweir #include "controller/SlsFocusManager.hxx"
35cdf0e10cSrcweir #include "controller/SlsPageSelector.hxx"
36cdf0e10cSrcweir #include "controller/SlsProperties.hxx"
37cdf0e10cSrcweir #include "controller/SlsScrollBarManager.hxx"
38cdf0e10cSrcweir #include "controller/SlsSlotManager.hxx"
39cdf0e10cSrcweir #include "controller/SlsSelectionObserver.hxx"
40cdf0e10cSrcweir #include "model/SlideSorterModel.hxx"
41cdf0e10cSrcweir #include "model/SlsPageEnumerationProvider.hxx"
42cdf0e10cSrcweir #include "model/SlsPageDescriptor.hxx"
43cdf0e10cSrcweir #include "view/SlideSorterView.hxx"
44cdf0e10cSrcweir #include "view/SlsLayouter.hxx"
45cdf0e10cSrcweir #include "drawdoc.hxx"
46cdf0e10cSrcweir #include "Window.hxx"
47cdf0e10cSrcweir #include <svx/svxids.hrc>
48cdf0e10cSrcweir #include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
49cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
50cdf0e10cSrcweir 
51cdf0e10cSrcweir #include "res_bmp.hrc"
52cdf0e10cSrcweir #include "sdresid.hxx"
53cdf0e10cSrcweir #include "strings.hrc"
54cdf0e10cSrcweir #include "app.hrc"
55cdf0e10cSrcweir #include "glob.hrc"
56cdf0e10cSrcweir 
57cdf0e10cSrcweir 
58cdf0e10cSrcweir using namespace ::com::sun::star;
59cdf0e10cSrcweir using namespace ::com::sun::star::drawing;
60cdf0e10cSrcweir using namespace ::com::sun::star::uno;
61cdf0e10cSrcweir using namespace ::sd::slidesorter::model;
62cdf0e10cSrcweir using namespace ::sd::slidesorter::view;
63cdf0e10cSrcweir using namespace ::sd::slidesorter::controller;
64cdf0e10cSrcweir 
65cdf0e10cSrcweir namespace sd { namespace slidesorter { namespace controller {
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 
68cdf0e10cSrcweir class SelectionManager::PageInsertionListener
69cdf0e10cSrcweir     : public SfxListener
70cdf0e10cSrcweir {
71cdf0e10cSrcweir public:
72cdf0e10cSrcweir 
73cdf0e10cSrcweir };
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 
SelectionManager(SlideSorter & rSlideSorter)76cdf0e10cSrcweir SelectionManager::SelectionManager (SlideSorter& rSlideSorter)
77cdf0e10cSrcweir     : mrSlideSorter(rSlideSorter),
78cdf0e10cSrcweir       mrController(rSlideSorter.GetController()),
79cdf0e10cSrcweir       maSelectionBeforeSwitch(),
80cdf0e10cSrcweir       mbIsMakeSelectionVisiblePending(true),
81cdf0e10cSrcweir       mnInsertionPosition(-1),
82cdf0e10cSrcweir       mnAnimationId(Animator::NotAnAnimationId),
83cdf0e10cSrcweir       maRequestedTopLeft(),
84cdf0e10cSrcweir       mpPageInsertionListener(),
85cdf0e10cSrcweir       mpSelectionObserver(new SelectionObserver(rSlideSorter))
86cdf0e10cSrcweir {
87cdf0e10cSrcweir }
88cdf0e10cSrcweir 
89cdf0e10cSrcweir 
90cdf0e10cSrcweir 
91cdf0e10cSrcweir 
~SelectionManager(void)92cdf0e10cSrcweir SelectionManager::~SelectionManager (void)
93cdf0e10cSrcweir {
94cdf0e10cSrcweir     if (mnAnimationId != Animator::NotAnAnimationId)
95cdf0e10cSrcweir         mrController.GetAnimator()->RemoveAnimation(mnAnimationId);
96cdf0e10cSrcweir }
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 
99cdf0e10cSrcweir 
100cdf0e10cSrcweir 
DeleteSelectedPages(const bool bSelectFollowingPage)101cdf0e10cSrcweir void SelectionManager::DeleteSelectedPages (const bool bSelectFollowingPage)
102cdf0e10cSrcweir {
103cdf0e10cSrcweir     // Create some locks to prevent updates of the model, view, selection
104cdf0e10cSrcweir     // state while modifying any of them.
105cdf0e10cSrcweir     SlideSorterController::ModelChangeLock aLock (mrController);
106cdf0e10cSrcweir     SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
107cdf0e10cSrcweir     PageSelector::UpdateLock aSelectionLock (mrSlideSorter);
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     // Hide focus.
110cdf0e10cSrcweir     bool bIsFocusShowing = mrController.GetFocusManager().IsFocusShowing();
111cdf0e10cSrcweir     if (bIsFocusShowing)
112cdf0e10cSrcweir         mrController.GetFocusManager().ToggleFocus();
113cdf0e10cSrcweir 
114cdf0e10cSrcweir     // Store pointers to all selected page descriptors.  This is necessary
115cdf0e10cSrcweir     // because the pages get deselected when the first one is deleted.
116cdf0e10cSrcweir     model::PageEnumeration aPageEnumeration (
117cdf0e10cSrcweir         PageEnumerationProvider::CreateSelectedPagesEnumeration(mrSlideSorter.GetModel()));
118cdf0e10cSrcweir     ::std::vector<SdPage*> aSelectedPages;
119cdf0e10cSrcweir     sal_Int32 nNewCurrentSlide (-1);
120cdf0e10cSrcweir     while (aPageEnumeration.HasMoreElements())
121cdf0e10cSrcweir     {
122cdf0e10cSrcweir         SharedPageDescriptor pDescriptor (aPageEnumeration.GetNextElement());
123cdf0e10cSrcweir         aSelectedPages.push_back(pDescriptor->GetPage());
124cdf0e10cSrcweir         if (bSelectFollowingPage || nNewCurrentSlide<0)
125cdf0e10cSrcweir             nNewCurrentSlide = pDescriptor->GetPageIndex();
126cdf0e10cSrcweir     }
127cdf0e10cSrcweir     if (aSelectedPages.empty())
128cdf0e10cSrcweir         return;
129cdf0e10cSrcweir 
130cdf0e10cSrcweir     // Determine the slide to select (and thereby make the current slide)
131cdf0e10cSrcweir     // after the deletion.
132cdf0e10cSrcweir     if (bSelectFollowingPage)
133cdf0e10cSrcweir         nNewCurrentSlide -= aSelectedPages.size() - 1;
134cdf0e10cSrcweir     else
135cdf0e10cSrcweir         --nNewCurrentSlide;
136cdf0e10cSrcweir 
137cdf0e10cSrcweir     // The actual deletion of the selected pages is done in one of two
138cdf0e10cSrcweir     // helper functions.  They are specialized for normal respectively for
139cdf0e10cSrcweir     // master pages.
140cdf0e10cSrcweir     mrSlideSorter.GetView().BegUndo (SdResId(STR_UNDO_DELETEPAGES));
141cdf0e10cSrcweir     if (mrSlideSorter.GetModel().GetEditMode() == EM_PAGE)
142cdf0e10cSrcweir         DeleteSelectedNormalPages(aSelectedPages);
143cdf0e10cSrcweir     else
144cdf0e10cSrcweir         DeleteSelectedMasterPages(aSelectedPages);
145cdf0e10cSrcweir     mrSlideSorter.GetView().EndUndo ();
146cdf0e10cSrcweir 
147cdf0e10cSrcweir     mrController.HandleModelChange();
148cdf0e10cSrcweir     aLock.Release();
149cdf0e10cSrcweir 
150cdf0e10cSrcweir     // Show focus and move it to next valid location.
151cdf0e10cSrcweir     if (bIsFocusShowing)
152cdf0e10cSrcweir         mrController.GetFocusManager().ToggleFocus();
153cdf0e10cSrcweir 
154cdf0e10cSrcweir     // Set the new current slide.
155cdf0e10cSrcweir     if (nNewCurrentSlide < 0)
156cdf0e10cSrcweir         nNewCurrentSlide = 0;
157cdf0e10cSrcweir     else if (nNewCurrentSlide >= mrSlideSorter.GetModel().GetPageCount())
158cdf0e10cSrcweir         nNewCurrentSlide = mrSlideSorter.GetModel().GetPageCount()-1;
159cdf0e10cSrcweir     mrController.GetPageSelector().CountSelectedPages();
160cdf0e10cSrcweir     mrController.GetPageSelector().SelectPage(nNewCurrentSlide);
161cdf0e10cSrcweir     mrController.GetFocusManager().SetFocusedPage(nNewCurrentSlide);
162cdf0e10cSrcweir }
163cdf0e10cSrcweir 
164cdf0e10cSrcweir 
165cdf0e10cSrcweir 
166cdf0e10cSrcweir 
DeleteSelectedNormalPages(const::std::vector<SdPage * > & rSelectedPages)167cdf0e10cSrcweir void SelectionManager::DeleteSelectedNormalPages (const ::std::vector<SdPage*>& rSelectedPages)
168cdf0e10cSrcweir {
169cdf0e10cSrcweir     // Prepare the deletion via the UNO API.
170cdf0e10cSrcweir 	OSL_ASSERT(mrSlideSorter.GetModel().GetEditMode() == EM_PAGE);
171cdf0e10cSrcweir 
172cdf0e10cSrcweir 	try
173cdf0e10cSrcweir 	{
174cdf0e10cSrcweir 	    Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier( mrSlideSorter.GetModel().GetDocument()->getUnoModel(), UNO_QUERY_THROW );
175cdf0e10cSrcweir 	    Reference<drawing::XDrawPages> xPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
176cdf0e10cSrcweir 
177cdf0e10cSrcweir 		// Iterate over all pages that where seleted when this method was called
178cdf0e10cSrcweir 		// and delete the draw page the notes page.  The iteration is done in
179cdf0e10cSrcweir 		// reverse order so that when one slide is not deleted (to avoid an
180cdf0e10cSrcweir 		// empty document) the remaining slide is the first one.
181cdf0e10cSrcweir 		::std::vector<SdPage*>::const_reverse_iterator aI;
182cdf0e10cSrcweir 		for (aI=rSelectedPages.rbegin(); aI!=rSelectedPages.rend(); aI++)
183cdf0e10cSrcweir 		{
184cdf0e10cSrcweir 			// Do not delete the last slide in the document.
185cdf0e10cSrcweir 			if (xPages->getCount() <= 1)
186cdf0e10cSrcweir 				break;
187cdf0e10cSrcweir 
188cdf0e10cSrcweir 			const sal_uInt16 nPage (model::FromCoreIndex((*aI)->GetPageNum()));
189cdf0e10cSrcweir 
190cdf0e10cSrcweir 			Reference< XDrawPage > xPage( xPages->getByIndex( nPage ), UNO_QUERY_THROW );
191cdf0e10cSrcweir 			xPages->remove(xPage);
192cdf0e10cSrcweir 		}
193cdf0e10cSrcweir 	}
194cdf0e10cSrcweir 	catch( Exception& )
195cdf0e10cSrcweir 	{
196cdf0e10cSrcweir 		DBG_ERROR("SelectionManager::DeleteSelectedNormalPages(), exception caught!");
197cdf0e10cSrcweir 	}
198cdf0e10cSrcweir }
199cdf0e10cSrcweir 
200cdf0e10cSrcweir 
201cdf0e10cSrcweir 
202cdf0e10cSrcweir 
DeleteSelectedMasterPages(const::std::vector<SdPage * > & rSelectedPages)203cdf0e10cSrcweir void SelectionManager::DeleteSelectedMasterPages (const ::std::vector<SdPage*>& rSelectedPages)
204cdf0e10cSrcweir {
205cdf0e10cSrcweir     // Prepare the deletion via the UNO API.
206cdf0e10cSrcweir     OSL_ASSERT(mrSlideSorter.GetModel().GetEditMode() == EM_MASTERPAGE);
207cdf0e10cSrcweir 
208cdf0e10cSrcweir 	try
209cdf0e10cSrcweir 	{
210cdf0e10cSrcweir 	    Reference<drawing::XMasterPagesSupplier> xDrawPagesSupplier( mrSlideSorter.GetModel().GetDocument()->getUnoModel(), UNO_QUERY_THROW );
211cdf0e10cSrcweir 	    Reference<drawing::XDrawPages> xPages( xDrawPagesSupplier->getMasterPages(), UNO_QUERY_THROW );
212cdf0e10cSrcweir 
213cdf0e10cSrcweir 		// Iterate over all pages that where seleted when this method was called
214cdf0e10cSrcweir 		// and delete the draw page the notes page.  The iteration is done in
215cdf0e10cSrcweir 		// reverse order so that when one slide is not deleted (to avoid an
216cdf0e10cSrcweir 		// empty document) the remaining slide is the first one.
217cdf0e10cSrcweir 		::std::vector<SdPage*>::const_reverse_iterator aI;
218cdf0e10cSrcweir 		for (aI=rSelectedPages.rbegin(); aI!=rSelectedPages.rend(); aI++)
219cdf0e10cSrcweir 		{
220cdf0e10cSrcweir 			// Do not delete the last slide in the document.
221cdf0e10cSrcweir 			if (xPages->getCount() <= 1)
222cdf0e10cSrcweir 				break;
223cdf0e10cSrcweir 
224cdf0e10cSrcweir 			const sal_uInt16 nPage (model::FromCoreIndex((*aI)->GetPageNum()));
225cdf0e10cSrcweir 
226cdf0e10cSrcweir 			Reference< XDrawPage > xPage( xPages->getByIndex( nPage ), UNO_QUERY_THROW );
227cdf0e10cSrcweir 			xPages->remove(xPage);
228cdf0e10cSrcweir 		}
229cdf0e10cSrcweir 	}
230cdf0e10cSrcweir 	catch( Exception& )
231cdf0e10cSrcweir 	{
232cdf0e10cSrcweir 		DBG_ERROR("SelectionManager::DeleteSelectedMasterPages(), exception caught!");
233cdf0e10cSrcweir 	}
234cdf0e10cSrcweir }
235cdf0e10cSrcweir 
236cdf0e10cSrcweir 
237cdf0e10cSrcweir 
238cdf0e10cSrcweir 
SelectionHasChanged(const bool bMakeSelectionVisible)239cdf0e10cSrcweir void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible)
240cdf0e10cSrcweir {
241cdf0e10cSrcweir     if (bMakeSelectionVisible)
242cdf0e10cSrcweir         mbIsMakeSelectionVisiblePending = true;
243cdf0e10cSrcweir 
244cdf0e10cSrcweir     ViewShell* pViewShell = mrSlideSorter.GetViewShell();
245cdf0e10cSrcweir     if (pViewShell != NULL)
246cdf0e10cSrcweir     {
247cdf0e10cSrcweir         pViewShell->Invalidate (SID_EXPAND_PAGE);
248cdf0e10cSrcweir         pViewShell->Invalidate (SID_SUMMARY_PAGE);
249cdf0e10cSrcweir         pViewShell->Invalidate(SID_SHOW_SLIDE);
250cdf0e10cSrcweir         pViewShell->Invalidate(SID_HIDE_SLIDE);
251cdf0e10cSrcweir         pViewShell->Invalidate(SID_DELETE_PAGE);
252cdf0e10cSrcweir         pViewShell->Invalidate(SID_DELETE_MASTER_PAGE);
253cdf0e10cSrcweir 		pViewShell->Invalidate(SID_ASSIGN_LAYOUT);
254cdf0e10cSrcweir 
255cdf0e10cSrcweir         // StatusBar
256cdf0e10cSrcweir         pViewShell->Invalidate (SID_STATUS_PAGE);
257cdf0e10cSrcweir         pViewShell->Invalidate (SID_STATUS_LAYOUT);
258cdf0e10cSrcweir 
259cdf0e10cSrcweir         OSL_ASSERT(mrController.GetCurrentSlideManager());
260cdf0e10cSrcweir         SharedPageDescriptor pDescriptor(mrController.GetCurrentSlideManager()->GetCurrentSlide());
261cdf0e10cSrcweir         if (pDescriptor.get() != NULL)
262cdf0e10cSrcweir             pViewShell->UpdatePreview(pDescriptor->GetPage());
263cdf0e10cSrcweir 
264cdf0e10cSrcweir         // Tell the slection change listeners that the selection has changed.
265cdf0e10cSrcweir         ::std::vector<Link>::iterator iListener (maSelectionChangeListeners.begin());
266cdf0e10cSrcweir         ::std::vector<Link>::iterator iEnd (maSelectionChangeListeners.end());
267cdf0e10cSrcweir         for (; iListener!=iEnd; ++iListener)
268cdf0e10cSrcweir         {
269cdf0e10cSrcweir             iListener->Call(NULL);
270cdf0e10cSrcweir         }
271cdf0e10cSrcweir 
272cdf0e10cSrcweir         // Reset the insertion position: until set again it is calculated from
273cdf0e10cSrcweir         // the current selection.
274cdf0e10cSrcweir         mnInsertionPosition = -1;
275cdf0e10cSrcweir     }
276cdf0e10cSrcweir }
277cdf0e10cSrcweir 
278cdf0e10cSrcweir 
279cdf0e10cSrcweir 
280cdf0e10cSrcweir 
AddSelectionChangeListener(const Link & rListener)281cdf0e10cSrcweir void SelectionManager::AddSelectionChangeListener (const Link& rListener)
282cdf0e10cSrcweir {
283cdf0e10cSrcweir     if (::std::find (
284cdf0e10cSrcweir         maSelectionChangeListeners.begin(),
285cdf0e10cSrcweir         maSelectionChangeListeners.end(),
286cdf0e10cSrcweir         rListener) == maSelectionChangeListeners.end())
287cdf0e10cSrcweir     {
288cdf0e10cSrcweir         maSelectionChangeListeners.push_back (rListener);
289cdf0e10cSrcweir     }
290cdf0e10cSrcweir }
291cdf0e10cSrcweir 
292cdf0e10cSrcweir 
293cdf0e10cSrcweir 
294cdf0e10cSrcweir 
RemoveSelectionChangeListener(const Link & rListener)295cdf0e10cSrcweir void SelectionManager::RemoveSelectionChangeListener(const Link&rListener)
296cdf0e10cSrcweir {
297cdf0e10cSrcweir     maSelectionChangeListeners.erase (
298cdf0e10cSrcweir         ::std::find (
299cdf0e10cSrcweir             maSelectionChangeListeners.begin(),
300cdf0e10cSrcweir             maSelectionChangeListeners.end(),
301cdf0e10cSrcweir             rListener));
302cdf0e10cSrcweir }
303cdf0e10cSrcweir 
304cdf0e10cSrcweir 
305cdf0e10cSrcweir 
306cdf0e10cSrcweir 
GetInsertionPosition(void) const307cdf0e10cSrcweir sal_Int32 SelectionManager::GetInsertionPosition (void) const
308cdf0e10cSrcweir {
309cdf0e10cSrcweir     sal_Int32 nInsertionPosition (mnInsertionPosition);
310cdf0e10cSrcweir     if (nInsertionPosition < 0)
311cdf0e10cSrcweir     {
312cdf0e10cSrcweir         model::PageEnumeration aSelectedPages
313cdf0e10cSrcweir             (model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
314cdf0e10cSrcweir                 mrSlideSorter.GetModel()));
315cdf0e10cSrcweir         // Initialize (for the case of an empty selection) with the position
316cdf0e10cSrcweir         // at the end of the document.
317cdf0e10cSrcweir         nInsertionPosition = mrSlideSorter.GetModel().GetPageCount();
318cdf0e10cSrcweir         while (aSelectedPages.HasMoreElements())
319cdf0e10cSrcweir         {
320cdf0e10cSrcweir             const sal_Int32 nPosition (aSelectedPages.GetNextElement()->GetPage()->GetPageNum());
321cdf0e10cSrcweir             // Convert *2+1 index to straight index (n-1)/2 after the page
322cdf0e10cSrcweir             // (+1).
323cdf0e10cSrcweir             nInsertionPosition = model::FromCoreIndex(nPosition) + 1;
324cdf0e10cSrcweir         }
325cdf0e10cSrcweir 
326cdf0e10cSrcweir     }
327cdf0e10cSrcweir     return nInsertionPosition;
328cdf0e10cSrcweir }
329cdf0e10cSrcweir 
330cdf0e10cSrcweir 
331cdf0e10cSrcweir 
332cdf0e10cSrcweir 
SetInsertionPosition(const sal_Int32 nInsertionPosition)333cdf0e10cSrcweir void SelectionManager::SetInsertionPosition (const sal_Int32 nInsertionPosition)
334cdf0e10cSrcweir {
335cdf0e10cSrcweir     if (nInsertionPosition < 0)
336cdf0e10cSrcweir         mnInsertionPosition = -1;
337cdf0e10cSrcweir     else if (nInsertionPosition > mrSlideSorter.GetModel().GetPageCount())
338cdf0e10cSrcweir     {
339cdf0e10cSrcweir         // Assert but then ignore invalid values.
340cdf0e10cSrcweir         OSL_ASSERT(nInsertionPosition<=mrSlideSorter.GetModel().GetPageCount());
341cdf0e10cSrcweir         return;
342cdf0e10cSrcweir     }
343cdf0e10cSrcweir     else
344cdf0e10cSrcweir         mnInsertionPosition = nInsertionPosition;
345cdf0e10cSrcweir }
346cdf0e10cSrcweir 
347cdf0e10cSrcweir 
348cdf0e10cSrcweir 
349cdf0e10cSrcweir 
GetSelectionObserver(void) const350cdf0e10cSrcweir ::boost::shared_ptr<SelectionObserver> SelectionManager::GetSelectionObserver (void) const
351cdf0e10cSrcweir {
352cdf0e10cSrcweir     return mpSelectionObserver;
353cdf0e10cSrcweir }
354cdf0e10cSrcweir 
355cdf0e10cSrcweir } } } // end of namespace ::sd::slidesorter
356