chart2/qa/extras/chart2import.cxx | 2 +- oox/qa/unit/drawingml.cxx | 6 +++--- oox/qa/unit/shape.cxx | 4 ++-- sd/qa/unit/export-tests-ooxml1.cxx | 6 +++--- sd/qa/unit/export-tests-ooxml4.cxx | 2 +- sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 2 +- vcl/qa/cppunit/XpmFilterTest.cxx | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-)
New commits: commit ac20b8a470706d239d8782696c6d5fab0d705a2f Author: Luv Sharma <luvsharma....@gmail.com> AuthorDate: Sun Jan 14 23:02:06 2024 +0530 Commit: Hossein <hoss...@libreoffice.org> CommitDate: Wed Jan 17 14:49:26 2024 +0100 tdf#141908: replace hex colors with color keywords Change-Id: I3d23186045c17006e50d9ef48bc26df3c79d28b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162052 Tested-by: Jenkins Reviewed-by: Hossein <hoss...@libreoffice.org> diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index f7324c94754f..678518d1c88a 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -637,7 +637,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc889755) CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 0.070000000000000007)); CPPUNIT_ASSERT_EQUAL(Color(0x404040), Color(aColorStops[1].getStopColor())); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[2].getStopOffset(), 0.080000000000000002)); - CPPUNIT_ASSERT_EQUAL(Color(0xffffff), Color(aColorStops[2].getStopColor())); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(aColorStops[2].getStopColor())); } CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc882383) diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx index ba2eaf75a144..6ae4d08f48a6 100644 --- a/oox/qa/unit/drawingml.cxx +++ b/oox/qa/unit/drawingml.cxx @@ -201,11 +201,11 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGradientMultiStepTransparency) CPPUNIT_ASSERT_DOUBLES_EQUAL(0.35, aColorStops[2].getStopOffset(), 1E-3); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.58, aColorStops[3].getStopOffset(), 1E-3); CPPUNIT_ASSERT_DOUBLES_EQUAL(1.00, aColorStops[4].getStopOffset(), 1E-3); - CPPUNIT_ASSERT_EQUAL(Color(0xffffff), Color(aColorStops[0].getStopColor())); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(aColorStops[0].getStopColor())); CPPUNIT_ASSERT_EQUAL(Color(0x9e9e9e), Color(aColorStops[1].getStopColor())); CPPUNIT_ASSERT_EQUAL(Color(0x363636), Color(aColorStops[2].getStopColor())); - CPPUNIT_ASSERT_EQUAL(Color(0x000000), Color(aColorStops[3].getStopColor())); - CPPUNIT_ASSERT_EQUAL(Color(0x000000), Color(aColorStops[4].getStopColor())); + CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aColorStops[3].getStopColor())); + CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aColorStops[4].getStopColor())); } CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAlignment) diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx index 490c81bf9b1f..4119c6c80db8 100644 --- a/oox/qa/unit/shape.cxx +++ b/oox/qa/unit/shape.cxx @@ -755,9 +755,9 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) // Transparency is encoded in gray color. CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size()); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0)); - CPPUNIT_ASSERT_EQUAL(Color(0x000000), Color(aColorStops[0].getStopColor())); + CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aColorStops[0].getStopColor())); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 1.0)); - CPPUNIT_ASSERT_EQUAL(Color(0xFFFFFF), Color(aColorStops[1].getStopColor())); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(aColorStops[1].getStopColor())); CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_RECT, aGradient.Style); CPPUNIT_ASSERT_EQUAL(sal_Int16(100), aGradient.XOffset); diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 9f87fd5d92c4..94f5d8b41ab3 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -1506,11 +1506,11 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf128345GradientAxial) CPPUNIT_ASSERT_EQUAL(size_t(3), aColorStops.size()); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0)); - CPPUNIT_ASSERT_EQUAL(Color(0xffffff), Color(aColorStops[0].getStopColor())); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(aColorStops[0].getStopColor())); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 0.5)); - CPPUNIT_ASSERT_EQUAL(Color(0x000000), Color(aColorStops[1].getStopColor())); + CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aColorStops[1].getStopColor())); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[2].getStopOffset(), 1.0)); - CPPUNIT_ASSERT_EQUAL(Color(0xffffff), Color(aColorStops[2].getStopColor())); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(aColorStops[2].getStopColor())); CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_LINEAR, aTransparenceGradient.Style); } diff --git a/sd/qa/unit/export-tests-ooxml4.cxx b/sd/qa/unit/export-tests-ooxml4.cxx index b09614454df9..cd3b5f5d5de4 100644 --- a/sd/qa/unit/export-tests-ooxml4.cxx +++ b/sd/qa/unit/export-tests-ooxml4.cxx @@ -868,7 +868,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf144092_emptyShapeTextProps) // check text properties of empty cells xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW); xCell->getPropertyValue("CharColor") >>= aColor; - CPPUNIT_ASSERT_EQUAL(Color(0xFFFFFF), aColor); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, aColor); xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW); xCell->getPropertyValue("CharColor") >>= aColor; diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 6293b6c44d03..26687b36474e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -781,7 +781,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf97090, "tdf97090.docx") uno::Reference<beans::XPropertySet> paragraphProperties(paraEnum->nextElement(), uno::UNO_QUERY); assert( paragraphProperties.is() ); CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(paragraphProperties, "FillStyle")); - CPPUNIT_ASSERT_EQUAL(Color(0xffffff), getProperty<Color>(paragraphProperties, "FillColor")); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color>(paragraphProperties, "FillColor")); } DECLARE_OOXMLEXPORT_TEST(testTdf89791, "tdf89791.docx") diff --git a/vcl/qa/cppunit/XpmFilterTest.cxx b/vcl/qa/cppunit/XpmFilterTest.cxx index 9dff029668b6..43f221d0dae0 100644 --- a/vcl/qa/cppunit/XpmFilterTest.cxx +++ b/vcl/qa/cppunit/XpmFilterTest.cxx @@ -67,10 +67,10 @@ CPPUNIT_TEST_FIXTURE(XpmFilterTest, testXPM_1bit) CPPUNIT_ASSERT_EQUAL(tools::Long(10), aBitmap.GetSizePixel().Width()); CPPUNIT_ASSERT_EQUAL(tools::Long(10), aBitmap.GetSizePixel().Height()); CPPUNIT_ASSERT_EQUAL(vcl::PixelFormat::N8_BPP, aBitmap.getPixelFormat()); - CPPUNIT_ASSERT_EQUAL(Color(0xffffff), aBitmap.GetPixelColor(0, 0)); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, aBitmap.GetPixelColor(0, 0)); CPPUNIT_ASSERT_EQUAL(Color(0x72d1c8), aBitmap.GetPixelColor(1, 1)); CPPUNIT_ASSERT_EQUAL(Color(0x72d1c8), aBitmap.GetPixelColor(8, 8)); - CPPUNIT_ASSERT_EQUAL(Color(0xffffff), aBitmap.GetPixelColor(9, 9)); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, aBitmap.GetPixelColor(9, 9)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */