summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:26:04 -0400
commita0e8e05008e143ee5e3bbc281d1c253c7e5ed136 (patch)
treeeaf5f70a067fd48704addd9f2b582624a2fb44ae /sd
parent9c7cae1561cfe16226b1f16dce59f08a38da3ce0 (diff)
use Any constructor instead of temporaries
(cherry picked from commit 58a32075ca4f457f570af75aef368dd6c389aca7) Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/EffectMigration.cxx20
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx2
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx4
-rw-r--r--sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx6
-rw-r--r--sd/source/ui/framework/factories/ViewShellWrapper.cxx5
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 3ca397048a8e..6b321991b858 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -1162,9 +1162,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 8848b8f1e9cd..e147a75bd1c4 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -977,9 +977,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 28c606216431..363fd897dbfd 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 079f4bbf3e7a..3e6ea09e3f3d 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -95,11 +95,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 );