diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-09 13:43:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-09 14:24:00 +0200 |
commit | 027b25ecd54ac97ea2471ca73e3ba89ce052fe76 (patch) | |
tree | fe8923a13998a96a865027c897273d0edb4d7c62 /oox | |
parent | f59e802478e35e7b6f561f24806bca47b604529b (diff) |
use comphelper::InitPropertySequence in more places
Change-Id: I72d7b13a23ce306b752b39187a0e9fbb7028643a
Reviewed-on: https://gerrit.libreoffice.org/38606
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/shapes.cxx | 10 | ||||
-rw-r--r-- | oox/source/vml/vmlformatting.cxx | 16 |
2 files changed, 12 insertions, 14 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 7d3090c1cd65..810391e22623 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -79,6 +79,7 @@ #include <tools/stream.hxx> #include <tools/globname.hxx> #include <comphelper/classids.hxx> +#include <comphelper/propertysequence.hxx> #include <comphelper/storagehelper.hxx> #include <sot/exchange.hxx> #include <utility> @@ -275,11 +276,10 @@ static uno::Reference<io::XInputStream> lcl_StoreOwnAsOOXML( xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.comp.MemoryStream", xContext), uno::UNO_QUERY_THROW); - uno::Sequence<beans::PropertyValue> args(2); - args[0].Name = "OutputStream"; - args[0].Value <<= xTempStream->getOutputStream(); - args[1].Name = "FilterName"; - args[1].Value <<= OUString::createFromAscii(pFilterName); + uno::Sequence<beans::PropertyValue> args( comphelper::InitPropertySequence({ + { "OutputStream", Any(xTempStream->getOutputStream()) }, + { "FilterName", Any(OUString::createFromAscii(pFilterName)) } + })); uno::Reference<frame::XStorable> xStorable(xObj->getComponent(), uno::UNO_QUERY); try { diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index cb7ea244c554..e2b4583ff7a2 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -35,6 +35,7 @@ #include <oox/token/properties.hxx> #include <oox/token/tokens.hxx> #include <svx/svdtrans.hxx> +#include <comphelper/propertysequence.hxx> namespace oox { namespace vml { @@ -864,15 +865,12 @@ TextpathModel::TextpathModel() beans::PropertyValue lcl_createTextpathProps() { - uno::Sequence<beans::PropertyValue> aTextpathPropSeq(4); - aTextpathPropSeq[0].Name = "TextPath"; - aTextpathPropSeq[0].Value <<= true; - aTextpathPropSeq[1].Name = "TextPathMode"; - aTextpathPropSeq[1].Value <<= drawing::EnhancedCustomShapeTextPathMode_SHAPE; - aTextpathPropSeq[2].Name = "ScaleX"; - aTextpathPropSeq[2].Value <<= false; - aTextpathPropSeq[3].Name = "SameLetterHeights"; - aTextpathPropSeq[3].Value <<= false; + uno::Sequence<beans::PropertyValue> aTextpathPropSeq( comphelper::InitPropertySequence({ + { "TextPath", uno::Any(true) }, + { "TextPathMode", uno::Any(drawing::EnhancedCustomShapeTextPathMode_SHAPE) }, + { "ScaleX", uno::Any(false) }, + { "SameLetterHeights", uno::Any(false) } + })); beans::PropertyValue aRet; aRet.Name = "TextPath"; |