summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/XMLImageMapContext.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerNoel Grandin <noel@peralex.com>2016-05-04 12:39:40 +0200
commit58a32075ca4f457f570af75aef368dd6c389aca7 (patch)
treee437dcbdeb248b4316cb8a9281d1543419853f6d /xmloff/source/draw/XMLImageMapContext.cxx
parent7d47700972d267fe7c5270c5dadd45a523a2baec (diff)
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'xmloff/source/draw/XMLImageMapContext.cxx')
-rw-r--r--xmloff/source/draw/XMLImageMapContext.cxx21
1 files changed, 5 insertions, 16 deletions
diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx
index 8f361dcd26f2..a502abadaf3d 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -220,9 +220,7 @@ void XMLImageMapObjectContext::EndElement()
Prepare( xMapEntry );
// insert into image map
- Any aAny;
- aAny <<= xMapEntry;
- xImageMap->insertByIndex( xImageMap->getCount(), aAny );
+ xImageMap->insertByIndex( xImageMap->getCount(), Any(xMapEntry) );
}
// else: not valid -> don't create and insert
}
@@ -392,9 +390,7 @@ void XMLImageMapRectangleContext::ProcessAttribute(
void XMLImageMapRectangleContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
- Any aAny;
- aAny <<= aRectangle;
- rPropertySet->setPropertyValue( sBoundary, aAny );
+ rPropertySet->setPropertyValue( sBoundary, uno::Any(aRectangle) );
// common properties handled by super class
XMLImageMapObjectContext::Prepare(rPropertySet);
@@ -480,11 +476,8 @@ void XMLImageMapPolygonContext::Prepare(Reference<XPropertySet> & rPropertySet)
if(aPolygon.count())
{
css::drawing::PointSequence aPointSequence;
- uno::Any aAny;
-
basegfx::tools::B2DPolygonToUnoPointSequence(aPolygon, aPointSequence);
- aAny <<= aPointSequence;
- rPropertySet->setPropertyValue(sPolygon, aAny);
+ rPropertySet->setPropertyValue(sPolygon, Any(aPointSequence));
}
}
@@ -581,13 +574,9 @@ void XMLImageMapCircleContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
// center (x,y)
- Any aAny;
- aAny <<= aCenter;
- rPropertySet->setPropertyValue( sCenter, aAny );
-
+ rPropertySet->setPropertyValue( sCenter, uno::Any(aCenter) );
// radius
- aAny <<= nRadius;
- rPropertySet->setPropertyValue( sRadius, aAny );
+ rPropertySet->setPropertyValue( sRadius, uno::Any(nRadius) );
// common properties handled by super class
XMLImageMapObjectContext::Prepare(rPropertySet);