summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/sdview4.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-16 08:43:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-16 13:23:40 +0100
commit4beed2ba7335fdb211aca7f70a144ffecf90a781 (patch)
tree23b645a3a2dca69466eaa664a34556d110745c95 /sd/source/ui/view/sdview4.cxx
parent79afa1d9b3ac33b75512095c6383db7f47342f26 (diff)
Revert "loplugin:changetoolsgen in sd" and reapply the 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 0d9f3f7628f88fa66aaeea1f7148db620e17e728. Change-Id: I33f79bf755aedc1ed48d95f7b82f3fabed1347fb Reviewed-on: https://gerrit.libreoffice.org/49834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/view/sdview4.cxx')
-rw-r--r--sd/source/ui/view/sdview4.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index de973ae8e82d..37366b5bf9cb 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -193,8 +193,8 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
pNewGrafObj = new SdrGrafObj( rGraphic, ::tools::Rectangle( rPos, aSize ) );
SdrPage* pPage = pPV->GetPage();
Size aPageSize( pPage->GetSize() );
- aPageSize.setWidth( aPageSize.Width() - pPage->GetLeftBorder() + pPage->GetRightBorder() );
- aPageSize.setHeight( aPageSize.Height() - pPage->GetUpperBorder() + pPage->GetLowerBorder() );
+ aPageSize.AdjustWidth( -(pPage->GetLeftBorder() + pPage->GetRightBorder()) );
+ aPageSize.AdjustHeight( -(pPage->GetUpperBorder() + pPage->GetLowerBorder()) );
pNewGrafObj->AdjustToMaxRect( ::tools::Rectangle( Point(), aPageSize ), true );
SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER;