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 /comphelper | |
parent | 7d47700972d267fe7c5270c5dadd45a523a2baec (diff) |
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/container/IndexedPropertyValuesContainer.cxx | 4 | ||||
-rw-r--r-- | comphelper/source/container/embeddedobjectcontainer.cxx | 4 |
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 ) ); |