diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/backendtest/VisualBackendTest.cxx | 2 | ||||
-rw-r--r-- | vcl/backendtest/outputdevice/gradient.cxx | 24 | ||||
-rw-r--r-- | vcl/headless/CairoCommon.cxx | 6 | ||||
-rw-r--r-- | vcl/qa/cppunit/TypeSerializerTest.cxx | 5 | ||||
-rw-r--r-- | vcl/qa/cppunit/gradient.cxx | 6 | ||||
-rw-r--r-- | vcl/qa/cppunit/outdev.cxx | 10 | ||||
-rw-r--r-- | vcl/qa/cppunit/svm/svmtest.cxx | 10 | ||||
-rw-r--r-- | vcl/skia/gdiimpl.cxx | 10 | ||||
-rw-r--r-- | vcl/source/filter/svm/SvmConverter.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/TypeSerializer.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gradient.cxx | 28 | ||||
-rw-r--r-- | vcl/source/gdi/mtfxmldump.cxx | 18 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 26 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/wall.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/gradient.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/svptest.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 14 |
19 files changed, 96 insertions, 87 deletions
diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx index 3277a3a54f3f..cbcf881bc788 100644 --- a/vcl/backendtest/VisualBackendTest.cxx +++ b/vcl/backendtest/VisualBackendTest.cxx @@ -712,7 +712,7 @@ public: mpVDev->DrawPolyPolygon(polyPolygon); tools::Rectangle aGradientRect(Point(200, 200), Size(200 + fTime * 300, 200 + fTime * 300)); - mpVDev->DrawGradient(aGradientRect, Gradient(GradientStyle::Linear, COL_YELLOW, COL_BLUE)); + mpVDev->DrawGradient(aGradientRect, Gradient(css::awt::GradientStyle_LINEAR, COL_YELLOW, COL_BLUE)); rRenderContext.DrawOutDev(Point(), mpVDev->GetOutputSizePixel(), Point(), mpVDev->GetOutputSizePixel(), diff --git a/vcl/backendtest/outputdevice/gradient.cxx b/vcl/backendtest/outputdevice/gradient.cxx index ebb94fbaaf9b..2596670b6874 100644 --- a/vcl/backendtest/outputdevice/gradient.cxx +++ b/vcl/backendtest/outputdevice/gradient.cxx @@ -17,7 +17,8 @@ Bitmap OutputDeviceTestGradient::setupLinearGradient() { initialSetup(12, 12, constBackgroundColor); - Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00)); + Gradient aGradient(css::awt::GradientStyle_LINEAR, Color(0xFF, 0xFF, 0xFF), + Color(0x00, 0x00, 0x00)); aGradient.SetAngle(900_deg10); tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1); @@ -30,7 +31,8 @@ Bitmap OutputDeviceTestGradient::setupLinearGradientAngled() { initialSetup(12, 12, constBackgroundColor); - Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00)); + Gradient aGradient(css::awt::GradientStyle_LINEAR, Color(0xFF, 0xFF, 0xFF), + Color(0x00, 0x00, 0x00)); aGradient.SetAngle(450_deg10); tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1); @@ -43,7 +45,8 @@ Bitmap OutputDeviceTestGradient::setupLinearGradientBorder() { initialSetup(12, 12, constBackgroundColor); - Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00)); + Gradient aGradient(css::awt::GradientStyle_LINEAR, Color(0xFF, 0xFF, 0xFF), + Color(0x00, 0x00, 0x00)); aGradient.SetBorder(50); tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1); @@ -56,7 +59,8 @@ Bitmap OutputDeviceTestGradient::setupLinearGradientIntensity() { initialSetup(12, 12, constBackgroundColor); - Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00)); + Gradient aGradient(css::awt::GradientStyle_LINEAR, Color(0xFF, 0xFF, 0xFF), + Color(0x00, 0x00, 0x00)); aGradient.SetStartIntensity(50); tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1); @@ -69,7 +73,8 @@ Bitmap OutputDeviceTestGradient::setupLinearGradientSteps() { initialSetup(12, 12, constBackgroundColor); - Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00)); + Gradient aGradient(css::awt::GradientStyle_LINEAR, Color(0xFF, 0xFF, 0xFF), + Color(0x00, 0x00, 0x00)); aGradient.SetAngle(900_deg10); aGradient.SetSteps(4); tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, @@ -83,7 +88,8 @@ Bitmap OutputDeviceTestGradient::setupAxialGradient() { initialSetup(13, 13, constBackgroundColor); - Gradient aGradient(GradientStyle::Axial, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00)); + Gradient aGradient(css::awt::GradientStyle_AXIAL, Color(0xFF, 0xFF, 0xFF), + Color(0x00, 0x00, 0x00)); aGradient.SetAngle(900_deg10); tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1); @@ -96,7 +102,8 @@ Bitmap OutputDeviceTestGradient::setupRadialGradient() { initialSetup(12, 12, constBackgroundColor); - Gradient aGradient(GradientStyle::Radial, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00)); + Gradient aGradient(css::awt::GradientStyle_RADIAL, Color(0xFF, 0xFF, 0xFF), + Color(0x00, 0x00, 0x00)); tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1); mpVirtualDevice->DrawGradient(aDrawRect, aGradient); @@ -108,7 +115,8 @@ Bitmap OutputDeviceTestGradient::setupRadialGradientOfs() { initialSetup(12, 12, constBackgroundColor); - Gradient aGradient(GradientStyle::Radial, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00)); + Gradient aGradient(css::awt::GradientStyle_RADIAL, Color(0xFF, 0xFF, 0xFF), + Color(0x00, 0x00, 0x00)); aGradient.SetOfsX(100); // Move center to the bottom-right corner. aGradient.SetOfsY(100); tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index 4706c7e344c0..2b732f627f30 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -1283,8 +1283,8 @@ bool CairoCommon::drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWid bool CairoCommon::drawGradient(const tools::PolyPolygon& rPolyPolygon, const Gradient& rGradient, bool bAntiAlias) { - if (rGradient.GetStyle() != GradientStyle::Linear - && rGradient.GetStyle() != GradientStyle::Radial) + if (rGradient.GetStyle() != css::awt::GradientStyle_LINEAR + && rGradient.GetStyle() != css::awt::GradientStyle_RADIAL) return false; // unsupported if (rGradient.GetSteps() != 0) return false; // We can't tell cairo how many colors to use in the gradient. @@ -1323,7 +1323,7 @@ bool CairoCommon::drawGradient(const tools::PolyPolygon& rPolyPolygon, const Gra Color aEndColor = aGradient.GetEndColor(); cairo_pattern_t* pattern; - if (rGradient.GetStyle() == GradientStyle::Linear) + if (rGradient.GetStyle() == css::awt::GradientStyle_LINEAR) { tools::Polygon aPoly(aBoundRect); aPoly.Rotate(aCenter, aGradient.GetAngle() % 3600_deg10); 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); diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index f26b2d26711b..94e1f7c176fa 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -1994,9 +1994,9 @@ bool SkiaSalGraphicsImpl::drawAlphaRect(tools::Long nX, tools::Long nY, tools::L bool SkiaSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPolygon, const Gradient& rGradient) { - if (rGradient.GetStyle() != GradientStyle::Linear - && rGradient.GetStyle() != GradientStyle::Axial - && rGradient.GetStyle() != GradientStyle::Radial) + if (rGradient.GetStyle() != css::awt::GradientStyle_LINEAR + && rGradient.GetStyle() != css::awt::GradientStyle_AXIAL + && rGradient.GetStyle() != css::awt::GradientStyle_RADIAL) return false; // unsupported if (rGradient.GetSteps() != 0) return false; // We can't tell Skia how many colors to use in the gradient. @@ -2031,7 +2031,7 @@ bool SkiaSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPolygon, SkColor endColor = toSkColorWithIntensity(rGradient.GetEndColor(), rGradient.GetEndIntensity()); sk_sp<SkShader> shader; - if (rGradient.GetStyle() == GradientStyle::Linear) + if (rGradient.GetStyle() == css::awt::GradientStyle_LINEAR) { tools::Polygon aPoly(aBoundRect); aPoly.Rotate(aCenter, aGradient.GetAngle() % 3600_deg10); @@ -2041,7 +2041,7 @@ bool SkiaSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPolygon, SkScalar pos[2] = { SkDoubleToScalar(aGradient.GetBorder() / 100.0), 1.0 }; shader = SkGradientShader::MakeLinear(points, colors, pos, 2, SkTileMode::kClamp); } - else if (rGradient.GetStyle() == GradientStyle::Axial) + else if (rGradient.GetStyle() == css::awt::GradientStyle_AXIAL) { tools::Polygon aPoly(aBoundRect); aPoly.Rotate(aCenter, aGradient.GetAngle() % 3600_deg10); diff --git a/vcl/source/filter/svm/SvmConverter.cxx b/vcl/source/filter/svm/SvmConverter.cxx index 60fa48f2927d..c844648d7b9b 100644 --- a/vcl/source/filter/svm/SvmConverter.cxx +++ b/vcl/source/filter/svm/SvmConverter.cxx @@ -1080,7 +1080,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) sal_Int16 nAngle(0), nBorder(0), nOfsX(0), nOfsY(0), nIntensityStart(0), nIntensityEnd(0); rIStm.ReadInt16( nAngle ).ReadInt16( nBorder ).ReadInt16( nOfsX ).ReadInt16( nOfsY ).ReadInt16( nIntensityStart ).ReadInt16( nIntensityEnd ); - Gradient aGrad( static_cast<GradientStyle>(nStyle), aStartCol, aEndCol ); + Gradient aGrad( static_cast<css::awt::GradientStyle>(nStyle), aStartCol, aEndCol ); aGrad.SetAngle( Degree10(nAngle) ); aGrad.SetBorder( nBorder ); diff --git a/vcl/source/gdi/TypeSerializer.cxx b/vcl/source/gdi/TypeSerializer.cxx index 0882f97243ad..9144650154af 100644 --- a/vcl/source/gdi/TypeSerializer.cxx +++ b/vcl/source/gdi/TypeSerializer.cxx @@ -58,7 +58,7 @@ void TypeSerializer::readGradient(Gradient& rGradient) mrStream.ReadUInt16(nIntensityEnd); mrStream.ReadUInt16(nStepCount); - rGradient.SetStyle(static_cast<GradientStyle>(nStyle)); + rGradient.SetStyle(static_cast<css::awt::GradientStyle>(nStyle)); rGradient.SetStartColor(aStartColor); rGradient.SetEndColor(aEndColor); if (nAngle > 3600) diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx index f7722174ba81..b8712511a39a 100644 --- a/vcl/source/gdi/gradient.cxx +++ b/vcl/source/gdi/gradient.cxx @@ -26,7 +26,7 @@ class Gradient::Impl { public: - GradientStyle meStyle; + css::awt::GradientStyle meStyle; Color maStartColor; Color maEndColor; Degree10 mnAngle; @@ -38,7 +38,7 @@ public: sal_uInt16 mnStepCount; Impl() - : meStyle (GradientStyle::Linear) + : meStyle (css::awt::GradientStyle_LINEAR) , maStartColor(COL_BLACK) , maEndColor(COL_WHITE) , mnAngle(0) @@ -86,7 +86,7 @@ Gradient::Gradient( const Gradient& ) = default; Gradient::Gradient( Gradient&& ) = default; -Gradient::Gradient( GradientStyle eStyle, +Gradient::Gradient( css::awt::GradientStyle eStyle, const Color& rStartColor, const Color& rEndColor ) { mpImplGradient->meStyle = eStyle; @@ -97,12 +97,12 @@ Gradient::Gradient( GradientStyle eStyle, Gradient::~Gradient() = default; -GradientStyle Gradient::GetStyle() const +css::awt::GradientStyle Gradient::GetStyle() const { return mpImplGradient->meStyle; } -void Gradient::SetStyle( GradientStyle eStyle ) +void Gradient::SetStyle( css::awt::GradientStyle eStyle ) { mpImplGradient->meStyle = eStyle; } @@ -202,7 +202,7 @@ void Gradient::GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle& rB tools::Rectangle aRect( rRect ); Degree10 nAngle = GetAngle() % 3600_deg10; - if( GetStyle() == GradientStyle::Linear || GetStyle() == GradientStyle::Axial ) + if( GetStyle() == css::awt::GradientStyle_LINEAR || GetStyle() == css::awt::GradientStyle_AXIAL ) { const double fAngle = toRadians(nAngle); const double fWidth = aRect.GetWidth(); @@ -223,7 +223,7 @@ void Gradient::GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle& rB } else { - if( GetStyle() == GradientStyle::Square || GetStyle() == GradientStyle::Rect ) + if( GetStyle() == css::awt::GradientStyle_SQUARE || GetStyle() == css::awt::GradientStyle_RECT ) { const double fAngle = toRadians(nAngle); const double fWidth = aRect.GetWidth(); @@ -242,13 +242,13 @@ void Gradient::GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle& rB Size aSize( aRect.GetSize() ); - if( GetStyle() == GradientStyle::Radial ) + if( GetStyle() == css::awt::GradientStyle_RADIAL ) { // Calculation of radii for circle aSize.setWidth( static_cast<tools::Long>(0.5 + std::hypot(aSize.Width(), aSize.Height())) ); aSize.setHeight( aSize.Width() ); } - else if( GetStyle() == GradientStyle::Elliptical ) + else if( GetStyle() == css::awt::GradientStyle_ELLIPTICAL ) { // Calculation of radii for ellipse aSize.setWidth( static_cast<tools::Long>( 0.5 + static_cast<double>(aSize.Width()) * M_SQRT2 ) ); @@ -324,7 +324,7 @@ void Gradient::AddGradientActions(tools::Rectangle const& rRect, GDIMetaFile& rM if (!GetSteps()) SetSteps(GRADIENT_DEFAULT_STEPCOUNT); - if (GetStyle() == GradientStyle::Linear || GetStyle() == GradientStyle::Axial) + if (GetStyle() == css::awt::GradientStyle_LINEAR || GetStyle() == css::awt::GradientStyle_AXIAL) DrawLinearGradientToMetafile(aRect, rMetaFile); else DrawComplexGradientToMetafile(aRect, rMetaFile); @@ -340,7 +340,7 @@ tools::Long Gradient::GetMetafileSteps(tools::Rectangle const& rRect) const if (nStepCount) return nStepCount; - if (GetStyle() == GradientStyle::Linear || GetStyle() == GradientStyle::Axial) + if (GetStyle() == css::awt::GradientStyle_LINEAR || GetStyle() == css::awt::GradientStyle_AXIAL) return rRect.GetHeight(); else return std::min(rRect.GetWidth(), rRect.GetHeight()); @@ -366,7 +366,7 @@ void Gradient::DrawLinearGradientToMetafile(tools::Rectangle const& rRect, GDIMe GetBoundRect(rRect, aRect, aCenter); - bool bLinear = (GetStyle() == GradientStyle::Linear); + bool bLinear = (GetStyle() == css::awt::GradientStyle_LINEAR); double fBorder = GetBorder() * aRect.GetHeight() / 100.0; if ( !bLinear ) { @@ -593,7 +593,7 @@ void Gradient::DrawComplexGradientToMetafile(tools::Rectangle const& rRect, GDIM // all gradients are rendered as nested rectangles which shrink // equally in each dimension - except for 'square' gradients // which shrink to a central vertex but are not per-se square. - if (GetStyle() != GradientStyle::Square) + if (GetStyle() != css::awt::GradientStyle_SQUARE) { fScanIncY = std::min( fScanIncY, fScanIncX ); fScanIncX = fScanIncY; @@ -623,7 +623,7 @@ void Gradient::DrawComplexGradientToMetafile(tools::Rectangle const& rRect, GDIM if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) ) break; - if (GetStyle() == GradientStyle::Radial || GetStyle() == GradientStyle::Elliptical) + if (GetStyle() == css::awt::GradientStyle_RADIAL || GetStyle() == css::awt::GradientStyle_ELLIPTICAL) aPoly = tools::Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 ); else aPoly = tools::Polygon( aRect ); diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx index b20dd7d35513..7092ebfa54fc 100644 --- a/vcl/source/gdi/mtfxmldump.cxx +++ b/vcl/source/gdi/mtfxmldump.cxx @@ -374,17 +374,17 @@ OUString convertFractionToString(const Fraction& aFraction) return OUString::createFromAscii(ss.str().c_str()); } -OUString convertGradientStyle(GradientStyle eStyle) +OUString convertGradientStyleToOUString(css::awt::GradientStyle eStyle) { switch (eStyle) { - case GradientStyle::Linear: return "Linear"; - case GradientStyle::Axial: return "Axial"; - case GradientStyle::Radial: return "Radial"; - case GradientStyle::Elliptical: return "Elliptical"; - case GradientStyle::Square: return "Square"; - case GradientStyle::Rect: return "Rect"; - case GradientStyle::FORCE_EQUAL_SIZE: return "ForceEqualSize"; + case css::awt::GradientStyle_LINEAR: return "Linear"; + case css::awt::GradientStyle_AXIAL: return "Axial"; + case css::awt::GradientStyle_RADIAL: return "Radial"; + case css::awt::GradientStyle_ELLIPTICAL: return "Elliptical"; + case css::awt::GradientStyle_SQUARE: return "Square"; + case css::awt::GradientStyle_RECT: return "Rect"; + case css::awt::GradientStyle::GradientStyle_MAKE_FIXED_SIZE: return "ForceEqualSize"; } return OUString(); } @@ -555,7 +555,7 @@ void writeLineInfo(tools::XmlWriter& rWriter, LineInfo const& rLineInfo) void writeGradient(tools::XmlWriter& rWriter, Gradient const& rGradient) { - rWriter.attribute("style", convertGradientStyle(rGradient.GetStyle())); + rWriter.attribute("style", convertGradientStyleToOUString(rGradient.GetStyle())); rWriter.attribute("startcolor", convertColorToString(rGradient.GetStartColor())); rWriter.attribute("endcolor", convertColorToString(rGradient.GetEndColor())); rWriter.attribute("angle", rGradient.GetAngle().get()); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 634a24235e16..2e2788fbac8b 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -8694,9 +8694,9 @@ void PDFWriterImpl::writeTransparentObject( TransparencyEmit& rObject ) bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject ) { // LO internal gradient -> PDF shading type: - // * GradientStyle::Linear: axial shading, using sampled-function with 2 samples + // * css::awt::GradientStyle_LINEAR: axial shading, using sampled-function with 2 samples // [t=0:colorStart, t=1:colorEnd] - // * GradientStyle::Axial: axial shading, using sampled-function with 3 samples + // * css::awt::GradientStyle_AXIAL: axial shading, using sampled-function with 3 samples // [t=0:colorEnd, t=0.5:colorStart, t=1:colorEnd] // * other styles: function shading with aSize.Width() * aSize.Height() samples sal_Int32 nFunctionObject = createObject(); @@ -8727,8 +8727,8 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject ) "<</FunctionType 0\n"); switch (rObject.m_aGradient.GetStyle()) { - case GradientStyle::Linear: - case GradientStyle::Axial: + case css::awt::GradientStyle_LINEAR: + case css::awt::GradientStyle_AXIAL: aLine.append("/Domain[ 0 1]\n"); break; default: @@ -8737,10 +8737,10 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject ) aLine.append("/Size[ " ); switch (rObject.m_aGradient.GetStyle()) { - case GradientStyle::Linear: + case css::awt::GradientStyle_LINEAR: aLine.append('2'); break; - case GradientStyle::Axial: + case css::awt::GradientStyle_AXIAL: aLine.append('3'); break; default: @@ -8773,13 +8773,13 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject ) sal_uInt8 aCol[3]; switch (rObject.m_aGradient.GetStyle()) { - case GradientStyle::Axial: + case css::awt::GradientStyle_AXIAL: aCol[0] = rObject.m_aGradient.GetEndColor().GetRed(); aCol[1] = rObject.m_aGradient.GetEndColor().GetGreen(); aCol[2] = rObject.m_aGradient.GetEndColor().GetBlue(); CHECK_RETURN( writeBufferBytes( aCol, 3 ) ); [[fallthrough]]; - case GradientStyle::Linear: + case css::awt::GradientStyle_LINEAR: { aCol[0] = rObject.m_aGradient.GetStartColor().GetRed(); aCol[1] = rObject.m_aGradient.GetStartColor().GetGreen(); @@ -8830,8 +8830,8 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject ) aLine.append( " 0 obj\n"); switch (rObject.m_aGradient.GetStyle()) { - case GradientStyle::Linear: - case GradientStyle::Axial: + case css::awt::GradientStyle_LINEAR: + case css::awt::GradientStyle_AXIAL: aLine.append("<</ShadingType 2\n"); break; default: @@ -8853,7 +8853,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject ) Degree10 nAngle = rObject.m_aGradient.GetAngle() % 3600_deg10; rObject.m_aGradient.GetBoundRect( aRect, aBoundRect, aCenter ); - const bool bLinear = (rObject.m_aGradient.GetStyle() == GradientStyle::Linear); + const bool bLinear = (rObject.m_aGradient.GetStyle() == css::awt::GradientStyle_LINEAR); double fBorder = aBoundRect.GetHeight() * rObject.m_aGradient.GetBorder() / 100.0; if ( !bLinear ) { @@ -8868,8 +8868,8 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject ) switch (rObject.m_aGradient.GetStyle()) { - case GradientStyle::Linear: - case GradientStyle::Axial: + case css::awt::GradientStyle_LINEAR: + case css::awt::GradientStyle_AXIAL: { aLine.append("/Domain[ 0 1 ]\n" "/Coords[ " ); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 4797436e1047..e309cc21a3b9 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -1947,8 +1947,8 @@ void PDFWriterImpl::DrawHatchLine_DrawLine(const Point& rStartPoint, const Point static bool lcl_canUsePDFAxialShading(const Gradient& rGradient) { switch (rGradient.GetStyle()) { - case GradientStyle::Linear: - case GradientStyle::Axial: + case css::awt::GradientStyle_LINEAR: + case css::awt::GradientStyle_AXIAL: break; default: return false; diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index 7ca75b1b1077..2c7d571e90e6 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -219,7 +219,7 @@ Gradient Wallpaper::ImplGetApplicationGradient() { Gradient g; g.SetAngle( 900_deg10 ); - g.SetStyle( GradientStyle::Linear ); + g.SetStyle( css::awt::GradientStyle_LINEAR ); g.SetStartColor( Application::GetSettings().GetStyleSettings().GetFaceColor() ); // no 'extreme' gradient when high contrast if( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 5a60184abfff..b89fb477c62b 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -133,7 +133,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, // if the clipping polypolygon is a rectangle, then it's the same size as the bounding of the // polypolygon, so pass in a NULL for the clipping parameter - if( aGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() == GradientStyle::Axial ) + if( aGradient.GetStyle() == css::awt::GradientStyle_LINEAR || rGradient.GetStyle() == css::awt::GradientStyle_AXIAL ) DrawLinearGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? nullptr : &aClixPolyPoly ); else DrawComplexGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? nullptr : &aClixPolyPoly ); @@ -233,7 +233,7 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect, rGradient.GetBoundRect( rRect, aRect, aCenter ); - bool bLinear = (rGradient.GetStyle() == GradientStyle::Linear); + bool bLinear = (rGradient.GetStyle() == css::awt::GradientStyle_LINEAR); double fBorder = rGradient.GetBorder() * aRect.GetHeight() / 100.0; if ( !bLinear ) { @@ -464,7 +464,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect, // all gradients are rendered as nested rectangles which shrink // equally in each dimension - except for 'square' gradients // which shrink to a central vertex but are not per-se square. - if( rGradient.GetStyle() != GradientStyle::Square ) + if( rGradient.GetStyle() != css::awt::GradientStyle_SQUARE ) { fScanIncY = std::min( fScanIncY, fScanIncX ); fScanIncX = fScanIncY; @@ -510,7 +510,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect, if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) ) break; - if( rGradient.GetStyle() == GradientStyle::Radial || rGradient.GetStyle() == GradientStyle::Elliptical ) + if( rGradient.GetStyle() == css::awt::GradientStyle_RADIAL || rGradient.GetStyle() == css::awt::GradientStyle_ELLIPTICAL ) aPoly = tools::Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 ); else aPoly = tools::Polygon( aRect ); @@ -591,7 +591,7 @@ tools::Long OutputDevice::GetGradientSteps(Gradient const& rGradient, tools::Rec tools::Long nMinRect = 0; - if (rGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() == GradientStyle::Axial) + if (rGradient.GetStyle() == css::awt::GradientStyle_LINEAR || rGradient.GetStyle() == css::awt::GradientStyle_AXIAL) nMinRect = rRect.GetHeight(); else nMinRect = std::min(rRect.GetWidth(), rRect.GetHeight()); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index cb33666cb06d..95c5fd5d0867 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -322,7 +322,7 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext) Gradient g; g.SetAngle(Degree10(mbHorz ? 0 : 900)); - g.SetStyle(GradientStyle::Linear); + g.SetStyle(css::awt::GradientStyle_LINEAR); g.SetStartColor(startCol); g.SetEndColor(endCol); diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index e152365a1342..a969bff5e242 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -265,7 +265,7 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rR Color const aLightGreen(0, 0xff, 0); Color const aDarkGreen(0, 0x40, 0); - Gradient aGradient(GradientStyle::Linear, aBlack, aWhite); + Gradient aGradient(css::awt::GradientStyle_LINEAR, aBlack, aWhite); aGradient.SetAngle(900_deg10); rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 4500), Size(aPaperSize.Width() - 2000, 500)), diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 6fb5f3514017..5b9b2b0289e1 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -244,7 +244,7 @@ public: Gradient aGradient; aGradient.SetStartColor(COL_BLUE); aGradient.SetEndColor(COL_GREEN); - aGradient.SetStyle(GradientStyle::Linear); + aGradient.SetStyle(css::awt::GradientStyle_LINEAR); rDev.DrawGradient(r, aGradient); } @@ -795,11 +795,11 @@ public: COL_GRAY, COL_GRAY, COL_LIGHTGRAY, COL_LIGHTBLUE, COL_LIGHTCYAN, COL_BLUE, COL_BLUE, COL_BLUE, COL_CYAN, COL_CYAN }; - GradientStyle eStyles[] = { - GradientStyle::Linear, GradientStyle::Axial, GradientStyle::Radial, GradientStyle::Elliptical, GradientStyle::Square, - GradientStyle::Rect, GradientStyle::FORCE_EQUAL_SIZE, GradientStyle::Linear, GradientStyle::Radial, GradientStyle::Linear, - GradientStyle::Linear, GradientStyle::Axial, GradientStyle::Radial, GradientStyle::Elliptical, GradientStyle::Square, - GradientStyle::Rect, GradientStyle::FORCE_EQUAL_SIZE, GradientStyle::Linear, GradientStyle::Radial, GradientStyle::Linear + css::awt::GradientStyle eStyles[] = { + css::awt::GradientStyle_LINEAR, css::awt::GradientStyle_AXIAL, css::awt::GradientStyle_RADIAL, css::awt::GradientStyle_ELLIPTICAL, css::awt::GradientStyle_SQUARE, + css::awt::GradientStyle_RECT, css::awt::GradientStyle::GradientStyle_MAKE_FIXED_SIZE, css::awt::GradientStyle_LINEAR, css::awt::GradientStyle_RADIAL, css::awt::GradientStyle_LINEAR, + css::awt::GradientStyle_LINEAR, css::awt::GradientStyle_AXIAL, css::awt::GradientStyle_RADIAL, css::awt::GradientStyle_ELLIPTICAL, css::awt::GradientStyle_SQUARE, + css::awt::GradientStyle_RECT, css::awt::GradientStyle::GradientStyle_MAKE_FIXED_SIZE, css::awt::GradientStyle_LINEAR, css::awt::GradientStyle_RADIAL, css::awt::GradientStyle_LINEAR }; sal_uInt16 nAngles[] = { 0, 0, 0, 0, 0, @@ -837,7 +837,7 @@ public: Gradient aGradient; aGradient.SetStartColor(COL_YELLOW); aGradient.SetEndColor(COL_RED); - aGradient.SetStyle(GradientStyle::Rect); + aGradient.SetStyle(css::awt::GradientStyle_RECT); aGradient.SetBorder(r.GetSize().Width()/20); rDev.DrawGradient(r, aGradient); } |