diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2023-05-12 15:32:51 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2023-05-15 15:19:53 +0200 |
commit | 438f0752deaf7d6e6d9d1df381b64aca4628e944 (patch) | |
tree | f1907b25dad1cbf2604b16c657e11f5623c8b5b2 /oox/source/export | |
parent | efa965969c6d3dfe5745a535605a6b9a482a03bd (diff) |
MCGR: consolidations/cleanups for changes so far
Change-Id: I85cf40e4803b0485bb40349d8e81adc8123666c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151706
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'oox/source/export')
-rw-r--r-- | oox/source/export/chartexport.cxx | 5 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 29 |
2 files changed, 16 insertions, 18 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index da8ef4924615..0c223bb452aa 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1916,10 +1916,9 @@ void ChartExport::exportSolidFill(const Reference< XPropertySet >& xPropSet) if (basegfx::utils::fillGradient2FromAny(aTransparenceGradient, rTransparenceValue)) { - basegfx::ColorStops aColorStops; - basegfx::utils::fillColorStopsFromAny(aColorStops, rTransparenceValue); + const basegfx::BColorStops aColorStops(rTransparenceValue); basegfx::BColor aSingleColor; - bNeedGradientFill = !basegfx::utils::isSingleColor(aColorStops, aSingleColor); + bNeedGradientFill = !aColorStops.isSingleColor(aSingleColor); } if (!bNeedGradientFill && 0 != aTransparenceGradient.StartColor) diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index fa587d6190bf..11d562ff41b9 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -479,10 +479,9 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet ) { if (basegfx::utils::fillGradient2FromAny(aTransparenceGradient, mAny)) { - basegfx::ColorStops aColorStops; - basegfx::utils::fillColorStopsFromAny(aColorStops, mAny); + const basegfx::BColorStops aColorStops(mAny); basegfx::BColor aSingleColor; - bNeedGradientFill = !basegfx::utils::isSingleColor(aColorStops, aSingleColor); + bNeedGradientFill = !aColorStops.isSingleColor(aSingleColor); } if (!bNeedGradientFill && 0 != aTransparenceGradient.StartColor) @@ -779,8 +778,8 @@ void DrawingML::WriteGradientFill( const awt::Gradient2* pColorGradient, sal_Int32 nFixColor, const awt::Gradient2* pTransparenceGradient, double fFixTransparence) { - basegfx::ColorStops aColorStops; - basegfx::ColorStops aAlphaStops; + basegfx::BColorStops aColorStops; + basegfx::BColorStops aAlphaStops; basegfx::BColor aSingleColor(::Color(ColorTransparency, nFixColor).getBColor()); basegfx::BColor aSingleAlpha(fFixTransparence); awt::Gradient2 aGradient; @@ -835,12 +834,12 @@ void DrawingML::WriteGradientFill( { // we need to 'double' the gradient to make it appear as what we call // 'axial', but also scale and mirror in doing so - basegfx::ColorStops aNewColorStops; - basegfx::ColorStops aNewAlphaStops; + basegfx::BColorStops aNewColorStops; + basegfx::BColorStops aNewAlphaStops; // add mirrored gradients, scaled to [0.0 .. 0.5] - basegfx::ColorStops::const_reverse_iterator aRevCurrColor(aColorStops.rbegin()); - basegfx::ColorStops::const_reverse_iterator aRevCurrAlpha(aAlphaStops.rbegin()); + basegfx::BColorStops::const_reverse_iterator aRevCurrColor(aColorStops.rbegin()); + basegfx::BColorStops::const_reverse_iterator aRevCurrAlpha(aAlphaStops.rbegin()); while (aRevCurrColor != aColorStops.rend() && aRevCurrAlpha != aAlphaStops.rend()) { @@ -850,8 +849,8 @@ void DrawingML::WriteGradientFill( aRevCurrAlpha++; } - basegfx::ColorStops::const_iterator aCurrColor(aColorStops.begin()); - basegfx::ColorStops::const_iterator aCurrAlpha(aAlphaStops.begin()); + basegfx::BColorStops::const_iterator aCurrColor(aColorStops.begin()); + basegfx::BColorStops::const_iterator aCurrAlpha(aAlphaStops.begin()); if (basegfx::fTools::equalZero(aCurrColor->getStopOffset())) { @@ -887,8 +886,8 @@ void DrawingML::WriteGradientFill( // case awt::GradientStyle_SQUARE: { // all these types need the gradients to be mirrored - basegfx::utils::reverseColorStops(aColorStops); - basegfx::utils::reverseColorStops(aAlphaStops); + aColorStops.reverseColorStops(); + aAlphaStops.reverseColorStops(); bRadialOrEllipticalOrRectOrSquare = true; break; @@ -898,8 +897,8 @@ void DrawingML::WriteGradientFill( // export GradientStops (with alpha) mpFS->startElementNS(XML_a, XML_gsLst); - basegfx::ColorStops::const_iterator aCurrColor(aColorStops.begin()); - basegfx::ColorStops::const_iterator aCurrAlpha(aAlphaStops.begin()); + basegfx::BColorStops::const_iterator aCurrColor(aColorStops.begin()); + basegfx::BColorStops::const_iterator aCurrAlpha(aAlphaStops.begin()); while (aCurrColor != aColorStops.end() && aCurrAlpha != aAlphaStops.end()) { |