diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2023-05-12 15:32:51 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2023-05-15 15:19:53 +0200 |
commit | 438f0752deaf7d6e6d9d1df381b64aca4628e944 (patch) | |
tree | f1907b25dad1cbf2604b16c657e11f5623c8b5b2 /oox/qa | |
parent | efa965969c6d3dfe5745a535605a6b9a482a03bd (diff) |
MCGR: consolidations/cleanups for changes so far
Change-Id: I85cf40e4803b0485bb40349d8e81adc8123666c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151706
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'oox/qa')
-rw-r--r-- | oox/qa/unit/drawingml.cxx | 3 | ||||
-rw-r--r-- | oox/qa/unit/shape.cxx | 22 |
2 files changed, 9 insertions, 16 deletions
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx index 10dc88e4954d..27bd3984a1c7 100644 --- a/oox/qa/unit/drawingml.cxx +++ b/oox/qa/unit/drawingml.cxx @@ -191,8 +191,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGradientMultiStepTransparency) // i.e. the end transparency was not 100%, but was 21%, leading to an unexpected visible line on // the right of this shape. // MCGR: Use the completely imported transparency gradient to check for correctness - basegfx::ColorStops aColorStops; - basegfx::utils::fillColorStopsFromGradient2(aColorStops, aTransparence); + const basegfx::BColorStops aColorStops(aTransparence.ColorStops); CPPUNIT_ASSERT_EQUAL(size_t(5), aColorStops.size()); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[4].getStopOffset(), 1.0)); diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx index ad43fb52b4a1..722d7d6d644b 100644 --- a/oox/qa/unit/shape.cxx +++ b/oox/qa/unit/shape.cxx @@ -471,8 +471,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3) xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness - basegfx::ColorStops aColorStops; - basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient); + const basegfx::BColorStops aColorStops(aGradient.ColorStops); CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size()); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0)); @@ -497,8 +496,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3) xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness - basegfx::ColorStops aColorStops; - basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient); + const basegfx::BColorStops aColorStops(aGradient.ColorStops); CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size()); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.40000000000000002)); @@ -523,8 +521,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3) xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness - basegfx::ColorStops aColorStops; - basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient); + const basegfx::BColorStops aColorStops(aGradient.ColorStops); CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size()); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0)); @@ -641,8 +638,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness - basegfx::ColorStops aColorStops; - basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient); + const basegfx::BColorStops aColorStops(aGradient.ColorStops); CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size()); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0)); @@ -675,8 +671,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness - basegfx::ColorStops aColorStops; - basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient); + basegfx::BColorStops aColorStops(aGradient.ColorStops); CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size()); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0)); @@ -692,7 +687,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) xShapeProps->getPropertyValue(u"FillTransparenceGradient") >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness - basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient); + aColorStops = basegfx::BColorStops(aGradient.ColorStops); // Transparency is encoded in gray color. CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size()); @@ -733,8 +728,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness - basegfx::ColorStops aColorStops; - basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient); + basegfx::BColorStops aColorStops(aGradient.ColorStops); CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size()); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0)); @@ -752,7 +746,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) xShapeProps->getPropertyValue(u"FillTransparenceGradient") >>= aGradient; // MCGR: Use the completely imported transparency gradient to check for correctness - basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient); + aColorStops = basegfx::BColorStops(aGradient.ColorStops); // Transparency is encoded in gray color. CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size()); |