summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun7.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-16 10:23:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-17 07:07:58 +0100
commite2e4798b35ecd33a09dda85c575d7a7709ab9414 (patch)
tree857c8bc0ee9061f630700921de79556b55e5725c /sc/source/ui/view/viewfun7.cxx
parentd4be0bfedf8497ad3b4244aeeb0b761b5c6b128b (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/viewfun7.cxx')
-rw-r--r--sc/source/ui/view/viewfun7.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index bf50a0739c87..57b56692f1fa 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -64,11 +64,11 @@ static void lcl_AdjustInsertPos( ScViewData* pData, Point& rPos, Size& rSize )
long y = aPgSize.Height() - rPos.Y() - rSize.Height();
// if necessary: adjustments (80/200) for pixel approx. errors
if( x < 0 )
- rPos.setX( rPos.X() + x + 80 );
+ rPos.AdjustX(x + 80 );
if( y < 0 )
- rPos.setY( rPos.Y() + y + 200 );
- rPos.setX( rPos.X() + rSize.Width() / 2 ); // position at paste is center
- rPos.setY( rPos.Y() + rSize.Height() / 2 );
+ rPos.AdjustY(y + 200 );
+ rPos.AdjustX(rSize.Width() / 2 ); // position at paste is center
+ rPos.AdjustY(rSize.Height() / 2 );
}
void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
@@ -347,7 +347,7 @@ bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X
// don't call AdjustInsertPos
Point aInsPos = rPos;
if ( GetViewData().GetDocument()->IsNegativePage( GetViewData().GetTabNo() ) )
- aInsPos.setX( aInsPos.X() - aSize.Width() );
+ aInsPos.AdjustX( -(aSize.Width()) );
tools::Rectangle aRect( aInsPos, aSize );
ScDrawView* pDrView = GetScDrawView();
@@ -426,7 +426,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
Size aSize = pWin->LogicToLogic( rGraphic.GetPrefSize(), &aSourceMap, &aDestMap );
if ( GetViewData().GetDocument()->IsNegativePage( GetViewData().GetTabNo() ) )
- aPos.setX( aPos.X() - aSize.Width() );
+ aPos.AdjustX( -(aSize.Width()) );
GetViewData().GetViewShell()->SetDrawShell( true );
tools::Rectangle aRect(aPos, aSize);