diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-14 12:48:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-15 07:28:07 +0100 |
commit | 0d9f3f7628f88fa66aaeea1f7148db620e17e728 (patch) | |
tree | 51cd0289fa399fbc338e0701f7ee13be8d228eb1 /sd/source/ui/func | |
parent | c82802a9ee3514d0b98fbb3783abbc17ec02c3b6 (diff) |
loplugin:changetoolsgen in sd
Change-Id: I41c5510f95167fe028f219fb593f12b75709bd65
Reviewed-on: https://gerrit.libreoffice.org/49726
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r-- | sd/source/ui/func/fudraw.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsfil.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fusnapln.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/futext.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuzoom.cxx | 16 |
7 files changed, 32 insertions, 32 deletions
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index a6e35ef27be3..082bacbbd982 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -599,10 +599,10 @@ bool FuDraw::SetPointer(SdrObject* pObj, const Point& rPos) Point aHitPosT(rPos); Point aHitPosB(rPos); - aHitPosR.X() += n2HitLog; - aHitPosL.X() -= n2HitLog; - aHitPosT.Y() += n2HitLog; - aHitPosB.Y() -= n2HitLog; + aHitPosR.setX( aHitPosR.X() + n2HitLog ); + aHitPosL.setX( aHitPosL.X() - n2HitLog ); + aHitPosT.setY( aHitPosT.Y() + n2HitLog ); + aHitPosB.setY( aHitPosB.Y() - n2HitLog ); if ( !pObj->IsClosedObj() || ( SdrObjectPrimitiveHit(*pObj, aHitPosR, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) && diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index e0ad64bd7169..8a63c098f0f0 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -368,8 +368,8 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) if (aSize.Height() == 0 || aSize.Width() == 0) { // rectangle with balanced edge ratio - aSize.Width() = 14100; - aSize.Height() = 10000; + aSize.setWidth( 14100 ); + aSize.setHeight( 10000 ); Size aTmp = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(aUnit)); aSz.Width = aTmp.Width(); aSz.Height = aTmp.Height(); @@ -384,8 +384,8 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) ::tools::Rectangle aWinRect(aPos, mpWindow->GetOutputSizePixel() ); aPos = aWinRect.Center(); aPos = mpWindow->PixelToLogic(aPos); - aPos.X() -= aSize.Width() / 2; - aPos.Y() -= aSize.Height() / 2; + aPos.setX( aPos.X() - aSize.Width() / 2 ); + aPos.setY( aPos.Y() - aSize.Height() / 2 ); aRect = ::tools::Rectangle(aPos, aSize); } @@ -544,8 +544,8 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) if (aSize.Height() == 0 || aSize.Width() == 0) { // rectangle with balanced edge ratio - aSize.Width() = 14100; - aSize.Height() = 10000; + aSize.setWidth( 14100 ); + aSize.setHeight( 10000 ); Size aTmp = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(aMapUnit)); aSz.Width = aTmp.Width(); aSz.Height = aTmp.Height(); @@ -747,8 +747,8 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq ) if( mpWindow ) { aPos = mpWindow->PixelToLogic( ::tools::Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() ); - aPos.X() -= aSize.Width() >> 1; - aPos.Y() -= aSize.Height() >> 1; + aPos.setX( aPos.X() - (aSize.Width() >> 1) ); + aPos.setY( aPos.Y() - (aSize.Height() >> 1) ); } mpView->InsertMediaURL( aURL, nAction, aPos, aSize, bLink ) ; diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 9c0fd2c6d172..b3f3d4ec158f 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -516,15 +516,15 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) limit object size if necessary */ Size aSize(pOutliner->CalcTextSize()); Size aMaxSize = mpDoc->GetMaxObjSize(); - aSize.Height() = std::min(aSize.Height(), aMaxSize.Height()); - aSize.Width() = std::min(aSize.Width(), aMaxSize.Width()); + aSize.setHeight( std::min(aSize.Height(), aMaxSize.Height()) ); + aSize.setWidth( std::min(aSize.Width(), aMaxSize.Width()) ); aSize = mpWindow->LogicToPixel(aSize); // put it at the center of the window Size aTemp(mpWindow->GetOutputSizePixel()); Point aPos(aTemp.Width() / 2, aTemp.Height() / 2); - aPos.X() -= aSize.Width() / 2; - aPos.Y() -= aSize.Height() / 2; + aPos.setX( aPos.X() - aSize.Width() / 2 ); + aPos.setY( aPos.Y() - aSize.Height() / 2 ); aSize = mpWindow->PixelToLogic(aSize); aPos = mpWindow->PixelToLogic(aPos); pTO->SetLogicRect(::tools::Rectangle(aPos, aSize)); diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 9fbca6fa8be8..29e578c7ffa2 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -1220,10 +1220,10 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) Point aHitPosT(rPos); Point aHitPosB(rPos); - aHitPosR.X() += n2HitLog; - aHitPosL.X() -= n2HitLog; - aHitPosT.Y() += n2HitLog; - aHitPosB.Y() -= n2HitLog; + aHitPosR.setX( aHitPosR.X() + n2HitLog ); + aHitPosL.setX( aHitPosL.X() - n2HitLog ); + aHitPosT.setY( aHitPosT.Y() + n2HitLog ); + aHitPosB.setY( aHitPosB.Y() - n2HitLog ); if ( !bClosed || !bFilled || diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index 96e135e9299b..b0b38e48c5a3 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -163,8 +163,8 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) } Point aHlpPos; - aHlpPos.X() = static_cast<const SfxInt32Item&>( pArgs->Get(ATTR_SNAPLINE_X)).GetValue(); - aHlpPos.Y() = static_cast<const SfxInt32Item&>( pArgs->Get(ATTR_SNAPLINE_Y)).GetValue(); + aHlpPos.setX( static_cast<const SfxInt32Item&>( pArgs->Get(ATTR_SNAPLINE_X)).GetValue() ); + aHlpPos.setY( static_cast<const SfxInt32Item&>( pArgs->Get(ATTR_SNAPLINE_Y)).GetValue() ); pPV->PagePosToLogic(aHlpPos); if ( bCreateNew ) diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 19c0ce638516..9108f5709c2a 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -784,8 +784,8 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) if (bSnapEnabled) mpView->SetSnapEnabled(false); - aPnt.X() += nDrgLog + nDrgLog; - aPnt.Y() += nDrgLog + nDrgLog; + aPnt.setX( aPnt.X() + nDrgLog + nDrgLog ); + aPnt.setY( aPnt.Y() + nDrgLog + nDrgLog ); mpView->MovAction(aPnt); mxTextObj.reset( dynamic_cast< SdrTextObj* >( mpView->GetCreateObj() ) ); diff --git a/sd/source/ui/func/fuzoom.cxx b/sd/source/ui/func/fuzoom.cxx index a739f2ec12c0..b059d2e2dba5 100644 --- a/sd/source/ui/func/fuzoom.cxx +++ b/sd/source/ui/func/fuzoom.cxx @@ -117,8 +117,8 @@ bool FuZoom::MouseMove(const MouseEvent& rMEvt) { Size aWorkSize = mpView->GetWorkArea().GetSize(); Size aPageSize = mpView->GetSdrPageView()->GetPage()->GetSize(); - aScroll.X() /= aWorkSize.Width() / aPageSize.Width(); - aScroll.Y() /= aWorkSize.Height() / aPageSize.Height(); + aScroll.setX( aScroll.X() / aWorkSize.Width() / aPageSize.Width() ); + aScroll.setY( aScroll.Y() / aWorkSize.Height() / aPageSize.Height() ); mpViewShell->Scroll(aScroll.X(), aScroll.Y()); aBeginPosPix = aPosPix; } @@ -163,16 +163,16 @@ bool FuZoom::MouseButtonUp(const MouseEvent& rMEvt) Size aSize = mpWindow->PixelToLogic(mpWindow->GetOutputSizePixel()); if ( rMEvt.IsMod1() ) { - aSize.Width() *= 2; - aSize.Height() *= 2; + aSize.setWidth( aSize.Width() * 2 ); + aSize.setHeight( aSize.Height() * 2 ); } else { - aSize.Width() /= 2; - aSize.Height() /= 2; + aSize.setWidth( aSize.Width() / 2 ); + aSize.setHeight( aSize.Height() / 2 ); } - aPos.X() -= aSize.Width() / 2; - aPos.Y() -= aSize.Height() / 2; + aPos.setX( aPos.X() - aSize.Width() / 2 ); + aPos.setY( aPos.Y() - aSize.Height() / 2 ); aZoomRect.SetPos(aPos); aZoomRect.SetSize(aSize); } |