diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 12:18:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 19:52:06 +0100 |
commit | 6d9d8a723f7d92057f26c884ced975f13fc90d8f (patch) | |
tree | b6790dd0b633c6e1cf8859fc59a49b20fb242865 /emfio/source | |
parent | 1a839524d46cc6cf5924db7f9dcd6847f050ec0f (diff) |
Revert "loplugin:changetoolsgen in editeng..extensions" 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 2096aac8b958db66b3ddce16b06dca87edc8ba0a.
Change-Id: I4b5941c4119b95aaefb9180a0ca95a1dbb4ec317
Reviewed-on: https://gerrit.libreoffice.org/49844
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'emfio/source')
-rw-r--r-- | emfio/source/reader/mtftools.cxx | 6 | ||||
-rw-r--r-- | emfio/source/reader/wmfreader.cxx | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index b265849f24e6..81aa50e2bf04 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -755,7 +755,7 @@ namespace emfio if ( pLineStyle->aLineInfo.GetStyle() == LineStyle::Dash ) { - aSize.setWidth( aSize.Width() + 1 ); + aSize.AdjustWidth(1 ); long nDotLen = ImplMap( aSize ).Width(); pLineStyle->aLineInfo.SetDistance( nDotLen ); pLineStyle->aLineInfo.SetDotLen( nDotLen ); @@ -1517,8 +1517,8 @@ namespace emfio // check whether there is a font rotation applied via transformation Point aP1( ImplMap( Point() ) ); Point aP2( ImplMap( Point( 0, 100 ) ) ); - aP2.setX( aP2.X() - aP1.X() ); - aP2.setY( aP2.Y() - aP1.Y() ); + aP2.AdjustX( -(aP1.X()) ); + aP2.AdjustY( -(aP1.Y()) ); double fX = aP2.X(); double fY = aP2.Y(); if ( fX ) diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx index bd584af39fde..233b2f5552a3 100644 --- a/emfio/source/reader/wmfreader.cxx +++ b/emfio/source/reader/wmfreader.cxx @@ -160,8 +160,8 @@ namespace emfio Point aBR, aTL; aBR = ReadYX(); aTL = ReadYX(); - aBR.setX( --aBR.X() ); - aBR.Y()--; + aBR.AdjustX( -1 ); + aBR.AdjustY( -1 ); return tools::Rectangle( aTL, aBR ); } @@ -1479,10 +1479,10 @@ namespace emfio bool bRet = true; tools::Rectangle aBound; - aBound.Left() = RECT_MAX; - aBound.Top() = RECT_MAX; - aBound.Right() = RECT_MIN; - aBound.Bottom() = RECT_MIN; + aBound.SetLeft( RECT_MAX ); + aBound.SetTop( RECT_MAX ); + aBound.SetRight( RECT_MIN ); + aBound.SetBottom( RECT_MIN ); bool bBoundsDetermined = false; auto nPos = pStm->Tell(); |