diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 11:56:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 15:13:53 +0100 |
commit | 1d180f48bc61444c610c35083e35745d38c6cce2 (patch) | |
tree | e580741aa902908a9fcf0c4b224e93ff42da1405 /filter/source/svg/svgwriter.cxx | |
parent | 26783527823883ccd5bbf3b9e014a0a3c1e3a022 (diff) |
Revert "loplugin:changetoolsgen in filter..framework" and reapply plugin
because I
(a) forgot to insert parentheses which changes the meaning of some expressions and
(b) I now use the AdjustFoo calls when changing unary operations, which reads much better
This reverts commit bf8a6cacd06d7c1961b5db8cc79ee4bbdb342e43.
Change-Id: I4b5a9bf0c38ee1b57af91e6b7f184f1e8807f6f7
Reviewed-on: https://gerrit.libreoffice.org/49843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source/svg/svgwriter.cxx')
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index bd3a50df0cc0..a080e1c6a1f6 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1612,9 +1612,9 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos, const vcl::Font& rFont = mpVDev->GetFont(); if( rFont.GetAlignment() == ALIGN_TOP ) - aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() ); + aBaseLinePos.AdjustY(aMetric.GetAscent() ); else if( rFont.GetAlignment() == ALIGN_BOTTOM ) - aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() ); + aBaseLinePos.AdjustY( -(aMetric.GetDescent()) ); implMap( rPos, aPos ); @@ -2250,8 +2250,7 @@ void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPo // Setting x value of a gradient vector to rotation center to // place a gradient vector in a target polygon. // This would help editing it in SVG editors like inkscape. - aPoly[ 0 ].setX( aCenter.X() ); - aPoly[ 1 ].setX( aCenter.X() ); + aPoly[ 0 ].X() = aPoly[ 1 ].X() = aCenter.X(); aPoly[ 0 ].setY( aRect.Top() ); aPoly[ 1 ].setY( aRect.Bottom() ); aPoly.Rotate( aCenter, nAngle ); @@ -2543,9 +2542,9 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText, const vcl::Font& rFont = mpVDev->GetFont(); if( rFont.GetAlignment() == ALIGN_TOP ) - aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() ); + aBaseLinePos.AdjustY(aMetric.GetAscent() ); else if( rFont.GetAlignment() == ALIGN_BOTTOM ) - aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() ); + aBaseLinePos.AdjustY( -(aMetric.GetDescent()) ); ImplMap( rPos, aPos ); |