diff options
Diffstat (limited to 'sd/source/ui/slidesorter/controller')
4 files changed, 8 insertions, 29 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx index ca8144484356..6c026415b04f 100644 --- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx @@ -94,16 +94,12 @@ void CurrentSlideManager::ReleaseCurrentSlide() mnCurrentSlideIndex = -1; } -bool CurrentSlideManager::IsCurrentSlideIsValid() -{ - return mnCurrentSlideIndex >= 0 && mnCurrentSlideIndex<mrSlideSorter.GetModel().GetPageCount(); -} - void CurrentSlideManager::AcquireCurrentSlide (const sal_Int32 nSlideIndex) { mnCurrentSlideIndex = nSlideIndex; - if (IsCurrentSlideIsValid()) + // if current slide valid + if (mnCurrentSlideIndex >= 0 && mnCurrentSlideIndex<mrSlideSorter.GetModel().GetPageCount()) { // Get a descriptor for the XDrawPage reference. Note that the // given XDrawPage may or may not be member of the slide sorter diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx index 5203b879407a..cbcd84241338 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.cxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx @@ -445,7 +445,11 @@ void SAL_CALL Listener::propertyChange ( const PropertyChangeEvent& rEvent) throw (RuntimeException, std::exception) { - ThrowIfDisposed(); + if (rBHelper.bDisposed || rBHelper.bInDispose) + { + throw lang::DisposedException ("SlideSorterController object has already been disposed", + static_cast<uno::XWeak*>(this)); + } static const char sCurrentPagePropertyName[] = "CurrentPage"; static const char sEditModePropertyName[] = "IsMasterPageMode"; @@ -624,16 +628,6 @@ void Listener::HandleShapeModification (const SdrPage* pPage) } } -void Listener::ThrowIfDisposed() - throw (css::lang::DisposedException) -{ - if (rBHelper.bDisposed || rBHelper.bInDispose) - { - throw lang::DisposedException ("SlideSorterController object has already been disposed", - static_cast<uno::XWeak*>(this)); - } -} - } } } // end of namespace ::sd::slidesorter::controller /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/controller/SlsListener.hxx b/sd/source/ui/slidesorter/controller/SlsListener.hxx index c57b6336a79a..429ff75162d4 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.hxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.hxx @@ -170,12 +170,6 @@ private: */ void HandleShapeModification (const SdrPage* pPage); - /** This method throws a DisposedException when the object has already been - disposed. - */ - void ThrowIfDisposed() - throw (css::lang::DisposedException); - DECL_LINK(EventMultiplexerCallback, tools::EventMultiplexerEvent&, void); }; diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 9232980b9695..26336fb033a9 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -132,7 +132,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest) case SID_PRESENTATION: case SID_PRESENTATION_CURRENT_SLIDE: case SID_REHEARSE_TIMINGS: - ShowSlideShow (rRequest); + slideshowhelp::ShowSlideShow(rRequest, *mrSlideSorter.GetModel().GetDocument()); pShell->Cancel(); rRequest.Done(); break; @@ -856,11 +856,6 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet) } } -void SlotManager::ShowSlideShow( SfxRequest& rReq) -{ - slideshowhelp::ShowSlideShow(rReq, *mrSlideSorter.GetModel().GetDocument()); -} - void SlotManager::RenameSlide() { View* pDrView = &mrSlideSorter.GetView(); |