summaryrefslogtreecommitdiff
path: root/canvas/source/tools/parametricpolypolygon.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-28 16:12:28 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-29 06:50:51 +0200
commit1a58461bfa3e980f3113a8a16c09cddda0606e7b (patch)
tree7be7c682771b48cc9e49ae914cbcdacf60f454de /canvas/source/tools/parametricpolypolygon.cxx
parentf6aef99057c08490af49aec0fd5f2601a83c4e76 (diff)
Prepare for removal of non-const operator[] from Sequence in canvas
Change-Id: Ifb96e496b0994b5fc66975b7aea0a60bcb4a3a03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124345 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'canvas/source/tools/parametricpolypolygon.cxx')
-rw-r--r--canvas/source/tools/parametricpolypolygon.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx
index c75d84348690..331b4e47535b 100644
--- a/canvas/source/tools/parametricpolypolygon.cxx
+++ b/canvas/source/tools/parametricpolypolygon.cxx
@@ -44,18 +44,14 @@ namespace canvas
std::u16string_view rServiceName,
const uno::Sequence< uno::Any >& rArgs )
{
- uno::Sequence< uno::Sequence< double > > colorSequence(2);
- uno::Sequence< double > colorStops(2);
double fAspectRatio=1.0;
// defaults
- uno::Sequence< rendering::RGBColor > rgbColors(1);
- rgbColors[0] = rendering::RGBColor(0,0,0);
- colorSequence[0] = rDevice->getDeviceColorSpace()->convertFromRGB(rgbColors);
- rgbColors[0] = rendering::RGBColor(1,1,1);
- colorSequence[1] = rDevice->getDeviceColorSpace()->convertFromRGB(rgbColors);
- colorStops[0] = 0;
- colorStops[1] = 1;
+ uno::Sequence< uno::Sequence< double > > colorSequence{
+ rDevice->getDeviceColorSpace()->convertFromRGB({ rendering::RGBColor(0,0,0) }),
+ rDevice->getDeviceColorSpace()->convertFromRGB({ rendering::RGBColor(1,1,1) })
+ };
+ uno::Sequence< double > colorStops{ 0, 1 };
// extract args
for( const uno::Any& rArg : rArgs )