summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorSwachhand Lokhande <swachhandl95@gmail.com>2015-03-07 18:58:49 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-10 10:26:59 +0000
commitb1534edf523a405b91ad04c5351735e745ceb7ee (patch)
tree936b938dab11100b532f3b9204891d162c334bef /comphelper
parentbb2728fd246716588d135c9e159135b1c5a7d3e1 (diff)
tdf#89592 Using initializer_lists to populate Sequence<PropertyValue>
Change-Id: Idef9dd55eb1719eaf592bc4a86440cbd5aa4fb32 Reviewed-on: https://gerrit.libreoffice.org/14781 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 99a968673a7e..1f3f61b3b9d6 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -40,6 +40,7 @@
#include <comphelper/storagehelper.hxx>
#include <comphelper/embeddedobjectcontainer.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/propertysequence.hxx>
#include <cppuhelper/weakref.hxx>
#include <algorithm>
#include <unordered_map>
@@ -492,11 +493,10 @@ bool EmbeddedObjectContainer::StoreEmbeddedObject(
uno::Sequence < beans::PropertyValue > aSeq;
if ( bCopy )
{
- uno::Sequence<beans::PropertyValue> aObjArgs(2);
- aObjArgs[0].Name = "SourceShellID";
- aObjArgs[0].Value <<= rSrcShellID;
- aObjArgs[1].Name = "DestinationShellID";
- aObjArgs[1].Value <<= rDestShellID;
+ auto aObjArgs(::comphelper::InitPropertySequence({
+ { "SourceShellID", uno::makeAny(rSrcShellID) },
+ { "DestinationShellID", uno::makeAny(rDestShellID) }
+ }));
xPersist->storeToEntry(pImpl->mxStorage, rName, aSeq, aObjArgs);
}
else