diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index c74f5e41d925..6787133e3705 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -1034,8 +1034,8 @@ void SdOOXMLExportTest2::testTdf105739() com::sun::star::awt::Gradient aFillGradient; aXBackgroundPropSet->getPropertyValue("FillGradient") >>= aFillGradient; CPPUNIT_ASSERT_EQUAL(int(awt::GradientStyle_LINEAR), static_cast(aFillGradient.Style)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0xff0000), aFillGradient.StartColor); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00b050), aFillGradient.EndColor); + CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, Color(ColorTransparency, aFillGradient.StartColor)); + CPPUNIT_ASSERT_EQUAL(Color(0x00b050), Color(ColorTransparency, aFillGradient.EndColor)); } xShell->DoClose(); diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx index 6100a9f64db6..d20c56d71766 100644 --- a/sd/qa/unit/export-tests-ooxml3.cxx +++ b/sd/qa/unit/export-tests-ooxml3.cxx @@ -1531,8 +1531,8 @@ void SdOOXMLExportTest3::testTdf127372() uno::Reference xShape(getShapeFromPage(0, 0, xDocShRef)); awt::Gradient aTransparenceGradient; xShape->getPropertyValue("FillTransparenceGradient") >>= aTransparenceGradient; - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x000000), aTransparenceGradient.StartColor); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x000000), aTransparenceGradient.EndColor); + CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aTransparenceGradient.StartColor)); + CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aTransparenceGradient.EndColor)); } void SdOOXMLExportTest3::testTdf127379() @@ -1558,8 +1558,8 @@ void SdOOXMLExportTest3::testTdf127379() awt::Gradient aGradient; CPPUNIT_ASSERT(aXBackgroundPropSet->getPropertyValue("FillGradient") >>= aGradient); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0xFF0000), aGradient.StartColor); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x2A6099), aGradient.EndColor); + CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, Color(ColorTransparency, aGradient.StartColor)); + CPPUNIT_ASSERT_EQUAL(Color(0x2A6099), Color(ColorTransparency, aGradient.EndColor)); } void SdOOXMLExportTest3::testTdf98603() diff --git a/svgio/qa/cppunit/SvgRead.cxx b/svgio/qa/cppunit/SvgRead.cxx index 127de19a7bbd..a26556dd7a5c 100644 --- a/svgio/qa/cppunit/SvgRead.cxx +++ b/svgio/qa/cppunit/SvgRead.cxx @@ -81,9 +81,9 @@ void TestParsing::testSimpleRectangle() CPPUNIT_ASSERT_EQUAL(basegfx::B2DRange(10, 10, 110, 110), pDrawRect->maRectangle); CPPUNIT_ASSERT_EQUAL(3.0, pDrawRect->mnStrokeWidth); CPPUNIT_ASSERT(bool(pDrawRect->mpStrokeColor)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0xff0000), sal_Int32(Color(*pDrawRect->mpStrokeColor))); + CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, Color(*pDrawRect->mpStrokeColor)); CPPUNIT_ASSERT(bool(pDrawRect->mpFillColor)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00cc00), sal_Int32(Color(*pDrawRect->mpFillColor))); + CPPUNIT_ASSERT_EQUAL(Color(0x00cc00), Color(*pDrawRect->mpFillColor)); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.1, pDrawRect->mnOpacity, 1E-12); } @@ -113,9 +113,9 @@ void TestParsing::testPath() basegfx::utils::exportToSvgD(pDrawPath->maPolyPolygon, true, true, false)); CPPUNIT_ASSERT_EQUAL(0.0, pDrawPath->mnStrokeWidth); CPPUNIT_ASSERT(bool(pDrawPath->mpStrokeColor)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), sal_Int32(Color(*pDrawPath->mpStrokeColor))); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(*pDrawPath->mpStrokeColor)); CPPUNIT_ASSERT(bool(pDrawPath->mpFillColor)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x007aff), sal_Int32(Color(*pDrawPath->mpFillColor))); + CPPUNIT_ASSERT_EQUAL(Color(0x007aff), Color(*pDrawPath->mpFillColor)); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.1, pDrawPath->mnOpacity, 1E-12); } diff --git a/vcl/qa/cppunit/drawmode.cxx b/vcl/qa/cppunit/drawmode.cxx index f2b59dc8440c..e3792ae1f29f 100644 --- a/vcl/qa/cppunit/drawmode.cxx +++ b/vcl/qa/cppunit/drawmode.cxx @@ -343,9 +343,7 @@ void VclDrawModeTest::testDrawModeBitmapEx() Bitmap::ScopedReadAccess pReadAccess(aResultBitmap); const BitmapColor& rColor = pReadAccess->GetColor(0, 0); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetRed())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetGreen())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetBlue())); + CPPUNIT_ASSERT_EQUAL(BitmapColor(0x26, 0x26, 0x26), rColor); } // any other operation other than DrawModeFlags::GrayBitmap is a noop @@ -355,9 +353,7 @@ void VclDrawModeTest::testDrawModeBitmapEx() Bitmap::ScopedReadAccess pReadAccess(aResultBitmap); const BitmapColor& rColor = pReadAccess->GetColor(0, 0); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x80), sal_Int32(rColor.GetRed())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00), sal_Int32(rColor.GetGreen())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00), sal_Int32(rColor.GetBlue())); + CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_RED), rColor); } } diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index 79fe71431f87..b3468aa7c4ee 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -452,9 +452,7 @@ void VclOutdevTest::testDrawGrayBitmap() { Bitmap::ScopedReadAccess pReadAccess(aVDevBmp); const BitmapColor& rColor = pReadAccess->GetColor(0, 0); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetRed())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetGreen())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetBlue())); + CPPUNIT_ASSERT_EQUAL(BitmapColor(0x26, 0x26, 0x26), rColor); } } diff --git a/writerperfect/CppunitTest_writerperfect_import.mk b/writerperfect/CppunitTest_writerperfect_import.mk index fe47a54c8533..f160c9e8de8b 100644 --- a/writerperfect/CppunitTest_writerperfect_import.mk +++ b/writerperfect/CppunitTest_writerperfect_import.mk @@ -22,6 +22,7 @@ $(eval $(call gb_CppunitTest_use_libraries,writerperfect_import,\ cppu \ sal \ test \ + tl \ unotest \ utl \ wpftqahelper \ diff --git a/writerperfect/qa/unit/ImportTest.cxx b/writerperfect/qa/unit/ImportTest.cxx index ef58118b0bb8..dcb1b3690558 100644 --- a/writerperfect/qa/unit/ImportTest.cxx +++ b/writerperfect/qa/unit/ImportTest.cxx @@ -83,9 +83,9 @@ void ImportTest::testWK3WithFM3() CPPUNIT_ASSERT(xSheet.is()); uno::Reference xCellProps(xSheet->getCellByPosition(1, 1), UNO_QUERY); CPPUNIT_ASSERT(xCellProps.is()); - sal_Int32 nCharColor = 0; + Color nCharColor; CPPUNIT_ASSERT(xCellProps->getPropertyValue("CharColor") >>= nCharColor); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x0000ff), nCharColor); // blue text + CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, nCharColor); // blue text } WpftLoader ImportTest::createCalcLoader(std::u16string_view rFile) const