summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/viewdraw.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-21 10:13:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-21 12:58:49 +0100
commit180f2860525fb7ed4892b417b20c3f2f9cbb44e0 (patch)
treef4c11ab79c1ba022f31944668eae2f20a8f5c808 /sw/source/uibase/uiview/viewdraw.cxx
parentb99dd5350c21ad4096af0ae281c518b127fa37b5 (diff)
loplugin:changetoolsgen in sw
Change-Id: If07efe4c15cfc28df38a9327856d39313ca78d50 Reviewed-on: https://gerrit.libreoffice.org/50078 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/uiview/viewdraw.cxx')
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 4366440bf8d4..b80b3008be62 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -123,16 +123,16 @@ void SwView::ExecDraw(SfxRequest& rReq)
const SwRect& rVisArea = m_pWrtShell->VisArea();
Point aStartPos = rVisArea.Center();
if(rVisArea.Width() > aDocSize.Width())
- aStartPos.X() = aDocSize.Width() / 2 + rVisArea.Left();
+ aStartPos.setX( aDocSize.Width() / 2 + rVisArea.Left() );
if(rVisArea.Height() > aDocSize.Height())
- aStartPos.Y() = aDocSize.Height() / 2 + rVisArea.Top();
+ aStartPos.setY( aDocSize.Height() / 2 + rVisArea.Top() );
//determine the size of the object
if(pObj->IsGroupObject())
{
const tools::Rectangle& rBoundRect = static_cast<SdrObjGroup*>(pObj)->GetCurrentBoundRect();
- aStartPos.X() -= rBoundRect.GetWidth()/2;
- aStartPos.Y() -= rBoundRect.GetHeight()/2;
+ aStartPos.AdjustX( -(rBoundRect.GetWidth()/2) );
+ aStartPos.AdjustY( -(rBoundRect.GetHeight()/2) );
}
// TODO: unmark all other
@@ -168,10 +168,10 @@ void SwView::ExecDraw(SfxRequest& rReq)
Size aPrefSize( pObj->GetSnapRect().GetSize() );
if( rVisArea.Width() > aDocSize.Width())
- aPos.X() = aDocSize.Width() / 2 + rVisArea.Left();
+ aPos.setX( aDocSize.Width() / 2 + rVisArea.Left() );
if(rVisArea.Height() > aDocSize.Height())
- aPos.Y() = aDocSize.Height() / 2 + rVisArea.Top();
+ aPos.setY( aDocSize.Height() / 2 + rVisArea.Top() );
if( aPrefSize.Width() && aPrefSize.Height() )
{