summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-06-11 14:20:45 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-06-11 15:32:10 +0200
commit771c8282aadb45373fc6348cc70f4cd75a43a396 (patch)
tree03baec5cace657f325e0a3ee781564c4a6651651 /vcl/qa
parent430fffdd64af4ae09bbc49328c5188fc2dd4e185 (diff)
Simplify Sequences initializations (vcl)
Change-Id: Id93bde17dbc4c71ad93bc094b94408fc9e39ec98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117055 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'vcl/qa')
-rw-r--r--vcl/qa/cppunit/canvasbitmaptest.cxx28
1 files changed, 18 insertions, 10 deletions
diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx
index d77599e7b8a4..9b50282ee8b0 100644
--- a/vcl/qa/cppunit/canvasbitmaptest.cxx
+++ b/vcl/qa/cppunit/canvasbitmaptest.cxx
@@ -216,19 +216,27 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
if( nOriginalDepth <= 8 )
return;
- uno::Sequence<rendering::ARGBColor> aARGBColor(1);
- uno::Sequence<rendering::RGBColor> aRGBColor(1);
uno::Sequence<sal_Int8> aPixel3, aPixel4;
const Color aCol(COL_GREEN);
- aARGBColor[0].Red = vcl::unotools::toDoubleColor(aCol.GetRed());
- aARGBColor[0].Green = vcl::unotools::toDoubleColor(aCol.GetGreen());
- aARGBColor[0].Blue = vcl::unotools::toDoubleColor(aCol.GetBlue());
- aARGBColor[0].Alpha = 1.0;
-
- aRGBColor[0].Red = vcl::unotools::toDoubleColor(aCol.GetRed());
- aRGBColor[0].Green = vcl::unotools::toDoubleColor(aCol.GetGreen());
- aRGBColor[0].Blue = vcl::unotools::toDoubleColor(aCol.GetBlue());
+ uno::Sequence<rendering::ARGBColor> aARGBColor
+ {
+ {
+ 1.0,
+ vcl::unotools::toDoubleColor(aCol.GetRed()),
+ vcl::unotools::toDoubleColor(aCol.GetGreen()),
+ vcl::unotools::toDoubleColor(aCol.GetBlue())
+ }
+ };
+
+ uno::Sequence<rendering::RGBColor> aRGBColor
+ {
+ {
+ vcl::unotools::toDoubleColor(aCol.GetRed()),
+ vcl::unotools::toDoubleColor(aCol.GetGreen()),
+ vcl::unotools::toDoubleColor(aCol.GetBlue())
+ }
+ };
aPixel3 = xBmp->convertIntegerFromARGB( aARGBColor );
aPixel4 = xBmp->getPixel( aLayout, geometry::IntegerPoint2D(5,0) );