summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-04-04 14:21:25 +0200
committerDavid Tardon <dtardon@redhat.com>2012-04-04 14:23:05 +0200
commita4b8a1c9f50bca3b557efca75100d9532a404ec6 (patch)
treeeb607bce86e2bcccff67fb1d9c0b9d50d05431aa /sdext
parent6ab4fac5a518fe7405936b753011dfd8c413bb62 (diff)
fdo#33914 do not play sound in presenter console
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/presenter/PresenterSlideShowView.cxx31
-rw-r--r--sdext/source/presenter/PresenterSlideShowView.hxx2
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