summaryrefslogtreecommitdiff
path: root/comphelper
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 /comphelper
parent7d47700972d267fe7c5270c5dadd45a523a2baec (diff)
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/container/IndexedPropertyValuesContainer.cxx4
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx4
2 files changed, 2 insertions, 6 deletions
diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
index 914629a6271f..824756e7ec36 100644
--- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
@@ -189,9 +189,7 @@ css::uno::Any SAL_CALL IndexedPropertyValuesContainer::getByIndex( sal_Int32 nIn
if (!((nIndex < nSize) && (nIndex >= 0)))
throw lang::IndexOutOfBoundsException();
- uno::Any aAny;
- aAny <<= maProperties[nIndex];
- return aAny;
+ return uno::Any( maProperties[nIndex] );
}
// XElementAccess
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 1204d3c9c8df..169f37516bcb 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -1198,9 +1198,7 @@ bool EmbeddedObjectContainer::InsertGraphicStream( const css::uno::Reference < c
xPropSet->setPropertyValue("UseCommonStoragePasswordEncryption",
uno::makeAny( true ) );
- uno::Any aAny;
- aAny <<= rMediaType;
- xPropSet->setPropertyValue("MediaType", aAny );
+ xPropSet->setPropertyValue("MediaType", uno::Any(rMediaType) );
xPropSet->setPropertyValue("Compressed",
uno::makeAny( true ) );