summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-04-04 14:21:25 +0200
committerPetr Mladek <pmladek@suse.cz>2012-04-17 11:00:15 +0200
commitbadc3a329d5b6819e3e15ed7faf77c0e2861b076 (patch)
tree63a9910a8d97950c4d3070d03f6f22daff3f84de /sdext
parentc16c9fe5b9caa5792d930ec2f3339108d50cd2e1 (diff)
fdo#33914 do not play sound in presenter console
Signed-off-by: Petr Mladek <pmladek@suse.cz>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/presenter/PresenterSlideShowView.cxx30
-rw-r--r--sdext/source/presenter/PresenterSlideShowView.hxx2
2 files changed, 19 insertions, 13 deletions
diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx
index 689a11984601..994999d67bcb 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 bb91fb5e136c..7bb4fc5a9ea0 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