diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 09:34:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 12:03:17 +0200 |
commit | f74da1315a5b2ec232a66944e41ff90231b383be (patch) | |
tree | 60d464c45df3531013642d61cbc8302ac815a1ae /cppcanvas | |
parent | 04a6a5d5cdc6889c6f0e41b3df537f59baeee9f9 (diff) |
use more comphelper::InitAnyPropertySequence
Found with:
git grep -n -A10 'Sequence.*Any' -- *.cxx | grep -B5 -w PropertyValueProvider
and:
git grep -n 'Sequence.*Any.*( *&'
Change-Id: Icb18c98bdd3f8352817e443ff78de5df042859ad
Reviewed-on: https://gerrit.libreoffice.org/40389
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfplus.cxx | 19 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 19 |
2 files changed, 14 insertions, 24 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 3550e3ace05f..f55dea3af038 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -42,6 +42,7 @@ #include <com/sun/star/rendering/PanoseWeight.hpp> #include <com/sun/star/rendering/TexturingMode.hpp> #include <com/sun/star/rendering/XCanvas.hpp> +#include <comphelper/propertysequence.hxx> #include <bitmapaction.hxx> #include <implrenderer.hxx> @@ -510,18 +511,12 @@ namespace cppcanvas rParms.mrCanvas->getUNOCanvas()->getDevice()->getParametricPolyPolygonFactory() ); if( xFactory.is() ) { - uno::Sequence<uno::Any> args( 3 ); - beans::PropertyValue aProp; - aProp.Name = "Colors"; - aProp.Value <<= aColors; - args[0] <<= aProp; - aProp.Name = "Stops"; - aProp.Value <<= aStops; - args[1] <<= aProp; - aProp.Name = "AspectRatio"; - aProp.Value <<= static_cast<sal_Int32>(1); - args[2] <<= aProp; - + uno::Sequence<uno::Any> args(comphelper::InitAnyPropertySequence( + { + {"Colors", uno::Any(aColors)}, + {"Stops", uno::Any(aStops)}, + {"AspectRatio", uno::Any(static_cast<sal_Int32>(1))}, + })); aTexture.Gradient.set( xFactory->createInstanceWithArguments( aGradientService, args ), diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index a72629edc8b7..2a2f75c9f7d0 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -21,6 +21,7 @@ #include <vcl/svapp.hxx> #include <comphelper/sequence.hxx> #include <comphelper/anytostring.hxx> +#include <comphelper/propertysequence.hxx> #include <cppuhelper/exc_hlp.hxx> #include <cppcanvas/canvas.hxx> #include <com/sun/star/rendering/XGraphicDevice.hpp> @@ -681,18 +682,12 @@ namespace cppcanvas ::basegfx::unotools::affineMatrixFromHomMatrix( aTexture.AffineTransform, aGradInfo.getTextureTransform() ); - uno::Sequence<uno::Any> args(3); - beans::PropertyValue aProp; - aProp.Name = "Colors"; - aProp.Value <<= aColors; - args[0] <<= aProp; - aProp.Name = "Stops"; - aProp.Value <<= aStops; - args[1] <<= aProp; - aProp.Name = "AspectRatio"; - aProp.Value <<= aGradInfo.getAspectRatio(); - args[2] <<= aProp; - + uno::Sequence<uno::Any> args(comphelper::InitAnyPropertySequence( + { + {"Colors", uno::Any(aColors)}, + {"Stops", uno::Any(aStops)}, + {"AspectRatio", uno::Any(aGradInfo.getAspectRatio())}, + })); aTexture.Gradient.set( xFactory->createInstanceWithArguments(aGradientService, args), |