diff options
-rw-r--r-- | sdext/source/presenter/PresenterSlideShowView.cxx | 31 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSlideShowView.hxx | 2 |
2 files changed, 20 insertions, 13 deletions
diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx index 0bd0a56fcc36..b1dad0911ed5 100644 --- a/sdext/source/presenter/PresenterSlideShowView.cxx +++ b/sdext/source/presenter/PresenterSlideShowView.cxx @@ -165,17 +165,7 @@ void PresenterSlideShowView::LateInit (void) // Add the new slide show view to the slide show. if (mxSlideShow.is() && ! mbIsViewAdded) { - Reference<presentation::XSlideShowView> xView (this); - mxSlideShow->addView(xView); - // Prevent embeded sounds being played twice at the same time by - // disabling sound for the new slide show view. - beans::PropertyValue aProperty; - aProperty.Name = A2S("IsSoundEnabled"); - Sequence<Any> aValues (2); - aValues[0] <<= xView; - aValues[1] <<= sal_False; - aProperty.Value <<= aValues; - mxSlideShow->setProperty(aProperty); + impl_addAndConfigureView(); mbIsViewAdded = true; } @@ -690,7 +680,7 @@ void PresenterSlideShowView::ActivatePresenterView (void) { if (mxSlideShow.is() && ! mbIsViewAdded) { - mxSlideShow->addView(this); + impl_addAndConfigureView(); mbIsViewAdded = true; } } @@ -958,7 +948,7 @@ void PresenterSlideShowView::ForceRepaint (void) if (mxSlideShow.is() && mbIsViewAdded) { mxSlideShow->removeView(this); - mxSlideShow->addView(this); + impl_addAndConfigureView(); } } @@ -1020,6 +1010,21 @@ void PresenterSlideShowView::ThrowIfDisposed (void) } } +void PresenterSlideShowView::impl_addAndConfigureView() +{ + Reference<presentation::XSlideShowView> xView (this); + mxSlideShow->addView(xView); + // Prevent embeded sounds being played twice at the same time by + // disabling sound for the new slide show view. + beans::PropertyValue aProperty; + aProperty.Name = A2S("IsSoundEnabled"); + Sequence<Any> aValues (2); + aValues[0] <<= xView; + aValues[1] <<= sal_False; + aProperty.Value <<= aValues; + mxSlideShow->setProperty(aProperty); +} + } } // end of namespace ::sd::presenter /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSlideShowView.hxx b/sdext/source/presenter/PresenterSlideShowView.hxx index 8a1b03497b77..c0816271c1b6 100644 --- a/sdext/source/presenter/PresenterSlideShowView.hxx +++ b/sdext/source/presenter/PresenterSlideShowView.hxx @@ -282,6 +282,8 @@ private: */ void ThrowIfDisposed (void) throw (css::lang::DisposedException); + + void impl_addAndConfigureView(); }; } } // end of namespace ::sd::presenter |