diff options
Diffstat (limited to 'sd/source/ui/slideshow')
-rw-r--r-- | sd/source/ui/slideshow/SlideShowRestarter.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshow.cxx | 20 |
2 files changed, 18 insertions, 5 deletions
diff --git a/sd/source/ui/slideshow/SlideShowRestarter.cxx b/sd/source/ui/slideshow/SlideShowRestarter.cxx index 822e8bee6db3..63fae1125082 100644 --- a/sd/source/ui/slideshow/SlideShowRestarter.cxx +++ b/sd/source/ui/slideshow/SlideShowRestarter.cxx @@ -83,7 +83,10 @@ IMPL_LINK_NOARG(SlideShowRestarter, EndPresentation) { if (mnDisplayCount != (sal_Int32)Application::GetScreenCount()) { + bool bIsExitAfterPresenting = mpSlideShow->IsExitAfterPresenting(); + mpSlideShow->SetExitAfterPresenting(false); mpSlideShow->end(); + mpSlideShow->SetExitAfterPresenting(bIsExitAfterPresenting); // The following piece of code should not be here because the // slide show should be aware of the existence of the presenter diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 594aaa2a7be9..279bd8b45445 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -147,16 +147,12 @@ SlideShow::SlideShow( SdDrawDocument* pDoc ) { } - - -void SlideShow::ThrowIfDisposed() throw (RuntimeException) +void SlideShow::ThrowIfDisposed() const throw (RuntimeException) { if( mpDoc == 0 ) throw DisposedException(); } - - /// used by the model to create a slideshow for it rtl::Reference< SlideShow > SlideShow::Create( SdDrawDocument* pDoc ) { @@ -679,6 +675,20 @@ WorkWindow *SlideShow::GetWorkWindow() return dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame().GetWindow().GetParent()); } +bool SlideShow::IsExitAfterPresenting() const +{ + SolarMutexGuard aGuard; + ThrowIfDisposed(); + return mpDoc->IsExitAfterPresenting(); +} + +void SlideShow::SetExitAfterPresenting(bool bExit) +{ + SolarMutexGuard aGuard; + ThrowIfDisposed(); + mpDoc->SetExitAfterPresenting(bExit); +} + void SAL_CALL SlideShow::end() throw (RuntimeException, std::exception) { |