mirror of
https://github.com/LibreOffice/core.git
synced 2025-07-23 04:42:03 +00:00
tdf#141908 - CppUnittests: replace usage of sal_Int32 with colors
Change-Id: Icdf2a5e7c0bd738f2cffbc0b7e99b1bd90a6dcce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141685 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:

committed by
Ilmari Lauhakangas

parent
503195ad4d
commit
aa5e2b24eb
@ -801,7 +801,7 @@ void Chart2ImportTest::testBnc889755()
|
||||
awt::Gradient aTransparence;
|
||||
xShapeProps->getPropertyValue("FillTransparenceGradient") >>= aTransparence;
|
||||
CPPUNIT_ASSERT(aTransparence.StartColor != aTransparence.EndColor);
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffffff), aTransparence.StartColor);
|
||||
CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(ColorTransparency, aTransparence.StartColor));
|
||||
}
|
||||
|
||||
void Chart2ImportTest::testBnc882383()
|
||||
|
@ -26,6 +26,7 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_drawingml, \
|
||||
sal \
|
||||
subsequenttest \
|
||||
test \
|
||||
tl \
|
||||
unotest \
|
||||
utl \
|
||||
))
|
||||
|
@ -183,11 +183,11 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGradientMultiStepTransparency)
|
||||
xShapeProps->getPropertyValue("FillTransparenceGradient") >>= aTransparence;
|
||||
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
// - Expected: 16777215 (0xffffff)
|
||||
// - Expected: 16777215 (COL_WHITE)
|
||||
// - Actual : 3487029 (0x353535)
|
||||
// i.e. the end transparency was not 100%, but was 21%, leading to an unexpected visible line on
|
||||
// the right of this shape.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffffff), aTransparence.EndColor);
|
||||
CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(ColorTransparency, aTransparence.EndColor));
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAlignment)
|
||||
|
@ -60,8 +60,8 @@ void checkSparklines(ScDocument& rDocument)
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x376092), rAttributes.getColorSeries());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x00b050), rAttributes.getColorNegative());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x000000), rAttributes.getColorAxis());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x000000), rAttributes.getColorMarkers());
|
||||
CPPUNIT_ASSERT_EQUAL(COL_BLACK, rAttributes.getColorAxis());
|
||||
CPPUNIT_ASSERT_EQUAL(COL_BLACK, rAttributes.getColorMarkers());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x7030a0), rAttributes.getColorFirst());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0xff0000), rAttributes.getColorLast());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x92d050), rAttributes.getColorHigh());
|
||||
@ -93,7 +93,7 @@ void checkSparklines(ScDocument& rDocument)
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x376092), rAttributes.getColorSeries());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0xff0000), rAttributes.getColorNegative());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x000000), rAttributes.getColorAxis());
|
||||
CPPUNIT_ASSERT_EQUAL(COL_BLACK, rAttributes.getColorAxis());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0xd00000), rAttributes.getColorMarkers());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x92d050), rAttributes.getColorFirst());
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x00b0f0), rAttributes.getColorLast());
|
||||
|
@ -586,7 +586,7 @@ DECLARE_OOXMLEXPORT_TEST(testTextframeGradient, "textframe-gradient.docx")
|
||||
xFrame.set(getShape(2), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
|
||||
aGradient = getProperty<awt::Gradient>(xFrame, "FillGradient");
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x000000), Color(ColorTransparency, aGradient.StartColor));
|
||||
CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aGradient.StartColor));
|
||||
CPPUNIT_ASSERT_EQUAL(Color(0x666666), Color(ColorTransparency, aGradient.EndColor));
|
||||
CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_AXIAL, aGradient.Style);
|
||||
|
||||
|
Reference in New Issue
Block a user