diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-03 08:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-04 12:39:40 +0200 |
commit | 58a32075ca4f457f570af75aef368dd6c389aca7 (patch) | |
tree | e437dcbdeb248b4316cb8a9281d1543419853f6d /sd/source | |
parent | 7d47700972d267fe7c5270c5dadd45a523a2baec (diff) |
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/EffectMigration.cxx | 20 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptexanimations.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/xml/sdxmlwrp.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/framework/factories/ViewShellWrapper.cxx | 5 |
5 files changed, 10 insertions, 27 deletions
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx index 7b1ab2efce31..83ca865b6f80 100644 --- a/sd/source/core/EffectMigration.cxx +++ b/sd/source/core/EffectMigration.cxx @@ -1304,14 +1304,12 @@ void EffectMigration::SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj ) void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, SdrObject& rCandidate, bool bVisible, bool bOnClick, double fDuration) { Reference< XMultiServiceFactory > xMsf(::comphelper::getProcessServiceFactory()); - Any aAny; // create par container node Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW); // set begin - aAny <<= (double)(0.0); - xOuterSeqTimeContainer->setBegin(aAny); + xOuterSeqTimeContainer->setBegin(Any((double)0.0)); // set fill xOuterSeqTimeContainer->setFill(AnimationFill::HOLD); @@ -1329,12 +1327,10 @@ void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, S Reference< XAnimationNode > xAnimateSetForLast(xMsf->createInstance("com.sun.star.animations.AnimateSet"), UNO_QUERY_THROW); // set begin - aAny <<= (double)(0.0); - xAnimateSetForLast->setBegin(aAny); + xAnimateSetForLast->setBegin(Any((double)0.0)); // set duration - aAny <<= fDuration; - xAnimateSetForLast->setDuration(aAny); + xAnimateSetForLast->setDuration(Any(fDuration)); // set fill xAnimateSetForLast->setFill(AnimationFill::HOLD); @@ -1342,15 +1338,13 @@ void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, S // set target Reference< XAnimate > xAnimate(xAnimateSetForLast, UNO_QUERY); Reference< XShape > xTargetShape(rCandidate.getUnoShape(), UNO_QUERY); - aAny <<= xTargetShape; - xAnimate->setTarget(aAny); + xAnimate->setTarget(Any(xTargetShape)); // set AttributeName xAnimate->setAttributeName("Visibility"); // set attribute value - aAny <<= bVisible; - xAnimate->setTo(aAny); + xAnimate->setTo(Any(bVisible)); // ad set node to par node Reference< XTimeContainer > xParentContainer(xOuterSeqTimeContainer, UNO_QUERY_THROW); @@ -1391,11 +1385,9 @@ void EffectMigration::CreateAnimatedGroup(SdrObjGroup& rGroupObj, SdPage& rPage) // create main node Reference< XMultiServiceFactory > xMsf(::comphelper::getProcessServiceFactory()); Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW); - Any aAny; // set begin - aAny <<= (double)(0.0); - xOuterSeqTimeContainer->setBegin(aAny); + xOuterSeqTimeContainer->setBegin(Any((double)(0.0))); // prepare parent container Reference< XTimeContainer > xParentContainer(xOuterSeqTimeContainer, UNO_QUERY_THROW); diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index 45dff69dc894..4c18cc23171e 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -1155,9 +1155,7 @@ bool AnimationExporter::exportAnimProperty( SvStream& rStrm, const sal_uInt16 nP { if ( eTranslateMode & TRANSLATE_NUMBER_TO_STRING ) { - Any aAny; OUString aNumber( OUString::number( fVal ) ); - aAny <<= aNumber; exportAnimPropertyString( rStrm, nPropertyId, aNumber, eTranslateMode ); } else diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 7483757f8130..89aa12f6b0b2 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -975,9 +975,7 @@ bool SdXMLFilter::Export() if( !xDocOut.is() || !xProps.is() ) return false; - uno::Any aAny; - aAny <<= OUString( "text/xml"); - xProps->setPropertyValue( "MediaType" , aAny); + xProps->setPropertyValue( "MediaType", Any(OUString( "text/xml"))); // encrypt all streams xProps->setPropertyValue( "UseCommonStoragePasswordEncryption", diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index 0af20497d857..1731248eef7e 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -730,8 +730,7 @@ void if( xShapes->getCount() ) { - aAny <<= xShapes; - xSel->select( aAny ); + xSel->select( Any(xShapes) ); } } } @@ -776,8 +775,7 @@ void else if( bFound && !bSelect ) xShapes->remove( xShape ); - aAny <<= xShapes; - xSel->select( aAny ); + xSel->select( Any(xShapes) ); } } } diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx index 3004c917f451..1c4be5b1eb60 100644 --- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx +++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx @@ -92,11 +92,8 @@ uno::Any SAL_CALL ViewShellWrapper::queryInterface( const uno::Type & rType ) th if( mpSlideSorterViewShell && rType == cppu::UnoType<view::XSelectionSupplier>::get() ) { - uno::Any aAny; uno::Reference<view::XSelectionSupplier> xSupplier( this ); - aAny <<= xSupplier; - - return aAny; + return Any(xSupplier); } else return ViewShellWrapperInterfaceBase::queryInterface( rType ); |