diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-29 10:28:28 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-01 07:11:36 +0100 |
commit | 8cb57be792e6991c38cf5d4434569dc118dd0ed4 (patch) | |
tree | 46f394a22466fb7281d9c48f6d7fbed8a1a448a6 /xmloff/source/draw/shapeexport.cxx | |
parent | 34d0dd41e1e7bb69d6c4f817b39da26bcd33831f (diff) |
Prepare for removal of non-const operator[] from Sequence in xmloff
Change-Id: I7ea7964f76f0a5db678510ac3533003726dc49fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124416
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmloff/source/draw/shapeexport.cxx')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index ae5dbf041d1e..d47ea15b2758 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -81,6 +81,7 @@ #include <comphelper/classids.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/propertyvalue.hxx> #include <comphelper/storagehelper.hxx> #include <officecfg/Office/Common.hxx> @@ -232,13 +233,11 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement if ( !aEngine.isEmpty() ) { - uno::Sequence< uno::Any > aArgument( 1 ); - uno::Sequence< beans::PropertyValue > aPropValues( 2 ); - aPropValues[ 0 ].Name = "CustomShape"; - aPropValues[ 0 ].Value <<= xShape; - aPropValues[ 1 ].Name = "ForceGroupWithText"; - aPropValues[ 1 ].Value <<= true; - aArgument[ 0 ] <<= aPropValues; + uno::Sequence< beans::PropertyValue > aPropValues{ + comphelper::makePropertyValue("CustomShape", xShape), + comphelper::makePropertyValue("ForceGroupWithText", true) + }; + uno::Sequence< uno::Any > aArgument = { uno::Any(aPropValues) }; uno::Reference< uno::XInterface > xInterface( xContext->getServiceManager()->createInstanceWithArgumentsAndContext(aEngine, aArgument, xContext) ); if ( xInterface.is() ) @@ -4994,11 +4993,10 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape } uno::Reference< graphic::XGraphicProvider > xProvider( graphic::GraphicProvider::create(xContext) ); - uno::Sequence< beans::PropertyValue > aArgs( 2 ); - aArgs[ 0 ].Name = "MimeType"; - aArgs[ 0 ].Value <<= OUString( "image/x-vclgraphic" ); - aArgs[ 1 ].Name = "OutputStream"; - aArgs[ 1 ].Value <<= xPictureStream->getOutputStream(); + uno::Sequence< beans::PropertyValue > aArgs{ + comphelper::makePropertyValue("MimeType", OUString( "image/x-vclgraphic" )), + comphelper::makePropertyValue("OutputStream", xPictureStream->getOutputStream()) + }; xProvider->storeGraphic( xGraphic, aArgs ); if( xPictureStorage.is() ) |