summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/access/accmap.cxx16
-rw-r--r--sw/source/core/bastyp/swrect.cxx16
-rw-r--r--sw/source/core/crsr/crsrsh.cxx8
-rw-r--r--sw/source/core/doc/doclay.cxx2
-rw-r--r--sw/source/core/doc/notxtfrm.cxx20
-rw-r--r--sw/source/core/doc/textboxhelper.cxx4
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx16
-rw-r--r--sw/source/core/draw/dflyobj.cxx6
-rw-r--r--sw/source/core/fields/expfld.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx8
-rw-r--r--sw/source/core/frmedt/feshview.cxx12
-rw-r--r--sw/source/core/frmedt/fews.cxx48
-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
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx16
-rw-r--r--sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx28
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx40
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx18
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx8
-rw-r--r--sw/source/core/text/blink.cxx18
-rw-r--r--sw/source/core/text/frmcrsr.cxx64
-rw-r--r--sw/source/core/text/frmform.cxx4
-rw-r--r--sw/source/core/text/frmpaint.cxx16
-rw-r--r--sw/source/core/text/inftxt.cxx78
-rw-r--r--sw/source/core/text/itrcrsr.cxx114
-rw-r--r--sw/source/core/text/itrform2.cxx18
-rw-r--r--sw/source/core/text/itrpaint.cxx10
-rw-r--r--sw/source/core/text/porfld.cxx12
-rw-r--r--sw/source/core/text/porglue.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx2
-rw-r--r--sw/source/core/text/porrst.cxx14
-rw-r--r--sw/source/core/text/txtdrop.cxx8
-rw-r--r--sw/source/core/text/txtfrm.cxx30
-rw-r--r--sw/source/core/text/txtpaint.cxx2
-rw-r--r--sw/source/core/txtnode/fntcache.cxx96
-rw-r--r--sw/source/core/txtnode/fntcap.cxx24
-rw-r--r--sw/source/core/txtnode/swfont.cxx42
-rw-r--r--sw/source/core/undo/unattr.cxx4
-rw-r--r--sw/source/core/unocore/unosett.cxx4
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx132
-rw-r--r--sw/source/core/view/vdraw.cxx8
-rw-r--r--sw/source/core/view/viewpg.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx56
-rw-r--r--sw/source/core/view/vprint.cxx6
58 files changed, 686 insertions, 686 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 98a50e784b5b..215985502de2 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -3220,14 +3220,14 @@ static inline void lcl_CorrectRectangle(tools::Rectangle & rRect,
const tools::Rectangle & rSource,
const tools::Rectangle & rInGrid)
{
- rRect.Left() = lcl_CorrectCoarseValue(rRect.Left(), rSource.Left(),
- rInGrid.Left(), false);
- rRect.Top() = lcl_CorrectCoarseValue(rRect.Top(), rSource.Top(),
- rInGrid.Top(), false);
- rRect.Right() = lcl_CorrectCoarseValue(rRect.Right(), rSource.Right(),
- rInGrid.Right(), true);
- rRect.Bottom() = lcl_CorrectCoarseValue(rRect.Bottom(), rSource.Bottom(),
- rInGrid.Bottom(), true);
+ rRect.SetLeft( lcl_CorrectCoarseValue(rRect.Left(), rSource.Left(),
+ rInGrid.Left(), false) );
+ rRect.SetTop( lcl_CorrectCoarseValue(rRect.Top(), rSource.Top(),
+ rInGrid.Top(), false) );
+ rRect.SetRight( lcl_CorrectCoarseValue(rRect.Right(), rSource.Right(),
+ rInGrid.Right(), true) );
+ rRect.SetBottom( lcl_CorrectCoarseValue(rRect.Bottom(), rSource.Bottom(),
+ rInGrid.Bottom(), true) );
}
tools::Rectangle SwAccessibleMap::CoreToPixel( const tools::Rectangle& rRect ) const
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index ac71a2023de3..8702d8f15733 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -150,9 +150,9 @@ void SwRect::Justify()
// Similar to the inline methods, but we need the function pointers
void SwRect::Width_( const long nNew ) { m_Size.setWidth(nNew); }
void SwRect::Height_( const long nNew ) { m_Size.setHeight(nNew); }
-void SwRect::Left_( const long nLeft ){ m_Size.Width() += m_Point.getX() - nLeft; m_Point.setX(nLeft); }
+void SwRect::Left_( const long nLeft ){ m_Size.AdjustWidth(m_Point.getX() - nLeft ); m_Point.setX(nLeft); }
void SwRect::Right_( const long nRight ){ m_Size.setWidth(nRight - m_Point.getX()); }
-void SwRect::Top_( const long nTop ){ m_Size.Height() += m_Point.getY() - nTop; m_Point.setY(nTop); }
+void SwRect::Top_( const long nTop ){ m_Size.AdjustHeight(m_Point.getY() - nTop ); m_Point.setY(nTop); }
void SwRect::Bottom_( const long nBottom ){ m_Size.setHeight(nBottom - m_Point.getY()); }
long SwRect::Width_() const{ return m_Size.getWidth(); }
@@ -162,12 +162,12 @@ long SwRect::Right_() const{ return m_Point.getX() + m_Size.getWidth(); }
long SwRect::Top_() const{ return m_Point.getY(); }
long SwRect::Bottom_() const{ return m_Point.getY() + m_Size.getHeight(); }
-void SwRect::AddWidth( const long nAdd ) { m_Size.Width() += nAdd; }
-void SwRect::AddHeight( const long nAdd ) { m_Size.Height() += nAdd; }
-void SwRect::SubLeft( const long nSub ){ m_Size.Width() += nSub; m_Point.setX(m_Point.getX() - nSub); }
-void SwRect::AddRight( const long nAdd ){ m_Size.Width() += nAdd; }
-void SwRect::SubTop( const long nSub ){ m_Size.Height() += nSub; m_Point.setY(m_Point.getY() - nSub); }
-void SwRect::AddBottom( const long nAdd ){ m_Size.Height() += nAdd; }
+void SwRect::AddWidth( const long nAdd ) { m_Size.AdjustWidth(nAdd ); }
+void SwRect::AddHeight( const long nAdd ) { m_Size.AdjustHeight(nAdd ); }
+void SwRect::SubLeft( const long nSub ){ m_Size.AdjustWidth(nSub ); m_Point.setX(m_Point.getX() - nSub); }
+void SwRect::AddRight( const long nAdd ){ m_Size.AdjustWidth(nAdd ); }
+void SwRect::SubTop( const long nSub ){ m_Size.AdjustHeight(nSub ); m_Point.setY(m_Point.getY() - nSub); }
+void SwRect::AddBottom( const long nAdd ){ m_Size.AdjustHeight(nAdd ); }
void SwRect::SetPosX( const long nNew ){ m_Point.setX(nNew); }
void SwRect::SetPosY( const long nNew ){ m_Point.setY(nNew); }
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 3a0aef4fa6de..beece9959b25 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -565,7 +565,7 @@ bool SwCursorShell::SttEndDoc( bool bStt )
if( bRet )
{
if( bStt )
- pTmpCursor->GetPtPos().Y() = 0; // set to 0 explicitly (table header)
+ pTmpCursor->GetPtPos().setY( 0 ); // set to 0 explicitly (table header)
if( m_pBlockCursor )
{
m_pBlockCursor->clearPoints();
@@ -2795,8 +2795,8 @@ void SwCursorShell::MakeSelVisible()
}
if( !aTmp.HasArea() )
{
- aTmp.SSize().Height() += 1;
- aTmp.SSize().Width() += 1;
+ aTmp.SSize().AdjustHeight(1 );
+ aTmp.SSize().AdjustWidth(1 );
}
MakeVisible( aTmp );
}
@@ -2807,7 +2807,7 @@ void SwCursorShell::MakeSelVisible()
else
{
SwRect aTmp( m_aCharRect );
- aTmp.SSize().Height() += 1; aTmp.SSize().Width() += 1;
+ aTmp.SSize().AdjustHeight(1 ); aTmp.SSize().AdjustWidth(1 );
MakeVisible( aTmp );
}
}
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 53f9c85c5833..3b93cd9735da 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -266,7 +266,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
// Set size
Size aSize( pNoTextNode->GetTwipSize() );
if( MINFLY > aSize.Width() )
- aSize.Width() = DEF_FLY_WIDTH;
+ aSize.setWidth( DEF_FLY_WIDTH );
aFormatSize.SetWidth( aSize.Width() );
if( aSize.Height() )
{
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 009047c73584..65d6be161ed4 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -334,13 +334,13 @@ static void lcl_CalcRect( Point& rPt, Size& rDim, MirrorGraph nMirror )
if( nMirror == MirrorGraph::Vertical || nMirror == MirrorGraph::Both )
{
rPt.setX(rPt.getX() + rDim.Width() -1);
- rDim.Width() = -rDim.Width();
+ rDim.setWidth( -rDim.Width() );
}
if( nMirror == MirrorGraph::Horizontal || nMirror == MirrorGraph::Both )
{
rPt.setY(rPt.getY() + rDim.Height() -1);
- rDim.Height() = -rDim.Height();
+ rDim.setHeight( -rDim.Height() );
}
}
@@ -382,7 +382,7 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const
Size aOrigSz( static_cast<const SwNoTextNode*>(GetNode())->GetTwipSize() );
if ( !aOrigSz.Width() )
{
- aOrigSz.Width() = aFramePrintArea.Width();
+ aOrigSz.setWidth( aFramePrintArea.Width() );
nLeftCrop = -rCrop.GetLeft();
nRightCrop = -rCrop.GetRight();
}
@@ -405,7 +405,7 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const
if( !aOrigSz.Height() )
{
- aOrigSz.Height() = aFramePrintArea.Height();
+ aOrigSz.setHeight( aFramePrintArea.Height() );
nTopCrop = -rCrop.GetTop();
nBottomCrop= -rCrop.GetBottom();
}
@@ -434,17 +434,17 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const
if ( nLeftCrop > 0 )
{
aVisPt.setX(aVisPt.getX() + nLeftCrop);
- aVisSz.Width() -= nLeftCrop;
+ aVisSz.AdjustWidth( -nLeftCrop );
}
if ( nTopCrop > 0 )
{
aVisPt.setY(aVisPt.getY() + nTopCrop);
- aVisSz.Height() -= nTopCrop;
+ aVisSz.AdjustHeight( -nTopCrop );
}
if ( nRightCrop > 0 )
- aVisSz.Width() -= nRightCrop;
+ aVisSz.AdjustWidth( -nRightCrop );
if ( nBottomCrop > 0 )
- aVisSz.Height() -= nBottomCrop;
+ aVisSz.AdjustHeight( -nBottomCrop );
rRect.Pos ( aVisPt );
rRect.SSize( aVisSz );
@@ -454,9 +454,9 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const
{
Size aTmpSz( aGrfSz );
aGrfPt.setX(aGrfPt.getX() + nLeftCrop);
- aTmpSz.Width() -= nLeftCrop + nRightCrop;
+ aTmpSz.AdjustWidth( -(nLeftCrop + nRightCrop) );
aGrfPt.setY(aGrfPt.getY() + nTopCrop);
- aTmpSz.Height()-= nTopCrop + nBottomCrop;
+ aTmpSz.AdjustHeight( -(nTopCrop + nBottomCrop) );
if( MirrorGraph::Dont != nMirror )
lcl_CalcRect( aGrfPt, aTmpSz, nMirror );
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index facf350dea2a..ccfb7b4d5f53 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -298,8 +298,8 @@ tools::Rectangle SwTextBoxHelper::getTextRectangle(SwFrameFormat* pShape, bool b
// Relative, so count the logic (reference) rectangle, see the EnhancedCustomShape2d ctor.
Point aPoint(pCustomShape->GetSnapRect().Center());
Size aSize(pCustomShape->GetLogicRect().GetSize());
- aPoint.X() -= aSize.Width() / 2;
- aPoint.Y() -= aSize.Height() / 2;
+ aPoint.AdjustX( -(aSize.Width() / 2) );
+ aPoint.AdjustY( -(aSize.Height() / 2) );
tools::Rectangle aLogicRect(aPoint, aSize);
aRet.Move(-1 * aLogicRect.Left(), -1 * aLogicRect.Top());
}
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index ca8b9183b96c..22f4f8bfe575 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -310,21 +310,21 @@ static bool SetGrfFlySize( const Size& rGrfSz, SwGrfNode* pGrfNd, const Size& rO
Size aCalcSz( aSz );
if ( !aSz.Height() && aSz.Width() )
// Calculate the right height
- aCalcSz.Height() = rGrfSz.Height() *
- aSz.Width() / rGrfSz.Width();
+ aCalcSz.setHeight( rGrfSz.Height() *
+ aSz.Width() / rGrfSz.Width() );
else if ( !aSz.Width() && aSz.Height() )
// Calculate the right width
- aCalcSz.Width() = rGrfSz.Width() *
- aSz.Height() / rGrfSz.Height();
+ aCalcSz.setWidth( rGrfSz.Width() *
+ aSz.Height() / rGrfSz.Height() );
else
// Take over height and width
aCalcSz = rGrfSz;
const SvxBoxItem &rBox = pFormat->GetBox();
- aCalcSz.Width() += rBox.CalcLineSpace(SvxBoxItemLine::LEFT) +
- rBox.CalcLineSpace(SvxBoxItemLine::RIGHT);
- aCalcSz.Height()+= rBox.CalcLineSpace(SvxBoxItemLine::TOP) +
- rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM);
+ aCalcSz.AdjustWidth(rBox.CalcLineSpace(SvxBoxItemLine::LEFT) +
+ rBox.CalcLineSpace(SvxBoxItemLine::RIGHT) );
+ aCalcSz.AdjustHeight(rBox.CalcLineSpace(SvxBoxItemLine::TOP) +
+ rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM) );
const SwFormatFrameSize& rOldAttr = pFormat->GetFrameSize();
if( rOldAttr.GetSize() != aCalcSz )
{
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 5153dd45e53f..ac313abdd9df 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -1045,7 +1045,7 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, const Fraction& xFact, const
}
nMin -= MINFLY;
}
- aSz.Width() = std::max( aSz.Width(), nMin );
+ aSz.setWidth( std::max( aSz.Width(), nMin ) );
}
SwFrameFormat *pFormat = GetFormat();
@@ -1260,8 +1260,8 @@ SdrObject* SwVirtFlyDrawObj::CheckMacroHit( const SdrObjMacroHitRec& rRec ) cons
{
aRect.Pos().setX(aRect.Pos().getX() + rRec.nTol);
aRect.Pos().setY(aRect.Pos().getY() + rRec.nTol);
- aRect.SSize().Height()-= 2 * rRec.nTol;
- aRect.SSize().Width() -= 2 * rRec.nTol;
+ aRect.SSize().AdjustHeight( -(2 * rRec.nTol) );
+ aRect.SSize().AdjustWidth( -(2 * rRec.nTol) );
if( aRect.IsInside( rRec.aPos ) )
{
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index e3de87396a88..77e8d9b3b54c 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -247,7 +247,7 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos,
else
{
Point aPt( pLayout->getFrameArea().Pos() );
- aPt.Y()++; // get out of the header
+ aPt.AdjustY( 1 ); // get out of the header
pContentFrame = pPgFrame->GetContentPos( aPt, false, true );
pTextNode = GetFirstTextNode( rDoc, rPos, pContentFrame, aPt );
}
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index e965f746160d..ebd55b4c2da7 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1322,8 +1322,8 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
aFrameSz.SetWidth( aNewSz.Width() );
if( ATT_MIN_SIZE != aFrameSz.GetHeightSizeType() )
{
- aNewSz.Height() += pChgFly->getFrameArea().Height() -
- pFly->getFramePrintArea().Height();
+ aNewSz.AdjustHeight(pChgFly->getFrameArea().Height() -
+ pFly->getFramePrintArea().Height() );
if( std::abs( aNewSz.Height() - pChgFly->getFrameArea().Height()) > 1 )
aFrameSz.SetHeight( aNewSz.Height() );
}
@@ -1337,8 +1337,8 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
// set the new Size at the fly themself
if ( pFly->getFramePrintArea().Height() > 0 && pFly->getFramePrintArea().Width() > 0 )
{
- aSz.Width() += pFly->getFrameArea().Width() - pFly->getFramePrintArea().Width();
- aSz.Height()+= pFly->getFrameArea().Height()- pFly->getFramePrintArea().Height();
+ aSz.AdjustWidth(pFly->getFrameArea().Width() - pFly->getFramePrintArea().Width() );
+ aSz.AdjustHeight(pFly->getFrameArea().Height()- pFly->getFramePrintArea().Height() );
}
aResult = pFly->ChgSize( aSz );
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index f515fb4260c9..3e88e65bb0db 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -837,7 +837,7 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst )
bCheckNeighbours = true;
pFly->InvalidatePos();
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFly);
- aFrm.Pos().Y() += 1;
+ aFrm.Pos().AdjustY(1 );
}
pPage = pFly->FindPageFrame();
@@ -884,7 +884,7 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst )
{
pAct->InvalidatePos();
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pAct);
- aFrm.Pos().Y() += 1;
+ aFrm.Pos().AdjustY(1 );
}
}
}
@@ -1802,10 +1802,10 @@ bool SwFEShell::ImpEndCreate()
// The crsr should not be too far away
bCharBound = true;
tools::Rectangle aRect( aTmp.SVRect() );
- aRect.Left() -= MM50*2;
- aRect.Top() -= MM50*2;
- aRect.Right() += MM50*2;
- aRect.Bottom()+= MM50*2;
+ aRect.AdjustLeft( -(MM50*2) );
+ aRect.AdjustTop( -(MM50*2) );
+ aRect.AdjustRight(MM50*2 );
+ aRect.AdjustBottom(MM50*2 );
if( !aRect.IsOver( rBound ) && !::GetHtmlMode( GetDoc()->GetDocShell() ))
bCharBound = false;
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index cd29703ced3d..fbcf8ea149b0 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -779,10 +779,10 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::PAGE_RIGHT:
- case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrame->getFramePrintArea().Height();
+ case text::RelOrientation::FRAME_RIGHT: aPos.AdjustY(pFrame->getFramePrintArea().Height() );
SAL_FALLTHROUGH;
case text::RelOrientation::PRINT_AREA:
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() += pFrame->getFramePrintArea().Top(); break;
+ case text::RelOrientation::PAGE_PRINT_AREA: aPos.AdjustY(pFrame->getFramePrintArea().Top() ); break;
default: break;
}
}
@@ -791,11 +791,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::PRINT_AREA:
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->getFramePrintArea().Width();
+ case text::RelOrientation::PAGE_PRINT_AREA: aPos.AdjustX(pFrame->getFramePrintArea().Width() );
SAL_FALLTHROUGH;
case text::RelOrientation::PAGE_RIGHT:
- case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->getFramePrintArea().Left(); break;
- default: aPos.X() += pFrame->getFrameArea().Width();
+ case text::RelOrientation::FRAME_RIGHT: aPos.AdjustX(pFrame->getFramePrintArea().Left() ); break;
+ default: aPos.AdjustX(pFrame->getFrameArea().Width() );
}
}
else if ( bRTL )
@@ -803,11 +803,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::PRINT_AREA:
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->getFramePrintArea().Width();
+ case text::RelOrientation::PAGE_PRINT_AREA: aPos.AdjustX(pFrame->getFramePrintArea().Width() );
SAL_FALLTHROUGH;
case text::RelOrientation::PAGE_LEFT:
- case text::RelOrientation::FRAME_LEFT: aPos.X() += pFrame->getFramePrintArea().Left() -
- pFrame->getFrameArea().Width(); break;
+ case text::RelOrientation::FRAME_LEFT: aPos.AdjustX(pFrame->getFramePrintArea().Left() -
+ pFrame->getFrameArea().Width() ); break;
default: break;
}
}
@@ -816,10 +816,10 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::PAGE_RIGHT:
- case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->getFramePrintArea().Width();
+ case text::RelOrientation::FRAME_RIGHT: aPos.AdjustX(pFrame->getFramePrintArea().Width() );
SAL_FALLTHROUGH;
case text::RelOrientation::PRINT_AREA:
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->getFramePrintArea().Left(); break;
+ case text::RelOrientation::PAGE_PRINT_AREA: aPos.AdjustX(pFrame->getFramePrintArea().Left() ); break;
default:break;
}
}
@@ -831,7 +831,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
case text::RelOrientation::PRINT_AREA:
case text::RelOrientation::PAGE_PRINT_AREA:
{
- aPos.X() -= pFrame->GetRightMargin();
+ aPos.AdjustX( -(pFrame->GetRightMargin()) );
}
break;
}
@@ -843,7 +843,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
case text::RelOrientation::PRINT_AREA:
case text::RelOrientation::PAGE_PRINT_AREA:
{
- aPos.X() += pFrame->GetLeftMargin();
+ aPos.AdjustX(pFrame->GetLeftMargin() );
}
break;
}
@@ -857,12 +857,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
if ( pFrame->IsPageFrame() )
{
- aPos.Y() =
- static_cast<const SwPageFrame*>(pFrame)->PrtWithoutHeaderAndFooter().Top();
+ aPos.setY(
+ static_cast<const SwPageFrame*>(pFrame)->PrtWithoutHeaderAndFooter().Top() );
}
else
{
- aPos.Y() += pFrame->getFramePrintArea().Top();
+ aPos.AdjustY(pFrame->getFramePrintArea().Top() );
}
}
break;
@@ -925,15 +925,15 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
if ( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() )
{
- aPos.X() = aVertEnvironRect.Right();
+ aPos.setX( aVertEnvironRect.Right() );
}
else if ( aRectFnSet.IsVertL2R() )
{
- aPos.X() = aVertEnvironRect.Left();
+ aPos.setX( aVertEnvironRect.Left() );
}
else
{
- aPos.Y() = aVertEnvironRect.Top();
+ aPos.setY( aVertEnvironRect.Top() );
}
}
}
@@ -949,7 +949,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
if ( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() )
{
- aPos.X() = aVertEnvironRect.Right();
+ aPos.setX( aVertEnvironRect.Right() );
if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
{
aPos.setX(aPos.getX() - rVertEnvironLayFrame.GetRightMargin());
@@ -957,7 +957,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
else if ( aRectFnSet.IsVertL2R() )
{
- aPos.X() = aVertEnvironRect.Left();
+ aPos.setX( aVertEnvironRect.Left() );
if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
{
aPos.setX(aPos.getX() + rVertEnvironLayFrame.GetLeftMargin());
@@ -965,7 +965,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
else
{
- aPos.Y() = aVertEnvironRect.Top();
+ aPos.setY( aVertEnvironRect.Top() );
if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
{
aPos.setY(aPos.getY() + rVertEnvironLayFrame.GetTopMargin());
@@ -1203,7 +1203,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::FRAME_RIGHT:
- aPos.X() += pFrame->getFramePrintArea().Width();
+ aPos.AdjustX(pFrame->getFramePrintArea().Width() );
aPos += pFrame->getFramePrintArea().Pos();
break;
case text::RelOrientation::PRINT_AREA:
@@ -1266,9 +1266,9 @@ Size SwFEShell::GetGraphicDefaultSize() const
SwRect aBound;
CalcBoundRect( aBound, pFly->GetFormat()->GetAnchor().GetAnchorId());
if ( pFly->GetAnchorFrame()->IsVertical() )
- aRet.Width() = aBound.Width();
+ aRet.setWidth( aBound.Width() );
else
- aRet.Height() = aBound.Height();
+ aRet.setHeight( aBound.Height() );
}
return aRet;
}
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!" );
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
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 7c027284db4c..7d18ac32c423 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1512,13 +1512,13 @@ tools::Rectangle SwEnhancedPDFExportHelper::SwRectToPDFRect(const SwPageFrame* p
tools::Rectangle aRect(rRectangle);
Size aRectSize(aRect.GetSize());
double fScale = 0.75;
- aRectSize.Width() = (aRectSize.Width() * fScale);
- aRectSize.Height() = (aRectSize.Height() * fScale);
+ aRectSize.setWidth( aRectSize.Width() * fScale );
+ aRectSize.setHeight( aRectSize.Height() * fScale );
long nOrigHeight = pCurrPage->getFrameArea().Height();
long nNewHeight = nOrigHeight*fScale;
long nShiftY = (nOrigHeight-nNewHeight)/2;
- aRect.Left() = (aRect.Left() * fScale);
- aRect.Top() = (aRect.Top() * fScale);
+ aRect.SetLeft( aRect.Left() * fScale );
+ aRect.SetTop( aRect.Top() * fScale );
aRect.Move(0, nShiftY);
aRect.SetSize(aRectSize);
return aRect;
diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx
index 042a97fc53fa..82dd83543d3c 100644
--- a/sw/source/core/text/blink.cxx
+++ b/sw/source/core/text/blink.cxx
@@ -79,32 +79,32 @@ IMPL_LINK_NOARG(SwBlink, Blinker, Timer *, void)
switch ( pTmp->GetDirection() )
{
case 900:
- aPos.X() -= pTmp->GetPortion()->GetAscent();
- aPos.Y() -= pTmp->GetPortion()->Width();
+ aPos.AdjustX( -(pTmp->GetPortion()->GetAscent()) );
+ aPos.AdjustY( -(pTmp->GetPortion()->Width()) );
nWidth = pTmp->GetPortion()->SvLSize().Height();
nHeight = pTmp->GetPortion()->SvLSize().Width();
break;
case 1800:
- aPos.Y() -= pTmp->GetPortion()->Height() -
- pTmp->GetPortion()->GetAscent();
- aPos.X() -= pTmp->GetPortion()->Width();
+ aPos.AdjustY( -(pTmp->GetPortion()->Height() -
+ pTmp->GetPortion()->GetAscent()) );
+ aPos.AdjustX( -(pTmp->GetPortion()->Width()) );
nWidth = pTmp->GetPortion()->SvLSize().Width();
nHeight = pTmp->GetPortion()->SvLSize().Height();
break;
case 2700:
- aPos.X() -= pTmp->GetPortion()->Height() -
- pTmp->GetPortion()->GetAscent();
+ aPos.AdjustX( -(pTmp->GetPortion()->Height() -
+ pTmp->GetPortion()->GetAscent()) );
nWidth = pTmp->GetPortion()->SvLSize().Height();
nHeight = pTmp->GetPortion()->SvLSize().Width();
break;
default:
- aPos.Y() -= pTmp->GetPortion()->GetAscent();
+ aPos.AdjustY( -(pTmp->GetPortion()->GetAscent()) );
nWidth = pTmp->GetPortion()->SvLSize().Width();
nHeight = pTmp->GetPortion()->SvLSize().Height();
}
tools::Rectangle aRefresh( aPos, Size( nWidth, nHeight ) );
- aRefresh.Right() += ( aRefresh.Bottom()- aRefresh.Top() ) / 8;
+ aRefresh.AdjustRight(( aRefresh.Bottom()- aRefresh.Top() ) / 8 );
pTmp->GetRootFrame()
->GetCurrShell()->InvalidateWindows( aRefresh );
}
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index e5f65cd2168b..2d2dd975ed65 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -219,33 +219,33 @@ bool SwTextFrame::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
if ( aRectFnSet.IsVert() )
{
if( nFirstOffset > 0 )
- aPnt1.Y() += nFirstOffset;
+ aPnt1.AdjustY(nFirstOffset );
if ( aPnt1.X() < nMaxY && !aRectFnSet.IsVertL2R() )
- aPnt1.X() = nMaxY;
- aPnt2.X() = aPnt1.X() + pFrame->getFramePrintArea().Width();
- aPnt2.Y() = aPnt1.Y();
+ aPnt1.setX( nMaxY );
+ aPnt2.setX( aPnt1.X() + pFrame->getFramePrintArea().Width() );
+ aPnt2.setY( aPnt1.Y() );
if( aPnt2.X() < nMaxY )
- aPnt2.X() = nMaxY;
+ aPnt2.setX( nMaxY );
}
else
{
if( nFirstOffset > 0 )
- aPnt1.X() += nFirstOffset;
+ aPnt1.AdjustX(nFirstOffset );
if( aPnt1.Y() > nMaxY )
- aPnt1.Y() = nMaxY;
- aPnt2.X() = aPnt1.X();
- aPnt2.Y() = aPnt1.Y() + pFrame->getFramePrintArea().Height();
+ aPnt1.setY( nMaxY );
+ aPnt2.setX( aPnt1.X() );
+ aPnt2.setY( aPnt1.Y() + pFrame->getFramePrintArea().Height() );
if( aPnt2.Y() > nMaxY )
- aPnt2.Y() = nMaxY;
+ aPnt2.setY( nMaxY );
}
rOrig = SwRect( aPnt1, aPnt2 );
if ( pCMS )
{
- pCMS->m_aRealHeight.X() = 0;
- pCMS->m_aRealHeight.Y() = aRectFnSet.IsVert() ? -rOrig.Width() : rOrig.Height();
+ pCMS->m_aRealHeight.setX( 0 );
+ pCMS->m_aRealHeight.setY( aRectFnSet.IsVert() ? -rOrig.Width() : rOrig.Height() );
}
if ( pFrame->IsRightToLeft() )
@@ -311,13 +311,13 @@ bool SwTextFrame::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
{
if ( pCMS->m_bRealHeight )
{
- pCMS->m_aRealHeight.Y() = -pCMS->m_aRealHeight.Y();
+ pCMS->m_aRealHeight.setY( -pCMS->m_aRealHeight.Y() );
if ( pCMS->m_aRealHeight.Y() < 0 )
{
// writing direction is from top to bottom
- pCMS->m_aRealHeight.X() = ( rOrig.Width() -
- pCMS->m_aRealHeight.X() +
- pCMS->m_aRealHeight.Y() );
+ pCMS->m_aRealHeight.setX( rOrig.Width() -
+ pCMS->m_aRealHeight.X() +
+ pCMS->m_aRealHeight.Y() );
}
}
if( pCMS->m_b2Lines && pCMS->m_p2Lines)
@@ -388,21 +388,21 @@ bool SwTextFrame::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
if ( aRectFnSet.IsVert() )
{
if ( aPnt1.X() < nMaxY && !aRectFnSet.IsVertL2R() )
- aPnt1.X() = nMaxY;
+ aPnt1.setX( nMaxY );
- aPnt2.X() = aPnt1.X() + pFrame->getFramePrintArea().Width();
- aPnt2.Y() = aPnt1.Y();
+ aPnt2.setX( aPnt1.X() + pFrame->getFramePrintArea().Width() );
+ aPnt2.setY( aPnt1.Y() );
if( aPnt2.X() < nMaxY )
- aPnt2.X() = nMaxY;
+ aPnt2.setX( nMaxY );
}
else
{
if( aPnt1.Y() > nMaxY )
- aPnt1.Y() = nMaxY;
- aPnt2.X() = aPnt1.X();
- aPnt2.Y() = aPnt1.Y() + pFrame->getFramePrintArea().Height();
+ aPnt1.setY( nMaxY );
+ aPnt2.setX( aPnt1.X() );
+ aPnt2.setY( aPnt1.Y() + pFrame->getFramePrintArea().Height() );
if( aPnt2.Y() > nMaxY )
- aPnt2.Y() = nMaxY;
+ aPnt2.setY( nMaxY );
}
rOrig = SwRect( aPnt1, aPnt2 );
return true;
@@ -424,7 +424,7 @@ bool SwTextFrame::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
{
if( aTmpState.m_aRealHeight.X() >= 0 )
{
- rOrig.Pos().Y() += aTmpState.m_aRealHeight.X();
+ rOrig.Pos().AdjustY(aTmpState.m_aRealHeight.X() );
rOrig.Height( aTmpState.m_aRealHeight.Y() );
}
@@ -822,8 +822,8 @@ bool SwTextFrame::UnitUp_( SwPaM *pPam, const SwTwips nOffset,
if ( bPrevLine || bSecondOfDouble )
{
- aCharBox.SSize().Width() /= 2;
- aCharBox.Pos().X() = aCharBox.Pos().X() - 150;
+ aCharBox.SSize().setWidth( aCharBox.SSize().Width() / 2 );
+ aCharBox.Pos().setX( aCharBox.Pos().X() - 150 );
// See comment in SwTextFrame::GetCursorOfst()
#if OSL_DEBUG_LEVEL > 0
@@ -850,7 +850,7 @@ bool SwTextFrame::UnitUp_( SwPaM *pPam, const SwTwips nOffset,
if ( IsFollow() )
{
aLine.GetCharRect( &aCharBox, nPos );
- aCharBox.SSize().Width() /= 2;
+ aCharBox.SSize().setWidth( aCharBox.SSize().Width() / 2 );
}
break;
} while ( true );
@@ -881,7 +881,7 @@ bool SwTextFrame::UnitUp_( SwPaM *pPam, const SwTwips nOffset,
}
if ( !pPrevPrev )
return pTmpPrev->SwContentFrame::UnitUp( pPam, nOffset, bSetInReadOnly );
- aCharBox.Pos().Y() = pPrevPrev->getFrameArea().Bottom() - 1;
+ aCharBox.Pos().setY( pPrevPrev->getFrameArea().Bottom() - 1 );
return pPrevPrev->GetKeyCursorOfst( pPam->GetPoint(), aCharBox.Pos() );
}
}
@@ -1184,7 +1184,7 @@ bool SwTextFrame::UnitDown_(SwPaM *pPam, const SwTwips nOffset,
if( pNextLine || bFirstOfDouble )
{
- aCharBox.SSize().Width() /= 2;
+ aCharBox.SSize().setWidth( aCharBox.SSize().Width() / 2 );
#if OSL_DEBUG_LEVEL > 0
// See comment in SwTextFrame::GetCursorOfst()
const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex();
@@ -1229,7 +1229,7 @@ bool SwTextFrame::UnitDown_(SwPaM *pPam, const SwTwips nOffset,
}
aLine.GetCharRect( &aCharBox, nPos );
- aCharBox.SSize().Width() /= 2;
+ aCharBox.SSize().setWidth( aCharBox.SSize().Width() / 2 );
}
else if( !IsFollow() )
{
@@ -1258,7 +1258,7 @@ bool SwTextFrame::UnitDown_(SwPaM *pPam, const SwTwips nOffset,
// We take a shortcut for follows
if( pTmpFollow )
{
- aCharBox.Pos().Y() = pTmpFollow->getFrameArea().Top() + 1;
+ aCharBox.Pos().setY( pTmpFollow->getFrameArea().Top() + 1 );
return static_cast<const SwTextFrame*>(pTmpFollow)->GetKeyCursorOfst( pPam->GetPoint(),
aCharBox.Pos() );
}
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index c3091d47bc91..c1300fd40938 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -383,11 +383,11 @@ void SwTextFrame::AdjustFrame( const SwTwips nChgHght, bool bHasToFit )
if( aRectFnSet.IsVert() )
{
- aPrt.SSize().Width() += nChgHght;
+ aPrt.SSize().AdjustWidth(nChgHght );
}
else
{
- aPrt.SSize().Height() += nChgHght;
+ aPrt.SSize().AdjustHeight(nChgHght );
}
return;
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index b978e31fd218..a036e2d1e964 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -218,13 +218,13 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed )
else
pTmpFnt = GetFont();
Point aTmpPos( nX, nY );
- aTmpPos.Y() += nAsc;
+ aTmpPos.AdjustY(nAsc );
bool bPaint = true;
if( !IsClipChg() )
{
Size aSize = pTmpFnt->GetTextSize_( aDrawInf );
if( bGoLeft )
- aTmpPos.X() -= aSize.Width();
+ aTmpPos.AdjustX( -(aSize.Width()) );
// calculate rectangle containing the line number
SwRect aRct( Point( aTmpPos.X(),
aTmpPos.Y() - pTmpFnt->GetAscent( pSh, *pSh->GetOut() )
@@ -238,7 +238,7 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed )
}
}
else if( bGoLeft )
- aTmpPos.X() -= pTmpFnt->GetTextSize_( aDrawInf ).Width();
+ aTmpPos.AdjustX( -(pTmpFnt->GetTextSize_( aDrawInf ).Width()) );
aDrawInf.SetPos( aTmpPos );
if( bPaint )
pTmpFnt->DrawText_( aDrawInf );
@@ -512,7 +512,7 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const
GetTextNode()->GetSwAttrSet().GetLRSpace();
if ( rSpace.GetTextFirstLineOfst() > 0 )
- aPos.X() += rSpace.GetTextFirstLineOfst();
+ aPos.AdjustX(rSpace.GetTextFirstLineOfst() );
SwSaveClip *pClip;
if( IsUndersized() )
@@ -523,7 +523,7 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const
else
pClip = nullptr;
- aPos.Y() += pFnt->GetAscent( pSh, *pSh->GetOut() );
+ aPos.AdjustY(pFnt->GetAscent( pSh, *pSh->GetOut() ) );
if ( GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() &&
IsInDocBody() )
@@ -532,11 +532,11 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const
if ( pGrid )
{
// center character in grid line
- aPos.Y() += ( pGrid->GetBaseHeight() -
- pFnt->GetHeight( pSh, *pSh->GetOut() ) ) / 2;
+ aPos.AdjustY(( pGrid->GetBaseHeight() -
+ pFnt->GetHeight( pSh, *pSh->GetOut() ) ) / 2 );
if ( ! pGrid->GetRubyTextBelow() )
- aPos.Y() += pGrid->GetRubyHeight();
+ aPos.AdjustY(pGrid->GetRubyHeight() );
}
}
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 898d2f56c48e..d4cb80f1e17e 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -579,7 +579,7 @@ void SwTextPaintInfo::DrawText_( const OUString &rText, const SwLinePortion &rPo
GetTextFrame()->SwitchLTRtoRTL( aPoint );
if ( ComplexTextLayoutFlags::BiDiStrong != GetOut()->GetLayoutMode() )
- aPoint.X() -= rPor.Width();
+ aPoint.AdjustX( -(rPor.Width()) );
if ( GetTextFrame()->IsVertical() )
GetTextFrame()->SwitchHorizontalToVertical( aPoint );
@@ -654,30 +654,30 @@ void SwTextPaintInfo::DrawText_( const OUString &rText, const SwLinePortion &rPo
const sal_uInt16 nLeftBorderSpace = m_pFnt->GetLeftBorderSpace();
if ( GetTextFrame()->IsRightToLeft() )
{
- aFontPos.X() -= nLeftBorderSpace;
+ aFontPos.AdjustX( -nLeftBorderSpace );
}
else
{
switch( m_pFnt->GetOrientation(GetTextFrame()->IsVertical()) )
{
case 0 :
- aFontPos.X() += nLeftBorderSpace;
+ aFontPos.AdjustX(nLeftBorderSpace );
break;
case 900 :
- aFontPos.Y() -= nLeftBorderSpace;
+ aFontPos.AdjustY( -nLeftBorderSpace );
break;
case 1800 :
- aFontPos.X() -= nLeftBorderSpace;
+ aFontPos.AdjustX( -nLeftBorderSpace );
break;
case 2700 :
- aFontPos.Y() += nLeftBorderSpace;
+ aFontPos.AdjustY(nLeftBorderSpace );
break;
}
}
if( aFontPos.X() < 0 )
- aFontPos.X() = 0;
+ aFontPos.setX( 0 );
if( aFontPos.Y() < 0 )
- aFontPos.Y() = 0;
+ aFontPos.setY( 0 );
}
if( GetTextFly().IsOn() )
@@ -716,13 +716,13 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor,
{
Size aSize( rPor.Width(), rPor.Height() );
if( rPor.IsHangingPortion() )
- aSize.Width() = static_cast<const SwHangingPortion&>(rPor).GetInnerWidth();
+ aSize.setWidth( static_cast<const SwHangingPortion&>(rPor).GetInnerWidth() );
if( rPor.InSpaceGrp() && GetSpaceAdd() )
{
SwTwips nAdd = rPor.CalcSpacing( GetSpaceAdd(), *this );
if( rPor.InFieldGrp() && GetSpaceAdd() < 0 && nAdd )
nAdd += GetSpaceAdd() / SPACING_PRECISION_FACTOR;
- aSize.Width() += nAdd;
+ aSize.AdjustWidth(nAdd );
}
Point aPoint;
@@ -730,26 +730,26 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor,
if( IsRotated() )
{
long nTmp = aSize.Width();
- aSize.Width() = aSize.Height();
- aSize.Height() = nTmp;
+ aSize.setWidth( aSize.Height() );
+ aSize.setHeight( nTmp );
if ( 1 == GetDirection() )
{
- aPoint.X() = X() - rPor.GetAscent();
- aPoint.Y() = Y() - aSize.Height();
+ aPoint.setX( X() - rPor.GetAscent() );
+ aPoint.setY( Y() - aSize.Height() );
}
else
{
- aPoint.X() = X() - rPor.Height() + rPor.GetAscent();
- aPoint.Y() = Y();
+ aPoint.setX( X() - rPor.Height() + rPor.GetAscent() );
+ aPoint.setY( Y() );
}
}
else
{
- aPoint.X() = X();
+ aPoint.setX( X() );
if ( GetTextFrame()->IsVertLR() )
- aPoint.Y() = Y() - rPor.Height() + rPor.GetAscent();
+ aPoint.setY( Y() - rPor.Height() + rPor.GetAscent() );
else
- aPoint.Y() = Y() - rPor.GetAscent();
+ aPoint.setY( Y() - rPor.GetAscent() );
}
// Adjust x coordinate if we are inside a bidi portion
@@ -758,7 +758,7 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor,
( bFrameDir && DIR_LEFT2RIGHT == GetDirection() );
if ( bCounterDir )
- aPoint.X() -= aSize.Width();
+ aPoint.AdjustX( -(aSize.Width()) );
SwRect aRect( aPoint, aSize );
@@ -868,8 +868,8 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rInf, const SwLinePortion& r
// new height for font
const SwFontScript nAct = s_pFnt->GetActual();
- aFontSize.Height() = ( 100 * s_pFnt->GetSize( nAct ).Height() ) / nFactor;
- aFontSize.Width() = ( 100 * s_pFnt->GetSize( nAct).Width() ) / nFactor;
+ aFontSize.setHeight( ( 100 * s_pFnt->GetSize( nAct ).Height() ) / nFactor );
+ aFontSize.setWidth( ( 100 * s_pFnt->GetSize( nAct).Width() ) / nFactor );
if ( !aFontSize.Width() && !aFontSize.Height() )
break;
@@ -975,8 +975,8 @@ void SwTextPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
sal_Unicode cChar;
if( static_cast<const SwArrowPortion&>(rPor).IsLeft() )
{
- aRect.Pos().Y() += 20 - GetAscent();
- aRect.Pos().X() += 20;
+ aRect.Pos().AdjustY(20 - GetAscent() );
+ aRect.Pos().AdjustX(20 );
if( aSize.Height() > rPor.Height() )
aRect.Height( rPor.Height() );
cChar = CHAR_LEFT_ARROW;
@@ -985,8 +985,8 @@ void SwTextPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
{
if( aSize.Height() > rPor.Height() )
aRect.Height( rPor.Height() );
- aRect.Pos().Y() -= aRect.Height() + 20;
- aRect.Pos().X() -= aRect.Width() + 20;
+ aRect.Pos().AdjustY( -(aRect.Height() + 20) );
+ aRect.Pos().AdjustX( -(aRect.Width() + 20) );
cChar = CHAR_RIGHT_ARROW;
}
@@ -1017,23 +1017,23 @@ void SwTextPaintInfo::DrawPostIts( bool bScript ) const
switch ( m_pFnt->GetOrientation( GetTextFrame()->IsVertical() ) )
{
case 0 :
- aSize.Width() = nPostItsWidth;
- aSize.Height() = nFontHeight;
- aTmp.X() = aPos.X();
- aTmp.Y() = aPos.Y() - nFontAscent;
+ aSize.setWidth( nPostItsWidth );
+ aSize.setHeight( nFontHeight );
+ aTmp.setX( aPos.X() );
+ aTmp.setY( aPos.Y() - nFontAscent );
break;
case 900 :
- aSize.Height() = nPostItsWidth;
- aSize.Width() = nFontHeight;
- aTmp.X() = aPos.X() - nFontAscent;
- aTmp.Y() = aPos.Y();
+ aSize.setHeight( nPostItsWidth );
+ aSize.setWidth( nFontHeight );
+ aTmp.setX( aPos.X() - nFontAscent );
+ aTmp.setY( aPos.Y() );
break;
case 2700 :
- aSize.Height() = nPostItsWidth;
- aSize.Width() = nFontHeight;
- aTmp.X() = aPos.X() - nFontHeight +
- nFontAscent;
- aTmp.Y() = aPos.Y();
+ aSize.setHeight( nPostItsWidth );
+ aSize.setWidth( nFontHeight );
+ aTmp.setX( aPos.X() - nFontHeight +
+ nFontAscent );
+ aTmp.setY( aPos.Y() );
break;
}
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 2757a2c7e49d..e90ad9126a13 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -88,7 +88,7 @@ static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig,
break;
nFieldIdx = nFieldIdx + nFieldLen;
- rOrig.Pos().X() += pPor->Width();
+ rOrig.Pos().AdjustX(pPor->Width() );
pPor = pPor->GetPortion();
} while ( true );
@@ -116,7 +116,7 @@ static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig,
const_cast<SwLinePortion*>(pPor)->SetLen( nOldLen );
- rOrig.Pos().X() += nX1;
+ rOrig.Pos().AdjustX(nX1 );
rOrig.Width( ( nX2 > nX1 ) ?
( nX2 - nX1 ) :
1 );
@@ -439,19 +439,19 @@ bool SwTextCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
const Size aCharSize( 1, nTmpHeight );
pOrig->Pos( GetTopLeft() );
pOrig->SSize( aCharSize );
- pOrig->Pos().X() += nLast;
+ pOrig->Pos().AdjustX(nLast );
const SwTwips nTmpRight = Right() - 1;
if( pOrig->Left() > nTmpRight )
- pOrig->Pos().X() = nTmpRight;
+ pOrig->Pos().setX( nTmpRight );
if ( pCMS && pCMS->m_bRealHeight )
{
if ( nTmpAscent > nPorAscent )
- pCMS->m_aRealHeight.X() = nTmpAscent - nPorAscent;
+ pCMS->m_aRealHeight.setX( nTmpAscent - nPorAscent );
else
- pCMS->m_aRealHeight.X() = 0;
+ pCMS->m_aRealHeight.setX( 0 );
OSL_ENSURE( nPorHeight, "GetCharRect: Missing Portion-Height" );
- pCMS->m_aRealHeight.Y() = nPorHeight;
+ pCMS->m_aRealHeight.setY( nPorHeight );
}
return true;
@@ -490,8 +490,8 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, const sal_Int32 nOfst,
{
if ( pCMS && pCMS->m_bRealHeight )
{
- pCMS->m_aRealHeight.X() = 0;
- pCMS->m_aRealHeight.Y() = nTmpHeight;
+ pCMS->m_aRealHeight.setX( 0 );
+ pCMS->m_aRealHeight.setY( nTmpHeight );
}
}
else
@@ -660,7 +660,7 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, const sal_Int32 nOfst,
{
nTmpAscent = AdjustBaseLine( *m_pCurr, pPor );
GetInfo().SetMulti( true );
- pOrig->Pos().Y() += nTmpAscent - nPorAscent;
+ pOrig->Pos().AdjustY(nTmpAscent - nPorAscent );
if( pCMS && pCMS->m_b2Lines )
{
@@ -730,7 +730,7 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, const sal_Int32 nOfst,
else
nOffset = GetLineHeight();
- pOrig->Pos().Y() += nOffset;
+ pOrig->Pos().AdjustY(nOffset );
Next();
}
@@ -810,15 +810,15 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, const sal_Int32 nOfst,
if ( nTmp )
nTmp--;
- pOrig->Pos().X() = nX + aOldPos.X();
+ pOrig->Pos().setX( nX + aOldPos.X() );
if( static_cast<SwMultiPortion*>(pPor)->IsRevers() )
- pOrig->Pos().Y() = aOldPos.Y() + nTmp;
+ pOrig->Pos().setY( aOldPos.Y() + nTmp );
else
- pOrig->Pos().Y() = aOldPos.Y()
- + pPor->Height() - nTmp - pOrig->Height();
+ pOrig->Pos().setY( aOldPos.Y()
+ + pPor->Height() - nTmp - pOrig->Height() );
if ( pCMS && pCMS->m_bRealHeight )
{
- pCMS->m_aRealHeight.Y() = -pCMS->m_aRealHeight.Y();
+ pCMS->m_aRealHeight.setY( -pCMS->m_aRealHeight.Y() );
// result for rotated multi portion is not
// correct for reverse (270 degree) portions
if( static_cast<SwMultiPortion*>(pPor)->IsRevers() )
@@ -828,34 +828,34 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, const sal_Int32 nOfst,
// if vertical alignment is set to auto,
// we switch from base line alignment
// to centered alignment
- pCMS->m_aRealHeight.X() =
+ pCMS->m_aRealHeight.setX(
( pOrig->Width() +
- pCMS->m_aRealHeight.Y() ) / 2;
+ pCMS->m_aRealHeight.Y() ) / 2 );
else
- pCMS->m_aRealHeight.X() =
- ( pOrig->Width() -
- pCMS->m_aRealHeight.X() +
- pCMS->m_aRealHeight.Y() );
+ pCMS->m_aRealHeight.setX(
+ pOrig->Width() -
+ pCMS->m_aRealHeight.X() +
+ pCMS->m_aRealHeight.Y() );
}
}
}
else
{
- pOrig->Pos().Y() += aOldPos.Y();
+ pOrig->Pos().AdjustY(aOldPos.Y() );
if ( static_cast<SwMultiPortion*>(pPor)->IsBidi() )
{
const SwTwips nPorWidth = pPor->Width() +
pPor->CalcSpacing( nSpaceAdd, aInf );
const SwTwips nInsideOfst = pOrig->Pos().X();
- pOrig->Pos().X() = nX + nPorWidth -
- nInsideOfst - pOrig->Width();
+ pOrig->Pos().setX( nX + nPorWidth -
+ nInsideOfst - pOrig->Width() );
}
else
- pOrig->Pos().X() += nX;
+ pOrig->Pos().AdjustX(nX );
if( static_cast<SwMultiPortion*>(pPor)->HasBrackets() )
- pOrig->Pos().X() +=
- static_cast<SwDoubleLinePortion*>(pPor)->PreWidth();
+ pOrig->Pos().AdjustX(
+ static_cast<SwDoubleLinePortion*>(pPor)->PreWidth() );
}
if( bSpaceChg )
@@ -1108,7 +1108,7 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, const sal_Int32 nOfst,
{
// we came from inside the bidi portion, we want to blink
// behind the portion
- pOrig->Pos().X() -= nLastBidiPorWidth;
+ pOrig->Pos().AdjustX( -nLastBidiPorWidth );
// Again, there is a special case: logically behind
// the portion can actually mean that the cursor is inside
@@ -1122,8 +1122,8 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, const sal_Int32 nOfst,
{
OSL_ENSURE( static_cast<const SwMultiPortion*>(pLast)->IsBidi(),
"Non-BidiPortion inside BidiPortion" );
- pOrig->Pos().X() += pLast->Width() +
- pLast->CalcSpacing( nSpaceAdd, aInf );
+ pOrig->Pos().AdjustX(pLast->Width() +
+ pLast->CalcSpacing( nSpaceAdd, aInf ) );
}
}
}
@@ -1135,26 +1135,26 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, const sal_Int32 nOfst,
{
// we came from inside the bidi portion, we want to blink
// behind the portion
- pOrig->Pos().X() += pPor->Width() +
- pPor->CalcSpacing( nSpaceAdd, aInf );
+ pOrig->Pos().AdjustX(pPor->Width() +
+ pPor->CalcSpacing( nSpaceAdd, aInf ) );
}
}
}
- pOrig->Pos().X() += nX;
+ pOrig->Pos().AdjustX(nX );
if ( pCMS && pCMS->m_bRealHeight )
{
nTmpAscent = AdjustBaseLine( *m_pCurr, nullptr, nPorHeight, nPorAscent );
if ( nTmpAscent > nPorAscent )
- pCMS->m_aRealHeight.X() = nTmpAscent - nPorAscent;
+ pCMS->m_aRealHeight.setX( nTmpAscent - nPorAscent );
else
- pCMS->m_aRealHeight.X() = 0;
+ pCMS->m_aRealHeight.setX( 0 );
OSL_ENSURE( nPorHeight, "GetCharRect: Missing Portion-Height" );
if ( nTmpHeight > nPorHeight )
- pCMS->m_aRealHeight.Y() = nPorHeight;
+ pCMS->m_aRealHeight.setY( nPorHeight );
else
- pCMS->m_aRealHeight.Y() = nTmpHeight;
+ pCMS->m_aRealHeight.setY( nTmpHeight );
}
}
}
@@ -1196,21 +1196,21 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
// expensive, so it's a value (-12), that should hopefully be OK.
const SwTwips nTmpRight = Right() - 12;
- pOrig->Pos().X() += aCharPos.X();
- pOrig->Pos().Y() += aCharPos.Y();
+ pOrig->Pos().AdjustX(aCharPos.X() );
+ pOrig->Pos().AdjustY(aCharPos.Y() );
if( pCMS && pCMS->m_b2Lines && pCMS->m_p2Lines )
{
- pCMS->m_p2Lines->aLine.Pos().X() += aCharPos.X();
- pCMS->m_p2Lines->aLine.Pos().Y() += aCharPos.Y();
- pCMS->m_p2Lines->aPortion.Pos().X() += aCharPos.X();
- pCMS->m_p2Lines->aPortion.Pos().Y() += aCharPos.Y();
+ pCMS->m_p2Lines->aLine.Pos().AdjustX(aCharPos.X() );
+ pCMS->m_p2Lines->aLine.Pos().AdjustY(aCharPos.Y() );
+ pCMS->m_p2Lines->aPortion.Pos().AdjustX(aCharPos.X() );
+ pCMS->m_p2Lines->aPortion.Pos().AdjustY(aCharPos.Y() );
}
const bool bTabOverMargin = GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN);
// Make sure the cursor respects the right margin, unless in compat mode, where the tab size has priority over the margin size.
if( pOrig->Left() > nTmpRight && !bTabOverMargin)
- pOrig->Pos().X() = nTmpRight;
+ pOrig->Pos().setX( nTmpRight );
if( nMax )
{
@@ -1225,11 +1225,11 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
long nTmp = pCMS->m_aRealHeight.X() + pOrig->Top();
if( nTmp >= nMax )
{
- pCMS->m_aRealHeight.X() = nMax - pOrig->Top();
- pCMS->m_aRealHeight.Y() = 0;
+ pCMS->m_aRealHeight.setX( nMax - pOrig->Top() );
+ pCMS->m_aRealHeight.setY( 0 );
}
else if( nTmp + pCMS->m_aRealHeight.Y() > nMax )
- pCMS->m_aRealHeight.Y() = nMax - nTmp;
+ pCMS->m_aRealHeight.setY( nMax - nTmp );
}
}
long nOut = pOrig->Right() - GetTextFrame()->getFrameArea().Right();
@@ -1240,7 +1240,7 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
nOut += GetTextFrame()->getFrameArea().Width() - GetTextFrame()->getFramePrintArea().Left()
- GetTextFrame()->getFramePrintArea().Width();
if( nOut > 0 )
- pOrig->Pos().X() -= nOut + 10;
+ pOrig->Pos().AdjustX( -(nOut + 10) );
}
return true;
@@ -1807,13 +1807,13 @@ bool SwTextFrame::FillSelection( SwSelectionList& rSelList, const SwRect& rRect
nLastY /= 2;
if( aRectFnSet.IsVert() )
{
- aPoint.X() = nLastY;
- aPoint.Y() = nLeft;
+ aPoint.setX( nLastY );
+ aPoint.setY( nLeft );
}
else
{
- aPoint.X() = nLeft;
- aPoint.Y() = nLastY;
+ aPoint.setX( nLeft );
+ aPoint.setY( nLastY );
}
// Looking for the position of the left border of the rectangle
// in this text line
@@ -1822,13 +1822,13 @@ bool SwTextFrame::FillSelection( SwSelectionList& rSelList, const SwRect& rRect
{
if( aRectFnSet.IsVert() )
{
- aPoint.X() = nLastY;
- aPoint.Y() = nRight;
+ aPoint.setX( nLastY );
+ aPoint.setY( nRight );
}
else
{
- aPoint.X() = nRight;
- aPoint.Y() = nLastY;
+ aPoint.setX( nRight );
+ aPoint.setY( nLastY );
}
// If we get a right position and if the left position
// is not the same like the left position of the line before
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 3a7813790673..382fe7c24258 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -2067,26 +2067,26 @@ void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
if ( GetMulti()->HasBrackets() )
{
OSL_ENSURE( GetMulti()->IsDouble(), "Brackets only for doubles");
- aSt.X() += static_cast<SwDoubleLinePortion*>(GetMulti())->PreWidth();
+ aSt.AdjustX(static_cast<SwDoubleLinePortion*>(GetMulti())->PreWidth() );
}
else if( GetMulti()->HasRotation() )
{
- aSt.Y() += pCurrent->GetAscent() - GetMulti()->GetAscent();
+ aSt.AdjustY(pCurrent->GetAscent() - GetMulti()->GetAscent() );
if( GetMulti()->IsRevers() )
- aSt.X() += GetMulti()->Width();
+ aSt.AdjustX(GetMulti()->Width() );
else
- aSt.Y() += GetMulti()->Height();
+ aSt.AdjustY(GetMulti()->Height() );
}
else if ( GetMulti()->IsBidi() )
// jump to end of the bidi portion
- aSt.X() += pLay->Width();
+ aSt.AdjustX(pLay->Width() );
sal_Int32 nStIdx = aTmpInf.GetIdx();
do
{
UpdatePos( pLay, aSt, nStIdx, bAlways );
nStIdx = nStIdx + pLay->GetLen();
- aSt.Y() += pLay->Height();
+ aSt.AdjustY(pLay->Height() );
pLay = pLay->GetNext();
} while ( pLay );
const_cast<SwTextFormatter*>(this)->pMulti = nullptr;
@@ -2166,7 +2166,7 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const
// We now check every portion that could have lowered for overlapping
// with the fly.
const SwLinePortion *pPos = GetCurr()->GetFirstPortion();
- aLine.Pos().Y() = Y() + GetCurr()->GetRealHeight() - GetCurr()->Height();
+ aLine.Pos().setY( Y() + GetCurr()->GetRealHeight() - GetCurr()->Height() );
aLine.Height( GetCurr()->Height() );
while( pPos )
@@ -2337,7 +2337,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
}
// aInter becomes frame-local
- aInter.Pos().X() -= nLeftMar;
+ aInter.Pos().AdjustX( -nLeftMar );
SwFlyPortion *pFly = new SwFlyPortion( aInter );
if( bForced )
{
@@ -2513,7 +2513,7 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf,
rInf.SelectFont();
if( pRet->GetAscent() > nAscent )
{
- aBase.Y() = Y() + pRet->GetAscent();
+ aBase.setY( Y() + pRet->GetAscent() );
nMode |= AsCharFlags::UlSpace;
if( !rInf.IsTest() )
{
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 8df27339a3e9..20c183064492 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -226,15 +226,15 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
OutputDevice* pOut = GetInfo().GetOut();
Point aPnt1( nTmpLeft, GetInfo().GetPos().Y() );
if ( aPnt1.X() < rPaint.Left() )
- aPnt1.X() = rPaint.Left();
+ aPnt1.setX( rPaint.Left() );
if ( aPnt1.Y() < rPaint.Top() )
- aPnt1.Y() = rPaint.Top();
+ aPnt1.setY( rPaint.Top() );
Point aPnt2( GetInfo().GetPos().X() + nMaxRight - GetInfo().X(),
GetInfo().GetPos().Y() + nTmpHeight );
if ( aPnt2.X() > rPaint.Right() )
- aPnt2.X() = rPaint.Right();
+ aPnt2.setX( rPaint.Right() );
if ( aPnt2.Y() > rPaint.Bottom() )
- aPnt2.Y() = rPaint.Bottom();
+ aPnt2.setY( rPaint.Bottom() );
const SwRect aLineRect( aPnt1, aPnt2 );
@@ -640,7 +640,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
pUnderlineFnt->SetWeight( WEIGHT_NORMAL, nActual );
// common base line
- aCommonBaseLine.Y() = nAdjustBaseLine + nMaxBaseLineOfst;
+ aCommonBaseLine.setY( nAdjustBaseLine + nMaxBaseLineOfst );
}
}
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 8816c02b8e8b..519583d63f2f 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -914,14 +914,14 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const
else
nOffset = nOffset - nMinDist;
}
- aPos.X() += nOffset;
+ aPos.AdjustX(nOffset );
}
if( m_bReplace )
{
const long nTmpH = GetPortion() ? GetPortion()->GetAscent() : 120;
aSize = Size( nTmpH, nTmpH );
- aPos.Y() = rInf.Y() - nTmpH;
+ aPos.setY( rInf.Y() - nTmpH );
}
SwRect aTmp( aPos, aSize );
@@ -1119,8 +1119,8 @@ void SwCombinedPortion::Paint( const SwTextPaintInfo &rInf ) const
for( sal_Int32 i = 0 ; i < nCount; ++i )
{
if( i == nTop ) // change the row
- aOutPos.Y() = aOldPos.Y() + nLowPos; // Y of the second row
- aOutPos.X() = aOldPos.X() + aPos[i]; // X position
+ aOutPos.setY( aOldPos.Y() + nLowPos ); // Y of the second row
+ aOutPos.setX( aOldPos.X() + aPos[i] ); // X position
const SwFontScript nAct = aScrType[i]; // script type
aTmpFont.SetActual( nAct );
@@ -1131,7 +1131,7 @@ void SwCombinedPortion::Paint( const SwTextPaintInfo &rInf ) const
Size aTmpSz = aTmpFont.GetSize( nAct );
if( aTmpSz.Width() != aWidth[ nAct ] )
{
- aTmpSz.Width() = aWidth[ nAct ];
+ aTmpSz.setWidth( aWidth[ nAct ] );
aTmpFont.SetSize( aTmpSz, nAct );
}
}
@@ -1208,7 +1208,7 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
if( aWidth[ nScrp ] )
{
Size aFontSize( aTmpFont.GetSize( nScrp ) );
- aFontSize.Width() = aWidth[ nScrp ];
+ aFontSize.setWidth( aWidth[ nScrp ] );
aTmpFont.SetSize( aFontSize, nScrp );
}
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 8138195fc825..28193b80d161 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -89,7 +89,7 @@ void SwGluePortion::Paint( const SwTextPaintInfo &rInf ) const
OUString aBullet( CH_BULLET );
SwPosSize aBulletSize( rInf.GetTextSize( aBullet ) );
Point aPos( rInf.GetPos() );
- aPos.X() += (Width()/2) - (aBulletSize.Width()/2);
+ aPos.AdjustX((Width()/2) - (aBulletSize.Width()/2) );
SwTextPaintInfo aInf( rInf, &aBullet );
aInf.SetPos( aPos );
SwTextPortion aBulletPor;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index ceeaef8bdf68..337a3b9299fe 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1641,7 +1641,7 @@ long SwScriptInfo::Compress( long* pKernArray, sal_Int32 nIdx, sal_Int32 nLen,
nMove = nLast;
else
{
- pPoint->X() += nLast;
+ pPoint->AdjustX(nLast );
nLast = 0;
}
}
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index e04c0f5c6e75..f6c969c32443 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -189,10 +189,10 @@ SwArrowPortion::SwArrowPortion( const SwTextPaintInfo &rInf )
: bLeft( false )
{
Height( static_cast<sal_uInt16>(rInf.GetTextFrame()->getFramePrintArea().Height()) );
- aPos.X() = rInf.GetTextFrame()->getFrameArea().Left() +
- rInf.GetTextFrame()->getFramePrintArea().Right();
- aPos.Y() = rInf.GetTextFrame()->getFrameArea().Top() +
- rInf.GetTextFrame()->getFramePrintArea().Bottom();
+ aPos.setX( rInf.GetTextFrame()->getFrameArea().Left() +
+ rInf.GetTextFrame()->getFramePrintArea().Right() );
+ aPos.setY( rInf.GetTextFrame()->getFrameArea().Top() +
+ rInf.GetTextFrame()->getFramePrintArea().Bottom() );
SetWhichPor( POR_ARROW );
}
@@ -463,8 +463,8 @@ void SwHiddenTextPortion::Paint( const SwTextPaintInfo & rInf) const
Color aOldColor( pOut->GetFillColor() );
pOut->SetFillColor( aCol );
Point aPos( rInf.GetPos() );
- aPos.Y() -= 150;
- aPos.X() -= 25;
+ aPos.AdjustY( -150 );
+ aPos.AdjustX( -25 );
SwRect aRect( aPos, Size( 100, 200 ) );
pOut->DrawRect( aRect.SVRect() );
pOut->SetFillColor( aOldColor );
@@ -515,7 +515,7 @@ void SwControlCharPortion::Paint( const SwTextPaintInfo &rInf ) const
Point aOldPos = rInf.GetPos();
Point aNewPos( aOldPos );
- aNewPos.X() = aNewPos.X() + ( Width() / 2 ) - mnHalfCharWidth;
+ aNewPos.setX( aNewPos.X() + ( Width() / 2 ) - mnHalfCharWidth );
const_cast< SwTextPaintInfo& >( rInf ).SetPos( aNewPos );
rInf.DrawText( aOutString, *this );
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index d6ffec0dc272..0f7cdc0ce42c 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -54,8 +54,8 @@ static bool lcl_IsDropFlyInter( const SwTextFormatInfo &rInf,
{
SwRect aRect( rInf.GetTextFrame()->getFrameArea().Pos(), Size( nWidth, nHeight) );
aRect.Pos() += rInf.GetTextFrame()->getFramePrintArea().Pos();
- aRect.Pos().X() += rInf.X();
- aRect.Pos().Y() = rInf.Y();
+ aRect.Pos().AdjustX(rInf.X() );
+ aRect.Pos().setY( rInf.Y() );
aRect = rTextFly.GetFrame( aRect );
return aRect.HasArea();
}
@@ -621,10 +621,10 @@ void SwTextPainter::PaintDropPortion()
}
Point aLineOrigin( GetTopLeft() );
- aLineOrigin.X() += nX;
+ aLineOrigin.AdjustX(nX );
sal_uInt16 nTmpAscent, nTmpHeight;
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
- aLineOrigin.Y() += nTmpAscent;
+ aLineOrigin.AdjustY(nTmpAscent );
GetInfo().SetIdx( GetStart() );
GetInfo().SetPos( aLineOrigin );
GetInfo().SetLen( pDrop->GetLen() );
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index d06e3d595f9d..c1e953725fc8 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -89,29 +89,29 @@ void SwTextFrame::SwapWidthAndHeight()
if ( ! mbIsSwapped )
{
const long nPrtOfstX = aPrt.Pos().X();
- aPrt.Pos().X() = aPrt.Pos().Y();
+ aPrt.Pos().setX( aPrt.Pos().Y() );
if( IsVertLR() )
{
- aPrt.Pos().Y() = nPrtOfstX;
+ aPrt.Pos().setY( nPrtOfstX );
}
else
{
- aPrt.Pos().Y() = getFrameArea().Width() - ( nPrtOfstX + aPrt.Width() );
+ aPrt.Pos().setY( getFrameArea().Width() - ( nPrtOfstX + aPrt.Width() ) );
}
}
else
{
const long nPrtOfstY = aPrt.Pos().Y();
- aPrt.Pos().Y() = aPrt.Pos().X();
+ aPrt.Pos().setY( aPrt.Pos().X() );
if( IsVertLR() )
{
- aPrt.Pos().X() = nPrtOfstY;
+ aPrt.Pos().setX( nPrtOfstY );
}
else
{
- aPrt.Pos().X() = getFrameArea().Height() - ( nPrtOfstY + aPrt.Height() );
+ aPrt.Pos().setX( getFrameArea().Height() - ( nPrtOfstY + aPrt.Height() ) );
}
}
@@ -178,17 +178,17 @@ void SwTextFrame::SwitchHorizontalToVertical( Point& rPoint ) const
const long nOfstX = rPoint.X() - getFrameArea().Left();
const long nOfstY = rPoint.Y() - getFrameArea().Top();
if ( IsVertLR() )
- rPoint.X() = getFrameArea().Left() + nOfstY;
+ rPoint.setX( getFrameArea().Left() + nOfstY );
else
{
if ( mbIsSwapped )
- rPoint.X() = getFrameArea().Left() + getFrameArea().Height() - nOfstY;
+ rPoint.setX( getFrameArea().Left() + getFrameArea().Height() - nOfstY );
else
// calc rotated coords
- rPoint.X() = getFrameArea().Left() + getFrameArea().Width() - nOfstY;
+ rPoint.setX( getFrameArea().Left() + getFrameArea().Width() - nOfstY );
}
- rPoint.Y() = getFrameArea().Top() + nOfstX;
+ rPoint.setY( getFrameArea().Top() + nOfstX );
}
/**
@@ -254,8 +254,8 @@ void SwTextFrame::SwitchVerticalToHorizontal( Point& rPoint ) const
const long nOfstY = rPoint.Y() - getFrameArea().Top();
// calc rotated coords
- rPoint.X() = getFrameArea().Left() + nOfstY;
- rPoint.Y() = getFrameArea().Top() + nOfstX;
+ rPoint.setX( getFrameArea().Left() + nOfstY );
+ rPoint.setY( getFrameArea().Top() + nOfstX );
}
/**
@@ -302,7 +302,7 @@ void SwTextFrame::SwitchLTRtoRTL( Point& rPoint ) const
{
SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this));
- rPoint.X() = 2 * ( getFrameArea().Left() + getFramePrintArea().Left() ) + getFramePrintArea().Width() - rPoint.X() - 1;
+ rPoint.setX( 2 * ( getFrameArea().Left() + getFramePrintArea().Left() ) + getFramePrintArea().Width() - rPoint.X() - 1 );
}
SwLayoutModeModifier::SwLayoutModeModifier( const OutputDevice& rOutp ) :
@@ -798,7 +798,7 @@ void SwTextFrame::CalcLineSpace()
aLine.Top();
aLine.RecalcRealHeight();
- aNewSize.Height() = (aLine.Y() - getFrameArea().Top()) + aLine.GetLineHeight();
+ aNewSize.setHeight( (aLine.Y() - getFrameArea().Top()) + aLine.GetLineHeight() );
SwTwips nDelta = aNewSize.Height() - getFramePrintArea().Height();
// Underflow with free-flying frames
@@ -2157,7 +2157,7 @@ SwTwips SwTextFrame::CalcFitToContent()
if ( IsRightToLeft() )
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
- aFrm.Pos().X() += nOldFrameWidth - nPageWidth;
+ aFrm.Pos().AdjustX(nOldFrameWidth - nPageWidth );
}
TextFrameLockGuard aLock( this );
diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx
index 80ada72d494d..4a1c24a22afd 100644
--- a/sw/source/core/text/txtpaint.cxx
+++ b/sw/source/core/text/txtpaint.cxx
@@ -75,7 +75,7 @@ void SwSaveClip::ChgClip_( const SwRect &rRect, const SwTextFrame* pFrame,
// (see frmform.cxx) because for some fonts it could be too small.
// Consequently, we have to enlarge the clipping rectangle as well.
if ( bEnlargeRect && ! bVertical )
- aRect.Bottom() += 40;
+ aRect.AdjustBottom(40 );
// If the ClipRect is identical, nothing will happen
if( pOut->IsClipRegion() ) // no && because of Mac
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index e177aa948201..7b40379abb9d 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -235,24 +235,24 @@ static void lcl_calcLinePos( const CalcLinePosData &rData,
switch ( nDir )
{
case 0 :
- rStart.X() += nKernStart;
- rEnd.X() = nBlank + rData.rInf.GetPos().X() + nKernEnd;
- rEnd.Y() = rData.rInf.GetPos().Y();
+ rStart.AdjustX(nKernStart );
+ rEnd.setX( nBlank + rData.rInf.GetPos().X() + nKernEnd );
+ rEnd.setY( rData.rInf.GetPos().Y() );
break;
case 900 :
- rStart.Y() -= nKernStart;
- rEnd.X() = rData.rInf.GetPos().X();
- rEnd.Y() = nBlank + rData.rInf.GetPos().Y() - nKernEnd;
+ rStart.AdjustY( -nKernStart );
+ rEnd.setX( rData.rInf.GetPos().X() );
+ rEnd.setY( nBlank + rData.rInf.GetPos().Y() - nKernEnd );
break;
case 1800 :
- rStart.X() -= nKernStart;
- rEnd.X() = rData.rInf.GetPos().X() - nKernEnd - nBlank;
- rEnd.Y() = rData.rInf.GetPos().Y();
+ rStart.AdjustX( -nKernStart );
+ rEnd.setX( rData.rInf.GetPos().X() - nKernEnd - nBlank );
+ rEnd.setY( rData.rInf.GetPos().Y() );
break;
case 2700 :
- rStart.Y() += nKernStart;
- rEnd.X() = rData.rInf.GetPos().X();
- rEnd.Y() = nBlank + rData.rInf.GetPos().Y() + nKernEnd;
+ rStart.AdjustY(nKernStart );
+ rEnd.setX( rData.rInf.GetPos().X() );
+ rEnd.setY( nBlank + rData.rInf.GetPos().Y() + nKernEnd );
break;
}
@@ -724,8 +724,8 @@ static void lcl_DrawLineForWrongListData(
{
rInf.GetOut().SetLineColor( wrongArea->mColor );
- aStart.Y() +=30;
- aEnd.Y() +=30;
+ aStart.AdjustY(30 );
+ aEnd.AdjustY(30 );
LineInfo aLineInfo( LineStyle::Dash );
aLineInfo.SetDistance( 40 );
@@ -897,7 +897,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
nPixWidth = rInf.GetOut().PixelToLogic( aTmp ).Width();
}
- aTextOriginPos.X() += rInf.GetFrame()->IsRightToLeft() ? 0 : nPixWidth;
+ aTextOriginPos.AdjustX(rInf.GetFrame()->IsRightToLeft() ? 0 : nPixWidth );
}
Color aOldColor( pTmpFont->GetColor() );
@@ -969,7 +969,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
// centre character
case SwScriptInfo::NONE :
- aTextOriginPos.X() += ( nAvgWidthPerChar - nCharWidth ) / 2;
+ aTextOriginPos.AdjustX(( nAvgWidthPerChar - nCharWidth ) / 2 );
nNextFix = nCharWidth / 2;
break;
case SwScriptInfo::SPECIAL_RIGHT :
@@ -977,7 +977,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
break;
// punctuation
default:
- aTextOriginPos.X() += nAvgWidthPerChar - nCharWidth;
+ aTextOriginPos.AdjustX(nAvgWidthPerChar - nCharWidth );
nNextFix = nCharWidth - nHalfWidth;
}
@@ -1132,7 +1132,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
pKernArray.get() + j, rInf.GetIdx() + j, i - j );
j = i + 1;
pKernArray[i] = pKernArray[i] + nSpaceSum;
- aTmpPos.X() = aTextOriginPos.X() + pKernArray[ i ] + nKernSum;
+ aTmpPos.setX( aTextOriginPos.X() + pKernArray[ i ] + nKernSum );
}
}
if( j < i )
@@ -1336,7 +1336,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
SwTwips nAdd = pKernArray[ i ] + nKernSum;
if ( ( ComplexTextLayoutFlags::BiDiStrong | ComplexTextLayoutFlags::BiDiRtl ) == nMode )
nAdd *= -1;
- aTmpPos.X() = aTextOriginPos.X() + nAdd;
+ aTmpPos.setX( aTextOriginPos.X() + nAdd );
}
}
if( j < i )
@@ -1661,20 +1661,20 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
switch ( nDir )
{
case 0 :
- aEnd.X() = rInf.GetPos().X() + nKernVal;
- aEnd.Y() = rInf.GetPos().Y();
+ aEnd.setX( rInf.GetPos().X() + nKernVal );
+ aEnd.setY( rInf.GetPos().Y() );
break;
case 900 :
- aEnd.X() = rInf.GetPos().X();
- aEnd.Y() = rInf.GetPos().Y() - nKernVal;
+ aEnd.setX( rInf.GetPos().X() );
+ aEnd.setY( rInf.GetPos().Y() - nKernVal );
break;
case 1800 :
- aEnd.X() = rInf.GetPos().X() - nKernVal;
- aEnd.Y() = rInf.GetPos().Y();
+ aEnd.setX( rInf.GetPos().X() - nKernVal );
+ aEnd.setY( rInf.GetPos().Y() );
break;
case 2700 :
- aEnd.X() = rInf.GetPos().X();
- aEnd.Y() = rInf.GetPos().Y() + nKernVal;
+ aEnd.setX( rInf.GetPos().X() );
+ aEnd.setY( rInf.GetPos().Y() + nKernVal );
break;
}
@@ -1767,9 +1767,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
aBulletOverlay[ nTmpIdx ] == CH_BULLET )
{
if (bSwitchH2V)
- aTextOriginPos.Y() += nShift ;
+ aTextOriginPos.AdjustY(nShift ) ;
else
- aTextOriginPos.X() += nShift ;
+ aTextOriginPos.AdjustX(nShift ) ;
nAdd = nShift ;
}
for( sal_Int32 i = 1 ; i < nLen ; ++i )
@@ -1827,14 +1827,14 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
else
pOutDev = rInf.GetpOut();
- aTextSize.Width() =
- pOutDev->GetTextWidth( rInf.GetText(), rInf.GetIdx(), nLn );
+ aTextSize.setWidth(
+ pOutDev->GetTextWidth( rInf.GetText(), rInf.GetIdx(), nLn ) );
OSL_ENSURE( !rInf.GetShell() ||
( USHRT_MAX != GetGuessedLeading() && USHRT_MAX != GetExternalLeading() ),
"Leading values should be already calculated" );
- aTextSize.Height() = pOutDev->GetTextHeight() +
- GetFontLeading( rInf.GetShell(), rInf.GetOut() );
+ aTextSize.setHeight( pOutDev->GetTextHeight() +
+ GetFontLeading( rInf.GetShell(), rInf.GetOut() ) );
long nAvgWidthPerChar = aTextSize.Width() / nLn;
@@ -1842,7 +1842,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
( nAvgWidthPerChar - 1 ) / nGridWidth + 1:
1;
- aTextSize.Width() = i * nGridWidth * nLn;
+ aTextSize.setWidth( i * nGridWidth * nLn );
rInf.SetKanaDiff( 0 );
return aTextSize;
}
@@ -1864,10 +1864,10 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
}
else
pOutDev = rInf.GetpOut();
- aTextSize.Width() = pOutDev->GetTextWidth( rInf.GetText(), rInf.GetIdx(), nLn );
- aTextSize.Height() = pOutDev->GetTextHeight() +
- GetFontLeading( rInf.GetShell(), rInf.GetOut() );
- aTextSize.Width() += nLn * nGridWidthAdd;
+ aTextSize.setWidth( pOutDev->GetTextWidth( rInf.GetText(), rInf.GetIdx(), nLn ) );
+ aTextSize.setHeight( pOutDev->GetTextHeight() +
+ GetFontLeading( rInf.GetShell(), rInf.GetOut() ) );
+ aTextSize.AdjustWidth(nLn * nGridWidthAdd );
//if ( rInf.GetKern() && nLn )
// aTextSize.Width() += ( nLn ) * long( rInf.GetKern() );
@@ -1892,9 +1892,9 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
{
if( !m_pPrtFont->IsSameInstance( m_pPrinter->GetFont() ) )
m_pPrinter->SetFont(*m_pPrtFont);
- aTextSize.Width() = m_pPrinter->GetTextWidth( rInf.GetText(),
- rInf.GetIdx(), nLn );
- aTextSize.Height() = m_pPrinter->GetTextHeight();
+ aTextSize.setWidth( m_pPrinter->GetTextWidth( rInf.GetText(),
+ rInf.GetIdx(), nLn ) );
+ aTextSize.setHeight( m_pPrinter->GetTextHeight() );
long* pKernArray = new long[nLn];
CreateScrFont( *rInf.GetShell(), rInf.GetOut() );
if( !GetScrFont()->IsSameInstance( rInf.GetOut().GetFont() ) )
@@ -1954,7 +1954,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
}
delete[] pKernArray;
- aTextSize.Width() = nScrPos;
+ aTextSize.setWidth( nScrPos );
}
else
{
@@ -1968,26 +1968,26 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray.get(),
rInf.GetIdx(), nLn, rInf.GetKanaComp(),
static_cast<sal_uInt16>(m_aFont.GetFontSize().Height()) ,lcl_IsFullstopCentered( rInf.GetOut() ) ) );
- aTextSize.Width() = pKernArray[ nLn - 1 ];
+ aTextSize.setWidth( pKernArray[ nLn - 1 ] );
}
else
{
- aTextSize.Width() = rInf.GetOut().GetTextWidth( rInf.GetText(),
+ aTextSize.setWidth( rInf.GetOut().GetTextWidth( rInf.GetText(),
rInf.GetIdx(), nLn,
- rInf.GetVclCache());
+ rInf.GetVclCache()) );
rInf.SetKanaDiff( 0 );
}
- aTextSize.Height() = rInf.GetOut().GetTextHeight();
+ aTextSize.setHeight( rInf.GetOut().GetTextHeight() );
}
if ( rInf.GetKern() && nLn )
- aTextSize.Width() += ( nLn - 1 ) * rInf.GetKern();
+ aTextSize.AdjustWidth(( nLn - 1 ) * rInf.GetKern() );
OSL_ENSURE( !rInf.GetShell() ||
( USHRT_MAX != GetGuessedLeading() && USHRT_MAX != GetExternalLeading() ),
"Leading values should be already calculated" );
- aTextSize.Height() += GetFontLeading( rInf.GetShell(), rInf.GetOut() );
+ aTextSize.AdjustHeight(GetFontLeading( rInf.GetShell(), rInf.GetOut() ) );
return aTextSize;
}
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 30f488513cc7..d536051b752a 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -118,15 +118,15 @@ public:
void SwDoGetCapitalSize::Init( SwFntObj *, SwFntObj * )
{
- aTextSize.Height() = 0;
- aTextSize.Width() = 0;
+ aTextSize.setHeight( 0 );
+ aTextSize.setWidth( 0 );
}
void SwDoGetCapitalSize::Do()
{
- aTextSize.Width() += rInf.GetSize().Width();
+ aTextSize.AdjustWidth(rInf.GetSize().Width() );
if( rInf.GetUpper() )
- aTextSize.Height() = rInf.GetSize().Height();
+ aTextSize.setHeight( rInf.GetSize().Height() );
}
Size SwSubFont::GetCapitalSize( SwDrawTextInfo& rInf )
@@ -146,7 +146,7 @@ Size SwSubFont::GetCapitalSize( SwDrawTextInfo& rInf )
if( !aTextSize.Height() )
{
SV_STAT( nGetTextSize );
- aTextSize.Height() = short ( rInf.GetpOut()->GetTextHeight() );
+ aTextSize.setHeight( short ( rInf.GetpOut()->GetTextHeight() ) );
}
rInf.SetKern( nOldKern );
return aTextSize;
@@ -297,7 +297,7 @@ void SwDoDrawCapital::DrawSpace( Point &rPos )
GetOut().DrawStretchText( aPos, nDiff,
" ", 0, 2 );
}
- rPos.X() = rInf.GetPos().X() + rInf.GetWidth();
+ rPos.setX( rInf.GetPos().X() + rInf.GetWidth() );
}
void SwSubFont::DrawCapital( SwDrawTextInfo &rInf )
@@ -439,7 +439,7 @@ void SwDoDrawStretchCapital::Do()
GetOut().DrawStretchText( aPos, nPartWidth,
rInf.GetText(), rInf.GetIdx(), rInf.GetLen() );
}
- const_cast<Point&>(rInf.GetPos()).X() += nPartWidth;
+ const_cast<Point&>(rInf.GetPos()).AdjustX(nPartWidth );
}
void SwSubFont::DrawStretchCapital( SwDrawTextInfo &rInf )
@@ -594,7 +594,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
nKana += rDo.GetInf().GetKanaDiff();
rDo.GetInf().SetOut( *pOldOut );
if( nTmpKern && nPos < nMaxPos )
- aPartSize.Width() += nTmpKern;
+ aPartSize.AdjustWidth(nTmpKern );
rDo.GetInf().SetSize( aPartSize );
rDo.Do();
nOldPos = nPos;
@@ -659,9 +659,9 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
nKana += rDo.GetInf().GetKanaDiff();
rDo.GetInf().SetOut( *pOldOut );
if( nSpaceAdd )
- aPartSize.Width() += nSpaceAdd * ( nTmp - nOldPos );
+ aPartSize.AdjustWidth(nSpaceAdd * ( nTmp - nOldPos ) );
if( nTmpKern && nPos < nMaxPos )
- aPartSize.Width() += nTmpKern;
+ aPartSize.AdjustWidth(nTmpKern );
rDo.GetInf().SetSize( aPartSize );
rDo.Do();
aStartPos = rDo.GetInf().GetPos();
@@ -703,11 +703,11 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
for( sal_Int32 nI = nOldPos; nI < nPos; ++nI )
{
if (CH_BLANK == oldText[nI])
- aPartSize.Width() += nSpaceAdd;
+ aPartSize.AdjustWidth(nSpaceAdd );
}
}
if( nTmpKern && nPos < nMaxPos )
- aPartSize.Width() += nTmpKern;
+ aPartSize.AdjustWidth(nTmpKern );
rDo.GetInf().SetSize( aPartSize );
rDo.Do();
nOldPos = nTmp;
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 9886c2b683ff..5e83449a6a98 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -502,7 +502,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
m_aSub[SwFontScript::Latin].SvxFont::SetPropr( 100 );
m_aSub[SwFontScript::Latin].m_aSize = m_aSub[SwFontScript::Latin].Font::GetFontSize();
Size aTmpSize = m_aSub[SwFontScript::Latin].m_aSize;
- aTmpSize.Height() = pHeight->GetHeight();
+ aTmpSize.setHeight( pHeight->GetHeight() );
m_aSub[SwFontScript::Latin].SetSize( aTmpSize );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_POSTURE,
@@ -532,7 +532,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
m_aSub[SwFontScript::CJK].SvxFont::SetPropr( 100 );
m_aSub[SwFontScript::CJK].m_aSize = m_aSub[SwFontScript::CJK].Font::GetFontSize();
Size aTmpSize = m_aSub[SwFontScript::CJK].m_aSize;
- aTmpSize.Height() = pHeight->GetHeight();
+ aTmpSize.setHeight( pHeight->GetHeight() );
m_aSub[SwFontScript::CJK].SetSize( aTmpSize );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_POSTURE,
@@ -568,7 +568,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
m_aSub[SwFontScript::CTL].SvxFont::SetPropr( 100 );
m_aSub[SwFontScript::CTL].m_aSize = m_aSub[SwFontScript::CTL].Font::GetFontSize();
Size aTmpSize = m_aSub[SwFontScript::CTL].m_aSize;
- aTmpSize.Height() = pHeight->GetHeight();
+ aTmpSize.setHeight( pHeight->GetHeight() );
m_aSub[SwFontScript::CTL].SetSize( aTmpSize );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_POSTURE,
@@ -748,7 +748,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
m_aSub[SwFontScript::Latin].SetCharSet( rFont.GetCharSet() );
m_aSub[SwFontScript::Latin].SvxFont::SetPropr( 100 ); // 100% of FontSize
Size aTmpSize = m_aSub[SwFontScript::Latin].m_aSize;
- aTmpSize.Height() = pAttrSet->GetSize().GetHeight();
+ aTmpSize.setHeight( pAttrSet->GetSize().GetHeight() );
m_aSub[SwFontScript::Latin].SetSize( aTmpSize );
m_aSub[SwFontScript::Latin].SetItalic( pAttrSet->GetPosture().GetPosture() );
m_aSub[SwFontScript::Latin].SetWeight( pAttrSet->GetWeight().GetWeight() );
@@ -764,7 +764,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
m_aSub[SwFontScript::CJK].SetCharSet( rFont.GetCharSet() );
m_aSub[SwFontScript::CJK].SvxFont::SetPropr( 100 ); // 100% of FontSize
Size aTmpSize = m_aSub[SwFontScript::CJK].m_aSize;
- aTmpSize.Height() = pAttrSet->GetCJKSize().GetHeight();
+ aTmpSize.setHeight( pAttrSet->GetCJKSize().GetHeight() );
m_aSub[SwFontScript::CJK].SetSize( aTmpSize );
m_aSub[SwFontScript::CJK].SetItalic( pAttrSet->GetCJKPosture().GetPosture() );
m_aSub[SwFontScript::CJK].SetWeight( pAttrSet->GetCJKWeight().GetWeight() );
@@ -784,7 +784,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
m_aSub[SwFontScript::CTL].SetCharSet( rFont.GetCharSet() );
m_aSub[SwFontScript::CTL].SvxFont::SetPropr( 100 ); // 100% of FontSize
Size aTmpSize = m_aSub[SwFontScript::CTL].m_aSize;
- aTmpSize.Height() = pAttrSet->GetCTLSize().GetHeight();
+ aTmpSize.setHeight( pAttrSet->GetCTLSize().GetHeight() );
m_aSub[SwFontScript::CTL].SetSize( aTmpSize );
m_aSub[SwFontScript::CTL].SetItalic( pAttrSet->GetCTLPosture().GetPosture() );
m_aSub[SwFontScript::CTL].SetWeight( pAttrSet->GetCTLWeight().GetWeight() );
@@ -1092,8 +1092,8 @@ Size SwSubFont::GetTextSize_( SwDrawTextInfo& rInf )
{
const sal_uInt16 nAscent = pLastFont->GetFontAscent( rInf.GetShell(),
rInf.GetOut() );
- aTextSize.Height() =
- static_cast<long>(CalcEscHeight( static_cast<sal_uInt16>(aTextSize.Height()), nAscent));
+ aTextSize.setHeight(
+ static_cast<long>(CalcEscHeight( static_cast<sal_uInt16>(aTextSize.Height()), nAscent)) );
}
}
@@ -1385,13 +1385,13 @@ void SwSubFont::CalcEsc( SwDrawTextInfo const & rInf, Point& rPos )
switch ( nDir )
{
case 0 :
- rPos.Y() += nOfst;
+ rPos.AdjustY(nOfst );
break;
case 900 :
- rPos.X() += nOfst;
+ rPos.AdjustX(nOfst );
break;
case 2700 :
- rPos.X() -= nOfst;
+ rPos.AdjustX( -nOfst );
break;
}
@@ -1403,13 +1403,13 @@ void SwSubFont::CalcEsc( SwDrawTextInfo const & rInf, Point& rPos )
switch ( nDir )
{
case 0 :
- rPos.Y() += nOfst;
+ rPos.AdjustY(nOfst );
break;
case 900 :
- rPos.X() += nOfst;
+ rPos.AdjustX(nOfst );
break;
case 2700 :
- rPos.X() -= nOfst;
+ rPos.AdjustX( -nOfst );
break;
}
@@ -1420,13 +1420,13 @@ void SwSubFont::CalcEsc( SwDrawTextInfo const & rInf, Point& rPos )
switch ( nDir )
{
case 0 :
- rPos.Y() -= nOfst;
+ rPos.AdjustY( -nOfst );
break;
case 900 :
- rPos.X() -= nOfst;
+ rPos.AdjustX( -nOfst );
break;
case 2700 :
- rPos.X() += nOfst;
+ rPos.AdjustX(nOfst );
break;
}
}
@@ -1450,17 +1450,17 @@ void SwDrawTextInfo::Shift( sal_uInt16 nDir )
switch ( nDir )
{
case 0 :
- m_aPos.X() += GetSize().Width();
+ m_aPos.AdjustX(GetSize().Width() );
break;
case 900 :
OSL_ENSURE( m_aPos.Y() >= GetSize().Width(), "Going underground" );
- m_aPos.Y() -= GetSize().Width();
+ m_aPos.AdjustY( -(GetSize().Width()) );
break;
case 1800 :
- m_aPos.X() -= GetSize().Width();
+ m_aPos.AdjustX( -(GetSize().Width()) );
break;
case 2700 :
- m_aPos.Y() += GetSize().Width();
+ m_aPos.AdjustY(GetSize().Width() );
break;
}
}
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 34262fd5ecc6..514e4aaa1d13 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -437,8 +437,8 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
if( RES_DRAWFRMFMT == pFrameFormat->Which() ) {
// get the old cached value
const SwFormatFrameSize& rOldSize = m_pOldSet->Get( RES_FRM_SIZE );
- aDrawSavePt.X() = rOldSize.GetWidth();
- aDrawSavePt.Y() = rOldSize.GetHeight();
+ aDrawSavePt.setX( rOldSize.GetWidth() );
+ aDrawSavePt.setY( rOldSize.GetHeight() );
m_pOldSet->ClearItem( RES_FRM_SIZE );
// write the current value into cache
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 6c607767c781..fbcafd56637a 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1977,8 +1977,8 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
{
size.Width = convertMm100ToTwip(size.Width);
size.Height = convertMm100ToTwip(size.Height);
- pSetSize->Width() = size.Width;
- pSetSize->Height() = size.Height;
+ pSetSize->setWidth( size.Width );
+ pSetSize->setHeight( size.Height );
}
else
bWrongArg = true;
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 2c4d45151cca..73217063f9e4 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1336,7 +1336,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
sal_Int32 nHeight = 0;
aValue >>= nHeight;
Size aSz(aFrameSize.GetSize());
- aSz.Height() = convertMm100ToTwip(nHeight);
+ aSz.setHeight( convertMm100ToTwip(nHeight) );
aFrameSize.SetSize(aSz);
}
pDoc->SetAttr(aFrameSize, *pLn->ClaimFrameFormat());
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index b02fe3742cc8..edcc554a5d24 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -62,8 +62,8 @@ void SwPagePreviewLayout::Clear_()
{
mbLayoutInfoValid = mbLayoutSizesValid = mbPaintInfoValid = false;
- maWinSize.Width() = 0;
- maWinSize.Height() = 0;
+ maWinSize.setWidth( 0 );
+ maWinSize.setHeight( 0 );
mnCols = mnRows = 0;
ClearPreviewLayoutSizes();
@@ -74,16 +74,16 @@ void SwPagePreviewLayout::Clear_()
mnPaintPhyStartPageNum = 0;
mnPaintStartCol = mnPaintStartRow = 0;
mbNoPageVisible = false;
- maPaintStartPageOffset.X() = 0;
- maPaintStartPageOffset.Y() = 0;
- maPaintPreviewDocOffset.X() = 0;
- maPaintPreviewDocOffset.Y() = 0;
- maAdditionalPaintOffset.X() = 0;
- maAdditionalPaintOffset.Y() = 0;
- maPaintedPreviewDocRect.Left() = 0;
- maPaintedPreviewDocRect.Top() = 0;
- maPaintedPreviewDocRect.Right() = 0;
- maPaintedPreviewDocRect.Bottom() = 0;
+ maPaintStartPageOffset.setX( 0 );
+ maPaintStartPageOffset.setY( 0 );
+ maPaintPreviewDocOffset.setX( 0 );
+ maPaintPreviewDocOffset.setY( 0 );
+ maAdditionalPaintOffset.setX( 0 );
+ maAdditionalPaintOffset.setY( 0 );
+ maPaintedPreviewDocRect.SetLeft( 0 );
+ maPaintedPreviewDocRect.SetTop( 0 );
+ maPaintedPreviewDocRect.SetRight( 0 );
+ maPaintedPreviewDocRect.SetBottom( 0 );
mnSelectedPageNum = 0;
ClearPreviewPageData();
@@ -95,8 +95,8 @@ void SwPagePreviewLayout::ClearPreviewLayoutSizes()
{
mnPages = 0;
- maMaxPageSize.Width() = 0;
- maMaxPageSize.Height() = 0;
+ maMaxPageSize.setWidth( 0 );
+ maMaxPageSize.setHeight( 0 );
maPreviewDocRect.Left() = maPreviewDocRect.Top() = 0;
maPreviewDocRect.Right() = maPreviewDocRect.Bottom() = 0;
mnColWidth = mnRowHeight = 0;
@@ -135,9 +135,9 @@ void SwPagePreviewLayout::CalcPreviewLayoutSizes()
pPage->Calc(pRenderContext);
const Size& rPageSize = pPage->getFrameArea().SSize();
if ( rPageSize.Width() > maMaxPageSize.Width() )
- maMaxPageSize.Width() = rPageSize.Width();
+ maMaxPageSize.setWidth( rPageSize.Width() );
if ( rPageSize.Height() > maMaxPageSize.Height() )
- maMaxPageSize.Height() = rPageSize.Height();
+ maMaxPageSize.setHeight( rPageSize.Height() );
pPage = static_cast<const SwPageFrame*>(pPage->GetNext());
}
// calculate and set column width and row height
@@ -152,14 +152,14 @@ void SwPagePreviewLayout::CalcPreviewLayoutSizes()
{
Size aDocSize;
// document width
- aDocSize.Width() = mnPreviewLayoutWidth;
+ aDocSize.setWidth( mnPreviewLayoutWidth );
// document height
// determine number of rows needed for <nPages> in preview layout
// use method <GetRowOfPage(..)>.
const sal_uInt16 nDocRows = GetRowOfPage( mnPages );
- aDocSize.Height() = nDocRows * maMaxPageSize.Height() +
- (nDocRows+1) * mnYFree;
+ aDocSize.setHeight( nDocRows * maMaxPageSize.Height() +
+ (nDocRows+1) * mnYFree );
maPreviewDocRect.SetPos( Point( 0, 0 ) );
maPreviewDocRect.SetSize( aDocSize );
}
@@ -356,14 +356,14 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
// set starting row
mnPaintStartRow = nRowOfProposed;
// page offset == (-1,-1), indicating no offset and paint of free space.
- maPaintStartPageOffset.X() = -1;
- maPaintStartPageOffset.Y() = -1;
+ maPaintStartPageOffset.setX( -1 );
+ maPaintStartPageOffset.setY( -1 );
// virtual preview document offset.
if ( _bStartWithPageAtFirstCol )
- maPaintPreviewDocOffset.X() = 0;
+ maPaintPreviewDocOffset.setX( 0 );
else
- maPaintPreviewDocOffset.X() = (nColOfProposed-1) * mnColWidth;
- maPaintPreviewDocOffset.Y() = (nRowOfProposed-1) * mnRowHeight;
+ maPaintPreviewDocOffset.setX( (nColOfProposed-1) * mnColWidth );
+ maPaintPreviewDocOffset.setY( (nRowOfProposed-1) * mnRowHeight );
}
else
{
@@ -399,10 +399,10 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
mnPaintStartCol = nColOfProposed;
mnPaintStartRow = nRowOfProposed;
// page offset
- maPaintStartPageOffset.X() =
- (rProposedStartPos.X() % mnColWidth) - mnXFree;
- maPaintStartPageOffset.Y() =
- (rProposedStartPos.Y() % mnRowHeight) - mnYFree;
+ maPaintStartPageOffset.setX(
+ (rProposedStartPos.X() % mnColWidth) - mnXFree );
+ maPaintStartPageOffset.setY(
+ (rProposedStartPos.Y() % mnRowHeight) - mnYFree );
// virtual preview document offset.
maPaintPreviewDocOffset = rProposedStartPos;
}
@@ -481,24 +481,24 @@ void SwPagePreviewLayout::CalcAdditionalPaintOffset()
maPaintStartPageOffset.X() <= 0 )
{
mbDoesLayoutColsFitIntoWindow = true;
- maAdditionalPaintOffset.X() = (maWinSize.Width() - mnPreviewLayoutWidth) / 2;
+ maAdditionalPaintOffset.setX( (maWinSize.Width() - mnPreviewLayoutWidth) / 2 );
}
else
{
mbDoesLayoutColsFitIntoWindow = false;
- maAdditionalPaintOffset.X() = 0;
+ maAdditionalPaintOffset.setX( 0 );
}
if ( mnPreviewLayoutHeight <= maWinSize.Height() &&
maPaintStartPageOffset.Y() <= 0 )
{
mbDoesLayoutRowsFitIntoWindow = true;
- maAdditionalPaintOffset.Y() = (maWinSize.Height() - mnPreviewLayoutHeight) / 2;
+ maAdditionalPaintOffset.setY( (maWinSize.Height() - mnPreviewLayoutHeight) / 2 );
}
else
{
mbDoesLayoutRowsFitIntoWindow = false;
- maAdditionalPaintOffset.Y() = 0;
+ maAdditionalPaintOffset.setY( 0 );
}
}
@@ -512,17 +512,17 @@ void SwPagePreviewLayout::CalcDocPreviewPaintRect()
Size aSize;
if ( mbDoesLayoutColsFitIntoWindow )
- aSize.Width() = std::min( mnPreviewLayoutWidth,
- maPreviewDocRect.GetWidth() - aTopLeftPos.X() );
+ aSize.setWidth( std::min( mnPreviewLayoutWidth,
+ maPreviewDocRect.GetWidth() - aTopLeftPos.X() ) );
else
- aSize.Width() = std::min( maPreviewDocRect.GetWidth() - aTopLeftPos.X(),
- maWinSize.Width() - maAdditionalPaintOffset.X() );
+ aSize.setWidth( std::min( maPreviewDocRect.GetWidth() - aTopLeftPos.X(),
+ maWinSize.Width() - maAdditionalPaintOffset.X() ) );
if ( mbDoesLayoutRowsFitIntoWindow )
- aSize.Height() = std::min( mnPreviewLayoutHeight,
- maPreviewDocRect.GetHeight() - aTopLeftPos.Y() );
+ aSize.setHeight( std::min( mnPreviewLayoutHeight,
+ maPreviewDocRect.GetHeight() - aTopLeftPos.Y() ) );
else
- aSize.Height() = std::min( maPreviewDocRect.GetHeight() - aTopLeftPos.Y(),
- maWinSize.Height() - maAdditionalPaintOffset.Y() );
+ aSize.setHeight( std::min( maPreviewDocRect.GetHeight() - aTopLeftPos.Y(),
+ maWinSize.Height() - maAdditionalPaintOffset.Y() ) );
maPaintedPreviewDocRect.SetSize( aSize );
}
@@ -602,8 +602,8 @@ void SwPagePreviewLayout::CalcPreviewPages()
// --> continue with increased paint offset and next column
/// check whether RTL interface or not
if(!AllSettings::GetLayoutRTL())
- aCurrPaintOffset.X() += mnColWidth;
- else aCurrPaintOffset.X() -= mnColWidth;
+ aCurrPaintOffset.AdjustX(mnColWidth );
+ else aCurrPaintOffset.AdjustX( -(mnColWidth) );
++nCurrCol;
continue;
}
@@ -628,15 +628,15 @@ void SwPagePreviewLayout::CalcPreviewPages()
/// check whether RTL interface or not
if(!AllSettings::GetLayoutRTL())
- aCurrPaintOffset.X() += mnColWidth;
- else aCurrPaintOffset.X() -= mnColWidth;
+ aCurrPaintOffset.AdjustX(mnColWidth );
+ else aCurrPaintOffset.AdjustX( -(mnColWidth) );
++nCurrCol;
if ( nCurrCol > mnCols )
{
++nConsideredRows;
- aCurrPaintOffset.X() = aInitialPaintOffset.X();
+ aCurrPaintOffset.setX( aInitialPaintOffset.X() );
nCurrCol = 1;
- aCurrPaintOffset.Y() += mnRowHeight;
+ aCurrPaintOffset.AdjustY(mnRowHeight );
}
}
}
@@ -664,9 +664,9 @@ void SwPagePreviewLayout::CalcPreviewDataForPage( const SwPageFrame& _rPage,
// position of page in preview window
Point aPreviewWinOffset( _rPreviewOffset );
if ( _opPreviewPage->aPageSize.Width() < maMaxPageSize.Width() )
- aPreviewWinOffset.X() += ( maMaxPageSize.Width() - _opPreviewPage->aPageSize.Width() ) / 2;
+ aPreviewWinOffset.AdjustX(( maMaxPageSize.Width() - _opPreviewPage->aPageSize.Width() ) / 2 );
if ( _opPreviewPage->aPageSize.Height() < maMaxPageSize.Height() )
- aPreviewWinOffset.Y() += ( maMaxPageSize.Height() - _opPreviewPage->aPageSize.Height() ) / 2;
+ aPreviewWinOffset.AdjustY(( maMaxPageSize.Height() - _opPreviewPage->aPageSize.Height() ) / 2 );
_opPreviewPage->aPreviewWinPos = aPreviewWinOffset;
// logic position of page and mapping offset for paint
if ( _rPage.IsEmptyPage() )
@@ -702,7 +702,7 @@ bool SwPagePreviewLayout::SetBookPreviewMode( const bool _bEnableBookPreview,
// bottom, adjust it to the virtual preview document bottom
if ( aProposedStartPos.Y() > maPreviewDocRect.Bottom() )
{
- aProposedStartPos.Y() = maPreviewDocRect.Bottom();
+ aProposedStartPos.setY( maPreviewDocRect.Bottom() );
}
Prepare( 0, aProposedStartPos,
mrParentViewShell.GetOut()->LogicToPixel( maWinSize ),
@@ -732,13 +732,13 @@ Point SwPagePreviewLayout::GetPreviewStartPosForNewScale(
{
// increase paint width by moving start point to left.
if ( mnPreviewLayoutWidth < _aNewWinSize.Width() )
- aNewPaintStartPos.X() = 0;
+ aNewPaintStartPos.setX( 0 );
else if ( maPaintedPreviewDocRect.GetWidth() < _aNewWinSize.Width() )
{
- aNewPaintStartPos.X() -=
- (_aNewWinSize.Width() - maPaintedPreviewDocRect.GetWidth()) / 2;
+ aNewPaintStartPos.AdjustX( -(
+ (_aNewWinSize.Width() - maPaintedPreviewDocRect.GetWidth()) / 2) );
if ( aNewPaintStartPos.X() < 0)
- aNewPaintStartPos.X() = 0;
+ aNewPaintStartPos.setX( 0 );
}
if ( !mbDoesLayoutRowsFitIntoWindow )
@@ -746,15 +746,15 @@ Point SwPagePreviewLayout::GetPreviewStartPosForNewScale(
// increase paint height by moving start point to top.
if ( mnPreviewLayoutHeight < _aNewWinSize.Height() )
{
- aNewPaintStartPos.Y() =
- ( (mnPaintStartRow - 1) * mnRowHeight );
+ aNewPaintStartPos.setY(
+ (mnPaintStartRow - 1) * mnRowHeight );
}
else if ( maPaintedPreviewDocRect.GetHeight() < _aNewWinSize.Height() )
{
- aNewPaintStartPos.Y() -=
- (_aNewWinSize.Height() - maPaintedPreviewDocRect.GetHeight()) / 2;
+ aNewPaintStartPos.AdjustY( -(
+ (_aNewWinSize.Height() - maPaintedPreviewDocRect.GetHeight()) / 2) );
if ( aNewPaintStartPos.Y() < 0)
- aNewPaintStartPos.Y() = 0;
+ aNewPaintStartPos.setY( 0 );
}
}
}
@@ -762,17 +762,17 @@ Point SwPagePreviewLayout::GetPreviewStartPosForNewScale(
{
// decrease paint width by moving start point to right
if ( maPaintedPreviewDocRect.GetWidth() > _aNewWinSize.Width() )
- aNewPaintStartPos.X() +=
- (maPaintedPreviewDocRect.GetWidth() - _aNewWinSize.Width()) / 2;
+ aNewPaintStartPos.AdjustX(
+ (maPaintedPreviewDocRect.GetWidth() - _aNewWinSize.Width()) / 2 );
// decrease paint height by moving start point to bottom
if ( maPaintedPreviewDocRect.GetHeight() > _aNewWinSize.Height() )
{
- aNewPaintStartPos.Y() +=
- (maPaintedPreviewDocRect.GetHeight() - _aNewWinSize.Height()) / 2;
+ aNewPaintStartPos.AdjustY(
+ (maPaintedPreviewDocRect.GetHeight() - _aNewWinSize.Height()) / 2 );
// check, if new y-position is outside document preview
if ( aNewPaintStartPos.Y() > maPreviewDocRect.Bottom() )
- aNewPaintStartPos.Y() =
- std::max( 0L, maPreviewDocRect.Bottom() - mnPreviewLayoutHeight );
+ aNewPaintStartPos.setY(
+ std::max( 0L, maPreviewDocRect.Bottom() - mnPreviewLayoutHeight ) );
}
}
@@ -897,8 +897,8 @@ bool SwPagePreviewLayout::IsPreviewPosInDocPreviewPage( const Point& rPreviewPo
sal_uInt16& _onPageNum ) const
{
// initialize variable parameter values.
- _orDocPos.X() = 0;
- _orDocPos.Y() = 0;
+ _orDocPos.setX( 0 );
+ _orDocPos.setY( 0 );
_obPosInEmptyPage = false;
_onPageNum = 0;
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 5cd851f2c66e..0af8f1f0dc55 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -257,18 +257,18 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz )
{
Size aSz;
if ( aObjBound.Left() > aDocRect.Right() )
- aSz.Width() = (aDocRect.Right() - aObjBound.Left()) - MINFLY;
+ aSz.setWidth( (aDocRect.Right() - aObjBound.Left()) - MINFLY );
if ( aObjBound.Top() > aDocRect.Bottom() )
- aSz.Height() = (aDocRect.Bottom() - aObjBound.Top()) - MINFLY;
+ aSz.setHeight( (aDocRect.Bottom() - aObjBound.Top()) - MINFLY );
if ( aSz.Width() || aSz.Height() )
pObj->Move( aSz );
// Don't let large objects disappear to the top
aSz.Width() = aSz.Height() = 0;
if ( aObjBound.Right() < aDocRect.Left() )
- aSz.Width() = (aDocRect.Left() - aObjBound.Right()) + MINFLY;
+ aSz.setWidth( (aDocRect.Left() - aObjBound.Right()) + MINFLY );
if ( aObjBound.Bottom() < aDocRect.Top() )
- aSz.Height() = (aDocRect.Top() - aObjBound.Bottom()) + MINFLY;
+ aSz.setHeight( (aDocRect.Top() - aObjBound.Bottom()) + MINFLY );
if ( aSz.Width() || aSz.Height() )
pObj->Move( aSz );
}
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index b7c8fc3e9fd6..7830f0c9c0da 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -207,7 +207,7 @@ void SwViewShell::PrintProspect(
}
pStPage = pNxtPage;
- aSttPt.X() += aTmpPrtSize.Width() / 2;
+ aSttPt.AdjustX(aTmpPrtSize.Width() / 2 );
}
SwPaintQueue::Repaint();
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 7617bb42a996..533e20d26a78 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -348,11 +348,11 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
aTmp1 = GetOut()->LogicToPixel( aTmp1 );
tools::Rectangle aTmp2( GetOut()->PixelToLogic( aTmp1 ) );
if ( aTmp2.Left() > aRect.Left() )
- aTmp1.Left() = std::max( 0L, aTmp1.Left() - 1 );
+ aTmp1.SetLeft( std::max( 0L, aTmp1.Left() - 1 ) );
if ( aTmp2.Top() > aRect.Top() )
- aTmp1.Top() = std::max( 0L, aTmp1.Top() - 1 );
- aTmp1.Right() += 1;
- aTmp1.Bottom() += 1;
+ aTmp1.SetTop( std::max( 0L, aTmp1.Top() - 1 ) );
+ aTmp1.AdjustRight(1 );
+ aTmp1.AdjustBottom(1 );
aTmp1 = GetOut()->PixelToLogic( aTmp1 );
aRect = SwRect( aTmp1 );
@@ -376,7 +376,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
pVout->SetLineColor( pOld->GetLineColor() );
pVout->SetFillColor( pOld->GetFillColor() );
Point aOrigin( aRect.Pos() );
- aOrigin.X() = -aOrigin.X(); aOrigin.Y() = -aOrigin.Y();
+ aOrigin.setX( -aOrigin.X() ); aOrigin.setY( -aOrigin.Y() );
aMapMode.SetOrigin( aOrigin );
pVout->SetMapMode( aMapMode );
@@ -476,8 +476,8 @@ void SwViewShell::ImplUnlockPaint( bool bVirDev )
VclPtrInstance<VirtualDevice> pVout( *mpOut );
pVout->SetMapMode( mpOut->GetMapMode() );
Size aSize( VisArea().SSize() );
- aSize.Width() += 20;
- aSize.Height()+= 20;
+ aSize.AdjustWidth(20 );
+ aSize.AdjustHeight(20 );
if( pVout->SetOutputSize( aSize ) )
{
GetWin()->EnablePaint( true );
@@ -1158,8 +1158,8 @@ void SwViewShell::VisPortChgd( const SwRect &rRect)
pPage = static_cast<const SwPageFrame*>(pPage->GetNext());
}
tools::Rectangle aRect( aPrevArea.SVRect() );
- aRect.Left() = nMinLeft;
- aRect.Right() = nMaxRight;
+ aRect.SetLeft( nMinLeft );
+ aRect.SetRight( nMaxRight );
if( VisArea().IsOver( aPrevArea ) && !mnLockPaint )
{
bScrolled = true;
@@ -1191,7 +1191,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect)
if (!comphelper::LibreOfficeKit::isActive())
{
Point aPt( VisArea().Pos() );
- aPt.X() = -aPt.X(); aPt.Y() = -aPt.Y();
+ aPt.setX( -aPt.X() ); aPt.setY( -aPt.Y() );
MapMode aMapMode( GetWin()->GetMapMode() );
aMapMode.SetOrigin( aPt );
GetWin()->SetMapMode( aMapMode );
@@ -1261,7 +1261,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const tools::Rectangle
pVout->SetMapMode( aMapMode );
Size aSize( maVisArea.Width()+2*aPixSz.Width(), std::abs(lYDiff)+(2*aPixSz.Height()) );
if ( pRect )
- aSize.Width() = std::min(aSize.Width(), pRect->GetWidth()+2*aPixSz.Width());
+ aSize.setWidth( std::min(aSize.Width(), pRect->GetWidth()+2*aPixSz.Width()) );
if ( pVout->SetOutputSize( aSize ) )
{
mnLockPaint++;
@@ -1271,14 +1271,14 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const tools::Rectangle
aRect.Height( aSize.Height() );
if ( pRect )
{
- aRect.Pos().X() = std::max(aRect.Left(),pRect->Left()-aPixSz.Width());
+ aRect.Pos().setX( std::max(aRect.Left(),pRect->Left()-aPixSz.Width()) );
aRect.Right( std::min(aRect.Right()+2*aPixSz.Width(), pRect->Right()+aPixSz.Width()));
}
else
- aRect.SSize().Width() += 2*aPixSz.Width();
- aRect.Pos().Y() = lYDiff < 0 ? aOldVis.Bottom() - aPixSz.Height()
- : aRect.Top() - aSize.Height() + aPixSz.Height();
- aRect.Pos().X() = std::max( 0L, aRect.Left()-aPixSz.Width() );
+ aRect.SSize().AdjustWidth(2*aPixSz.Width() );
+ aRect.Pos().setY( lYDiff < 0 ? aOldVis.Bottom() - aPixSz.Height()
+ : aRect.Top() - aSize.Height() + aPixSz.Height() );
+ aRect.Pos().setX( std::max( 0L, aRect.Left()-aPixSz.Width() ) );
aRect.Pos() = GetWin()->PixelToLogic( GetWin()->LogicToPixel( aRect.Pos()));
aRect.SSize()= GetWin()->PixelToLogic( GetWin()->LogicToPixel( aRect.SSize()));
maVisArea = aRect;
@@ -1356,14 +1356,14 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const tools::Rectangle
}
const SwRect aTmpOldVis = VisArea();
- maVisArea.Pos().Y() -= lScroll;
+ maVisArea.Pos().AdjustY( -lScroll );
maVisArea.Pos() = GetWin()->PixelToLogic( GetWin()->LogicToPixel( VisArea().Pos()));
lScroll = aTmpOldVis.Top() - VisArea().Top();
if ( pRect )
{
tools::Rectangle aTmp( aTmpOldVis.SVRect() );
- aTmp.Left() = pRect->Left();
- aTmp.Right()= pRect->Right();
+ aTmp.SetLeft( pRect->Left() );
+ aTmp.SetRight( pRect->Right() );
GetWin()->Scroll( 0, lScroll, aTmp, ScrollFlags::Children);
}
else
@@ -1442,8 +1442,8 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const tools::Rectangle
}
#endif
- maVisArea.Pos().X() -= lXDiff;
- maVisArea.Pos().Y() -= lYDiff;
+ maVisArea.Pos().AdjustX( -lXDiff );
+ maVisArea.Pos().AdjustY( -lYDiff );
if ( pRect )
GetWin()->Scroll( lXDiff, lYDiff, *pRect, ScrollFlags::Children);
else
@@ -1519,8 +1519,8 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect
const bool bSidebarRight =
static_cast<const SwPageFrame*>(pPage)->SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT;
- aPageRect.Pos().X() -= bSidebarRight ? 0 : nSidebarWidth;
- aPageRect.SSize().Width() += nSidebarWidth;
+ aPageRect.Pos().AdjustX( -(bSidebarRight ? 0 : nSidebarWidth) );
+ aPageRect.SSize().AdjustWidth(nSidebarWidth );
if ( aPageRect.IsOver( rRect ) )
aRegion -= aPageRect;
@@ -1973,8 +1973,8 @@ sal_Int32 SwViewShell::GetBrowseWidth() const
if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
{
Size aBorder( maBrowseBorder );
- aBorder.Width() += maBrowseBorder.Width();
- aBorder.Width() += pPostItMgr->GetSidebarWidth(true) + pPostItMgr->GetSidebarBorderWidth(true);
+ aBorder.AdjustWidth(maBrowseBorder.Width() );
+ aBorder.AdjustWidth(pPostItMgr->GetSidebarWidth(true) + pPostItMgr->GetSidebarBorderWidth(true) );
return maVisArea.Width() - GetOut()->PixelToLogic(aBorder).Width();
}
else
@@ -2502,7 +2502,7 @@ sal_Int32 SwViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const S
// #i40059# Position out of bounds:
SwRect aRect( rRect );
- aRect.Pos().X() = std::max( aRect.Left(), GetLayout()->getFrameArea().Left() );
+ aRect.Pos().setX( std::max( aRect.Left(), GetLayout()->getFrameArea().Left() ) );
const SwPageFrame* pPage = GetLayout()->GetPageAtPos( aRect.Center() );
if ( pPage )
@@ -2510,8 +2510,8 @@ sal_Int32 SwViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const S
OSL_ENSURE( pPage, "GetPageNumAndSetOffsetForPDF: No page found" );
Point aOffset( pPage->getFrameArea().Pos() );
- aOffset.X() = -aOffset.X();
- aOffset.Y() = -aOffset.Y();
+ aOffset.setX( -aOffset.X() );
+ aOffset.setY( -aOffset.Y() );
MapMode aMapMode( rOut.GetMapMode() );
aMapMode.SetOrigin( aOffset );
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 1aadcc2d0071..d7884a6f190c 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -184,7 +184,7 @@ void SetSwVisArea( SwViewShell *pSh, const SwRect &rRect )
// move the start point of the output operation to a position
// such that in the output device all pages will be painted
// at the same position
- aPt.X() = -aPt.X(); aPt.Y() = -aPt.Y();
+ aPt.setX( -aPt.X() ); aPt.setY( -aPt.Y() );
vcl::RenderContext *pOut = pSh->GetOut();
@@ -278,8 +278,8 @@ void SwViewShell::ChgAllPageSize( Size const &rSz )
: aSz.Height() < aSz.Width() )
{
SwTwips aTmp = aSz.Height();
- aSz.Height() = aSz.Width();
- aSz.Width() = aTmp;
+ aSz.setHeight( aSz.Width() );
+ aSz.setWidth( aTmp );
}
SwFormatFrameSize aFrameSz( rPgFormat.GetFrameSize() );