[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sdext/source

Petr Mladek pmladek at kemper.freedesktop.org
Tue Apr 17 02:00:24 PDT 2012


 sdext/source/presenter/PresenterSlideShowView.cxx |   30 ++++++++++++----------
 sdext/source/presenter/PresenterSlideShowView.hxx |    2 +
 2 files changed, 19 insertions(+), 13 deletions(-)

New commits:
commit badc3a329d5b6819e3e15ed7faf77c0e2861b076
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Apr 4 14:21:25 2012 +0200

    fdo#33914 do not play sound in presenter console
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx
index 689a119..994999d 100644
--- a/sdext/source/presenter/PresenterSlideShowView.cxx
+++ b/sdext/source/presenter/PresenterSlideShowView.cxx
@@ -168,17 +168,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;
     }
 
@@ -791,7 +781,7 @@ void PresenterSlideShowView::ActivatePresenterView (void)
 {
     if (mxSlideShow.is() && ! mbIsViewAdded)
     {
-        mxSlideShow->addView(this);
+        impl_addAndConfigureView();
         mbIsViewAdded = true;
     }
 }
@@ -1083,7 +1073,7 @@ void PresenterSlideShowView::ForceRepaint (void)
     if (mxSlideShow.is() && mbIsViewAdded)
     {
         mxSlideShow->removeView(this);
-        mxSlideShow->addView(this);
+        impl_addAndConfigureView();
     }
 }
 
@@ -1151,6 +1141,20 @@ 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
 
diff --git a/sdext/source/presenter/PresenterSlideShowView.hxx b/sdext/source/presenter/PresenterSlideShowView.hxx
index bb91fb5..7bb4fc5 100644
--- a/sdext/source/presenter/PresenterSlideShowView.hxx
+++ b/sdext/source/presenter/PresenterSlideShowView.hxx
@@ -291,6 +291,8 @@ private:
     */
     void ThrowIfDisposed (void)
         throw (css::lang::DisposedException);
+
+    void impl_addAndConfigureView();
 };
 
 } } // end of namespace ::sd::presenter


More information about the Libreoffice-commits mailing list