summaryrefslogtreecommitdiffstats
path: root/slideshow/source/engine/slideshowimpl.cxx
diff options
context:
space:
mode:
authorAndre Fischer <af@openoffice.org>2009-03-24 13:53:29 +0000
committerAndre Fischer <af@openoffice.org>2009-03-24 13:53:29 +0000
commit3444422cc1fd774961c43d5699a15f4e4b13d6d1 (patch)
tree63cdfa6555fd2209fcd24d77ee5604e491c5c62d /slideshow/source/engine/slideshowimpl.cxx
parent#i100047# Calling updateStateIds() from createAttributeLayer(). (diff)
downloadcore-3444422cc1fd774961c43d5699a15f4e4b13d6d1.tar.gz
core-3444422cc1fd774961c43d5699a15f4e4b13d6d1.zip
#i98806# Added IsSoundEnabled property to mute sound in some slide show views.
Diffstat (limited to 'slideshow/source/engine/slideshowimpl.cxx')
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 919cd478c160..2658f2a490eb 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1451,6 +1451,34 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return (rProperty.Value >>= mbNoSlideTransitions);
}
+ if (rProperty.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsSoundEnabled")))
+ {
+ uno::Sequence<uno::Any> aValues;
+ uno::Reference<presentation::XSlideShowView> xView;
+ sal_Bool bValue;
+ if ((rProperty.Value >>= aValues)
+ && aValues.getLength()==2
+ && (aValues[0] >>= xView)
+ && (aValues[1] >>= bValue))
+ {
+ // Look up the view.
+ for (UnoViewVector::const_iterator
+ iView (maViewContainer.begin()),
+ iEnd (maViewContainer.end());
+ iView!=iEnd;
+ ++iView)
+ {
+ if (*iView && (*iView)->getUnoView()==xView)
+ {
+ // Store the flag at the view so that media shapes have
+ // access to it.
+ (*iView)->setIsSoundEnabled(bValue);
+ return true;
+ }
+ }
+ }
+ }
+
return false;
}