diff options
Diffstat (limited to 'vcl/source')
-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 |
9 files changed, 47 insertions, 47 deletions
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); |