diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-21 10:13:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-21 12:58:49 +0100 |
commit | 180f2860525fb7ed4892b417b20c3f2f9cbb44e0 (patch) | |
tree | f4c11ab79c1ba022f31944668eae2f20a8f5c808 /sw/source/core/objectpositioning | |
parent | b99dd5350c21ad4096af0ae281c518b127fa37b5 (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/core/objectpositioning')
4 files changed, 51 insertions, 51 deletions
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index 45f8292b279a..e0d58f0b01e3 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -934,13 +934,13 @@ SwTwips SwAnchoredObjectPosition::AdjustHoriRelPosForDrawAside( Point aTmpPos = aRectFnSet.GetPos(rAnchorTextFrame.getFrameArea()); if( aRectFnSet.IsVert() ) { - aTmpPos.X() -= _nRelPosY + aObjBoundRect.Width(); - aTmpPos.Y() += nAdjustedRelPosX; + aTmpPos.AdjustX( -(_nRelPosY + aObjBoundRect.Width()) ); + aTmpPos.AdjustY(nAdjustedRelPosX ); } else { - aTmpPos.X() += nAdjustedRelPosX; - aTmpPos.Y() += _nRelPosY; + aTmpPos.AdjustX(nAdjustedRelPosX ); + aTmpPos.AdjustY(_nRelPosY ); } SwRect aTmpObjRect( aTmpPos, aObjBoundRect.SSize() ); @@ -987,8 +987,8 @@ SwTwips SwAnchoredObjectPosition::AdjustHoriRelPosForDrawAside( nAdjustedRelPosX = nTmp; } } - aTmpObjRect.Pos().Y() = rAnchorTextFrame.getFrameArea().Top() + - nAdjustedRelPosX; + aTmpObjRect.Pos().setY( rAnchorTextFrame.getFrameArea().Top() + + nAdjustedRelPosX ); } } else @@ -1023,8 +1023,8 @@ SwTwips SwAnchoredObjectPosition::AdjustHoriRelPosForDrawAside( nAdjustedRelPosX = nTmp; } } - aTmpObjRect.Pos().X() = rAnchorTextFrame.getFrameArea().Left() + - nAdjustedRelPosX; + aTmpObjRect.Pos().setX( rAnchorTextFrame.getFrameArea().Left() + + nAdjustedRelPosX ); } } // end of <if (bVert)> } // end of <if DrawAsideFly(..)> diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index 5ecc5c3db6db..07f6d7c496d7 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -130,9 +130,9 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() // left spacing is only considered, if requested. if( mnFlags & AsCharFlags::UlSpace ) { - aAnchorPos.X() += nLRSpaceLeft; + aAnchorPos.AdjustX(nLRSpaceLeft ); } - aAnchorPos.Y() += nULSpaceUpper; + aAnchorPos.AdjustY(nULSpaceUpper ); // for drawing objects: consider difference between its bounding rectangle // and its snapping rectangle by adjusting anchor position. @@ -147,9 +147,9 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() if( mnFlags & AsCharFlags::UlSpace ) { - aAnchorPos.X() += aSnapRect.Left() - aObjBoundRect.Left(); + aAnchorPos.AdjustX(aSnapRect.Left() - aObjBoundRect.Left() ); } - aAnchorPos.Y() += aSnapRect.Top() - aObjBoundRect.Top(); + aAnchorPos.AdjustY(aSnapRect.Top() - aObjBoundRect.Top() ); } // enlarge bounding rectangle of object by its spacing. @@ -173,14 +173,14 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() if( mnFlags & AsCharFlags::Init && nRelPos < 0 && mnLineAscentInclObjs < -nRelPos ) { if( mnFlags & AsCharFlags::Rotate ) - aAnchorPos.X() -= mnLineAscentInclObjs + nRelPos; + aAnchorPos.AdjustX( -(mnLineAscentInclObjs + nRelPos) ); else - aAnchorPos.Y() -= mnLineAscentInclObjs + nRelPos; + aAnchorPos.AdjustY( -(mnLineAscentInclObjs + nRelPos) ); } // consider BIDI-multiportion by adjusting proposed anchor position if( mnFlags & AsCharFlags::Bidi ) - aAnchorPos.X() -= aObjBoundRect.Width(); + aAnchorPos.AdjustX( -(aObjBoundRect.Width()) ); // calculate relative position considering rotation and inside rotation // reverse direction. @@ -189,15 +189,15 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() if( mnFlags & AsCharFlags::Rotate ) { if( mnFlags & AsCharFlags::Reverse ) - aRelPos.X() = -nRelPos - aObjBoundRect.Width(); + aRelPos.setX( -nRelPos - aObjBoundRect.Width() ); else { - aRelPos.X() = nRelPos; - aRelPos.Y() = -aObjBoundRect.Height(); + aRelPos.setX( nRelPos ); + aRelPos.setY( -aObjBoundRect.Height() ); } } else - aRelPos.Y() = nRelPos; + aRelPos.setY( nRelPos ); } if( !IsObjFly() ) @@ -224,7 +224,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() if ( rAnchorFrame.IsRightToLeft() ) { rAnchorFrame.SwitchLTRtoRTL( aAbsAnchorPos ); - aAbsAnchorPos.X() -= nObjWidth; + aAbsAnchorPos.AdjustX( -nObjWidth ); } if ( rAnchorFrame.IsVertical() ) rAnchorFrame.SwitchHorizontalToVertical( aAbsAnchorPos ); @@ -259,7 +259,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() if ( rAnchorFrame.IsRightToLeft() ) { rAnchorFrame.SwitchLTRtoRTL( aAnchorPos ); - aAnchorPos.X() -= nObjWidth; + aAnchorPos.AdjustX( -nObjWidth ); } if ( rAnchorFrame.IsVertical() ) rAnchorFrame.SwitchHorizontalToVertical( aAnchorPos ); @@ -280,7 +280,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() if ( rAnchorFrame.IsRightToLeft() ) { rAnchorFrame.SwitchLTRtoRTL( aAnchorPos ); - aAnchorPos.X() -= nObjWidth; + aAnchorPos.AdjustX( -nObjWidth ); } if ( rAnchorFrame.IsVertical() ) { diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index c19d1fba9648..4144f8241154 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -420,13 +420,13 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // anchor position, depending on layout-direction if ( aRectFnSet.IsVert() ) { - aRelPos.X() = nRelPosY; - maOffsetToFrameAnchorPos.X() = nAlignAreaOffset; + aRelPos.setX( nRelPosY ); + maOffsetToFrameAnchorPos.setX( nAlignAreaOffset ); } else { - aRelPos.Y() = nRelPosY; - maOffsetToFrameAnchorPos.Y() = nAlignAreaOffset; + aRelPos.setY( nRelPosY ); + maOffsetToFrameAnchorPos.setY( nAlignAreaOffset ); } } @@ -557,9 +557,9 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // #i26791# - determine offset to 'vertical' // frame anchor position, depending on layout-direction if ( aRectFnSet.IsVert() ) - maOffsetToFrameAnchorPos.X() = nVertOffsetToFrameAnchorPos; + maOffsetToFrameAnchorPos.setX( nVertOffsetToFrameAnchorPos ); else - maOffsetToFrameAnchorPos.Y() = nVertOffsetToFrameAnchorPos; + maOffsetToFrameAnchorPos.setY( nVertOffsetToFrameAnchorPos ); // #i11860# - use new method <GetTopForObjPos> // to get top of frame for object positioning. const SwTwips nTopOfAnch = GetTopForObjPos( *pAnchorFrameForVertPos, aRectFnSet.FnRect(), aRectFnSet.IsVert() ); @@ -578,9 +578,9 @@ void SwToContentAnchoredObjectPosition::CalcPosition() DoesObjFollowsTextFlow(), bCheckBottom ); if ( aRectFnSet.IsVert() ) - aRelPos.X() = nRelPosY; + aRelPos.setX( nRelPosY ); else - aRelPos.Y() = nRelPosY; + aRelPos.setY( nRelPosY ); } else { @@ -619,9 +619,9 @@ void SwToContentAnchoredObjectPosition::CalcPosition() DoesObjFollowsTextFlow(), bCheckBottom ); if ( aRectFnSet.IsVert() ) - aRelPos.X() = nTmpRelPosY; + aRelPos.setX( nTmpRelPosY ); else - aRelPos.Y() = nTmpRelPosY; + aRelPos.setY( nTmpRelPosY ); // #i23512# - use local variable // <pLayoutFrameToGrow> provided by new method @@ -704,9 +704,9 @@ void SwToContentAnchoredObjectPosition::CalcPosition() nRelPosY, DoesObjFollowsTextFlow() ); if( aRectFnSet.IsVert() ) - aRelPos.X() = nRelPosY; + aRelPos.setX( nRelPosY ); else - aRelPos.Y() = nRelPosY; + aRelPos.setY( nRelPosY ); nRelPosY = 0; } } @@ -828,7 +828,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() false ); if ( aRectFnSet.IsVert() ) { - aRelPos.X() = nTmpRelPosY; + aRelPos.setX( nTmpRelPosY ); // --> OD 2009-08-31 #mongolianlayout# if ( !aRectFnSet.IsVertL2R() ) { @@ -843,7 +843,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() } else { - aRelPos.Y() = nTmpRelPosY; + aRelPos.setY( nTmpRelPosY ); GetAnchoredObj().SetObjTop( nTopOfAnch + aRelPos.Y() ); } // If the anchor frame is the first content of the table cell @@ -910,9 +910,9 @@ void SwToContentAnchoredObjectPosition::CalcPosition() aRectFnSet.YDiff( aRectFnSet.GetPrtTop(*pNextLay), nTopOfAnch ); if ( aRectFnSet.IsVert() ) - aRelPos.X() = nTmpRelPosY; + aRelPos.setX( nTmpRelPosY ); else - aRelPos.Y() = nTmpRelPosY; + aRelPos.setY( nTmpRelPosY ); pUpperOfOrientFrame = pNextLay; aRectFnSet.Refresh(pUpperOfOrientFrame); bMoveable = rAnchorTextFrame.IsMoveable( pUpperOfOrientFrame ); @@ -1014,13 +1014,13 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // anchor position, depending on layout-direction if ( aRectFnSet.IsVert() ) { - aRelPos.Y() = nRelPosX; - maOffsetToFrameAnchorPos.Y() = nHoriOffsetToFrameAnchorPos; + aRelPos.setY( nRelPosX ); + maOffsetToFrameAnchorPos.setY( nHoriOffsetToFrameAnchorPos ); } else { - aRelPos.X() = nRelPosX; - maOffsetToFrameAnchorPos.X() = nHoriOffsetToFrameAnchorPos; + aRelPos.setX( nRelPosX ); + maOffsetToFrameAnchorPos.setX( nHoriOffsetToFrameAnchorPos ); } // save calculated horizontal position - needed for filters diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx index 41ee37128e3d..6d6ad30275ee 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -106,15 +106,15 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() if( aRectFnSet.IsVert() ) { if ( aRectFnSet.IsVertL2R() ) - aRelPos.X() = nRelPosY; + aRelPos.setX( nRelPosY ); else - aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); - maOffsetToFrameAnchorPos.X() = nVertOffsetToFrameAnchorPos; + aRelPos.setX( -nRelPosY - aObjBoundRect.Width() ); + maOffsetToFrameAnchorPos.setX( nVertOffsetToFrameAnchorPos ); } else { - aRelPos.Y() = nRelPosY; - maOffsetToFrameAnchorPos.Y() = nVertOffsetToFrameAnchorPos; + aRelPos.setY( nRelPosY ); + maOffsetToFrameAnchorPos.setY( nVertOffsetToFrameAnchorPos ); } // if in online-layout the bottom of to-page anchored object is beyond @@ -196,13 +196,13 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() if( aRectFnSet.IsVert() || aRectFnSet.IsVertL2R() ) { - aRelPos.Y() = nRelPosX; - maOffsetToFrameAnchorPos.Y() = nOffset; + aRelPos.setY( nRelPosX ); + maOffsetToFrameAnchorPos.setY( nOffset ); } else { - aRelPos.X() = nRelPosX; - maOffsetToFrameAnchorPos.X() = nOffset; + aRelPos.setX( nRelPosX ); + maOffsetToFrameAnchorPos.setX( nOffset ); } // keep the calculated relative horizontal position - needed for filters |