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/hdrcont.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/hdrcont.cxx')
-rw-r--r-- | sc/source/ui/view/hdrcont.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index bdb7594ee712..a73b7d84d174 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -82,8 +82,8 @@ ScHeaderControl::ScHeaderControl( vcl::Window* pParent, SelectionEngine* pSelect Size aSize = LogicToPixel( Size( GetTextWidth("8888"), GetTextHeight() ) ); - aSize.setWidth( aSize.Width() + 4 ); // place for highlight border - aSize.setHeight( aSize.Height() + 3 ); + aSize.AdjustWidth(4 ); // place for highlight border + aSize.AdjustHeight(3 ); SetSizePixel( aSize ); nWidth = nSmallWidth = aSize.Width(); @@ -539,15 +539,15 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools Point aTxtPos(aScrPos); if (bVertical) { - aTxtPos.setX( aTxtPos.X() + (nBarSize-aTextSize.Width())/2 ); - aTxtPos.setY( aTxtPos.Y() + (nSizePix*nLayoutSign-aTextSize.Height())/2 ); + aTxtPos.AdjustX((nBarSize-aTextSize.Width())/2 ); + aTxtPos.AdjustY((nSizePix*nLayoutSign-aTextSize.Height())/2 ); if ( bMirrored ) - aTxtPos.setX( aTxtPos.X() + 1 ); // dark border is left instead of right + aTxtPos.AdjustX(1 ); // dark border is left instead of right } else { - aTxtPos.setX( aTxtPos.X() + (nSizePix*nLayoutSign-aTextSize.Width()+1)/2 ); - aTxtPos.setY( aTxtPos.Y() + (nBarSize-aTextSize.Height())/2 ); + aTxtPos.AdjustX((nSizePix*nLayoutSign-aTextSize.Width()+1)/2 ); + aTxtPos.AdjustY((nBarSize-aTextSize.Height())/2 ); } DrawText( aTxtPos, aString ); } @@ -711,13 +711,13 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt ) tools::Rectangle aVis( aPoint,GetOutputSizePixel() ); if (bVertical) { - aVis.Left() = LONG_MIN; - aVis.Right() = LONG_MAX; + aVis.SetLeft( LONG_MIN ); + aVis.SetRight( LONG_MAX ); } else { - aVis.Top() = LONG_MIN; - aVis.Bottom() = LONG_MAX; + aVis.SetTop( LONG_MIN ); + aVis.SetBottom( LONG_MAX ); } pSelEngine->SetVisibleArea( aVis ); |