summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/sdview3.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-14 12:48:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-15 07:28:07 +0100
commit0d9f3f7628f88fa66aaeea1f7148db620e17e728 (patch)
tree51cd0289fa399fbc338e0701f7ee13be8d228eb1 /sd/source/ui/view/sdview3.cxx
parentc82802a9ee3514d0b98fbb3783abbc17ec02c3b6 (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/view/sdview3.cxx')
-rw-r--r--sd/source/ui/view/sdview3.cxx64
1 files changed, 32 insertions, 32 deletions
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index fdc7237974be..3297d81d01db 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -124,22 +124,22 @@ void ImpCheckInsertPos(Point& rPos, const Size& rSize, const ::tools::Rectangle&
{
if(aMarkRect.Left() < rWorkArea.Left())
{
- rPos.X() += rWorkArea.Left() - aMarkRect.Left();
+ rPos.setX( rPos.X() + rWorkArea.Left() - aMarkRect.Left() );
}
if(aMarkRect.Right() > rWorkArea.Right())
{
- rPos.X() -= aMarkRect.Right() - rWorkArea.Right();
+ rPos.setX( rPos.X() - aMarkRect.Right() - rWorkArea.Right() );
}
if(aMarkRect.Top() < rWorkArea.Top())
{
- rPos.Y() += rWorkArea.Top() - aMarkRect.Top();
+ rPos.setY( rPos.Y() + rWorkArea.Top() - aMarkRect.Top() );
}
if(aMarkRect.Bottom() > rWorkArea.Bottom())
{
- rPos.Y() -= aMarkRect.Bottom() - rWorkArea.Bottom();
+ rPos.setY( rPos.Y() - aMarkRect.Bottom() - rWorkArea.Bottom() );
}
}
}
@@ -545,8 +545,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
const SdrGluePoint& rGluePoint = (*pGlueList)[nInd];
Point aPosition = rGluePoint.GetAbsolutePos(*pConnObj);
- aPosition.X() += aVector.Width();
- aPosition.Y() += aVector.Height();
+ aPosition.setX( aPosition.X() + aVector.Width() );
+ aPosition.setY( aPosition.Y() + aVector.Height() );
pCloneEdge->SetTailPoint(false, aPosition);
}
}
@@ -577,8 +577,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
const SdrGluePoint& rGluePoint = (*pGlueList)[nInd];
Point aPosition = rGluePoint.GetAbsolutePos(*pConnObj);
- aPosition.X() += aVector.Width();
- aPosition.Y() += aVector.Height();
+ aPosition.setX( aPosition.X() + aVector.Width() );
+ aPosition.setY( aPosition.Y() + aVector.Height() );
pCloneEdge->SetTailPoint(true, aPosition);
}
}
@@ -651,8 +651,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
// #i120393# Clipboard data uses full object geometry range
const Size aSize( pWorkPage->GetAllObjBoundRect().GetSize() );
- maDropPos.X() = pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 );
- maDropPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 );
+ maDropPos.setX( pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 ) );
+ maDropPos.setY( pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 ) );
// delete pages, that are not of any interest for us
for( long i = ( pWorkModel->GetPageCount() - 1 ); i >= 0; i-- )
@@ -819,8 +819,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
// #i120393# Clipboard data uses full object geometry range
const Size aSize( pWorkPage->GetAllObjBoundRect().GetSize() );
- maDropPos.X() = pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 );
- maDropPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 );
+ maDropPos.setX( pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 ) );
+ maDropPos.setY( pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 ) );
}
bReturn = Paste(*pModel, maDropPos, pPage, nPasteOptions);
@@ -844,8 +844,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
::tools::Rectangle aRect( pObj->GetLogicRect() );
Size aSize( aRect.GetSize() );
- maDropPos.X() -= ( aSize.Width() >> 1 );
- maDropPos.Y() -= ( aSize.Height() >> 1 );
+ maDropPos.setX( maDropPos.X() - ( aSize.Width() >> 1 ) );
+ maDropPos.setY( maDropPos.Y() - ( aSize.Height() >> 1 ) );
aRect.SetPos( maDropPos );
pObj->SetLogicRect( aRect );
@@ -893,8 +893,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
// #i120393# Clipboard data uses full object geometry range
const Size aSize( pWorkPage->GetAllObjBoundRect().GetSize() );
- maDropPos.X() = pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 );
- maDropPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 );
+ maDropPos.setX( pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 ) );
+ maDropPos.setY( pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 ) );
}
// delete pages, that are not of any interest for us
@@ -978,8 +978,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( !aSize.Width() || !aSize.Height() )
{
- aSize.Width() = 14100;
- aSize.Height() = 10000;
+ aSize.setWidth( 14100 );
+ aSize.setHeight( 10000 );
aSize = OutputDevice::LogicToLogic(Size(14100, 10000), MapMode(MapUnit::Map100thMM), MapMode(aMapUnit));
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
@@ -991,8 +991,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
Size aMaxSize( mrDoc.GetMaxObjSize() );
- maDropPos.X() -= std::min( aSize.Width(), aMaxSize.Width() ) >> 1;
- maDropPos.Y() -= std::min( aSize.Height(), aMaxSize.Height() ) >> 1;
+ maDropPos.setX( maDropPos.X() - (std::min( aSize.Width(), aMaxSize.Width() ) >> 1) );
+ maDropPos.setY( maDropPos.Y() - (std::min( aSize.Height(), aMaxSize.Height() ) >> 1) );
::tools::Rectangle aRect( maDropPos, aSize );
SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect );
@@ -1161,8 +1161,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
Size aMaxSize( mrDoc.GetMaxObjSize() );
- maDropPos.X() -= std::min( aSize.Width(), aMaxSize.Width() ) >> 1;
- maDropPos.Y() -= std::min( aSize.Height(), aMaxSize.Height() ) >> 1;
+ maDropPos.setX( maDropPos.X() - (std::min( aSize.Width(), aMaxSize.Width() ) >> 1) );
+ maDropPos.setY( maDropPos.Y() - (std::min( aSize.Height(), aMaxSize.Height() ) >> 1) );
::tools::Rectangle aRect( maDropPos, aSize );
SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect );
@@ -1221,8 +1221,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
// #i120393# Clipboard data uses full object geometry range
const Size aSize( pWorkPage->GetAllObjBoundRect().GetSize() );
- aInsertPos.X() = pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 );
- aInsertPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 );
+ aInsertPos.setX( pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 ) );
+ aInsertPos.setY( pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 ) );
}
// restrict movement to WorkArea
@@ -1253,8 +1253,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
// #i120393# Clipboard data uses full object geometry range
const Size aSize( pWorkPage->GetAllObjBoundRect().GetSize() );
- aInsertPos.X() = pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 );
- aInsertPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 );
+ aInsertPos.setX( pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 ) );
+ aInsertPos.setY( pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 ) );
}
bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap.get(), nFormat == SotClipboardFormatId::NONE );
@@ -1302,8 +1302,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
// #i120393# Clipboard data uses full object geometry range
const Size aSize( pWorkPage->GetAllObjBoundRect().GetSize() );
- aInsertPos.X() = pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 );
- aInsertPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 );
+ aInsertPos.setX( pOwnData->GetStartPos().X() + ( aSize.Width() >> 1 ) );
+ aInsertPos.setY( pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 ) );
}
// restrict movement to WorkArea
@@ -1353,10 +1353,10 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
Point aHitPosB( rPos );
const SdrLayerIDSet* pVisiLayer = &GetSdrPageView()->GetVisibleLayers();
- 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 &&
SdrObjectPrimitiveHit(*pPickObj, aHitPosR, nHitLog, *GetSdrPageView(), pVisiLayer, false) &&