summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
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/core/layout
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/core/layout')
-rw-r--r--sw/source/core/layout/anchoredobject.cxx8
-rw-r--r--sw/source/core/layout/atrfrm.cxx6
-rw-r--r--sw/source/core/layout/fly.cxx20
-rw-r--r--sw/source/core/layout/flylay.cxx6
-rw-r--r--sw/source/core/layout/frmtool.cxx4
-rw-r--r--sw/source/core/layout/ftnfrm.cxx8
-rw-r--r--sw/source/core/layout/hffrm.cxx2
-rw-r--r--sw/source/core/layout/laycache.cxx8
-rw-r--r--sw/source/core/layout/pagechg.cxx4
-rw-r--r--sw/source/core/layout/paintfrm.cxx136
-rw-r--r--sw/source/core/layout/ssfrm.cxx24
-rw-r--r--[-rwxr-xr-x]sw/source/core/layout/tabfrm.cxx4
-rw-r--r--sw/source/core/layout/trvlfrm.cxx62
-rw-r--r--sw/source/core/layout/virtoutp.cxx8
-rw-r--r--sw/source/core/layout/wsfrm.cxx36
15 files changed, 168 insertions, 168 deletions
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index 13d67c902663..0145389eab9e 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -174,7 +174,7 @@ SwTwips SwAnchoredObject::GetRelCharY( const SwFrame* pFrame ) const
void SwAnchoredObject::AddLastCharY( long nDiff )
{
- maLastCharRect.Pos().Y() += nDiff;
+ maLastCharRect.Pos().AdjustY(nDiff );
}
void SwAnchoredObject::ResetLastCharRectHeight()
@@ -577,8 +577,8 @@ const SwRect& SwAnchoredObject::GetObjRectWithSpaces() const
{
maObjRectWithSpaces.Top ( std::max( maObjRectWithSpaces.Top() - long(rUL.GetUpper()), 0L ));
maObjRectWithSpaces.Left( std::max( maObjRectWithSpaces.Left()- rLR.GetLeft(), 0L ));
- maObjRectWithSpaces.SSize().Height() += rUL.GetLower();
- maObjRectWithSpaces.SSize().Width() += rLR.GetRight();
+ maObjRectWithSpaces.SSize().AdjustHeight(rUL.GetLower() );
+ maObjRectWithSpaces.SSize().AdjustWidth(rLR.GetRight() );
}
mbObjRectWithSpacesValid = true;
@@ -888,7 +888,7 @@ Point SwAnchoredObject::GetRelPosToLine() const
Point aRelPos;
aRelPos = GetObjRect().Pos();
- aRelPos.Y() -= GetLastTopOfLine();
+ aRelPos.AdjustY( -(GetLastTopOfLine()) );
return aRelPos;
}
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 6e09e74547ab..3a364a9c84d6 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -295,8 +295,8 @@ bool SwFormatFrameSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
Size aTmp(aVal.Width, aVal.Height);
if(bConvert)
{
- aTmp.Height() = convertMm100ToTwip(aTmp.Height());
- aTmp.Width() = convertMm100ToTwip(aTmp.Width());
+ aTmp.setHeight( convertMm100ToTwip(aTmp.Height()) );
+ aTmp.setWidth( convertMm100ToTwip(aTmp.Width()) );
}
SetSize(aTmp);
}
@@ -2708,7 +2708,7 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint )
else
{
aRet = pFrame->getFrameArea();
- --aRet.Pos().Y();
+ aRet.Pos().AdjustY( -1 );
}
pFrame = nullptr; // the rect is finished by now
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 41f8479a0018..2ae868df995f 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -765,10 +765,10 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
SwRect aOld( getFrameArea() );
const SvxULSpaceItem &rUL = static_cast<const SwFormatChg*>(pOld)->pChangedFormat->GetULSpace();
aOld.Top( std::max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
- aOld.SSize().Height()+= rUL.GetLower();
+ aOld.SSize().AdjustHeight(rUL.GetLower() );
const SvxLRSpaceItem &rLR = static_cast<const SwFormatChg*>(pOld)->pChangedFormat->GetLRSpace();
aOld.Left ( std::max( aOld.Left() - rLR.GetLeft(), 0L ) );
- aOld.SSize().Width() += rLR.GetRight();
+ aOld.SSize().AdjustWidth(rLR.GetRight() );
aNew.Union( aOld );
NotifyBackground( FindPageFrame(), aNew, PREP_CLEAR );
@@ -867,13 +867,13 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
{
const SvxULSpaceItem &rUL = *static_cast<const SvxULSpaceItem*>(pNew);
aOld.Top( std::max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
- aOld.SSize().Height()+= rUL.GetLower();
+ aOld.SSize().AdjustHeight(rUL.GetLower() );
}
else
{
const SvxLRSpaceItem &rLR = *static_cast<const SvxLRSpaceItem*>(pNew);
aOld.Left ( std::max( aOld.Left() - rLR.GetLeft(), 0L ) );
- aOld.SSize().Width() += rLR.GetRight();
+ aOld.SSize().AdjustWidth(rLR.GetRight() );
}
}
aNew.Union( aOld );
@@ -2378,19 +2378,19 @@ Size SwFlyFrame::CalcRel( const SwFormatFrameSize &rSz ) const
}
if ( rSz.GetWidthPercent() && rSz.GetWidthPercent() != SwFormatFrameSize::SYNCED )
- aRet.Width() = nRelWidth * rSz.GetWidthPercent() / 100;
+ aRet.setWidth( nRelWidth * rSz.GetWidthPercent() / 100 );
if ( rSz.GetHeightPercent() && rSz.GetHeightPercent() != SwFormatFrameSize::SYNCED )
- aRet.Height() = nRelHeight * rSz.GetHeightPercent() / 100;
+ aRet.setHeight( nRelHeight * rSz.GetHeightPercent() / 100 );
if ( rSz.GetWidthPercent() == SwFormatFrameSize::SYNCED )
{
- aRet.Width() *= aRet.Height();
- aRet.Width() /= rSz.GetHeight();
+ aRet.setWidth( aRet.Width() * ( aRet.Height()) );
+ aRet.setWidth( aRet.Width() / ( rSz.GetHeight()) );
}
else if ( rSz.GetHeightPercent() == SwFormatFrameSize::SYNCED )
{
- aRet.Height() *= aRet.Width();
- aRet.Height() /= rSz.GetWidth();
+ aRet.setHeight( aRet.Height() * ( aRet.Width()) );
+ aRet.setHeight( aRet.Height() / ( rSz.GetWidth()) );
}
}
return aRet;
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index ea1dfa7de12f..2a20c9c70e9d 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -513,7 +513,7 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
if ( !bDisableOffPagePositioning || nOld <= nClipBot)
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
- aFrm.Pos().Y() = std::max( aClip.Top(), nClipBot - aFrm.Height() );
+ aFrm.Pos().setY( std::max( aClip.Top(), nClipBot - aFrm.Height() ) );
}
if ( getFrameArea().Top() != nOld )
@@ -533,7 +533,7 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
if ( !bDisableOffPagePositioning || nOld <= nClipRig )
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
- aFrm.Pos().X() = std::max( aClip.Left(), nClipRig - aFrm.Width() );
+ aFrm.Pos().setX( std::max( aClip.Left(), nClipRig - aFrm.Width() ) );
}
if ( getFrameArea().Left() != nOld )
@@ -544,7 +544,7 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
if( rH.GetHoriOrient() == text::HoriOrientation::LEFT )
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
- aFrm.Pos().X() = nOld;
+ aFrm.Pos().setX( nOld );
}
else
{
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index e12f02a8ffab..f5a1be87b1ec 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1134,11 +1134,11 @@ static void lcl_SetPos( SwFrame& _rNewFrame,
// notifications for a new calculated position after its formatting.
if ( aRectFnSet.IsVert() )
{
- aFrm.Pos().X() -= 1;
+ aFrm.Pos().AdjustX( -1 );
}
else
{
- aFrm.Pos().Y() += 1;
+ aFrm.Pos().AdjustY(1 );
}
}
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index a3fc1aebaf74..e8eddce278c1 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -344,7 +344,7 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
if( IsVertical() && !IsVertLR() )
{
- aFrm.Pos().X() -= nDist;
+ aFrm.Pos().AdjustX( -nDist );
}
}
long nGrow = nDist - nAvail,
@@ -387,11 +387,11 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
// We can only respect the boundless wish so much
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
- aFrm.SSize().Height() -= nDist;
+ aFrm.SSize().AdjustHeight( -nDist );
if( IsVertical() && !IsVertLR() )
{
- aFrm.Pos().X() += nDist;
+ aFrm.Pos().AdjustX(nDist );
}
}
@@ -2745,7 +2745,7 @@ bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrame *pO
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pNewUp);
aFrm.Pos() = pTmpFootnote->getFrameArea().Pos();
- aFrm.Pos().Y() += 1; // for notifications
+ aFrm.Pos().AdjustY(1 ); // for notifications
}
// If the section frame has a successor then the latter needs
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index f4ac216ab24e..c2d2a46718c6 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -385,7 +385,7 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
aFrm.Bottom( nDeadLine );
SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
- aPrt.SSize().Height() = getFrameArea().Height() - nBorder;
+ aPrt.SSize().setHeight( getFrameArea().Height() - nBorder );
}
}
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index a1977c68b287..3d605ffa397c 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -811,7 +811,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*mrpFrame);
aFrm.Pos() = mrpLay->getFrameArea().Pos();
- aFrm.Pos().Y() += 1;
+ aFrm.Pos().AdjustY(1 );
}
mrpPrv = mrpFrame;
@@ -921,7 +921,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pSct);
aFrm.Pos() = mrpLay->getFrameArea().Pos();
- aFrm.Pos().Y() += 1; //because of the notifications
+ aFrm.Pos().AdjustY(1 ); //because of the notifications
}
mrpLay = pSct;
@@ -1022,8 +1022,8 @@ void SwLayHelper::CheckFlyCache_( SwPageFrame* pPage )
{
// we get the stored information
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFly);
- aFrm.Pos().X() = pFlyCache->Left() + pPage->getFrameArea().Left();
- aFrm.Pos().Y() = pFlyCache->Top() + pPage->getFrameArea().Top();
+ aFrm.Pos().setX( pFlyCache->Left() + pPage->getFrameArea().Left() );
+ aFrm.Pos().setY( pFlyCache->Top() + pPage->getFrameArea().Top() );
if ( mpImpl->IsUseFlyCache() )
{
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 6cb4f071d8e6..238f44cc1afb 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1379,7 +1379,7 @@ SwTwips SwRootFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
if ( !bTst )
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
- aFrm.SSize().Height() += nDist;
+ aFrm.SSize().AdjustHeight(nDist );
}
return nDist;
@@ -1393,7 +1393,7 @@ SwTwips SwRootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool )
if ( !bTst )
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
- aFrm.SSize().Height() -= nDist;
+ aFrm.SSize().AdjustHeight( -nDist );
}
return nDist;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index dc2837e2eed9..f692ff446eb0 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1838,43 +1838,43 @@ void DrawGraphic(
break;
case GPOS_MT:
- aGrf.Pos().Y() = rOrg.Top();
- aGrf.Pos().X() = rOrg.Left() + rOrg.Width()/2 - aGrfSize.Width()/2;
+ aGrf.Pos().setY( rOrg.Top() );
+ aGrf.Pos().setX( rOrg.Left() + rOrg.Width()/2 - aGrfSize.Width()/2 );
break;
case GPOS_RT:
- aGrf.Pos().Y() = rOrg.Top();
- aGrf.Pos().X() = rOrg.Right() - aGrfSize.Width();
+ aGrf.Pos().setY( rOrg.Top() );
+ aGrf.Pos().setX( rOrg.Right() - aGrfSize.Width() );
break;
case GPOS_LM:
- aGrf.Pos().Y() = rOrg.Top() + rOrg.Height()/2 - aGrfSize.Height()/2;
- aGrf.Pos().X() = rOrg.Left();
+ aGrf.Pos().setY( rOrg.Top() + rOrg.Height()/2 - aGrfSize.Height()/2 );
+ aGrf.Pos().setX( rOrg.Left() );
break;
case GPOS_MM:
- aGrf.Pos().Y() = rOrg.Top() + rOrg.Height()/2 - aGrfSize.Height()/2;
- aGrf.Pos().X() = rOrg.Left() + rOrg.Width()/2 - aGrfSize.Width()/2;
+ aGrf.Pos().setY( rOrg.Top() + rOrg.Height()/2 - aGrfSize.Height()/2 );
+ aGrf.Pos().setX( rOrg.Left() + rOrg.Width()/2 - aGrfSize.Width()/2 );
break;
case GPOS_RM:
- aGrf.Pos().Y() = rOrg.Top() + rOrg.Height()/2 - aGrfSize.Height()/2;
- aGrf.Pos().X() = rOrg.Right() - aGrfSize.Width();
+ aGrf.Pos().setY( rOrg.Top() + rOrg.Height()/2 - aGrfSize.Height()/2 );
+ aGrf.Pos().setX( rOrg.Right() - aGrfSize.Width() );
break;
case GPOS_LB:
- aGrf.Pos().Y() = rOrg.Bottom() - aGrfSize.Height();
- aGrf.Pos().X() = rOrg.Left();
+ aGrf.Pos().setY( rOrg.Bottom() - aGrfSize.Height() );
+ aGrf.Pos().setX( rOrg.Left() );
break;
case GPOS_MB:
- aGrf.Pos().Y() = rOrg.Bottom() - aGrfSize.Height();
- aGrf.Pos().X() = rOrg.Left() + rOrg.Width()/2 - aGrfSize.Width()/2;
+ aGrf.Pos().setY( rOrg.Bottom() - aGrfSize.Height() );
+ aGrf.Pos().setX( rOrg.Left() + rOrg.Width()/2 - aGrfSize.Width()/2 );
break;
case GPOS_RB:
- aGrf.Pos().Y() = rOrg.Bottom() - aGrfSize.Height();
- aGrf.Pos().X() = rOrg.Right() - aGrfSize.Width();
+ aGrf.Pos().setY( rOrg.Bottom() - aGrfSize.Height() );
+ aGrf.Pos().setX( rOrg.Right() - aGrfSize.Width() );
break;
case GPOS_AREA:
@@ -2156,30 +2156,30 @@ static void lcl_AdjustRectToPixelSize( SwRect& io_aSwRect, const vcl::RenderCont
// the Twip-centers. Thus, adjust borders by half of pixel width/height plus 1.
// Afterwards, adjust calculated Twip-positions of the all borders.
tools::Rectangle aSizedRect = aPxCenterRect;
- aSizedRect.Left() -= (aTwipToPxSize.Width()/2 + 1);
- aSizedRect.Right() += (aTwipToPxSize.Width()/2 + 1);
- aSizedRect.Top() -= (aTwipToPxSize.Height()/2 + 1);
- aSizedRect.Bottom() += (aTwipToPxSize.Height()/2 + 1);
+ aSizedRect.AdjustLeft( -(aTwipToPxSize.Width()/2 + 1) );
+ aSizedRect.AdjustRight( aTwipToPxSize.Width()/2 + 1 );
+ aSizedRect.AdjustTop( -(aTwipToPxSize.Height()/2 + 1) );
+ aSizedRect.AdjustBottom(aTwipToPxSize.Height()/2 + 1);
// adjust left()
while ( aOut.LogicToPixel(aSizedRect).Left() < aOrgPxRect.Left() )
{
- ++aSizedRect.Left();
+ aSizedRect.AdjustLeft( 1 );
}
// adjust right()
while ( aOut.LogicToPixel(aSizedRect).Right() > aOrgPxRect.Right() )
{
- --aSizedRect.Right();
+ aSizedRect.AdjustRight( -1 );
}
// adjust top()
while ( aOut.LogicToPixel(aSizedRect).Top() < aOrgPxRect.Top() )
{
- ++aSizedRect.Top();
+ aSizedRect.AdjustTop( 1 );
}
// adjust bottom()
while ( aOut.LogicToPixel(aSizedRect).Bottom() > aOrgPxRect.Bottom() )
{
- --aSizedRect.Bottom();
+ aSizedRect.AdjustBottom( -1 );
}
io_aSwRect = SwRect( aSizedRect );
@@ -2190,29 +2190,29 @@ static void lcl_AdjustRectToPixelSize( SwRect& io_aSwRect, const vcl::RenderCont
OSL_ENSURE( aTestOrgPxRect == aTestNewPxRect,
"Error in lcl_AlignRectToPixelSize(..): Adjusted rectangle has incorrect position or size");
// check Left()
- --aSizedRect.Left();
+ aSizedRect.AdjustLeft( -1 );
aTestNewPxRect = aOut.LogicToPixel( aSizedRect );
OSL_ENSURE( aTestOrgPxRect.Left() >= (aTestNewPxRect.Left()+1),
"Error in lcl_AlignRectToPixelSize(..): Left() not correct adjusted");
- ++aSizedRect.Left();
+ aSizedRect.AdjustLeft( 1 );
// check Right()
- ++aSizedRect.Right();
+ aSizedRect.AdjustRight( 1 );
aTestNewPxRect = aOut.LogicToPixel( aSizedRect );
OSL_ENSURE( aTestOrgPxRect.Right() <= (aTestNewPxRect.Right()-1),
"Error in lcl_AlignRectToPixelSize(..): Right() not correct adjusted");
- --aSizedRect.Right();
+ aSizedRect.AdjustRight( -1 );
// check Top()
- --aSizedRect.Top();
+ aSizedRect.AdjustTop( -1 );
aTestNewPxRect = aOut.LogicToPixel( aSizedRect );
OSL_ENSURE( aTestOrgPxRect.Top() >= (aTestNewPxRect.Top()+1),
"Error in lcl_AlignRectToPixelSize(..): Top() not correct adjusted");
- ++aSizedRect.Top();
+ aSizedRect.AdjustTop( 1 );
// check Bottom()
- ++aSizedRect.Bottom();
+ aSizedRect.AdjustBottom( 1 );
aTestNewPxRect = aOut.LogicToPixel( aSizedRect );
OSL_ENSURE( aTestOrgPxRect.Bottom() <= (aTestNewPxRect.Bottom()-1),
"Error in lcl_AlignRectToPixelSize(..): Bottom() not correct adjusted");
- --aSizedRect.Bottom();
+ aSizedRect.AdjustBottom( -1 );
#endif
}
@@ -2415,17 +2415,17 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons
Point aStart, aEnd;
if ( bHori )
{
- aStart.X() = rEntry.mnStartPos;
- aStart.Y() = rEntry.mnKey;
- aEnd.X() = rEntry.mnEndPos;
- aEnd.Y() = rEntry.mnKey;
+ aStart.setX( rEntry.mnStartPos );
+ aStart.setY( rEntry.mnKey );
+ aEnd.setX( rEntry.mnEndPos );
+ aEnd.setY( rEntry.mnKey );
}
else
{
- aStart.X() = rEntry.mnKey;
- aStart.Y() = rEntry.mnStartPos;
- aEnd.X() = rEntry.mnKey;
- aEnd.Y() = rEntry.mnEndPos;
+ aStart.setX( rEntry.mnKey );
+ aStart.setY( rEntry.mnStartPos );
+ aEnd.setX( rEntry.mnKey );
+ aEnd.setY( rEntry.mnEndPos );
}
svx::frame::Style aStyles[ 7 ];
@@ -2438,7 +2438,7 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons
if ( bHori )
{
aRepaintRect.Height( 2 * nRepaintRectSize );
- aRepaintRect.Pos().Y() -= nRepaintRectSize;
+ aRepaintRect.Pos().AdjustY( -nRepaintRectSize );
// To decide on visibility it is also necessary to expand the RepaintRect
// to left/right according existing BorderLine overlap matchings, else there
@@ -2449,13 +2449,13 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons
const double fLineWidthMaxLeft(std::max(aStyles[1].GetWidth(), aStyles[3].GetWidth()));
const double fLineWidthMaxRight(std::max(aStyles[4].GetWidth(), aStyles[6].GetWidth()));
aRepaintRect.Width(aRepaintRect.Width() + (fLineWidthMaxLeft + fLineWidthMaxRight));
- aRepaintRect.Pos().X() -= fLineWidthMaxLeft;
+ aRepaintRect.Pos().AdjustX( -fLineWidthMaxLeft );
}
}
else
{
aRepaintRect.Width( 2 * nRepaintRectSize );
- aRepaintRect.Pos().X() -= nRepaintRectSize;
+ aRepaintRect.Pos().AdjustX( -nRepaintRectSize );
// Accordingly to horizontal case, but for top/bottom
// aStyles[3] == aTFromR, aStyles[1] == aTFromL, aStyles[6] == aBFromR, aStyles[4] == aBFromL
@@ -2464,7 +2464,7 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons
const double fLineWidthMaxTop(std::max(aStyles[3].GetWidth(), aStyles[1].GetWidth()));
const double fLineWidthMaxBottom(std::max(aStyles[6].GetWidth(), aStyles[4].GetWidth()));
aRepaintRect.Height(aRepaintRect.Height() + (fLineWidthMaxTop + fLineWidthMaxBottom));
- aRepaintRect.Pos().Y() -= fLineWidthMaxTop;
+ aRepaintRect.Pos().AdjustY( -fLineWidthMaxTop );
}
}
@@ -2502,22 +2502,22 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons
// Therefore we tweak the outer borders a bit to achieve that the outer
// borders match the subsidiary lines of the upper:
if (aStart.X() == aUpper.Left())
- aPaintStart.X() = aUpperAligned.Left();
+ aPaintStart.setX( aUpperAligned.Left() );
else if (aStart.X() == aUpper.Right_())
- aPaintStart.X() = aUpperAligned.Right_();
+ aPaintStart.setX( aUpperAligned.Right_() );
if (aStart.Y() == aUpper.Top())
- aPaintStart.Y() = aUpperAligned.Top();
+ aPaintStart.setY( aUpperAligned.Top() );
else if (aStart.Y() == aUpper.Bottom_())
- aPaintStart.Y() = aUpperAligned.Bottom_();
+ aPaintStart.setY( aUpperAligned.Bottom_() );
if (aEnd.X() == aUpper.Left())
- aPaintEnd.X() = aUpperAligned.Left();
+ aPaintEnd.setX( aUpperAligned.Left() );
else if (aEnd.X() == aUpper.Right_())
- aPaintEnd.X() = aUpperAligned.Right_();
+ aPaintEnd.setX( aUpperAligned.Right_() );
if (aEnd.Y() == aUpper.Top())
- aPaintEnd.Y() = aUpperAligned.Top();
+ aPaintEnd.setY( aUpperAligned.Top() );
else if (aEnd.Y() == aUpper.Bottom_())
- aPaintEnd.Y() = aUpperAligned.Bottom_();
+ aPaintEnd.setY( aUpperAligned.Bottom_() );
}
if(aStyles[0].IsUsed())
@@ -5324,7 +5324,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
bool bBorder = bLeft || bRight;
while( nY > nRight )
{
- aTmp.Pos().X() = nY;
+ aTmp.Pos().setX( nY );
if( bGrid )
{
nY -= nGrid;
@@ -5339,7 +5339,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
while( aVert.Top() <= nBottom )
{
PaintBorderLine(rRect,aVert,this,pCol);
- aVert.Pos().Y() += nGrid;
+ aVert.Pos().AdjustY(nGrid );
}
}
else if( bBorder )
@@ -5350,7 +5350,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
PaintBorderLine(rRect,aVert,this,pCol);
if( bRight )
{
- aVert.Pos().Y() = nGridBottom;
+ aVert.Pos().setY( nGridBottom );
PaintBorderLine(rRect,aVert,this,pCol);
}
}
@@ -5371,7 +5371,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
PaintBorderLine(rRect,aVert,this,pCol);
if( bRight )
{
- aVert.Pos().Y() = nGridBottom;
+ aVert.Pos().setY( nGridBottom );
PaintBorderLine(rRect,aVert,this,pCol);
}
}
@@ -5381,7 +5381,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
}
while( nY >= aInter.Left() )
{
- aTmp.Pos().X() = nY;
+ aTmp.Pos().setX( nY );
PaintBorderLine( rRect, aTmp, this, pCol);
if( bGrid )
{
@@ -5397,7 +5397,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
while( aVert.Top() <= nBottom )
{
PaintBorderLine(rRect,aVert,this,pCol);
- aVert.Pos().Y() += nGrid;
+ aVert.Pos().AdjustY(nGrid );
}
}
else if( bBorder )
@@ -5408,7 +5408,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
PaintBorderLine(rRect,aVert,this,pCol);
if( bRight )
{
- aVert.Pos().Y() = nGridBottom;
+ aVert.Pos().setY( nGridBottom );
PaintBorderLine(rRect,aVert,this,pCol);
}
}
@@ -5429,7 +5429,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
PaintBorderLine(rRect,aVert,this,pCol);
if( bRight )
{
- aVert.Pos().Y() = nGridBottom;
+ aVert.Pos().setY( nGridBottom );
PaintBorderLine(rRect,aVert,this,pCol);
}
}
@@ -5470,7 +5470,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
while( aVert.Left() <= nRight )
{
PaintBorderLine(rRect,aVert,this,pCol);
- aVert.Pos().X() += nGridWidth; //for textgrid refactor
+ aVert.Pos().AdjustX(nGridWidth ); //for textgrid refactor
}
}
else if ( bBorder )
@@ -5481,7 +5481,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
PaintBorderLine(rRect,aVert,this,pCol);
if( bRight )
{
- aVert.Pos().X() = nGridRight;
+ aVert.Pos().setX( nGridRight );
PaintBorderLine(rRect,aVert,this,pCol);
}
}
@@ -5686,10 +5686,10 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
switch (eArea)
{
- case LEFT: aRect.Left() = aRect.Right() - 1; break;
- case RIGHT: aRect.Right() = aRect.Left() + 1; break;
- case TOP: aRect.Top() = aRect.Bottom() - 1; break;
- case BOTTOM: aRect.Bottom() = aRect.Top() + 1; break;
+ case LEFT: aRect.SetLeft( aRect.Right() - 1 ); break;
+ case RIGHT: aRect.SetRight( aRect.Left() + 1 ); break;
+ case TOP: aRect.SetTop( aRect.Bottom() - 1 ); break;
+ case BOTTOM: aRect.SetBottom( aRect.Top() + 1 ); break;
}
pOut->SetFillColor(SwViewOption::GetAppBackgroundColor());
@@ -7313,9 +7313,9 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFly );
const SwBorderAttrs &rAttrs = *aAccess.Get();
if ( rAttrs.CalcRightLine() )
- aOut.SSize().Width() += 2*gProp.nSPixelSzW;
+ aOut.SSize().AdjustWidth(2*gProp.nSPixelSzW );
if ( rAttrs.CalcBottomLine() )
- aOut.SSize().Height()+= 2*gProp.nSPixelSzH;
+ aOut.SSize().AdjustHeight(2*gProp.nSPixelSzH );
// #i92711# start Pre/PostPaint encapsulation before pOut is changed to the buffering VDev
const vcl::Region aRepaintRegion(aOut.SVRect());
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 180ceba1ff9c..8fceca4e8bd9 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -105,7 +105,7 @@ void SwFrame::MakeBelowPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotif
if( pPrv )
{
aFrm.Pos( pPrv->getFrameArea().Pos() );
- aFrm.Pos().Y() += pPrv->getFrameArea().Height();
+ aFrm.Pos().AdjustY(pPrv->getFrameArea().Height() );
}
else
{
@@ -115,7 +115,7 @@ void SwFrame::MakeBelowPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotif
if( bNotify )
{
- aFrm.Pos().Y() += 1;
+ aFrm.Pos().AdjustY(1 );
}
}
@@ -126,18 +126,18 @@ void SwFrame::MakeLeftPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify
if( pPrv )
{
aFrm.Pos( pPrv->getFrameArea().Pos() );
- aFrm.Pos().X() -= aFrm.Width();
+ aFrm.Pos().AdjustX( -(aFrm.Width()) );
}
else
{
aFrm.Pos( pUp->getFrameArea().Pos() );
aFrm.Pos() += pUp->getFramePrintArea().Pos();
- aFrm.Pos().X() += pUp->getFramePrintArea().Width() - aFrm.Width();
+ aFrm.Pos().AdjustX(pUp->getFramePrintArea().Width() - aFrm.Width() );
}
if( bNotify )
{
- aFrm.Pos().X() -= 1;
+ aFrm.Pos().AdjustX( -1 );
}
}
@@ -148,7 +148,7 @@ void SwFrame::MakeRightPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotif
if( pPrv )
{
aFrm.Pos( pPrv->getFrameArea().Pos() );
- aFrm.Pos().X() += pPrv->getFrameArea().Width();
+ aFrm.Pos().AdjustX(pPrv->getFrameArea().Width() );
}
else
{
@@ -158,7 +158,7 @@ void SwFrame::MakeRightPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotif
if( bNotify )
{
- aFrm.Pos().X() += 1;
+ aFrm.Pos().AdjustX(1 );
}
}
@@ -288,16 +288,16 @@ Point SwFrame::GetFrameAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const
Point aAnchor = getFrameArea().Pos();
if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() )
- aAnchor.X() += getFrameArea().Width();
+ aAnchor.AdjustX(getFrameArea().Width() );
if ( IsTextFrame() )
{
SwTwips nBaseOfstForFly =
static_cast<const SwTextFrame*>(this)->GetBaseOfstForFly( bIgnoreFlysAnchoredAtThisFrame );
if ( IsVertical() )
- aAnchor.Y() += nBaseOfstForFly;
+ aAnchor.AdjustY(nBaseOfstForFly );
else
- aAnchor.X() += nBaseOfstForFly;
+ aAnchor.AdjustX(nBaseOfstForFly );
// OD 2004-03-10 #i11860# - if option 'Use former object positioning'
// is OFF, consider the lower space and the line spacing of the
@@ -307,11 +307,11 @@ Point SwFrame::GetFrameAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const
pThisTextFrame->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
if ( IsVertical() )
{
- aAnchor.X() -= nUpperSpaceAmountConsideredForPrevFrameAndPageGrid;
+ aAnchor.AdjustX( -nUpperSpaceAmountConsideredForPrevFrameAndPageGrid );
}
else
{
- aAnchor.Y() += nUpperSpaceAmountConsideredForPrevFrameAndPageGrid;
+ aAnchor.AdjustY(nUpperSpaceAmountConsideredForPrevFrameAndPageGrid );
}
}
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index b816dfdf319e..fec639ea943e 100755..100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4532,7 +4532,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
if( IsVertical() && !IsVertLR() )
{
- aFrm.Pos().X() += nReal;
+ aFrm.Pos().AdjustX(nReal );
}
}
@@ -4551,7 +4551,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
if( IsVertical() && !IsVertLR() )
{
- aFrm.Pos().X() -= nReal;
+ aFrm.Pos().AdjustX( -nReal );
}
}
nReal = nTmp;
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 4b0df5c5709e..f322cc9d9cc6 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -178,10 +178,10 @@ bool SwPageFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
// check, if we have to adjust the point
if ( !getFrameArea().IsInside( aPoint ) )
{
- aPoint.X() = std::max( aPoint.X(), getFrameArea().Left() );
- aPoint.X() = std::min( aPoint.X(), getFrameArea().Right() );
- aPoint.Y() = std::max( aPoint.Y(), getFrameArea().Top() );
- aPoint.Y() = std::min( aPoint.Y(), getFrameArea().Bottom() );
+ aPoint.setX( std::max( aPoint.X(), getFrameArea().Left() ) );
+ aPoint.setX( std::min( aPoint.X(), getFrameArea().Right() ) );
+ aPoint.setY( std::max( aPoint.Y(), getFrameArea().Top() ) );
+ aPoint.setY( std::min( aPoint.Y(), getFrameArea().Bottom() ) );
}
bool bTextRet = false;
@@ -1221,15 +1221,15 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint,
//First set the vertical position
if ( aContentFrame.Top() > aContentPoint.Y() )
- aContentPoint.Y() = aContentFrame.Top();
+ aContentPoint.setY( aContentFrame.Top() );
else if ( aContentFrame.Bottom() < aContentPoint.Y() )
- aContentPoint.Y() = aContentFrame.Bottom();
+ aContentPoint.setY( aContentFrame.Bottom() );
//Now the horizontal position
if ( aContentFrame.Left() > aContentPoint.X() )
- aContentPoint.X() = aContentFrame.Left();
+ aContentPoint.setX( aContentFrame.Left() );
else if ( aContentFrame.Right() < aContentPoint.X() )
- aContentPoint.X() = aContentFrame.Right();
+ aContentPoint.setX( aContentFrame.Right() );
// pInside is a page area in which the point lies. As soon
// as pInside != 0 only frames are accepted which are
@@ -1321,41 +1321,41 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint,
//A small correction at the first/last
Size aActualSize( pActual->getFramePrintArea().SSize() );
if ( aActualSize.Height() > pActual->GetUpper()->getFramePrintArea().Height() )
- aActualSize.Height() = pActual->GetUpper()->getFramePrintArea().Height();
+ aActualSize.setHeight( pActual->GetUpper()->getFramePrintArea().Height() );
SwRectFnSet aRectFnSet(pActual);
if ( !pActual->GetPrev() &&
aRectFnSet.YDiff( aRectFnSet.GetPrtTop(*pActual),
aRectFnSet.IsVert() ? rPoint.X() : rPoint.Y() ) > 0 )
{
- aPoint.Y() = pActual->getFrameArea().Top() + pActual->getFramePrintArea().Top();
- aPoint.X() = pActual->getFrameArea().Left() +
+ aPoint.setY( pActual->getFrameArea().Top() + pActual->getFramePrintArea().Top() );
+ aPoint.setX( pActual->getFrameArea().Left() +
( pActual->IsRightToLeft() || aRectFnSet.IsVert() ?
pActual->getFramePrintArea().Right() :
- pActual->getFramePrintArea().Left() );
+ pActual->getFramePrintArea().Left() ) );
}
else if ( !pActual->GetNext() &&
aRectFnSet.YDiff( aRectFnSet.GetPrtBottom(*pActual),
aRectFnSet.IsVert() ? rPoint.X() : rPoint.Y() ) < 0 )
{
- aPoint.Y() = pActual->getFrameArea().Top() + pActual->getFramePrintArea().Bottom();
- aPoint.X() = pActual->getFrameArea().Left() +
+ aPoint.setY( pActual->getFrameArea().Top() + pActual->getFramePrintArea().Bottom() );
+ aPoint.setX( pActual->getFrameArea().Left() +
( pActual->IsRightToLeft() || aRectFnSet.IsVert() ?
pActual->getFramePrintArea().Left() :
- pActual->getFramePrintArea().Right() );
+ pActual->getFramePrintArea().Right() ) );
}
//Bring the Point in to the PrtArea
const SwRect aRect( pActual->getFrameArea().Pos() + pActual->getFramePrintArea().Pos(),
aActualSize );
if ( aPoint.Y() < aRect.Top() )
- aPoint.Y() = aRect.Top();
+ aPoint.setY( aRect.Top() );
else if ( aPoint.Y() > aRect.Bottom() )
- aPoint.Y() = aRect.Bottom();
+ aPoint.setY( aRect.Bottom() );
if ( aPoint.X() < aRect.Left() )
- aPoint.X() = aRect.Left();
+ aPoint.setX( aRect.Left() );
else if ( aPoint.X() > aRect.Right() )
- aPoint.X() = aRect.Right();
+ aPoint.setX( aRect.Right() );
rPoint = aPoint;
return pActual;
}
@@ -1396,15 +1396,15 @@ void SwPageFrame::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
//Calculate the vertical position first
if ( aContentFrame.Top() > rPt.Y() )
- aPoint.Y() = aContentFrame.Top();
+ aPoint.setY( aContentFrame.Top() );
else if ( aContentFrame.Bottom() < rPt.Y() )
- aPoint.Y() = aContentFrame.Bottom();
+ aPoint.setY( aContentFrame.Bottom() );
//And now the horizontal position
if ( aContentFrame.Left() > rPt.X() )
- aPoint.X() = aContentFrame.Left();
+ aPoint.setX( aContentFrame.Left() );
else if ( aContentFrame.Right() < rPt.X() )
- aPoint.X() = aContentFrame.Right();
+ aPoint.setX( aContentFrame.Right() );
const sal_uInt64 nDiff = ::CalcDiff( aPoint, rPt );
if ( nDiff < nDist )
@@ -1425,13 +1425,13 @@ void SwPageFrame::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
//Bring the point into the PrtArea.
const SwRect aRect( pAct->getFrameArea().Pos() + pAct->getFramePrintArea().Pos(), pAct->getFramePrintArea().SSize() );
if ( aAct.Y() < aRect.Top() )
- aAct.Y() = aRect.Top();
+ aAct.setY( aRect.Top() );
else if ( aAct.Y() > aRect.Bottom() )
- aAct.Y() = aRect.Bottom();
+ aAct.setY( aRect.Bottom() );
if ( aAct.X() < aRect.Left() )
- aAct.X() = aRect.Left();
+ aAct.setX( aRect.Left() );
else if ( aAct.X() > aRect.Right() )
- aAct.X() = aRect.Right();
+ aAct.setX( aRect.Right() );
if (!pAct->isFrameAreaDefinitionValid() ||
(pAct->IsTextFrame() && !static_cast<SwTextFrame const*>(pAct)->HasPara()))
@@ -2353,14 +2353,14 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
if( aTmpSt.Y() > aTmpEnd.Y() )
{
long nTmpY = aTmpEnd.Y();
- aTmpEnd.Y() = aTmpSt.Y();
- aTmpSt.Y() = nTmpY;
+ aTmpEnd.setY( aTmpSt.Y() );
+ aTmpSt.setY( nTmpY );
}
if( aTmpSt.X() > aTmpEnd.X() )
{
long nTmpX = aTmpEnd.X();
- aTmpEnd.X() = aTmpSt.X();
- aTmpSt.X() = nTmpX;
+ aTmpEnd.setX( aTmpSt.X() );
+ aTmpSt.setX( nTmpX );
}
}
diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index 523b340f99fd..c39055fea33b 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -99,11 +99,11 @@ bool SwLayVout::DoesFit( const Size &rNew )
if( rNew.Width() > aSize.Width() )
{
- aSize.Width() = rNew.Width();
+ aSize.setWidth( rNew.Width() );
if( !pVirDev->SetOutputSizePixel( aSize ) )
{
pVirDev.disposeAndClear();
- aSize.Width() = 0;
+ aSize.setWidth( 0 );
return false;
}
}
@@ -142,8 +142,8 @@ void SwLayVout::Enter( SwViewShell *pShell, SwRect &rRect, bool bOn )
pOut = pO;
Size aPixSz( pOut->PixelToLogic( Size( 1,1 )) );
SwRect aTmp( rRect );
- aTmp.SSize().Width() += aPixSz.Width()/2 + 1;
- aTmp.SSize().Height()+= aPixSz.Height()/2 + 1;
+ aTmp.SSize().AdjustWidth(aPixSz.Width()/2 + 1 );
+ aTmp.SSize().AdjustHeight(aPixSz.Height()/2 + 1 );
tools::Rectangle aTmpRect( pO->LogicToPixel( aTmp.SVRect() ) );
OSL_ENSURE( !pSh->GetWin()->IsReallyVisible() ||
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 61195cbeef8b..1107da6c4e94 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -141,12 +141,12 @@ void SwFrameAreaDefinition::transform_translate(const Point& rOffset)
if (aFrm.Pos().X() != FAR_AWAY)
{
- aFrm.Pos().X() += rOffset.X();
+ aFrm.Pos().AdjustX(rOffset.X() );
}
if (aFrm.Pos().Y() != FAR_AWAY)
{
- aFrm.Pos().Y() += rOffset.Y();
+ aFrm.Pos().AdjustY(rOffset.Y() );
}
}
@@ -1560,7 +1560,7 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
SwRect aInva( pUp->getFrameArea() );
if ( pViewShell )
{
- aInva.Pos().X() = pViewShell->VisArea().Left();
+ aInva.Pos().setX( pViewShell->VisArea().Left() );
aInva.Width( pViewShell->VisArea().Width() );
}
if ( nDiff > 0 )
@@ -1637,12 +1637,12 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
{
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pUp);
- aFrm.SSize().Height() += nChg;
+ aFrm.SSize().AdjustHeight(nChg );
}
{
SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*pUp);
- aPrt.SSize().Height() += nChg;
+ aPrt.SSize().AdjustHeight(nChg );
}
if ( pViewShell )
@@ -1673,7 +1673,7 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
if ( IsBodyFrame() )
{
SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
- aPrt.SSize().Height() = nOldFrameHeight;
+ aPrt.SSize().setHeight( nOldFrameHeight );
}
if ( pUp->GetUpper() )
@@ -1682,10 +1682,10 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
}
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
- aFrm.SSize().Height() = nOldFrameHeight;
+ aFrm.SSize().setHeight( nOldFrameHeight );
SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
- aPrt.SSize().Height() = nOldPrtHeight;
+ aPrt.SSize().setHeight( nOldPrtHeight );
mbCompletePaint = bOldComplete;
}
@@ -1787,7 +1787,7 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() )
{
- aFrm.Pos().X() += nAdd;
+ aFrm.Pos().AdjustX(nAdd );
}
}
@@ -1812,7 +1812,7 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() )
{
- aFrm.Pos().X() += nReal;
+ aFrm.Pos().AdjustX(nReal );
}
}
@@ -2047,7 +2047,7 @@ SwTwips SwContentFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
if( IsVertical() && !IsVertLR() )
{
- aFrm.Pos().X() -= nDist;
+ aFrm.Pos().AdjustX( -nDist );
}
}
@@ -2087,7 +2087,7 @@ SwTwips SwContentFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
if( IsVertical()&& !IsVertLR() )
{
- aFrm.Pos().X() -= nDist;
+ aFrm.Pos().AdjustX( -nDist );
}
}
@@ -2183,7 +2183,7 @@ SwTwips SwContentFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
if( IsVertical() && !IsVertLR() )
{
- aFrm.Pos().X() += nDist;
+ aFrm.Pos().AdjustX(nDist );
}
}
@@ -2579,7 +2579,7 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
if( bChgPos && !IsVertLR() )
{
- aFrm.Pos().X() -= nDist;
+ aFrm.Pos().AdjustX( -nDist );
}
bMoveAccFrame = true;
@@ -2665,7 +2665,7 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
if( bChgPos && !IsVertLR() )
{
- aFrm.Pos().X() = nFramePos - nReal;
+ aFrm.Pos().setX( nFramePos - nReal );
}
bMoveAccFrame = true;
@@ -2772,7 +2772,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
if( bChgPos && !IsVertLR() )
{
- aFrm.Pos().X() += nReal;
+ aFrm.Pos().AdjustX(nReal );
}
bMoveAccFrame = true;
@@ -2797,7 +2797,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
if( bChgPos && !IsVertLR() )
{
- aFrm.Pos().X() += nRealDist - nReal;
+ aFrm.Pos().AdjustX(nRealDist - nReal );
}
OSL_ENSURE( !IsAccessibleFrame(), "bMoveAccFrame has to be set!" );
@@ -2814,7 +2814,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
if( bChgPos && !IsVertLR() )
{
- aFrm.Pos().X() += nTmp - nReal;
+ aFrm.Pos().AdjustX(nTmp - nReal );
}
OSL_ENSURE( !IsAccessibleFrame(), "bMoveAccFrame has to be set!" );