diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 10:23:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-17 07:07:58 +0100 |
commit | e2e4798b35ecd33a09dda85c575d7a7709ab9414 (patch) | |
tree | 857c8bc0ee9061f630700921de79556b55e5725c /sc/source/ui/view/output.cxx | |
parent | d4be0bfedf8497ad3b4244aeeb0b761b5c6b128b (diff) |
Revert "loplugin:changetoolsgen in sc" 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 95fab7cbf2f0576d0f728bed8898b7ff769d90e6.
Change-Id: Icbdcc0f4227d88812be12e18ba6961088db80c3e
Reviewed-on: https://gerrit.libreoffice.org/49840
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view/output.cxx')
-rw-r--r-- | sc/source/ui/view/output.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 5bb9df7a5eb2..16db6a191dc1 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -831,10 +831,10 @@ void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldD { long nPosZero = 0; tools::Rectangle aPaintRect = rRect; - aPaintRect.SetTop( aPaintRect.Top() + 2 * nOneY ); - aPaintRect.SetBottom( aPaintRect.Bottom() - 2 * nOneY ); - aPaintRect.SetLeft( aPaintRect.Left() + 2 * nOneX ); - aPaintRect.SetRight( aPaintRect.Right() - 2 * nOneX ); + aPaintRect.AdjustTop(2 * nOneY ); + aPaintRect.AdjustBottom( -(2 * nOneY) ); + aPaintRect.Left() += 2 * nOneX; + aPaintRect.AdjustRight( -(2 * nOneX) ); if(pOldDataBarInfo->mnZero) { // need to calculate null point in cell @@ -1267,16 +1267,16 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot if (ePart == SC_SHADOW_HSTART) { if (eLoc == SvxShadowLocation::TopLeft || eLoc == SvxShadowLocation::BottomLeft) - aRect.SetRight( aRect.Right() - nSizeX ); + aRect.AdjustRight( -nSizeX ); else - aRect.SetLeft( aRect.Left() + nSizeX ); + aRect.AdjustLeft(nSizeX ); } if (ePart == SC_SHADOW_VSTART) { if (eLoc == SvxShadowLocation::TopLeft || eLoc == SvxShadowLocation::TopRight) - aRect.SetBottom( aRect.Bottom() - nSizeY ); + aRect.AdjustBottom( -nSizeY ); else - aRect.SetTop( aRect.Top() + nSizeY ); + aRect.AdjustTop(nSizeY ); } //! merge rectangles? @@ -2405,11 +2405,11 @@ void ScOutputData::DrawClipMarks() Point( nStartPosX+nOutWidth-1, nPosY+nOutHeight-1 ) ); } - aCellRect.SetBottom( aCellRect.Bottom() - 1 ); // don't paint over the cell grid + aCellRect.AdjustBottom( -1 ); // don't paint over the cell grid if ( bLayoutRTL ) - aCellRect.SetLeft( aCellRect.Left() + 1 ); + aCellRect.AdjustLeft(1 ); else - aCellRect.SetRight( aCellRect.Right() - 1 ); + aCellRect.AdjustRight( -1 ); long nMarkPixel = static_cast<long>( SC_CLIPMARK_SIZE * mnPPTX ); Size aMarkSize( nMarkPixel, (nMarkPixel-1)*2 ); |