diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-28 13:55:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-29 08:57:08 +0200 |
commit | 7cdbde4867b14ae382262dc394ba83e609a8eecf (patch) | |
tree | 5fa180d35a8423a7857b0d57355f74a6d26b5bec /sd | |
parent | ab20a5888d3a7f964ef2fb3afe2477825da6037e (diff) |
Initialize Sequence<beans::NamedValue> from initializer_lists
Change-Id: I216dcbd983dcf3df79df9fda371b93114540a9d8
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/CustomAnimationEffect.cxx | 15 | ||||
-rw-r--r-- | sd/source/core/sdpage_animations.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 5 |
3 files changed, 10 insertions, 15 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 87df6e03b15e..d8092bb6a502 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -3002,9 +3002,8 @@ MainSequence::MainSequence() { if( mxTimingRootNode.is() ) { - Sequence< ::com::sun::star::beans::NamedValue > aUserData( 1 ); - aUserData[0].Name = "node-type"; - aUserData[0].Value <<= ::com::sun::star::presentation::EffectNodeType::MAIN_SEQUENCE; + Sequence< ::com::sun::star::beans::NamedValue > aUserData + { { "node-type", css::uno::makeAny(css::presentation::EffectNodeType::MAIN_SEQUENCE) } }; mxTimingRootNode->setUserData( aUserData ); } init(); @@ -3090,9 +3089,8 @@ void MainSequence::createMainSequence() { mxSequenceRoot = SequenceTimeContainer::create( ::comphelper::getProcessComponentContext() ); - uno::Sequence< ::com::sun::star::beans::NamedValue > aUserData( 1 ); - aUserData[0].Name = "node-type"; - aUserData[0].Value <<= ::com::sun::star::presentation::EffectNodeType::MAIN_SEQUENCE; + uno::Sequence< ::com::sun::star::beans::NamedValue > aUserData + { { "node-type", css::uno::makeAny(css::presentation::EffectNodeType::MAIN_SEQUENCE) } }; mxSequenceRoot->setUserData( aUserData ); // empty sequence until now, set duration to 0.0 @@ -3149,9 +3147,8 @@ InteractiveSequencePtr MainSequence::createInteractiveSequence( const ::com::sun // create a new interactive sequence container Reference< XTimeContainer > xISRoot = SequenceTimeContainer::create( ::comphelper::getProcessComponentContext() ); - uno::Sequence< ::com::sun::star::beans::NamedValue > aUserData( 1 ); - aUserData[0].Name = "node-type"; - aUserData[0].Value <<= ::com::sun::star::presentation::EffectNodeType::INTERACTIVE_SEQUENCE ; + uno::Sequence< ::com::sun::star::beans::NamedValue > aUserData + { { "node-type", css::uno::makeAny(css::presentation::EffectNodeType::INTERACTIVE_SEQUENCE) } }; xISRoot->setUserData( aUserData ); Reference< XChild > xChild( mxSequenceRoot, UNO_QUERY_THROW ); diff --git a/sd/source/core/sdpage_animations.cxx b/sd/source/core/sdpage_animations.cxx index 6b7aa967ae00..55ff97fad84f 100644 --- a/sd/source/core/sdpage_animations.cxx +++ b/sd/source/core/sdpage_animations.cxx @@ -54,9 +54,8 @@ Reference< XAnimationNode > SdPage::getAnimationNode() throw (RuntimeException) if( !mxAnimationNode.is() ) { mxAnimationNode.set( ParallelTimeContainer::create( ::comphelper::getProcessComponentContext() ), UNO_QUERY_THROW ); - Sequence< ::com::sun::star::beans::NamedValue > aUserData( 1 ); - aUserData[0].Name = "node-type"; - aUserData[0].Value <<= ::com::sun::star::presentation::EffectNodeType::TIMING_ROOT; + Sequence< ::com::sun::star::beans::NamedValue > aUserData + { { "node-type", css::uno::makeAny(css::presentation::EffectNodeType::TIMING_ROOT) } }; mxAnimationNode->setUserData( aUserData ); } diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 35abbbc28fdd..8797c2e08913 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -2202,9 +2202,8 @@ void CustomAnimationPane::onPreview( bool bForcePreview ) void CustomAnimationPane::preview( const Reference< XAnimationNode >& xAnimationNode ) { Reference< XParallelTimeContainer > xRoot = ParallelTimeContainer::create( ::comphelper::getProcessComponentContext() ); - Sequence< ::com::sun::star::beans::NamedValue > aUserData( 1 ); - aUserData[0].Name = "node-type"; - aUserData[0].Value <<= ::com::sun::star::presentation::EffectNodeType::TIMING_ROOT; + Sequence< ::com::sun::star::beans::NamedValue > aUserData + { { "node-type", css::uno::makeAny(css::presentation::EffectNodeType::TIMING_ROOT) } }; xRoot->setUserData( aUserData ); xRoot->appendChild( xAnimationNode ); |