fdo#33914 do not play sound in presenter console

This commit is contained in:
David Tardon
2012-04-04 14:21:25 +02:00
parent 6ab4fac5a5
commit a4b8a1c9f5
2 changed files with 20 additions and 13 deletions

View File

@@ -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: */

View File

@@ -282,6 +282,8 @@ private:
*/
void ThrowIfDisposed (void)
throw (css::lang::DisposedException);
void impl_addAndConfigureView();
};
} } // end of namespace ::sd::presenter