summaryrefslogtreecommitdiff
path: root/vcl/qa/cppunit
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2023-04-20 17:16:32 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2023-04-21 15:03:14 +0200
commitdccd82b5ac47f44ea0297d301dc894c70bc793a2 (patch)
tree71dad46c8e0fbd3b05363978f5554dfc32911276 /vcl/qa/cppunit
parent0293724d05953be608287629ed6178a7c05383a6 (diff)
MCGR: Reduce diverse GradientStyle enums to single UNO API one
Change-Id: Ie0cd26a308a75ddead9451c53e874a39cc6eeb63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150705 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'vcl/qa/cppunit')
-rw-r--r--vcl/qa/cppunit/TypeSerializerTest.cxx5
-rw-r--r--vcl/qa/cppunit/gradient.cxx6
-rw-r--r--vcl/qa/cppunit/outdev.cxx10
-rw-r--r--vcl/qa/cppunit/svm/svmtest.cxx10
4 files changed, 16 insertions, 15 deletions
diff --git a/vcl/qa/cppunit/TypeSerializerTest.cxx b/vcl/qa/cppunit/TypeSerializerTest.cxx
index 1c7b93d25a62..2ffa3ec1257f 100644
--- a/vcl/qa/cppunit/TypeSerializerTest.cxx
+++ b/vcl/qa/cppunit/TypeSerializerTest.cxx
@@ -89,7 +89,8 @@ TypeSerializerTest::~TypeSerializerTest()
void TypeSerializerTest::testGradient()
{
- Gradient aGradient(GradientStyle::Radial, Color(0xFF, 0x00, 0x00), Color(0x00, 0xFF, 0x00));
+ Gradient aGradient(css::awt::GradientStyle_RADIAL, Color(0xFF, 0x00, 0x00),
+ Color(0x00, 0xFF, 0x00));
aGradient.SetAngle(900_deg10);
aGradient.SetBorder(5);
aGradient.SetOfsX(11);
@@ -105,7 +106,7 @@ void TypeSerializerTest::testGradient()
Gradient aReadGradient;
aSerializer.readGradient(aReadGradient);
- CPPUNIT_ASSERT_EQUAL(GradientStyle::Radial, aReadGradient.GetStyle());
+ CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_RADIAL, aReadGradient.GetStyle());
CPPUNIT_ASSERT_EQUAL(Color(0xFF, 0x00, 0x00), aReadGradient.GetStartColor());
CPPUNIT_ASSERT_EQUAL(Color(0x00, 0xFF, 0x00), aReadGradient.GetEndColor());
CPPUNIT_ASSERT_EQUAL(sal_Int16(900), aReadGradient.GetAngle().get());
diff --git a/vcl/qa/cppunit/gradient.cxx b/vcl/qa/cppunit/gradient.cxx
index 474c619bef72..2f33f4b1a6d0 100644
--- a/vcl/qa/cppunit/gradient.cxx
+++ b/vcl/qa/cppunit/gradient.cxx
@@ -91,7 +91,7 @@ void VclGradientTest::testAddGradientActions_rect_linear()
{
GDIMetaFile aMtf;
tools::Rectangle aRect(Point(10, 10), Size(40, 40));
- Gradient aGradient(GradientStyle::Linear, COL_RED, COL_WHITE);
+ Gradient aGradient(css::awt::GradientStyle_LINEAR, COL_RED, COL_WHITE);
aGradient.SetBorder(100);
aGradient.AddGradientActions(aRect, aMtf);
@@ -166,7 +166,7 @@ void VclGradientTest::testAddGradientActions_rect_axial()
{
GDIMetaFile aMtf;
tools::Rectangle aRect(Point(10, 10), Size(40, 40));
- Gradient aGradient(GradientStyle::Axial, COL_RED, COL_WHITE);
+ Gradient aGradient(css::awt::GradientStyle_AXIAL, COL_RED, COL_WHITE);
aGradient.SetBorder(100);
aGradient.AddGradientActions(aRect, aMtf);
@@ -226,7 +226,7 @@ void VclGradientTest::testAddGradientActions_rect_complex()
{
GDIMetaFile aMtf;
tools::Rectangle aRect(Point(10, 10), Size(40, 40));
- Gradient aGradient(GradientStyle::Square, COL_RED, COL_WHITE);
+ Gradient aGradient(css::awt::GradientStyle_SQUARE, COL_RED, COL_WHITE);
aGradient.SetBorder(10);
aGradient.AddGradientActions(aRect, aMtf);
diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index e9576c42221e..379346dd0b76 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -2021,7 +2021,7 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawGradient_rect_linear)
tools::Rectangle aRect(Point(10, 10), Size(40, 40));
pVDev->SetOutputSizePixel(Size(100, 100));
- Gradient aGradient(GradientStyle::Linear, COL_RED, COL_WHITE);
+ Gradient aGradient(css::awt::GradientStyle_LINEAR, COL_RED, COL_WHITE);
aGradient.SetBorder(100);
pVDev->DrawGradient(aRect, aGradient);
@@ -2042,7 +2042,7 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawGradient_rect_axial)
tools::Rectangle aRect(Point(10, 10), Size(40, 40));
pVDev->SetOutputSizePixel(Size(100, 100));
- Gradient aGradient(GradientStyle::Axial, COL_RED, COL_WHITE);
+ Gradient aGradient(css::awt::GradientStyle_AXIAL, COL_RED, COL_WHITE);
aGradient.SetBorder(100);
pVDev->DrawGradient(aRect, aGradient);
@@ -2064,7 +2064,7 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawGradient_polygon_linear)
pVDev->SetOutputSizePixel(Size(100, 100));
- Gradient aGradient(GradientStyle::Linear, COL_RED, COL_WHITE);
+ Gradient aGradient(css::awt::GradientStyle_LINEAR, COL_RED, COL_WHITE);
aGradient.SetBorder(100);
pVDev->DrawGradient(aPolyPolygon, aGradient);
@@ -2082,7 +2082,7 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawGradient_polygon_axial)
pVDev->SetOutputSizePixel(Size(100, 100));
- Gradient aGradient(GradientStyle::Axial, COL_RED, COL_WHITE);
+ Gradient aGradient(css::awt::GradientStyle_AXIAL, COL_RED, COL_WHITE);
aGradient.SetBorder(100);
pVDev->DrawGradient(aPolyPolygon, aGradient);
@@ -2099,7 +2099,7 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDrawGradient_rect_complex)
tools::Rectangle aRect(Point(10, 10), Size(40, 40));
pVDev->SetOutputSizePixel(Size(1000, 1000));
- Gradient aGradient(GradientStyle::Square, COL_RED, COL_WHITE);
+ Gradient aGradient(css::awt::GradientStyle_SQUARE, COL_RED, COL_WHITE);
aGradient.SetBorder(10);
pVDev->DrawGradient(aRect, aGradient);
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index c5ca008b0a9b..8b43f828ac7d 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -1290,13 +1290,13 @@ void SvmTest::testGradient()
tools::Rectangle aRectangle(Point(1, 2), Size(4,5));
- Gradient aGradient(GradientStyle::Linear, COL_WHITE, COL_BLACK);
+ Gradient aGradient(css::awt::GradientStyle_LINEAR, COL_WHITE, COL_BLACK);
pVirtualDev->DrawGradient(aRectangle, aGradient);
tools::Rectangle aRectangle2(Point(3, 4), Size(1,2));
Gradient aGradient2;
- aGradient2.SetStyle(GradientStyle::Radial);
+ aGradient2.SetStyle(css::awt::GradientStyle_RADIAL);
aGradient2.SetStartColor(COL_LIGHTRED);
aGradient2.SetEndColor(COL_LIGHTGREEN);
aGradient2.SetAngle(Degree10(55));
@@ -1384,7 +1384,7 @@ void SvmTest::testGradientEx()
tools::PolyPolygon aPolyPolygon(1);
aPolyPolygon.Insert(aPolygon);
- Gradient aGradient(GradientStyle::Linear, COL_WHITE, COL_BLACK);
+ Gradient aGradient(css::awt::GradientStyle_LINEAR, COL_WHITE, COL_BLACK);
pVirtualDev->DrawGradient(aPolyPolygon, aGradient);
tools::Polygon aPolygon2(2);
@@ -1400,7 +1400,7 @@ void SvmTest::testGradientEx()
aPolyPolygon2.Insert(aPolygon3);
Gradient aGradient2;
- aGradient2.SetStyle(GradientStyle::Axial);
+ aGradient2.SetStyle(css::awt::GradientStyle_AXIAL);
aGradient2.SetStartColor(COL_LIGHTMAGENTA);
aGradient2.SetEndColor(COL_CYAN);
aGradient2.SetAngle(Degree10(55));
@@ -2134,7 +2134,7 @@ void SvmTest::testFloatTransparent()
pVirtualDev1->DrawPixel(Point(1, 8));
pVirtualDev1->DrawPixel(Point(2, 7));
- Gradient aGradient(GradientStyle::Linear, COL_WHITE, COL_BLACK);
+ Gradient aGradient(css::awt::GradientStyle_LINEAR, COL_WHITE, COL_BLACK);
pVirtualDev->DrawTransparent(aGDIMetaFile1, Point(1, 2), Size(3, 4), aGradient);