summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tools/gen.hxx16
-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
-rw-r--r--sw/source/filter/html/css1atr.cxx4
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx18
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx10
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx90
-rw-r--r--sw/source/filter/html/htmlform.cxx50
-rw-r--r--sw/source/filter/html/htmlforw.cxx8
-rw-r--r--sw/source/filter/html/htmlgrin.cxx32
-rw-r--r--sw/source/filter/html/htmlplug.cxx60
-rw-r--r--sw/source/filter/html/htmltabw.cxx10
-rw-r--r--sw/source/filter/html/swhtml.cxx10
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx8
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx6
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx8
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx64
-rw-r--r--sw/source/filter/ww8/ww8par.cxx20
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx4
-rw-r--r--sw/source/filter/xml/xmlimp.cxx4
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/config/optpage.cxx4
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx24
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx2
-rw-r--r--sw/source/ui/fldui/FldRefTreeListBox.cxx4
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx16
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx10
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx24
-rw-r--r--sw/source/ui/misc/glosbib.cxx4
-rw-r--r--sw/source/ui/misc/glossary.cxx4
-rw-r--r--sw/source/ui/misc/outline.cxx4
-rw-r--r--sw/source/ui/misc/pggrid.cxx8
-rw-r--r--sw/source/ui/table/tautofmt.cxx18
-rw-r--r--sw/source/uibase/app/docsh.cxx2
-rw-r--r--sw/source/uibase/config/usrpref.cxx4
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx8
-rw-r--r--sw/source/uibase/docvw/AnnotationMenuButton.cxx8
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx2
-rw-r--r--sw/source/uibase/docvw/edtdd.cxx16
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx18
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx8
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx14
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx72
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx8
-rw-r--r--sw/source/uibase/misc/swruler.cxx20
-rw-r--r--sw/source/uibase/ribbar/conform.cxx8
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx12
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx14
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx8
-rw-r--r--sw/source/uibase/shells/grfsh.cxx4
-rw-r--r--sw/source/uibase/shells/grfshex.cxx4
-rw-r--r--sw/source/uibase/shells/textsh.cxx6
-rw-r--r--sw/source/uibase/table/chartins.cxx22
-rw-r--r--sw/source/uibase/uiview/pview.cxx22
-rw-r--r--sw/source/uibase/uiview/srcview.cxx10
-rw-r--r--sw/source/uibase/uiview/swcli.cxx4
-rw-r--r--sw/source/uibase/uiview/view.cxx4
-rw-r--r--sw/source/uibase/uiview/view2.cxx6
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx12
-rw-r--r--sw/source/uibase/uiview/viewling.cxx4
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx16
-rw-r--r--sw/source/uibase/uiview/viewport.cxx170
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx68
-rw-r--r--sw/source/uibase/uno/unomod.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx6
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx6
-rw-r--r--sw/source/uibase/utlui/navipi.cxx6
-rw-r--r--sw/source/uibase/utlui/shdwcrsr.cxx12
-rw-r--r--sw/source/uibase/utlui/viewlayoutctrl.cxx8
-rw-r--r--sw/source/uibase/wrtsh/move.cxx28
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx16
130 files changed, 1293 insertions, 1293 deletions
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 38ca77af9046..ce79396e6788 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -82,8 +82,8 @@ public:
long& Y() { return nB; }
void Move( long nHorzMove, long nVertMove );
- void AdjustX( long nHorzMove ) { nA += nHorzMove; }
- void AdjustY( long nVertMove ) { nB += nVertMove; }
+ long AdjustX( long nHorzMove ) { nA += nHorzMove; return nA; }
+ long AdjustY( long nVertMove ) { nB += nVertMove; return nB; }
void RotateAround( long& rX, long& rY, short nOrientation ) const;
@@ -193,8 +193,8 @@ public:
long& Width() { return nA; }
long& Height() { return nB; }
- void AdjustWidth( long n ) { nA += n; }
- void AdjustHeight( long n ) { nB += n; }
+ long AdjustWidth( long n ) { nA += n; return nA; }
+ long AdjustHeight( long n ) { nB += n; return nB; }
long getWidth() const { return Width(); }
long getHeight() const { return Height(); }
@@ -404,10 +404,10 @@ public:
/// Move the top and left edges by a delta, preserving width and height
inline void Move( long nHorzMoveDelta, long nVertMoveDelta );
- void AdjustLeft( long nHorzMoveDelta ) { nLeft += nHorzMoveDelta; }
- void AdjustRight( long nHorzMoveDelta ) { nRight += nHorzMoveDelta; }
- void AdjustTop( long nVertMoveDelta ) { nTop += nVertMoveDelta; }
- void AdjustBottom( long nVertMoveDelta ) { nBottom += nVertMoveDelta; }
+ long AdjustLeft( long nHorzMoveDelta ) { nLeft += nHorzMoveDelta; return nLeft; }
+ long AdjustRight( long nHorzMoveDelta ) { nRight += nHorzMoveDelta; return nRight; }
+ long AdjustTop( long nVertMoveDelta ) { nTop += nVertMoveDelta; return nTop; }
+ long AdjustBottom( long nVertMoveDelta ) { nBottom += nVertMoveDelta; return nBottom; }
inline void SetPos( const Point& rPoint );
void SetSize( const Size& rSize );
inline Size GetSize() const;
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() );
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index c7316e90c2e7..6d23a4a60ce9 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1658,8 +1658,8 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
if( bRefLandscape != rPageDesc.GetLandscape() )
{
long nTmp = aRefSz.Height();
- aRefSz.Height() = aRefSz.Width();
- aRefSz.Width() = nTmp;
+ aRefSz.setHeight( aRefSz.Width() );
+ aRefSz.setWidth( nTmp );
}
}
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index a6514534d4b5..7d746579f361 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -332,12 +332,12 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
case HtmlOptionId::HSPACE:
// first only save as pixel value!
- aSpace.Height() = rOption.GetNumber();
+ aSpace.setHeight( rOption.GetNumber() );
break;
case HtmlOptionId::VSPACE:
// first only save as pixel value!
- aSpace.Width() = rOption.GetNumber();
+ aSpace.setWidth( rOption.GetNumber() );
break;
case HtmlOptionId::ALIGN:
@@ -467,12 +467,12 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
if( SVX_CSS1_LTYPE_TWIP== aPropInfo.m_eWidthType )
{
- aTwipSz.Width() = aPropInfo.m_nWidth;
+ aTwipSz.setWidth( aPropInfo.m_nWidth );
nWidth = 1; // != 0;
bPrcWidth = false;
}
if( SVX_CSS1_LTYPE_TWIP== aPropInfo.m_eHeightType )
- aTwipSz.Height() = aPropInfo.m_nHeight;
+ aTwipSz.setHeight( aPropInfo.m_nHeight );
m_bFixMarqueeWidth = false;
if( !nWidth || bPrcWidth )
@@ -494,25 +494,25 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
nWidth = 100;
bPrcWidth = true;
}
- aTwipSz.Width() = MINLAY;
+ aTwipSz.setWidth( MINLAY );
}
else
{
long nBrowseWidth = GetCurrentBrowseWidth();
- aTwipSz.Width() = !nWidth ? nBrowseWidth
- : (nWidth*nBrowseWidth) / 100;
+ aTwipSz.setWidth( !nWidth ? nBrowseWidth
+ : (nWidth*nBrowseWidth) / 100 );
}
}
// The height is only minimum height
if( aTwipSz.Height() < MINFLY )
- aTwipSz.Height() = MINFLY;
+ aTwipSz.setHeight( MINFLY );
aItemSet.Put( makeSdrTextMinFrameHeightItem( aTwipSz.Height() ) );
m_pMarquee->SetMergedItemSetAndBroadcast(aItemSet);
if( aTwipSz.Width() < MINFLY )
- aTwipSz.Width() = MINFLY;
+ aTwipSz.setWidth( MINFLY );
m_pMarquee->SetLogicRect( tools::Rectangle( 0, 0, aTwipSz.Width(), aTwipSz.Height() ) );
// and insert the object into the document
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index 7d3ac31f630d..3ab1b86de4b6 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -218,16 +218,16 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
Size aTwipSz( pTextObj->GetLogicRect().GetSize() );
if( pTextObj->IsAutoGrowWidth() )
- aTwipSz.Width() = 0;
+ aTwipSz.setWidth( 0 );
// The height is at MS a minimum height, therefore we output the minimum
// height, if they exists. Because a minimum height MINFLY is coming with
// high probability from import, we aren't outputting it. You can't
// do anything wrong, because every font is higher.
if( pTextObj->IsAutoGrowHeight() )
{
- aTwipSz.Height() = pTextObj->GetMinTextFrameHeight();
+ aTwipSz.setHeight( pTextObj->GetMinTextFrameHeight() );
if( MINFLY==aTwipSz.Height() )
- aTwipSz.Height() = 0;
+ aTwipSz.setHeight( 0 );
}
if( (aTwipSz.Width() || aTwipSz.Height()) &&
@@ -237,9 +237,9 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
- aPixelSz.Width() = 1;
+ aPixelSz.setWidth( 1 );
if( !aPixelSz.Height() && aTwipSz.Height() )
- aPixelSz.Height() = 1;
+ aPixelSz.setHeight( 1 );
if( aPixelSz.Width() )
{
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index cece99430a9a..0924ad6d6555 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -606,17 +606,17 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
if( (nFrameOpts & (HtmlFrmOpts::Space|HtmlFrmOpts::MarginSize)) &&
SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, true, &pItem ))
{
- aTwipSpc.Width() =
+ aTwipSpc.setWidth(
( static_cast<const SvxLRSpaceItem*>(pItem)->GetLeft() +
- static_cast<const SvxLRSpaceItem*>(pItem)->GetRight() ) / 2;
+ static_cast<const SvxLRSpaceItem*>(pItem)->GetRight() ) / 2 );
m_nDfltLeftMargin = m_nDfltRightMargin = aTwipSpc.Width();
}
if( (nFrameOpts & (HtmlFrmOpts::Space|HtmlFrmOpts::MarginSize)) &&
SfxItemState::SET == rItemSet.GetItemState( RES_UL_SPACE, true, &pItem ))
{
- aTwipSpc.Height() =
+ aTwipSpc.setHeight(
( static_cast<const SvxULSpaceItem*>(pItem)->GetUpper() +
- static_cast<const SvxULSpaceItem*>(pItem)->GetLower() ) / 2;
+ static_cast<const SvxULSpaceItem*>(pItem)->GetLower() ) / 2 );
m_nDfltTopMargin = m_nDfltBottomMargin = static_cast<sal_uInt16>(aTwipSpc.Height());
}
@@ -628,9 +628,9 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
Application::GetDefaultDevice()->LogicToPixel( aTwipSpc,
MapMode(MapUnit::MapTwip) );
if( !aPixelSpc.Width() && aTwipSpc.Width() )
- aPixelSpc.Width() = 1;
+ aPixelSpc.setWidth( 1 );
if( !aPixelSpc.Height() && aTwipSpc.Height() )
- aPixelSpc.Height() = 1;
+ aPixelSpc.setHeight( 1 );
if( aPixelSpc.Width() )
{
@@ -649,13 +649,13 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
// is set.
if( nFrameOpts & HtmlFrmOpts::MarginSize )
{
- aTwipSpc.Width() *= -2;
- aTwipSpc.Height() *= -2;
+ aTwipSpc.setWidth( aTwipSpc.Width() * -2 );
+ aTwipSpc.setHeight( aTwipSpc.Height() * -2 );
}
else
{
- aTwipSpc.Width() = 0;
- aTwipSpc.Height() = 0;
+ aTwipSpc.setWidth( 0 );
+ aTwipSpc.setHeight( 0 );
}
if( !(nFrameOpts & HtmlFrmOpts::AbsSize) &&
@@ -663,10 +663,10 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
{
const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem);
- aTwipSpc.Width() += pBoxItem->CalcLineSpace( SvxBoxItemLine::LEFT );
- aTwipSpc.Width() += pBoxItem->CalcLineSpace( SvxBoxItemLine::RIGHT );
- aTwipSpc.Height() += pBoxItem->CalcLineSpace( SvxBoxItemLine::TOP );
- aTwipSpc.Height() += pBoxItem->CalcLineSpace( SvxBoxItemLine::BOTTOM );
+ aTwipSpc.AdjustWidth(pBoxItem->CalcLineSpace( SvxBoxItemLine::LEFT ) );
+ aTwipSpc.AdjustWidth(pBoxItem->CalcLineSpace( SvxBoxItemLine::RIGHT ) );
+ aTwipSpc.AdjustHeight(pBoxItem->CalcLineSpace( SvxBoxItemLine::TOP ) );
+ aTwipSpc.AdjustHeight(pBoxItem->CalcLineSpace( SvxBoxItemLine::BOTTOM ) );
}
// WIDTH and/or HEIGHT
@@ -689,9 +689,9 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0,
"Frame size minus spacing < 0!!!???" );
if( aTwipSz.Width() < 0 )
- aTwipSz.Width() = 0;
+ aTwipSz.setWidth( 0 );
if( aTwipSz.Height() < 0 )
- aTwipSz.Height() = 0;
+ aTwipSz.setHeight( 0 );
Size aPixelSz( 0, 0 );
if( (aTwipSz.Width() || aTwipSz.Height()) &&
@@ -701,9 +701,9 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
- aPixelSz.Width() = 1;
+ aPixelSz.setWidth( 1 );
if( !aPixelSz.Height() && aTwipSz.Height() )
- aPixelSz.Height() = 1;
+ aPixelSz.setHeight( 1 );
}
if( (nFrameOpts & HtmlFrmOpts::Width) &&
@@ -873,17 +873,17 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
if( (nFrameOptions & (HtmlFrmOpts::Space | HtmlFrmOpts::MarginSize)) &&
SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, true, &pItem ))
{
- aTwipSpc.Width() =
+ aTwipSpc.setWidth(
( static_cast<const SvxLRSpaceItem*>(pItem)->GetLeft() +
- static_cast<const SvxLRSpaceItem*>(pItem)->GetRight() ) / 2;
+ static_cast<const SvxLRSpaceItem*>(pItem)->GetRight() ) / 2 );
m_nDfltLeftMargin = m_nDfltRightMargin = aTwipSpc.Width();
}
if( (nFrameOptions & (HtmlFrmOpts::Space|HtmlFrmOpts::MarginSize)) &&
SfxItemState::SET == rItemSet.GetItemState( RES_UL_SPACE, true, &pItem ))
{
- aTwipSpc.Height() =
+ aTwipSpc.setHeight(
( static_cast<const SvxULSpaceItem*>(pItem)->GetUpper() +
- static_cast<const SvxULSpaceItem*>(pItem)->GetLower() ) / 2;
+ static_cast<const SvxULSpaceItem*>(pItem)->GetLower() ) / 2 );
m_nDfltTopMargin = m_nDfltBottomMargin = static_cast<sal_uInt16>(aTwipSpc.Height());
}
@@ -895,9 +895,9 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
Application::GetDefaultDevice()->LogicToPixel( aTwipSpc,
MapMode(MapUnit::MapTwip) );
if( !aPixelSpc.Width() && aTwipSpc.Width() )
- aPixelSpc.Width() = 1;
+ aPixelSpc.setWidth( 1 );
if( !aPixelSpc.Height() && aTwipSpc.Height() )
- aPixelSpc.Height() = 1;
+ aPixelSpc.setHeight( 1 );
if (aPixelSpc.Width())
{
@@ -914,13 +914,13 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
// is set.
if( nFrameOptions & HtmlFrmOpts::MarginSize )
{
- aTwipSpc.Width() *= -2;
- aTwipSpc.Height() *= -2;
+ aTwipSpc.setWidth( aTwipSpc.Width() * -2 );
+ aTwipSpc.setHeight( aTwipSpc.Height() * -2 );
}
else
{
- aTwipSpc.Width() = 0;
- aTwipSpc.Height() = 0;
+ aTwipSpc.setWidth( 0 );
+ aTwipSpc.setHeight( 0 );
}
if( !(nFrameOptions & HtmlFrmOpts::AbsSize) &&
@@ -928,10 +928,10 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
{
const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem);
- aTwipSpc.Width() += pBoxItem->CalcLineSpace( SvxBoxItemLine::LEFT );
- aTwipSpc.Width() += pBoxItem->CalcLineSpace( SvxBoxItemLine::RIGHT );
- aTwipSpc.Height() += pBoxItem->CalcLineSpace( SvxBoxItemLine::TOP );
- aTwipSpc.Height() += pBoxItem->CalcLineSpace( SvxBoxItemLine::BOTTOM );
+ aTwipSpc.AdjustWidth(pBoxItem->CalcLineSpace( SvxBoxItemLine::LEFT ) );
+ aTwipSpc.AdjustWidth(pBoxItem->CalcLineSpace( SvxBoxItemLine::RIGHT ) );
+ aTwipSpc.AdjustHeight(pBoxItem->CalcLineSpace( SvxBoxItemLine::TOP ) );
+ aTwipSpc.AdjustHeight(pBoxItem->CalcLineSpace( SvxBoxItemLine::BOTTOM ) );
}
// "width" and/or "height"
@@ -954,9 +954,9 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0,
"Frame size minus spacing < 0!!!???" );
if( aTwipSz.Width() < 0 )
- aTwipSz.Width() = 0;
+ aTwipSz.setWidth( 0 );
if( aTwipSz.Height() < 0 )
- aTwipSz.Height() = 0;
+ aTwipSz.setHeight( 0 );
Size aPixelSz( 0, 0 );
if( (aTwipSz.Width() || aTwipSz.Height()) &&
@@ -966,9 +966,9 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
- aPixelSz.Width() = 1;
+ aPixelSz.setWidth( 1 );
if( !aPixelSz.Height() && aTwipSz.Height() )
- aPixelSz.Height() = 1;
+ aPixelSz.setHeight( 1 );
}
if( (nFrameOptions & HtmlFrmOpts::Width) &&
@@ -1304,32 +1304,32 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat,
if( pBorderLine )
{
pColBorderLine = pBorderLine;
- aTwipBorder.Width() += pBorderLine->GetOutWidth();
+ aTwipBorder.AdjustWidth(pBorderLine->GetOutWidth() );
}
pBorderLine = pBoxItem->GetRight();
if( pBorderLine )
{
pColBorderLine = pBorderLine;
- aTwipBorder.Width() += pBorderLine->GetOutWidth();
+ aTwipBorder.AdjustWidth(pBorderLine->GetOutWidth() );
}
pBorderLine = pBoxItem->GetTop();
if( pBorderLine )
{
pColBorderLine = pBorderLine;
- aTwipBorder.Height() += pBorderLine->GetOutWidth();
+ aTwipBorder.AdjustHeight(pBorderLine->GetOutWidth() );
}
pBorderLine = pBoxItem->GetBottom();
if( pBorderLine )
{
pColBorderLine = pBorderLine;
- aTwipBorder.Height() += pBorderLine->GetOutWidth();
+ aTwipBorder.AdjustHeight(pBorderLine->GetOutWidth() );
}
- aTwipBorder.Width() /= 2;
- aTwipBorder.Height() /= 2;
+ aTwipBorder.setWidth( aTwipBorder.Width() / 2 );
+ aTwipBorder.setHeight( aTwipBorder.Height() / 2 );
if( (aTwipBorder.Width() || aTwipBorder.Height()) &&
Application::GetDefaultDevice() )
@@ -1338,12 +1338,12 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat,
Application::GetDefaultDevice()->LogicToPixel( aTwipBorder,
MapMode(MapUnit::MapTwip) );
if( !aPixelBorder.Width() && aTwipBorder.Width() )
- aPixelBorder.Width() = 1;
+ aPixelBorder.setWidth( 1 );
if( !aPixelBorder.Height() && aTwipBorder.Height() )
- aPixelBorder.Height() = 1;
+ aPixelBorder.setHeight( 1 );
if( aPixelBorder.Width() )
- aPixelBorder.Height() = 0;
+ aPixelBorder.setHeight( 0 );
nBorderWidth =
static_cast<sal_uInt16>(aPixelBorder.Width() + aPixelBorder.Height());
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index c40d30bf543d..2e6d38e42666 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1669,9 +1669,9 @@ void SwHTMLParser::InsertInput()
case HTMLInputType::Image:
{
// SIZE = WIDTH
- aSz.Width() = nSize ? nSize : nWidth;
- aSz.Width() = nWidth;
- aSz.Height() = nHeight;
+ aSz.setWidth( nSize ? nSize : nWidth );
+ aSz.setWidth( nWidth );
+ aSz.setHeight( nHeight );
if( (aSz.Width() || aSz.Height()) && Application::GetDefaultDevice() )
{
aSz = Application::GetDefaultDevice()
@@ -1745,7 +1745,7 @@ void SwHTMLParser::InsertInput()
if( !nSize )
nSize = 20;
- aTextSz.Width() = nSize;
+ aTextSz.setWidth( nSize );
bMinHeight = true;
break;
@@ -1764,7 +1764,7 @@ void SwHTMLParser::InsertInput()
Size aNewSz( nSize, 0 );
aNewSz = Application::GetDefaultDevice()
->PixelToLogic( aNewSz, MapMode( MapUnit::Map100thMM ) );
- aSz.Width() = aNewSz.Width();
+ aSz.setWidth( aNewSz.Width() );
OSL_ENSURE( !aTextSz.Width(), "text width is present" );
bMinWidth = false;
}
@@ -1781,14 +1781,14 @@ void SwHTMLParser::InsertInput()
if( SVX_CSS1_LTYPE_TWIP== aCSS1PropInfo.m_eWidthType )
{
- aSz.Width() = convertTwipToMm100( aCSS1PropInfo.m_nWidth );
- aTextSz.Width() = 0;
+ aSz.setWidth( convertTwipToMm100( aCSS1PropInfo.m_nWidth ) );
+ aTextSz.setWidth( 0 );
bMinWidth = false;
}
if( SVX_CSS1_LTYPE_TWIP== aCSS1PropInfo.m_eHeightType )
{
- aSz.Height() = convertTwipToMm100( aCSS1PropInfo.m_nHeight );
- aTextSz.Height() = 0;
+ aSz.setHeight( convertTwipToMm100( aCSS1PropInfo.m_nHeight ) );
+ aTextSz.setHeight( 0 );
bMinHeight = false;
}
@@ -1797,21 +1797,21 @@ void SwHTMLParser::InsertInput()
{
if( !aSz.Width() )
{
- aSz.Width() = HTML_DFLT_IMG_WIDTH;
+ aSz.setWidth( HTML_DFLT_IMG_WIDTH );
bSetGrfWidth = true;
if (m_xTable)
IncGrfsThatResizeTable();
}
if( !aSz.Height() )
{
- aSz.Height() = HTML_DFLT_IMG_HEIGHT;
+ aSz.setHeight( HTML_DFLT_IMG_HEIGHT );
bSetGrfHeight = true;
}
}
if( aSz.Width() < MINFLY )
- aSz.Width() = MINFLY;
+ aSz.setWidth( MINFLY );
if( aSz.Height() < MINFLY )
- aSz.Height() = MINFLY;
+ aSz.setHeight( MINFLY );
uno::Reference< drawing::XShape > xShape = InsertControl(
xFComp, xPropSet, aSz,
@@ -2042,18 +2042,18 @@ void SwHTMLParser::NewTextArea()
Size aSz( MINFLY, MINFLY );
if( SVX_CSS1_LTYPE_TWIP== aCSS1PropInfo.m_eWidthType )
{
- aSz.Width() = convertTwipToMm100( aCSS1PropInfo.m_nWidth );
- aTextSz.Width() = 0;
+ aSz.setWidth( convertTwipToMm100( aCSS1PropInfo.m_nWidth ) );
+ aTextSz.setWidth( 0 );
}
if( SVX_CSS1_LTYPE_TWIP== aCSS1PropInfo.m_eHeightType )
{
- aSz.Height() = convertTwipToMm100( aCSS1PropInfo.m_nHeight );
- aTextSz.Height() = 0;
+ aSz.setHeight( convertTwipToMm100( aCSS1PropInfo.m_nHeight ) );
+ aTextSz.setHeight( 0 );
}
if( aSz.Width() < MINFLY )
- aSz.Width() = MINFLY;
+ aSz.setWidth( MINFLY );
if( aSz.Height() < MINFLY )
- aSz.Height() = MINFLY;
+ aSz.setHeight( MINFLY );
uno::Reference< drawing::XShape > xShape = InsertControl( xFComp, xPropSet, aSz,
text::VertOrientation::TOP, text::HoriOrientation::NONE,
@@ -2293,7 +2293,7 @@ void SwHTMLParser::NewSelect()
{
xPropSet->setPropertyValue("MultiSelection", makeAny(true) );
}
- aTextSz.Height() = m_nSelectEntryCnt;
+ aTextSz.setHeight( m_nSelectEntryCnt );
bMinHeight = false;
}
@@ -2310,20 +2310,20 @@ void SwHTMLParser::NewSelect()
m_bFixSelectWidth = true;
if( SVX_CSS1_LTYPE_TWIP== aCSS1PropInfo.m_eWidthType )
{
- aSz.Width() = convertTwipToMm100( aCSS1PropInfo.m_nWidth );
+ aSz.setWidth( convertTwipToMm100( aCSS1PropInfo.m_nWidth ) );
m_bFixSelectWidth = false;
bMinWidth = false;
}
if( SVX_CSS1_LTYPE_TWIP== aCSS1PropInfo.m_eHeightType )
{
- aSz.Height() = convertTwipToMm100( aCSS1PropInfo.m_nHeight );
- aTextSz.Height() = 0;
+ aSz.setHeight( convertTwipToMm100( aCSS1PropInfo.m_nHeight ) );
+ aTextSz.setHeight( 0 );
bMinHeight = false;
}
if( aSz.Width() < MINFLY )
- aSz.Width() = MINFLY;
+ aSz.setWidth( MINFLY );
if( aSz.Height() < MINFLY )
- aSz.Height() = MINFLY;
+ aSz.setHeight( MINFLY );
uno::Reference< drawing::XShape > xShape = InsertControl( xFComp, xPropSet, aSz,
text::VertOrientation::TOP, text::HoriOrientation::NONE,
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index cd2548cd0a26..d7011c4b19d7 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -669,8 +669,8 @@ static void GetControlSize(const SdrUnoObj& rFormObj, Size& rSz, SwDoc *pDoc)
sal_Int16 nCols=0, nLines=0;
xLC->getColumnsAndLines( nCols, nLines );
- rSz.Width() = nCols;
- rSz.Height() = nLines;
+ rSz.setWidth( nCols );
+ rSz.setHeight( nLines );
}
Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
@@ -988,9 +988,9 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
- aPixelSz.Width() = 1;
+ aPixelSz.setWidth( 1 );
if( !aPixelSz.Height() && aTwipSz.Height() )
- aPixelSz.Height() = 1;
+ aPixelSz.setHeight( 1 );
}
if( aPixelSz.Width() )
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index b0d94be7609d..3c6d5022bfc0 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -558,12 +558,12 @@ IMAGE_SETEVENT:
switch( aPropInfo.m_eWidthType )
{
case SVX_CSS1_LTYPE_TWIP:
- aTwipSz.Width() = aPropInfo.m_nWidth;
+ aTwipSz.setWidth( aPropInfo.m_nWidth );
nWidth = 1; // != 0
bPrcWidth = false;
break;
case SVX_CSS1_LTYPE_PERCENTAGE:
- aTwipSz.Width() = 0;
+ aTwipSz.setWidth( 0 );
nWidth = aPropInfo.m_nWidth;
bPrcWidth = true;
break;
@@ -573,12 +573,12 @@ IMAGE_SETEVENT:
switch( aPropInfo.m_eHeightType )
{
case SVX_CSS1_LTYPE_TWIP:
- aTwipSz.Height() = aPropInfo.m_nHeight;
+ aTwipSz.setHeight( aPropInfo.m_nHeight );
nHeight = 1; // != 0
bPrcHeight = false;
break;
case SVX_CSS1_LTYPE_PERCENTAGE:
- aTwipSz.Height() = 0;
+ aTwipSz.setHeight( 0 );
nHeight = aPropInfo.m_nHeight;
bPrcHeight = true;
break;
@@ -608,8 +608,8 @@ IMAGE_SETEVENT:
aGrfSz = aTwipSz;
if( !nWidth && !nHeight )
{
- aTwipSz.Width() = HTML_DFLT_IMG_WIDTH;
- aTwipSz.Height() = HTML_DFLT_IMG_HEIGHT;
+ aTwipSz.setWidth( HTML_DFLT_IMG_WIDTH );
+ aTwipSz.setHeight( HTML_DFLT_IMG_HEIGHT );
}
else if( nWidth )
{
@@ -621,7 +621,7 @@ IMAGE_SETEVENT:
}
else
{
- aTwipSz.Height() = HTML_DFLT_IMG_HEIGHT;
+ aTwipSz.setHeight( HTML_DFLT_IMG_HEIGHT );
}
}
else if( nHeight )
@@ -633,7 +633,7 @@ IMAGE_SETEVENT:
}
else
{
- aTwipSz.Width() = HTML_DFLT_IMG_WIDTH;
+ aTwipSz.setWidth( HTML_DFLT_IMG_WIDTH );
}
}
}
@@ -688,27 +688,27 @@ IMAGE_SETEVENT:
{
OSL_ENSURE( !aTwipSz.Width(),
"Why is a width set if we already have percentage value?" );
- aTwipSz.Width() = aGrfSz.Width() ? aGrfSz.Width()
- : HTML_DFLT_IMG_WIDTH;
+ aTwipSz.setWidth( aGrfSz.Width() ? aGrfSz.Width()
+ : HTML_DFLT_IMG_WIDTH );
}
else
{
- aTwipSz.Width() += 2*nVBorderWidth;
+ aTwipSz.AdjustWidth(2*nVBorderWidth );
if( aTwipSz.Width() < MINFLY )
- aTwipSz.Width() = MINFLY;
+ aTwipSz.setWidth( MINFLY );
}
if( nPrcHeight )
{
OSL_ENSURE( !aTwipSz.Height(),
"Why is a height set if we already have percentage value?" );
- aTwipSz.Height() = aGrfSz.Height() ? aGrfSz.Height()
- : HTML_DFLT_IMG_HEIGHT;
+ aTwipSz.setHeight( aGrfSz.Height() ? aGrfSz.Height()
+ : HTML_DFLT_IMG_HEIGHT );
}
else
{
- aTwipSz.Height() += 2*nHBorderWidth;
+ aTwipSz.AdjustHeight(2*nHBorderWidth );
if( aTwipSz.Height() < MINFLY )
- aTwipSz.Height() = MINFLY;
+ aTwipSz.setHeight( MINFLY );
}
SwFormatFrameSize aFrameSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() );
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index a0862890543b..e16846b9d882 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -138,11 +138,11 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
if( SVX_CSS1_LTYPE_PERCENTAGE == rCSS1PropInfo.m_eWidthType )
{
nPrcWidth = static_cast<sal_uInt8>(rCSS1PropInfo.m_nWidth);
- aTwipSz.Width() = rTwipDfltSize.Width();
+ aTwipSz.setWidth( rTwipDfltSize.Width() );
}
else if( SVX_CSS1_LTYPE_TWIP== rCSS1PropInfo.m_eWidthType )
{
- aTwipSz.Width() = rCSS1PropInfo.m_nWidth;
+ aTwipSz.setWidth( rCSS1PropInfo.m_nWidth );
}
else if( bPrcWidth && rPixSize.Width() )
{
@@ -150,26 +150,26 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
if( nPrcWidth > 100 )
nPrcWidth = 100;
- aTwipSz.Width() = rTwipDfltSize.Width();
+ aTwipSz.setWidth( rTwipDfltSize.Width() );
}
else if( USHRT_MAX==rPixSize.Width() )
{
- aTwipSz.Width() = rTwipDfltSize.Width();
+ aTwipSz.setWidth( rTwipDfltSize.Width() );
}
if( aTwipSz.Width() < MINFLY )
{
- aTwipSz.Width() = MINFLY;
+ aTwipSz.setWidth( MINFLY );
}
// process height
if( SVX_CSS1_LTYPE_PERCENTAGE == rCSS1PropInfo.m_eHeightType )
{
nPrcHeight = static_cast<sal_uInt8>(rCSS1PropInfo.m_nHeight);
- aTwipSz.Height() = rTwipDfltSize.Height();
+ aTwipSz.setHeight( rTwipDfltSize.Height() );
}
else if( SVX_CSS1_LTYPE_TWIP== rCSS1PropInfo.m_eHeightType )
{
- aTwipSz.Height() = rCSS1PropInfo.m_nHeight;
+ aTwipSz.setHeight( rCSS1PropInfo.m_nHeight );
}
else if( bPrcHeight && rPixSize.Height() )
{
@@ -177,15 +177,15 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
if( nPrcHeight > 100 )
nPrcHeight = 100;
- aTwipSz.Height() = rTwipDfltSize.Height();
+ aTwipSz.setHeight( rTwipDfltSize.Height() );
}
else if( USHRT_MAX==rPixSize.Height() )
{
- aTwipSz.Height() = rTwipDfltSize.Height();
+ aTwipSz.setHeight( rTwipDfltSize.Height() );
}
if( aTwipSz.Height() < MINFLY )
{
- aTwipSz.Height() = MINFLY;
+ aTwipSz.setHeight( MINFLY );
}
// set size
@@ -339,23 +339,23 @@ void SwHTMLParser::InsertEmbed()
if( USHRT_MAX==aSize.Width() )
{
bPrcWidth = (rOption.GetString().indexOf('%') != -1);
- aSize.Width() = static_cast<long>(rOption.GetNumber());
+ aSize.setWidth( static_cast<long>(rOption.GetNumber()) );
}
break;
case HtmlOptionId::HEIGHT:
if( USHRT_MAX==aSize.Height() )
{
bPrcHeight = (rOption.GetString().indexOf('%') != -1);
- aSize.Height() = static_cast<long>(rOption.GetNumber());
+ aSize.setHeight( static_cast<long>(rOption.GetNumber()) );
}
break;
case HtmlOptionId::HSPACE:
if( USHRT_MAX==aSpace.Width() )
- aSpace.Width() = static_cast<long>(rOption.GetNumber());
+ aSpace.setWidth( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::VSPACE:
if( USHRT_MAX==aSpace.Height() )
- aSpace.Height() = static_cast<long>(rOption.GetNumber());
+ aSpace.setHeight( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::UNKNOWN:
if (rOption.GetTokenString().equalsIgnoreAsciiCase(
@@ -381,14 +381,14 @@ void SwHTMLParser::InsertEmbed()
if( eVertOri==text::VertOrientation::NONE && eHoriOri==text::HoriOrientation::NONE )
eVertOri = text::VertOrientation::TOP;
if( USHRT_MAX==aSpace.Width() )
- aSpace.Width() = 0;
+ aSpace.setWidth( 0 );
if( USHRT_MAX==aSpace.Height() )
- aSpace.Height() = 0;
+ aSpace.setHeight( 0 );
if( bHidden )
{
// Size (0,0) will be changed to (MINFLY, MINFLY) in SetFrameSize()
- aSize.Width() = 0; aSize.Height() = 0;
- aSpace.Width() = 0; aSpace.Height() = 0;
+ aSize.setWidth( 0 ); aSize.setHeight( 0 );
+ aSpace.setWidth( 0 ); aSpace.setHeight( 0 );
bPrcWidth = bPrcHeight = false;
}
@@ -530,11 +530,11 @@ void SwHTMLParser::NewObject()
break;
case HtmlOptionId::WIDTH:
bPrcWidth = (rOption.GetString().indexOf('%') != -1);
- aSize.Width() = static_cast<long>(rOption.GetNumber());
+ aSize.setWidth( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::HEIGHT:
bPrcHeight = (rOption.GetString().indexOf('%') != -1);
- aSize.Height() = static_cast<long>(rOption.GetNumber());
+ aSize.setHeight( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::ALIGN:
eVertOri = rOption.GetEnum( aHTMLImgVAlignTable, eVertOri );
@@ -546,10 +546,10 @@ void SwHTMLParser::NewObject()
aName = rOption.GetString();
break;
case HtmlOptionId::HSPACE:
- aSpace.Width() = static_cast<long>(rOption.GetNumber());
+ aSpace.setWidth( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::VSPACE:
- aSpace.Height() = static_cast<long>(rOption.GetNumber());
+ aSpace.setHeight( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::BORDER:
break;
@@ -694,17 +694,17 @@ void SwHTMLParser::InsertApplet()
break;
case HtmlOptionId::WIDTH:
bPrcWidth = (rOption.GetString().indexOf('%') != -1);
- aSize.Width() = static_cast<long>(rOption.GetNumber());
+ aSize.setWidth( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::HEIGHT:
bPrcHeight = (rOption.GetString().indexOf('%') != -1);
- aSize.Height() = static_cast<long>(rOption.GetNumber());
+ aSize.setHeight( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::HSPACE:
- aSpace.Width() = static_cast<long>(rOption.GetNumber());
+ aSpace.setWidth( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::VSPACE:
- aSpace.Height() = static_cast<long>(rOption.GetNumber());
+ aSpace.setHeight( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::MAYSCRIPT:
bMayScript = true;
@@ -845,17 +845,17 @@ void SwHTMLParser::InsertFloatingFrame()
break;
case HtmlOptionId::WIDTH:
bPrcWidth = (rOption.GetString().indexOf('%') != -1);
- aSize.Width() = static_cast<long>(rOption.GetNumber());
+ aSize.setWidth( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::HEIGHT:
bPrcHeight = (rOption.GetString().indexOf('%') != -1);
- aSize.Height() = static_cast<long>(rOption.GetNumber());
+ aSize.setHeight( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::HSPACE:
- aSpace.Width() = static_cast<long>(rOption.GetNumber());
+ aSpace.setWidth( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::VSPACE:
- aSpace.Height() = static_cast<long>(rOption.GetNumber());
+ aSpace.setHeight( static_cast<long>(rOption.GetNumber()) );
break;
default: break;
}
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index bc79a91cf9cf..3bfe273c32b2 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -111,7 +111,7 @@ void SwHTMLWrtTable::Pixelize( sal_uInt16& rValue )
Size aSz( rValue, 0 );
aSz = Application::GetDefaultDevice()->LogicToPixel( aSz, MapMode(MapUnit::MapTwip) );
if( !aSz.Width() )
- aSz.Width() = 1;
+ aSz.setWidth( 1 );
aSz = Application::GetDefaultDevice()->PixelToLogic( aSz, MapMode(MapUnit::MapTwip) );
rValue = static_cast<sal_uInt16>(aSz.Width());
}
@@ -351,9 +351,9 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
aPixelSz = Application::GetDefaultDevice()->LogicToPixel( aPixelSz,
MapMode(MapUnit::MapTwip) );
if( aOldSz.Width() && !aPixelSz.Width() )
- aPixelSz.Width() = 1;
+ aPixelSz.setWidth( 1 );
if( aOldSz.Height() && !aPixelSz.Height() )
- aPixelSz.Height() = 1;
+ aPixelSz.setHeight( 1 );
}
// output WIDTH: from layout or calculated
@@ -657,9 +657,9 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
Application::GetDefaultDevice()->LogicToPixel( Size(nHSpace,nVSpace),
MapMode(MapUnit::MapTwip) );
if( !aPixelSpc.Width() && nHSpace )
- aPixelSpc.Width() = 1;
+ aPixelSpc.setWidth( 1 );
if( !aPixelSpc.Height() && nVSpace )
- aPixelSpc.Height() = 1;
+ aPixelSpc.setHeight( 1 );
if( aPixelSpc.Width() )
{
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 1af09bd802d6..b529f6a97d18 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -4850,12 +4850,12 @@ void SwHTMLParser::InsertSpacer()
case HtmlOptionId::WIDTH:
// First only save as pixel value!
bPrcWidth = (rOption.GetString().indexOf('%') != -1);
- aSize.Width() = static_cast<long>(rOption.GetNumber());
+ aSize.setWidth( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::HEIGHT:
// First only save as pixel value!
bPrcHeight = (rOption.GetString().indexOf('%') != -1);
- aSize.Height() = static_cast<long>(rOption.GetNumber());
+ aSize.setHeight( static_cast<long>(rOption.GetNumber()) );
break;
case HtmlOptionId::SIZE:
// First only save as pixel value!
@@ -5017,11 +5017,11 @@ SwTwips SwHTMLParser::GetCurrentBrowseWidth()
const SvxULSpaceItem& rUL = rPgFormat.GetULSpace();
const SwFormatCol& rCol = rPgFormat.GetCol();
- m_aHTMLPageSize.Width() = rSz.GetWidth() - rLR.GetLeft() - rLR.GetRight();
- m_aHTMLPageSize.Height() = rSz.GetHeight() - rUL.GetUpper() - rUL.GetLower();
+ m_aHTMLPageSize.setWidth( rSz.GetWidth() - rLR.GetLeft() - rLR.GetRight() );
+ m_aHTMLPageSize.setHeight( rSz.GetHeight() - rUL.GetUpper() - rUL.GetLower() );
if( 1 < rCol.GetNumCols() )
- m_aHTMLPageSize.Width() /= rCol.GetNumCols();
+ m_aHTMLPageSize.setWidth( m_aHTMLPageSize.Width() / ( rCol.GetNumCols()) );
}
return m_aHTMLPageSize.Width();
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index f2b4a6cf69a6..bf3d687c72ba 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3865,8 +3865,8 @@ void RtfAttributeOutput::FlyFrameOLEReplacement(const SwFlyFrameFormat* pFlyFram
m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_SHPPICT);
Size aSize(rOLENode.GetTwipSize());
Size aRendered(aSize);
- aRendered.Width() = rSize.Width();
- aRendered.Height() = rSize.Height();
+ aRendered.setWidth(rSize.Width());
+ aRendered.setHeight(rSize.Height());
const Graphic* pGraphic = rOLENode.GetGraphic();
Size aMapped(pGraphic->GetPrefSize());
auto& rCr = static_cast<const SwCropGrf&>(rOLENode.GetAttr(RES_GRFATR_CROPGRF));
@@ -4022,8 +4022,8 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
Size aRendered(aSize);
const SwFormatFrameSize& rS = pFlyFrameFormat->GetFrameSize();
- aRendered.Width() = rS.GetWidth();
- aRendered.Height() = rS.GetHeight();
+ aRendered.setWidth(rS.GetWidth());
+ aRendered.setHeight(rS.GetHeight());
ww8::Frame* pFrame = nullptr;
for (auto& rFrame : m_rExport.m_aFrames)
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 4b5d3e00916a..0260e6c74beb 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -707,12 +707,12 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
// #i22673#
sal_Int16 eOri = rVOr.GetRelationOrient();
if (eOri == text::RelOrientation::CHAR || eOri == text::RelOrientation::TEXT_LINE)
- aObjPos.Y() = -rVOr.GetPos();
+ aObjPos.setY( -rVOr.GetPos() );
else
- aObjPos.Y() = rVOr.GetPos();
+ aObjPos.setY( rVOr.GetPos() );
}
if (text::HoriOrientation::NONE == rHOr.GetHoriOrient())
- aObjPos.X() = rHOr.GetPos();
+ aObjPos.setX( rHOr.GetPos() );
aRect.SetPos( aObjPos );
}
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index d0b47f658c7a..d51630f76816 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -581,8 +581,8 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const ww8::Frame &rFly,
(aGrTwipSz.Width() < 0 ) || (aGrTwipSz.Height() < 0);
if ( bIsSubstitutedSize )
{
- aGrTwipSz.Width() = nWidth;
- aGrTwipSz.Height() = nHeight;
+ aGrTwipSz.setWidth( nWidth );
+ aGrTwipSz.setHeight( nHeight );
}
using namespace sw::types;
// set xExt & yExt
@@ -714,8 +714,8 @@ void SwWW8WrGrf::WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf,
if ( (convertTwipToMm100(aGrTwipSz.Width()) > USHRT_MAX ) || ( convertTwipToMm100(aGrTwipSz.Height()) > USHRT_MAX )
|| (aGrTwipSz.Width() < 0 ) || (aGrTwipSz.Height() < 0) )
{
- aGrTwipSz.Width() = nWidth;
- aGrTwipSz.Height() = nHeight;
+ aGrTwipSz.setWidth( nWidth );
+ aGrTwipSz.setHeight( nHeight );
}
using namespace sw::types;
// set xExt & yExt
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 1fa4223b7531..61ad5ce85638 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -314,13 +314,13 @@ SdrObject* SwWW8ImplReader::ReadLine(WW8_DPHEAD const * pHd, SfxAllItemSet &rSet
Point& rP0 = aP[0];
Point& rP1 = aP[1];
- rP0.X() = static_cast<sal_Int16>(SVBT16ToShort( pHd->xa )) + m_nDrawXOfs2;
- rP0.Y() = static_cast<sal_Int16>(SVBT16ToShort( pHd->ya )) + m_nDrawYOfs2;
+ rP0.setX( static_cast<sal_Int16>(SVBT16ToShort( pHd->xa )) + m_nDrawXOfs2 );
+ rP0.setY( static_cast<sal_Int16>(SVBT16ToShort( pHd->ya )) + m_nDrawYOfs2 );
rP1 = rP0;
- rP0.X() += static_cast<sal_Int16>(SVBT16ToShort( aLine.xaStart ));
- rP0.Y() += static_cast<sal_Int16>(SVBT16ToShort( aLine.yaStart ));
- rP1.X() += static_cast<sal_Int16>(SVBT16ToShort( aLine.xaEnd ));
- rP1.Y() += static_cast<sal_Int16>(SVBT16ToShort( aLine.yaEnd ));
+ rP0.AdjustX(static_cast<sal_Int16>(SVBT16ToShort( aLine.xaStart )) );
+ rP0.AdjustY(static_cast<sal_Int16>(SVBT16ToShort( aLine.yaStart )) );
+ rP1.AdjustX(static_cast<sal_Int16>(SVBT16ToShort( aLine.xaEnd )) );
+ rP1.AdjustY(static_cast<sal_Int16>(SVBT16ToShort( aLine.yaEnd )) );
}
::basegfx::B2DPolygon aPolygon;
@@ -344,8 +344,8 @@ SdrObject* SwWW8ImplReader::ReadRect(WW8_DPHEAD const * pHd, SfxAllItemSet &rSet
Point aP0( static_cast<sal_Int16>(SVBT16ToShort( pHd->xa )) + m_nDrawXOfs2,
static_cast<sal_Int16>(SVBT16ToShort( pHd->ya )) + m_nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa ));
- aP1.Y() += static_cast<sal_Int16>(SVBT16ToShort( pHd->dya ));
+ aP1.AdjustX(static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa )) );
+ aP1.AdjustY(static_cast<sal_Int16>(SVBT16ToShort( pHd->dya )) );
SdrObject* pObj = new SdrRectObj( tools::Rectangle( aP0, aP1 ) );
@@ -365,8 +365,8 @@ SdrObject* SwWW8ImplReader::ReadElipse(WW8_DPHEAD const * pHd, SfxAllItemSet &rS
Point aP0( static_cast<sal_Int16>(SVBT16ToShort( pHd->xa )) + m_nDrawXOfs2,
static_cast<sal_Int16>(SVBT16ToShort( pHd->ya )) + m_nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa ));
- aP1.Y() += static_cast<sal_Int16>(SVBT16ToShort( pHd->dya ));
+ aP1.AdjustX(static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa )) );
+ aP1.AdjustY(static_cast<sal_Int16>(SVBT16ToShort( pHd->dya )) );
SdrObject* pObj = new SdrCircObj( OBJ_CIRC, tools::Rectangle( aP0, aP1 ) );
@@ -386,18 +386,18 @@ SdrObject* SwWW8ImplReader::ReadArc(WW8_DPHEAD const * pHd, SfxAllItemSet &rSet)
Point aP0( static_cast<sal_Int16>(SVBT16ToShort( pHd->xa )) + m_nDrawXOfs2,
static_cast<sal_Int16>(SVBT16ToShort( pHd->ya )) + m_nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa )) * 2;
- aP1.Y() += static_cast<sal_Int16>(SVBT16ToShort( pHd->dya )) * 2;
+ aP1.AdjustX(static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa )) * 2 );
+ aP1.AdjustY(static_cast<sal_Int16>(SVBT16ToShort( pHd->dya )) * 2 );
short nA[] = { 2, 3, 1, 0 };
short nW = nA[ ( ( aArc.fLeft & 1 ) << 1 ) + ( aArc.fUp & 1 ) ];
if( !aArc.fLeft ){
- aP0.Y() -= static_cast<sal_Int16>(SVBT16ToShort( pHd->dya ));
- aP1.Y() -= static_cast<sal_Int16>(SVBT16ToShort( pHd->dya ));
+ aP0.AdjustY( -static_cast<sal_Int16>(SVBT16ToShort( pHd->dya )) );
+ aP1.AdjustY( -static_cast<sal_Int16>(SVBT16ToShort( pHd->dya )) );
}
if( aArc.fUp ){
- aP0.X() -= static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa ));
- aP1.X() -= static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa ));
+ aP0.AdjustX( -static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa )) );
+ aP1.AdjustX( -static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa )) );
}
SdrObject* pObj = new SdrCircObj( OBJ_SECT, tools::Rectangle( aP0, aP1 ),
@@ -428,10 +428,10 @@ SdrObject* SwWW8ImplReader::ReadPolyLine(WW8_DPHEAD const * pHd, SfxAllItemSet &
Point aPt;
for (sal_uInt16 i=0; i<nCount; ++i)
{
- aPt.X() = SVBT16ToShort( xP[i << 1] ) + m_nDrawXOfs2
- + static_cast<sal_Int16>(SVBT16ToShort( pHd->xa ));
- aPt.Y() = SVBT16ToShort( xP[( i << 1 ) + 1] ) + m_nDrawYOfs2
- + static_cast<sal_Int16>(SVBT16ToShort( pHd->ya ));
+ aPt.setX( SVBT16ToShort( xP[i << 1] ) + m_nDrawXOfs2
+ + static_cast<sal_Int16>(SVBT16ToShort( pHd->xa )) );
+ aPt.setY( SVBT16ToShort( xP[( i << 1 ) + 1] ) + m_nDrawYOfs2
+ + static_cast<sal_Int16>(SVBT16ToShort( pHd->ya )) );
aP[i] = aPt;
}
xP.reset();
@@ -1218,8 +1218,8 @@ SdrObject* SwWW8ImplReader::ReadTextBox(WW8_DPHEAD const * pHd, SfxAllItemSet &r
Point aP0( static_cast<sal_Int16>(SVBT16ToShort( pHd->xa )) + m_nDrawXOfs2,
static_cast<sal_Int16>(SVBT16ToShort( pHd->ya )) + m_nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa ));
- aP1.Y() += static_cast<sal_Int16>(SVBT16ToShort( pHd->dya ));
+ aP1.AdjustX(static_cast<sal_Int16>(SVBT16ToShort( pHd->dxa )) );
+ aP1.AdjustY(static_cast<sal_Int16>(SVBT16ToShort( pHd->dya )) );
SdrRectObj* pObj = new SdrRectObj( OBJ_TEXT, tools::Rectangle( aP0, aP1 ) );
pObj->SetModel( m_pDrawModel );
@@ -1281,8 +1281,8 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox(WW8_DPHEAD const * pHd, SfxAllItemSet
static_cast<sal_Int16>(SVBT16ToShort( pHd->ya ))
+ static_cast<sal_Int16>(SVBT16ToShort( aCallB.dpheadTxbx.ya )) + m_nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += static_cast<sal_Int16>(SVBT16ToShort( aCallB.dpheadTxbx.dxa ));
- aP1.Y() += static_cast<sal_Int16>(SVBT16ToShort( aCallB.dpheadTxbx.dya ));
+ aP1.AdjustX(static_cast<sal_Int16>(SVBT16ToShort( aCallB.dpheadTxbx.dxa )) );
+ aP1.AdjustY(static_cast<sal_Int16>(SVBT16ToShort( aCallB.dpheadTxbx.dya )) );
Point aP2( static_cast<sal_Int16>(SVBT16ToShort( pHd->xa ))
+ static_cast<sal_Int16>(SVBT16ToShort( aCallB.dpheadPolyLine.xa ))
+ m_nDrawXOfs2 + static_cast<sal_Int16>(SVBT16ToShort( xP[0] )),
@@ -1688,15 +1688,15 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
eDashing, eShapeType, nLineThick, aBox);
}
- rInnerDist.Left()+=nLineThick;
- rInnerDist.Top()+=nLineThick;
- rInnerDist.Right()+=nLineThick;
- rInnerDist.Bottom()+=nLineThick;
+ rInnerDist.AdjustLeft(nLineThick );
+ rInnerDist.AdjustTop(nLineThick );
+ rInnerDist.AdjustRight(nLineThick );
+ rInnerDist.AdjustBottom(nLineThick );
- rInnerDist.Left() -= aBox.CalcLineWidth( SvxBoxItemLine::LEFT );
- rInnerDist.Top() -= aBox.CalcLineWidth( SvxBoxItemLine::TOP );
- rInnerDist.Right() -= aBox.CalcLineWidth( SvxBoxItemLine::RIGHT );
- rInnerDist.Bottom() -= aBox.CalcLineWidth( SvxBoxItemLine::BOTTOM );
+ rInnerDist.AdjustLeft( -(aBox.CalcLineWidth( SvxBoxItemLine::LEFT )) );
+ rInnerDist.AdjustTop( -(aBox.CalcLineWidth( SvxBoxItemLine::TOP )) );
+ rInnerDist.AdjustRight( -(aBox.CalcLineWidth( SvxBoxItemLine::RIGHT )) );
+ rInnerDist.AdjustBottom( -(aBox.CalcLineWidth( SvxBoxItemLine::BOTTOM )) );
// set distances from box's border to text contained within the box
if( 0 < rInnerDist.Left() )
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 70c962d48a2f..2be8a9562df4 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -697,8 +697,8 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if (nTextRotationAngle == 9000)
{
long nWidth = rTextRect.GetWidth();
- rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
- rTextRect.Bottom() = rTextRect.Top() + nWidth;
+ rTextRect.SetRight( rTextRect.Left() + rTextRect.GetHeight() );
+ rTextRect.SetBottom( rTextRect.Top() + nWidth );
sal_Int32 nOldTextLeft = nTextLeft;
sal_Int32 nOldTextRight = nTextRight;
@@ -713,8 +713,8 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
else if (nTextRotationAngle == 27000)
{
long nWidth = rTextRect.GetWidth();
- rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
- rTextRect.Bottom() = rTextRect.Top() + nWidth;
+ rTextRect.SetRight( rTextRect.Left() + rTextRect.GetHeight() );
+ rTextRect.SetBottom( rTextRect.Top() + nWidth );
sal_Int32 nOldTextLeft = nTextLeft;
sal_Int32 nOldTextRight = nTextRight;
@@ -737,8 +737,8 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
// The vertical paragraph justification are contained within the
// BoundRect so calculate it here
tools::Rectangle aNewRect(rTextRect);
- aNewRect.Bottom() -= nTextTop + nTextBottom;
- aNewRect.Right() -= nTextLeft + nTextRight;
+ aNewRect.AdjustBottom( -(nTextTop + nTextBottom) );
+ aNewRect.AdjustRight( -(nTextLeft + nTextRight) );
// Only if it's a simple Textbox, Writer can replace the Object
// with a Frame, else
@@ -872,8 +872,8 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.GetWidth() : rTextRect.GetHeight();
nMinWH /= 2;
Point aPivot(rTextRect.TopLeft());
- aPivot.X() += nMinWH;
- aPivot.Y() += nMinWH;
+ aPivot.AdjustX(nMinWH );
+ aPivot.AdjustY(nMinWH );
double a = nTextRotationAngle * nPi180;
pObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a));
}
@@ -988,8 +988,8 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
nX = nSmallX;
nY = nSmallY;
}
- (*(pImpRec->pWrapPolygon))[i].X() = nX;
- (*(pImpRec->pWrapPolygon))[i].Y() = nY;
+ (*(pImpRec->pWrapPolygon))[i].setX( nX );
+ (*(pImpRec->pWrapPolygon))[i].setY( nY );
}
}
}
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index ae4b675beec6..06993b1eaa8e 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -318,8 +318,8 @@ bool SwWW8ImplReader::ImportOleWMF(tools::SvRef<SotStorage> xSrc1,GDIMetaFile &r
// take scaling factor as found in PIC and apply it to graphic.
SwWw8ReadScaling( rX, rY, xSrc1 );
Size aFinalSize, aOrigSize;
- aFinalSize.Width() = rX;
- aFinalSize.Height() = rY;
+ aFinalSize.setWidth( rX );
+ aFinalSize.setHeight( rY );
aFinalSize = OutputDevice::LogicToLogic(
aFinalSize, MapMode(MapUnit::MapTwip), rWMF.GetPrefMapMode() );
aOrigSize = rWMF.GetPrefSize();
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 834d0467bcba..f8e9278a0459 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1222,14 +1222,14 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps)
{
pValue->Value >>= nTmp;
Size aSize( aRect.GetSize() );
- aSize.Width() = static_cast< long >(bTwip ? sanitiseMm100ToTwip(nTmp) : nTmp);
+ aSize.setWidth( static_cast< long >(bTwip ? sanitiseMm100ToTwip(nTmp) : nTmp) );
aRect.SetSize( aSize );
}
else if ( pValue->Name == "ViewAreaHeight" )
{
pValue->Value >>= nTmp;
Size aSize( aRect.GetSize() );
- aSize.Height() = static_cast< long >(bTwip ? sanitiseMm100ToTwip(nTmp) : nTmp);
+ aSize.setHeight( static_cast< long >(bTwip ? sanitiseMm100ToTwip(nTmp) : nTmp) );
aRect.SetSize( aSize );
}
else if ( pValue->Name == "ShowRedlineChanges" )
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index cac7cbfa27f0..fb9a75947c11 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -409,7 +409,7 @@ void SwDropCapsPict::DrawPrev(vcl::RenderContext& rRenderContext, const Point& r
rFnt.DrawPrev(&rRenderContext, mpPrinter, aPt, maText, nStart, nEnd - nStart);
if (!maScriptChanges.empty())
- aPt.X() += maScriptChanges[nIdx].textWidth;
+ aPt.AdjustX(maScriptChanges[nIdx].textWidth );
if (!GetNextScriptSegment(nIdx, nStart, nEnd, nScript))
break;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index f01afe473344..ec277a1922d9 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1686,8 +1686,8 @@ void SwMarkPreview::PaintPage(vcl::RenderContext& rRenderContext, const tools::R
tools::Rectangle aTextLine = rRect;
aTextLine.SetSize(Size(aTextLine.GetWidth(), 2));
- aTextLine.Left() += 4;
- aTextLine.Right() -= 4;
+ aTextLine.AdjustLeft(4 );
+ aTextLine.AdjustRight( -4 );
aTextLine.Move(0, 4);
const long nStep = aTextLine.GetHeight() + 2;
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 496f88c13cac..cc8a2fb97511 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -229,7 +229,7 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
m_pScrollBar->DoScroll(0);
}
Size aWinOutputSize(m_aWinOutputSize);
- aWinOutputSize.Height() = nContentHeight;
+ aWinOutputSize.setHeight( nContentHeight );
m_pWindow->SetOutputSizePixel(aWinOutputSize);
}
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 945e72c93382..ded560e5bdb0 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star::sdbcx;
static void lcl_Move(Control* pCtrl, long nYOffset)
{
Point aPos(pCtrl->GetPosPixel());
- aPos.Y() += nYOffset;
+ aPos.AdjustY(nYOffset );
pCtrl->SetPosPixel(aPos);
}
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 89f4d63f615e..18c4b2feb4bd 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -55,22 +55,22 @@ void DrawArrow(vcl::RenderContext& rRenderContext, const Point &rP1, const Point
if (rP1.Y() == rP2.Y())
{
// Horizontal
- aArr[0].X() = rP2.X() - 5;
- aArr[0].Y() = rP2.Y() - 2;
- aArr[1].X() = rP2.X();
- aArr[1].Y() = rP2.Y();
- aArr[2].X() = rP2.X() - 5;
- aArr[2].Y() = rP2.Y() + 2;
+ aArr[0].setX( rP2.X() - 5 );
+ aArr[0].setY( rP2.Y() - 2 );
+ aArr[1].setX( rP2.X() );
+ aArr[1].setY( rP2.Y() );
+ aArr[2].setX( rP2.X() - 5 );
+ aArr[2].setY( rP2.Y() + 2 );
}
else
{
// Vertical
- aArr[0].X() = rP2.X() - 2;
- aArr[0].Y() = rP2.Y() - 5;
- aArr[1].X() = rP2.X() + 2;
- aArr[1].Y() = rP2.Y() - 5;
- aArr[2].X() = rP2.X();
- aArr[2].Y() = rP2.Y();
+ aArr[0].setX( rP2.X() - 2 );
+ aArr[0].setY( rP2.Y() - 5 );
+ aArr[1].setX( rP2.X() + 2 );
+ aArr[1].setY( rP2.Y() - 5 );
+ aArr[2].setX( rP2.X() );
+ aArr[2].setY( rP2.Y() );
}
const Color& rFieldTextColor = SwViewOption::GetFontColor();
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 4c222369e4a3..794852abb4c7 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -188,7 +188,7 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell,
Point aMailPos = m_pMailingRB->GetPosPixel();
Point aFilePos = m_pFileRB->GetPosPixel();
- aFilePos.X() -= (aFilePos.X() - aMailPos.X()) /2;
+ aFilePos.AdjustX( -((aFilePos.X() - aMailPos.X()) /2) );
m_pFileRB->SetPosPixel(aFilePos);
uno::Reference< lang::XMultiServiceFactory > xMSF = comphelper::getProcessServiceFactory();
if(pSelection) {
diff --git a/sw/source/ui/fldui/FldRefTreeListBox.cxx b/sw/source/ui/fldui/FldRefTreeListBox.cxx
index 3387125a1151..6935a568996f 100644
--- a/sw/source/ui/fldui/FldRefTreeListBox.cxx
+++ b/sw/source/ui/fldui/FldRefTreeListBox.cxx
@@ -45,11 +45,11 @@ void SwFieldRefTreeListBox::RequestHelp( const HelpEvent& rHEvt )
{
aPos = GetEntryPosition( pEntry );
- aPos.X() = GetTabPos( pEntry, pTab );
+ aPos.setX( GetTabPos( pEntry, pTab ) );
Size aSize( pItem->GetSize( this, pEntry ) );
if((aPos.X() + aSize.Width()) > GetSizePixel().Width())
- aSize.Width() = GetSizePixel().Width() - aPos.X();
+ aSize.setWidth( GetSizePixel().Width() - aPos.X() );
aPos = OutputToScreenPixel(aPos);
tools::Rectangle aItemRect( aPos, aSize );
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 4ec3d12dab8c..bdc38bc9ddf6 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -133,24 +133,24 @@ void SwFieldDlg::Initialize(SfxChildWinInfo *pInfo)
aSize = GetSizePixel();
Size aParentSize = GetParent()->GetOutputSizePixel();
- aPos.X() += ( aParentSize.Width() - aSize.Width() ) / 2;
- aPos.Y() += ( aParentSize.Height() - aSize.Height() ) / 2;
+ aPos.AdjustX(( aParentSize.Width() - aSize.Width() ) / 2 );
+ aPos.AdjustY(( aParentSize.Height() - aSize.Height() ) / 2 );
}
Point aPoint;
tools::Rectangle aRect = GetDesktopRectPixel();
- aPoint.X() = aRect.Right() - aSize.Width();
- aPoint.Y() = aRect.Bottom() - aSize.Height();
+ aPoint.setX( aRect.Right() - aSize.Width() );
+ aPoint.setY( aRect.Bottom() - aSize.Height() );
aPoint = OutputToScreenPixel( aPoint );
if ( aPos.X() > aPoint.X() )
- aPos.X() = aPoint.X() ;
+ aPos.setX( aPoint.X() ) ;
if ( aPos.Y() > aPoint.Y() )
- aPos.Y() = aPoint.Y();
+ aPos.setY( aPoint.Y() );
- if ( aPos.X() < 0 ) aPos.X() = 0;
- if ( aPos.Y() < 0 ) aPos.Y() = 0;
+ if ( aPos.X() < 0 ) aPos.setX( 0 );
+ if ( aPos.Y() < 0 ) aPos.setY( 0 );
SetPosPixel( aPos );
}
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index cdcbc6744ff7..20a2b854614a 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2707,14 +2707,14 @@ void BmpWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
&& (aGrfSize.Height() <= aPntSz.Height()))
{
const long nHeight = aPntSz.Height();
- aPntSz.Width() = aGrfSize.Width();
- aPntSz.Height() = aGrfSize.Height();
- aPntPos.Y() += (nHeight - aPntSz.Height()) / 2;
+ aPntSz.setWidth( aGrfSize.Width() );
+ aPntSz.setHeight( aGrfSize.Height() );
+ aPntPos.AdjustY((nHeight - aPntSz.Height()) / 2 );
}
else
- aPntSz.Width() = aPntSz.Height() * nRelGrf /100;
+ aPntSz.setWidth( aPntSz.Height() * nRelGrf /100 );
- aPntPos.X() += nWidth - aPntSz.Width() ;
+ aPntPos.AdjustX(nWidth - aPntSz.Width() ) ;
}
// #i119307# clear window background, the graphic might have transparency
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index d70894f38649..75039bca767b 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -416,10 +416,10 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aVal.nVRelOrient = rVert.GetRelationOrient();
if (rFrameSize.GetWidthPercent() && rFrameSize.GetWidthPercent() != SwFormatFrameSize::SYNCED)
- aSize.Width() = aSize.Width() * rFrameSize.GetWidthPercent() / 100;
+ aSize.setWidth( aSize.Width() * rFrameSize.GetWidthPercent() / 100 );
if (rFrameSize.GetHeightPercent() && rFrameSize.GetHeightPercent() != SwFormatFrameSize::SYNCED)
- aSize.Height() = aSize.Height() * rFrameSize.GetHeightPercent() / 100;
+ aSize.setHeight( aSize.Height() * rFrameSize.GetHeightPercent() / 100 );
aVal.nWidth = aSize.Width();
aVal.nHeight = aSize.Height();
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 3b1bffbe0cc7..27278667bf80 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1595,7 +1595,7 @@ void SwTOXEdit::AdjustSize()
Size aSize(GetSizePixel());
Size aTextSize(GetTextWidth(GetText()), GetTextHeight());
aTextSize = LogicToPixel(aTextSize);
- aSize.Width() = aTextSize.Width() + EDIT_MINWIDTH;
+ aSize.setWidth( aTextSize.Width() + EDIT_MINWIDTH );
SetSizePixel(aSize);
}
@@ -1769,11 +1769,11 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt )
{
aPos = GetEntryPosition( pEntry );
- aPos.X() = GetTabPos( pEntry, pTab );
+ aPos.setX( GetTabPos( pEntry, pTab ) );
Size aSize( pItem->GetSize( this, pEntry ) );
if((aPos.X() + aSize.Width()) > GetSizePixel().Width())
- aSize.Width() = GetSizePixel().Width() - aPos.X();
+ aSize.setWidth( GetSizePixel().Width() - aPos.X() );
aPos = OutputToScreenPixel(aPos);
tools::Rectangle aItemRect( aPos, aSize );
@@ -2791,7 +2791,7 @@ void SwTokenWindow::setAllocation(const Size &rAllocation)
for (VclPtr<Control> const & pControl : m_aControlList)
{
Size aSize(pControl->GetSizePixel());
- aSize.Height() = aControlSize.Height();
+ aSize.setHeight( aControlSize.Height() );
pControl->SetSizePixel(aSize);
}
AdjustPositions();
@@ -2934,7 +2934,7 @@ Control* SwTokenWindow::InsertItem(const OUString& rText, const SwFormToken&
aControlSize = pLast->GetSizePixel();
aControlPos = pLast->GetPosPixel();
- aControlPos.X() += aControlSize.Width();
+ aControlPos.AdjustX(aControlSize.Width() );
}
if(TOKEN_TEXT == rToken.eTokenType)
@@ -2958,7 +2958,7 @@ Control* SwTokenWindow::InsertItem(const OUString& rText, const SwFormToken&
}
pEdit->SetAccessibleName(strName);
Size aEditSize(aControlSize);
- aEditSize.Width() = pEdit->GetTextWidth(rText) + EDIT_MINWIDTH;
+ aEditSize.setWidth( pEdit->GetTextWidth(rText) + EDIT_MINWIDTH );
pEdit->SetSizePixel(aEditSize);
pEdit->SetModifyHdl(LINK(this, SwTokenWindow, EditResize ));
pEdit->SetPrevNextLink(LINK(this, SwTokenWindow, NextItemHdl));
@@ -2974,7 +2974,7 @@ Control* SwTokenWindow::InsertItem(const OUString& rText, const SwFormToken&
m_aControlList.emplace_back(pButton);
Size aEditSize(aControlSize);
- aEditSize.Width() = pButton->GetTextWidth(rText) + 5;
+ aEditSize.setWidth( pButton->GetTextWidth(rText) + 5 );
pButton->SetSizePixel(aEditSize);
pButton->SetPrevNextLink(LINK(this, SwTokenWindow, NextItemBtnHdl));
pButton->SetGetFocusHdl(LINK(this, SwTokenWindow, TbxFocusBtnHdl));
@@ -3198,7 +3198,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
}
Size aEditSize(GetOutputSizePixel());
- aEditSize.Width() = pButton->GetTextWidth(rText) + 5;
+ aEditSize.setWidth( pButton->GetTextWidth(rText) + 5 );
pButton->SetSizePixel(aEditSize);
pButton->Check();
pButton->Show();
@@ -3255,13 +3255,13 @@ void SwTokenWindow::AdjustPositions()
++it;
Point aNextPos = pCtrl->GetPosPixel();
- aNextPos.X() += pCtrl->GetSizePixel().Width();
+ aNextPos.AdjustX(pCtrl->GetSizePixel().Width() );
for(; it != m_aControlList.end(); ++it)
{
pCtrl = it->get();
pCtrl->SetPosPixel(aNextPos);
- aNextPos.X() += pCtrl->GetSizePixel().Width();
+ aNextPos.AdjustX(pCtrl->GetSizePixel().Width() );
}
AdjustScrolling();
@@ -3274,7 +3274,7 @@ void SwTokenWindow::MoveControls(long nOffset)
for (VclPtr<Control> const & pCtrl : m_aControlList)
{
Point aPos = pCtrl->GetPosPixel();
- aPos.X() += nOffset;
+ aPos.AdjustX(nOffset );
pCtrl->SetPosPixel(aPos);
}
@@ -3974,7 +3974,7 @@ Size SwEntryBrowseBox::GetOptimalSize() const
long nWidth(std::accumulate(aWidths.begin(), aWidths.end(), 0));
- aSize.Width() = std::max(aSize.Width(), nWidth);
+ aSize.setWidth( std::max(aSize.Width(), nWidth) );
return aSize;
}
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index d54e457f079b..4d9c5f0956fa 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -426,10 +426,10 @@ void SwGlossaryGroupTLB::RequestHelp( const HelpEvent& rHEvt )
{
aPos = GetEntryPosition( pEntry );
Size aSize(pItem->GetSize( this, pEntry ));
- aPos.X() = GetTabPos( pEntry, pTab );
+ aPos.setX( GetTabPos( pEntry, pTab ) );
if((aPos.X() + aSize.Width()) > GetSizePixel().Width())
- aSize.Width() = GetSizePixel().Width() - aPos.X();
+ aSize.setWidth( GetSizePixel().Width() - aPos.X() );
aPos = OutputToScreenPixel(aPos);
tools::Rectangle aItemRect( aPos, aSize );
GlosBibUserData* pData = static_cast<GlosBibUserData*>(pEntry->GetUserData());
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 0751cb648264..e69802781349 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -865,10 +865,10 @@ void SwGlTreeListBox::RequestHelp( const HelpEvent& rHEvt )
{
aPos = GetEntryPosition( pEntry );
Size aSize(pItem->GetSize( this, pEntry ));
- aPos.X() = GetTabPos( pEntry, pTab );
+ aPos.setX( GetTabPos( pEntry, pTab ) );
if((aPos.X() + aSize.Width()) > GetSizePixel().Width())
- aSize.Width() = GetSizePixel().Width() - aPos.X();
+ aSize.setWidth( GetSizePixel().Width() - aPos.X() );
aPos = OutputToScreenPixel(aPos);
tools::Rectangle aItemRect( aPos, aSize );
OUString sMsg;
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 158800e09b2d..afe7076fe9d0 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -892,9 +892,9 @@ static long lcl_DrawGraphic(vcl::RenderContext* pVDev, const SwNumFormat &rForma
if (pGraphic)
{
Size aGSize( rFormat.GetGraphicSize());
- aGSize.Width() /= nDivision;
+ aGSize.setWidth( aGSize.Width() / nDivision );
nRet = aGSize.Width();
- aGSize.Height() /= nDivision;
+ aGSize.setHeight( aGSize.Height() / nDivision );
pGraphic->Draw(pVDev, Point(nXStart, nYStart), pVDev->PixelToLogic(aGSize));
}
}
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 77aa10018c93..2ec697256232 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -322,13 +322,13 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
rBox.GetDistance(SvxBoxItemLine::RIGHT);
if(m_bVertical)
{
- m_aPageSize.Width() = nValue1;
- m_aPageSize.Height() = nValue2;
+ m_aPageSize.setWidth( nValue1 );
+ m_aPageSize.setHeight( nValue2 );
}
else
{
- m_aPageSize.Width() = nValue2;
- m_aPageSize.Height() = nValue1;
+ m_aPageSize.setWidth( nValue2 );
+ m_aPageSize.setHeight( nValue1 );
}
sal_Int32 nTextSize = static_cast< sal_Int32 >(m_bRubyUserValue ?
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index f2b27433bfda..75edc414fe14 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -758,24 +758,24 @@ MAKENUMSTR:
nRightX = cellRect.GetWidth() - aStrSize.Width() - FRAME_OFFSET;
// vertical (always centering):
- aPos.Y() += (nRowHeight - aStrSize.Height()) / 2;
+ aPos.AdjustY((nRowHeight - aStrSize.Height()) / 2 );
// horizontal
if (mbRTL)
- aPos.X() += nRightX;
+ aPos.AdjustX(nRightX );
else if (aCurData.IsJustify())
{
const SvxAdjustItem& rAdj = aCurData.GetBoxFormat(nFormatIndex).GetAdjust();
switch (rAdj.GetAdjust())
{
case SvxAdjust::Left:
- aPos.X() += FRAME_OFFSET;
+ aPos.AdjustX(FRAME_OFFSET );
break;
case SvxAdjust::Right:
- aPos.X() += nRightX;
+ aPos.AdjustX(nRightX );
break;
default:
- aPos.X() += (cellRect.GetWidth() - aStrSize.Width()) / 2;
+ aPos.AdjustX((cellRect.GetWidth() - aStrSize.Width()) / 2 );
break;
}
}
@@ -785,12 +785,12 @@ MAKENUMSTR:
if (nCol == 0 || nIndex == 4)
{
// Text-Label left or sum left aligned
- aPos.X() += FRAME_OFFSET;
+ aPos.AdjustX(FRAME_OFFSET );
}
else
{
// numbers/dates right aligned
- aPos.X() += nRightX;
+ aPos.AdjustX(nRightX );
}
}
@@ -871,8 +871,8 @@ void AutoFormatPreview::CalcCellArray( bool _bFitWidth )
maArray.SetYOffset( 2 );
maArray.SetAllRowHeights( nRowHeight );
- aPrvSize.Width() = maArray.GetWidth() + 4;
- aPrvSize.Height() = maArray.GetHeight() + 4;
+ aPrvSize.setWidth( maArray.GetWidth() + 4 );
+ aPrvSize.setHeight( maArray.GetHeight() + 4 );
}
inline void lclSetStyleFromBorder( svx::frame::Style& rStyle, const ::editeng::SvxBorderLine* pBorder )
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 53670177d97e..1cc101938fa9 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -857,7 +857,7 @@ void SwDocShell::SetVisArea( const tools::Rectangle &rRect )
if (m_pView)
{
Size aSz( m_pView->GetDocSz() );
- aSz.Width() += DOCUMENTBORDER; aSz.Height() += DOCUMENTBORDER;
+ aSz.AdjustWidth(DOCUMENTBORDER ); aSz.AdjustHeight(DOCUMENTBORDER );
long nMoveX = 0, nMoveY = 0;
if ( aRect.Right() > aSz.Width() )
nMoveX = aSz.Width() - aRect.Right();
diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx
index c47f88b6dfaf..d7ad06fe6a3d 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -446,8 +446,8 @@ void SwGridConfig::Load()
case 0: rParent.SetSnap(bSet); break;// "Option/SnapToGrid",
case 1: rParent.SetGridVisible(bSet); break;//"Option/VisibleGrid",
case 2: rParent.SetSynchronize(bSet); break;// "Option/Synchronize",
- case 3: aSnap.Width() = convertMm100ToTwip(nSet); break;// "Resolution/XAxis",
- case 4: aSnap.Height() = convertMm100ToTwip(nSet); break;// "Resolution/YAxis",
+ case 3: aSnap.setWidth( convertMm100ToTwip(nSet) ); break;// "Resolution/XAxis",
+ case 4: aSnap.setHeight( convertMm100ToTwip(nSet) ); break;// "Resolution/YAxis",
case 5: rParent.SetDivisionX(static_cast<short>(nSet)); break;// "Subdivision/XAxis",
case 6: rParent.SetDivisionY(static_cast<short>(nSet)); break;// "Subdivision/YAxis"
}
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index f4211f6a8f46..e544ff05b333 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -317,13 +317,13 @@ void SwAddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re
sal_uInt16 nStartRow = 0;
if(aVScrollBar->IsVisible())
{
- aSize.Width() -= aVScrollBar->GetSizePixel().Width();
+ aSize.AdjustWidth( -(aVScrollBar->GetSizePixel().Width()) );
nStartRow = static_cast<sal_uInt16>(aVScrollBar->GetThumbPos());
}
Size aPartSize(aSize.Width() / pImpl->nColumns,
aSize.Height() / pImpl->nRows);
- aPartSize.Width() -= 2;
- aPartSize.Height() -= 2;
+ aPartSize.AdjustWidth( -2 );
+ aPartSize.AdjustHeight( -2 );
sal_uInt16 nAddress = nStartRow * pImpl->nColumns;
const sal_uInt16 nNumAddresses = static_cast<sal_uInt16>(pImpl->aAddresses.size());
@@ -444,7 +444,7 @@ void SwAddressPreview::DrawText_Impl(vcl::RenderContext& rRenderContext, const O
do
{
rRenderContext.DrawText(aStart, rAddress.getToken(0, '\n', nPos));
- aStart.Y() += nHeight;
+ aStart.AdjustY(nHeight );
}
while (nPos >= 0);
}
diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
index af7af8aa60f4..b8da589d4ad2 100644
--- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
@@ -168,14 +168,14 @@ void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const tools
tools::Rectangle aSymbolRect(aRect);
// 25% distance to the left and right button border
const long nBorderDistanceLeftAndRight = ((aSymbolRect.GetWidth() * 250) + 500) / 1000;
- aSymbolRect.Left() += nBorderDistanceLeftAndRight;
- aSymbolRect.Right() -= nBorderDistanceLeftAndRight;
+ aSymbolRect.AdjustLeft(nBorderDistanceLeftAndRight );
+ aSymbolRect.AdjustRight( -nBorderDistanceLeftAndRight );
// 40% distance to the top button border
const long nBorderDistanceTop = ((aSymbolRect.GetHeight() * 400) + 500) / 1000;
- aSymbolRect.Top()+=nBorderDistanceTop;
+ aSymbolRect.AdjustTop(nBorderDistanceTop );
// 15% distance to the bottom button border
const long nBorderDistanceBottom = ((aSymbolRect.GetHeight() * 150) + 500) / 1000;
- aSymbolRect.Bottom() -= nBorderDistanceBottom;
+ aSymbolRect.AdjustBottom( -nBorderDistanceBottom );
DecorationView aDecoView(&rRenderContext);
aDecoView.DrawSymbol(aSymbolRect, SymbolType::SPIN_DOWN, (bHighContrast ? Color(COL_WHITE) : Color(COL_BLACK)));
}
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index e8540298706e..132387b9ff6b 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -134,7 +134,7 @@ void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, const Size&
{
//Take the control's height, but overwrite the scrollbar area if there was one
Size aSize(PixelToLogic(GetSizePixel()));
- aSize.Width() = rSz.Width();
+ aSize.setWidth( rSz.Width() );
if ( GetTextView() )
{
diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx
index a379a5f4e2e0..e45561269217 100644
--- a/sw/source/uibase/docvw/edtdd.cxx
+++ b/sw/source/uibase/docvw/edtdd.cxx
@@ -341,10 +341,10 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
Point aPoint;
tools::Rectangle aWin(aPoint,GetOutputSizePixel());
const int nMargin = 10;
- aWin.Left() += nMargin;
- aWin.Top() += nMargin;
- aWin.Right() -= nMargin;
- aWin.Bottom() -= nMargin;
+ aWin.AdjustLeft(nMargin );
+ aWin.AdjustTop(nMargin );
+ aWin.AdjustRight( -nMargin );
+ aWin.AdjustBottom( -nMargin );
if(!aWin.IsInside(aPixPt)) {
static sal_uInt64 last_tick = 0;
sal_uInt64 current_tick = tools::Time::GetSystemTicks();
@@ -356,10 +356,10 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
m_bOldIdleSet = true;
}
CleanupDropUserMarker();
- if(aPixPt.X() > aWin.Right()) aPixPt.X() += nMargin;
- if(aPixPt.X() < aWin.Left()) aPixPt.X() -= nMargin;
- if(aPixPt.Y() > aWin.Bottom()) aPixPt.Y() += nMargin;
- if(aPixPt.Y() < aWin.Top()) aPixPt.Y() -= nMargin;
+ if(aPixPt.X() > aWin.Right()) aPixPt.AdjustX(nMargin );
+ if(aPixPt.X() < aWin.Left()) aPixPt.AdjustX( -nMargin );
+ if(aPixPt.Y() > aWin.Bottom()) aPixPt.AdjustY(nMargin );
+ if(aPixPt.Y() < aWin.Top()) aPixPt.AdjustY( -nMargin );
Point aDocPt(PixelToLogic(aPixPt));
SwRect rect(aDocPt,Size(1,1));
rSh.MakeVisible(rect);
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 832a20bcc4c4..6168e4fde52f 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -1038,10 +1038,10 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb )
aSnap = rSh.GetViewOptions()->GetSnapSize();
short nDiv = rSh.GetViewOptions()->GetDivisionX();
if ( nDiv > 0 )
- aSnap.Width() = std::max( sal_uLong(1), static_cast<sal_uLong>(aSnap.Width()) / nDiv );
+ aSnap.setWidth( std::max( sal_uLong(1), static_cast<sal_uLong>(aSnap.Width()) / nDiv ) );
nDiv = rSh.GetViewOptions()->GetDivisionY();
if ( nDiv > 0 )
- aSnap.Height() = std::max( sal_uLong(1), static_cast<sal_uLong>(aSnap.Height()) / nDiv );
+ aSnap.setHeight( std::max( sal_uLong(1), static_cast<sal_uLong>(aSnap.Height()) / nDiv ) );
}
if(bHuge)
@@ -1239,10 +1239,10 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
Size aSnap( rSh.GetViewOptions()->GetSnapSize() );
short nDiv = rSh.GetViewOptions()->GetDivisionX();
if ( nDiv > 0 )
- aSnap.Width() = std::max( sal_uLong(1), static_cast<sal_uLong>(aSnap.Width()) / nDiv );
+ aSnap.setWidth( std::max( sal_uLong(1), static_cast<sal_uLong>(aSnap.Width()) / nDiv ) );
nDiv = rSh.GetViewOptions()->GetDivisionY();
if ( nDiv > 0 )
- aSnap.Height() = std::max( sal_uLong(1), static_cast<sal_uLong>(aSnap.Height()) / nDiv );
+ aSnap.setHeight( std::max( sal_uLong(1), static_cast<sal_uLong>(aSnap.Height()) / nDiv ) );
if(bOnePixel)
{
@@ -2958,8 +2958,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
m_bIsInMove = false;
m_aStartPos = rMEvt.GetPosPixel();
- m_aRszMvHdlPt.X() = 0;
- m_aRszMvHdlPt.Y() = 0;
+ m_aRszMvHdlPt.setX( 0 );
+ m_aRszMvHdlPt.setY( 0 );
SwTab nMouseTabCol = SwTab::COL_NONE;
const bool bTmp = !rSh.IsDrawCreate() && !m_pApplyTempl && !rSh.IsInSelect() &&
@@ -5667,8 +5667,8 @@ void SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
aEEPos -= rOutputArea.TopRight();
//invert the horizontal direction and exchange X and Y
long nTemp = -aEEPos.X();
- aEEPos.X() = aEEPos.Y();
- aEEPos.Y() = nTemp;
+ aEEPos.setX( aEEPos.Y() );
+ aEEPos.setY( nTemp );
}
else
aEEPos -= rOutputArea.TopLeft();
@@ -5950,7 +5950,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, sal_uInt16 nWrdLen )
{
Point aPt( rWin.OutputToScreenPixel( rWin.LogicToPixel(
rSh.GetCharRect().Pos() )));
- aPt.Y() -= 3;
+ aPt.AdjustY( -3 );
nTipId = Help::ShowPopover(&rWin, tools::Rectangle( aPt, Size( 1, 1 )),
m_aHelpStrings[ nCurArrPos ],
QuickHelpFlags::Left | QuickHelpFlags::Bottom);
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index e279bc2d2d98..35f73733bd3d 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -371,11 +371,11 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{
tools::Rectangle aRect( aFieldRect.SVRect() );
Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() )));
- aRect.Left() = aPt.X();
- aRect.Top() = aPt.Y();
+ aRect.SetLeft( aPt.X() );
+ aRect.SetTop( aPt.Y() );
aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() ));
- aRect.Right() = aPt.X();
- aRect.Bottom() = aPt.Y();
+ aRect.SetRight( aPt.X() );
+ aRect.SetBottom( aPt.Y() );
if( bBalloon )
Help::ShowBalloon( this, rEvt.GetMousePosPixel(), aRect, sText );
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 5f3e0de062dc..dd82b1b4124e 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -338,7 +338,7 @@ void SwSrcEditWindow::Resize()
if ( m_pTextView->GetStartDocPos().Y() > nMaxVisAreaStart )
{
Point aStartDocPos( m_pTextView->GetStartDocPos() );
- aStartDocPos.Y() = nMaxVisAreaStart;
+ aStartDocPos.setY( nMaxVisAreaStart );
m_pTextView->SetStartDocPos( aStartDocPos );
m_pTextView->ShowCursor();
}
@@ -348,13 +348,13 @@ void SwSrcEditWindow::Resize()
m_pHScrollbar->SetPosSizePixel( aScrollPos, aScrollSz);
- aScrollSz.Width() = aScrollSz.Height();
- aScrollSz.Height() = aOutSz.Height();
+ aScrollSz.setWidth( aScrollSz.Height() );
+ aScrollSz.setHeight( aOutSz.Height() );
aScrollPos = Point(aOutSz.Width() - nScrollStd, 0);
m_pVScrollbar->SetPosSizePixel( aScrollPos, aScrollSz);
- aOutSz.Width() -= nScrollStd;
- aOutSz.Height() -= nScrollStd;
+ aOutSz.AdjustWidth( -nScrollStd );
+ aOutSz.AdjustHeight( -nScrollStd );
m_pOutWin->SetOutputSizePixel(aOutSz);
InitScrollBars();
@@ -989,8 +989,8 @@ void SwSrcEditWindow::SetFont()
vcl::Font aFont(aFontMetric);
Size aSize(rFont.GetFontSize());
//font height is stored in point and set in twip
- aSize.Height() =
- officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() * 20;
+ aSize.setHeight(
+ officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() * 20 );
aFont.SetFontSize(m_pOutWin->LogicToPixel(aSize, MapMode(MapUnit::MapTwip)));
GetTextEngine()->SetFont( aFont );
m_pOutWin->SetFont(aFont);
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 3c5fa5f07478..11568bd934a9 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -215,10 +215,10 @@ void SwColExample::DrawPage(vcl::RenderContext& rRenderContext, const Point& rOr
rRenderContext.SetFillColor(Color(COL_LIGHTGRAY));
tools::Rectangle aRect;
- aRect.Right() = rOrg.X() + GetSize().Width() - nR;
- aRect.Left() = rOrg.X() + nL;
- aRect.Top() = rOrg.Y() + GetTop() + GetHdHeight() + GetHdDist();
- aRect.Bottom()= rOrg.Y() + GetSize().Height() - GetBottom() - GetFtHeight() - GetFtDist();
+ aRect.SetRight( rOrg.X() + GetSize().Width() - nR );
+ aRect.SetLeft( rOrg.X() + nL );
+ aRect.SetTop( rOrg.Y() + GetTop() + GetHdHeight() + GetHdDist() );
+ aRect.SetBottom( rOrg.Y() + GetSize().Height() - GetBottom() - GetFtHeight() - GetFtDist() );
rRenderContext.DrawRect(aRect);
const tools::Rectangle aDefineRect(aRect);
@@ -252,9 +252,9 @@ void SwColExample::DrawPage(vcl::RenderContext& rRenderContext, const Point& rOr
nAutoColWidth = pColMgr->GetColWidth(i);
if (!m_bVertical)
- aRect.Right() = aRect.Left() + nAutoColWidth;
+ aRect.SetRight( aRect.Left() + nAutoColWidth );
else
- aRect.Bottom() = aRect.Top() + nAutoColWidth;
+ aRect.SetBottom( aRect.Top() + nAutoColWidth );
// use primitive draw command
drawFillAttributes(rRenderContext, getPageFillAttributes(), aRect, aDefineRect);
@@ -262,9 +262,9 @@ void SwColExample::DrawPage(vcl::RenderContext& rRenderContext, const Point& rOr
if (i < nColumnCount - 1)
{
if (!m_bVertical)
- aRect.Left() = aRect.Right() + pColMgr->GetGutterWidth(i);
+ aRect.SetLeft( aRect.Right() + pColMgr->GetGutterWidth(i) );
else
- aRect.Top() = aRect.Bottom() + pColMgr->GetGutterWidth(i);
+ aRect.SetTop( aRect.Bottom() + pColMgr->GetGutterWidth(i) );
}
}
if (pColMgr->HasLine())
@@ -281,26 +281,26 @@ void SwColExample::DrawPage(vcl::RenderContext& rRenderContext, const Point& rOr
{
case COLADJ_BOTTOM:
if (!m_bVertical)
- aUp.Y() += nLength;
+ aUp.AdjustY(nLength );
else
- aUp.X() += nLength;
+ aUp.AdjustX(nLength );
break;
case COLADJ_TOP:
if (!m_bVertical)
- aDown.Y() -= nLength;
+ aDown.AdjustY( -nLength );
else
- aDown.X() -= nLength;
+ aDown.AdjustX( -nLength );
break;
case COLADJ_CENTER:
if (!m_bVertical)
{
- aUp.Y() += nLength / 2;
- aDown.Y() -= nLength / 2;
+ aUp.AdjustY(nLength / 2 );
+ aDown.AdjustY( -(nLength / 2) );
}
else
{
- aUp.X() += nLength / 2;
- aDown.X() -= nLength / 2;
+ aUp.AdjustX(nLength / 2 );
+ aDown.AdjustX( -(nLength / 2) );
}
break;
default:
@@ -315,13 +315,13 @@ void SwColExample::DrawPage(vcl::RenderContext& rRenderContext, const Point& rOr
nDist -= (i == 0) ? nGutter / 2 : 0;
if (!m_bVertical)
{
- aUp.X() += nDist;
- aDown.X() += nDist;
+ aUp.AdjustX(nDist );
+ aDown.AdjustX(nDist );
}
else
{
- aUp.Y() += nDist;
- aDown.Y() += nDist;
+ aUp.AdjustY(nDist );
+ aDown.AdjustY(nDist );
}
rRenderContext.DrawLine(aUp, aDown);
@@ -337,8 +337,8 @@ SwColumnOnlyExample::SwColumnOnlyExample(vcl::Window* pParent)
{
SetMapMode( MapMode( MapUnit::MapTwip ) );
m_aWinSize = GetOptimalSize();
- m_aWinSize.Height() -= 4;
- m_aWinSize.Width() -= 4;
+ m_aWinSize.AdjustHeight( -4 );
+ m_aWinSize.AdjustWidth( -4 );
m_aWinSize = PixelToLogic( m_aWinSize );
@@ -404,11 +404,11 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const tools:
nLength -= nLength * nPercent / 100;
switch(m_aCols.GetLineAdj())
{
- case COLADJ_BOTTOM: aUp.Y() += nLength; break;
- case COLADJ_TOP: aDown.Y() -= nLength; break;
+ case COLADJ_BOTTOM: aUp.AdjustY(nLength ); break;
+ case COLADJ_TOP: aDown.AdjustY( -nLength ); break;
case COLADJ_CENTER:
- aUp.Y() += nLength / 2;
- aDown.Y() -= nLength / 2;
+ aUp.AdjustY(nLength / 2 );
+ aDown.AdjustY( -(nLength / 2) );
break;
default:
break; //prevent warning
@@ -427,9 +427,9 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const tools:
for (sal_uInt16 i = 0; i < nColCount; i++)
{
const SwColumn* pCol = &rCols[i];
- aFrameRect.Left() = nSum + pCol->GetLeft(); //nSum + pCol->GetLeft() + aTL.X();
+ aFrameRect.SetLeft( nSum + pCol->GetLeft() ); //nSum + pCol->GetLeft() + aTL.X();
nSum += pCol->GetWishWidth();
- aFrameRect.Right() = nSum - pCol->GetRight();
+ aFrameRect.SetRight( nSum - pCol->GetRight() );
rRenderContext.DrawRect(aFrameRect);
}
if (bLines)
@@ -438,8 +438,8 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const tools:
for (sal_uInt16 i = 0; i < nColCount - 1; i++)
{
nSum += rCols[i].GetWishWidth();
- aUp.X() = nSum;
- aDown.X() = nSum;
+ aUp.setX( nSum );
+ aDown.setX( nSum );
rRenderContext.DrawLine(aUp, aDown);
}
}
@@ -533,10 +533,10 @@ void SwPageGridExample::DrawPage(vcl::RenderContext& rRenderContext, const Point
}
tools::Rectangle aRect;
- aRect.Right() = rOrg.X() + GetSize().Width() - nR;
- aRect.Left() = rOrg.X() + nL;
- aRect.Top() = rOrg.Y() + GetTop() + GetHdHeight() + GetHdDist();
- aRect.Bottom()= rOrg.Y() + GetSize().Height() - GetBottom() - GetFtHeight() - GetFtDist();
+ aRect.SetRight( rOrg.X() + GetSize().Width() - nR );
+ aRect.SetLeft( rOrg.X() + nL );
+ aRect.SetTop( rOrg.Y() + GetTop() + GetHdHeight() + GetHdDist() );
+ aRect.SetBottom( rOrg.Y() + GetSize().Height() - GetBottom() - GetFtHeight() - GetFtDist() );
//increase the values to get a 'viewable' preview
sal_Int32 nBaseHeight = pGridItem->GetBaseHeight() * 3;
@@ -595,9 +595,9 @@ void SwPageGridExample::DrawPage(vcl::RenderContext& rRenderContext, const Point
{
rRenderContext.DrawLine(aStart, aEnd);
if(m_bVertical)
- aStart.Y() = aEnd.Y() += nBaseHeight;
+ aStart.setY( aEnd.AdjustY(nBaseHeight ) );
else
- aStart.X() = aEnd.X() += nBaseHeight;
+ aStart.setX( aEnd.AdjustX(nBaseHeight ) );
}
}
aRubyRect.Move(nXMove, nYMove);
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index 2a7bce931465..1debb81ca787 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -271,12 +271,12 @@ void SwFlyFrameAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
{
Point aPos(aBoundRect.Pos());
long nTmp = aPos.X();
- aPos.X() = aPos.Y();
- aPos.Y() = nTmp;
+ aPos.setX( aPos.Y() );
+ aPos.setY( nTmp );
Size aSize(aBoundRect.SSize());
nTmp = aSize.Width();
- aSize.Width() = aSize.Height();
- aSize.Height() = nTmp;
+ aSize.setWidth( aSize.Height() );
+ aSize.setHeight( nTmp );
aBoundRect.Chg( aPos, aSize );
//exchange width/height to enable correct values
nTmp = rVal.nWidth;
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index 21f2470bc2f7..51d65e760f44 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -136,22 +136,22 @@ void SwCommentRuler::DrawCommentControl(vcl::RenderContext& rRenderContext)
Point aArrowPos;
bool bArrowToRight;
// TODO Discover why it should be 0 instead of CONTROL_BORDER_WIDTH + CONTROL_TOP_OFFSET
- aLabelPos.Y() = 0;
- aArrowPos.Y() = CONTROL_BORDER_WIDTH + CONTROL_TOP_OFFSET;
+ aLabelPos.setY( 0 );
+ aArrowPos.setY( CONTROL_BORDER_WIDTH + CONTROL_TOP_OFFSET );
if ( !AllSettings::GetLayoutRTL() )
{
// LTR
if ( bIsCollapsed )
{
// It should draw something like | > Comments |
- aLabelPos.X() = CONTROL_LEFT_OFFSET + CONTROL_TRIANGLE_WIDTH + CONTROL_TRIANGLE_PAD;
- aArrowPos.X() = CONTROL_LEFT_OFFSET;
+ aLabelPos.setX( CONTROL_LEFT_OFFSET + CONTROL_TRIANGLE_WIDTH + CONTROL_TRIANGLE_PAD );
+ aArrowPos.setX( CONTROL_LEFT_OFFSET );
}
else
{
// It should draw something like | Comments < |
- aLabelPos.X() = CONTROL_LEFT_OFFSET;
- aArrowPos.X() = aControlRect.GetSize().Width() - 1 - CONTROL_RIGHT_OFFSET - CONTROL_BORDER_WIDTH - CONTROL_TRIANGLE_WIDTH;
+ aLabelPos.setX( CONTROL_LEFT_OFFSET );
+ aArrowPos.setX( aControlRect.GetSize().Width() - 1 - CONTROL_RIGHT_OFFSET - CONTROL_BORDER_WIDTH - CONTROL_TRIANGLE_WIDTH );
}
bArrowToRight = bIsCollapsed;
}
@@ -162,14 +162,14 @@ void SwCommentRuler::DrawCommentControl(vcl::RenderContext& rRenderContext)
if ( bIsCollapsed )
{
// It should draw something like | Comments < |
- aArrowPos.X() = aControlRect.GetSize().Width() - 1 - CONTROL_RIGHT_OFFSET - CONTROL_BORDER_WIDTH - CONTROL_TRIANGLE_WIDTH;
- aLabelPos.X() = aArrowPos.X() - CONTROL_TRIANGLE_PAD - nLabelWidth;
+ aArrowPos.setX( aControlRect.GetSize().Width() - 1 - CONTROL_RIGHT_OFFSET - CONTROL_BORDER_WIDTH - CONTROL_TRIANGLE_WIDTH );
+ aLabelPos.setX( aArrowPos.X() - CONTROL_TRIANGLE_PAD - nLabelWidth );
}
else
{
// It should draw something like | > Comments |
- aLabelPos.X() = aControlRect.GetSize().Width() - 1 - CONTROL_RIGHT_OFFSET - CONTROL_BORDER_WIDTH - nLabelWidth;
- aArrowPos.X() = CONTROL_LEFT_OFFSET;
+ aLabelPos.setX( aControlRect.GetSize().Width() - 1 - CONTROL_RIGHT_OFFSET - CONTROL_BORDER_WIDTH - nLabelWidth );
+ aArrowPos.setX( CONTROL_LEFT_OFFSET );
}
bArrowToRight = !bIsCollapsed;
}
diff --git a/sw/source/uibase/ribbar/conform.cxx b/sw/source/uibase/ribbar/conform.cxx
index 0694358ce096..c7ecb91f0903 100644
--- a/sw/source/uibase/ribbar/conform.cxx
+++ b/sw/source/uibase/ribbar/conform.cxx
@@ -91,10 +91,10 @@ void ConstFormControl::CreateDefaultObject()
{
Point aStartPos(GetDefaultCenterPos());
Point aEndPos(aStartPos);
- aStartPos.X() -= 2 * MM50;
- aStartPos.Y() -= MM50;
- aEndPos.X() += 2 * MM50;
- aEndPos.Y() += MM50;
+ aStartPos.AdjustX( -(2 * MM50) );
+ aStartPos.AdjustY( -(MM50) );
+ aEndPos.AdjustX(2 * MM50 );
+ aEndPos.AdjustY(MM50 );
if(!m_pSh->HasDrawView())
m_pSh->MakeDrawView();
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index 7bfea2cb6b9d..bb5fd3b9a5e9 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -598,10 +598,10 @@ void SwDrawBase::CreateDefaultObject()
{
Point aStartPos = GetDefaultCenterPos();
Point aEndPos(aStartPos);
- aStartPos.X() -= 8 * MM50;
- aStartPos.Y() -= 4 * MM50;
- aEndPos.X() += 8 * MM50;
- aEndPos.Y() += 4 * MM50;
+ aStartPos.AdjustX( -(8 * MM50) );
+ aStartPos.AdjustY( -(4 * MM50) );
+ aEndPos.AdjustX(8 * MM50 );
+ aEndPos.AdjustY(4 * MM50 );
tools::Rectangle aRect(aStartPos, aEndPos);
m_pSh->CreateDefaultShape( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId);
}
@@ -612,9 +612,9 @@ Point SwDrawBase::GetDefaultCenterPos()
const SwRect& rVisArea = m_pSh->VisArea();
Point aStartPos = rVisArea.Center();
if(rVisArea.Width() > aDocSz.Width())
- aStartPos.X() = aDocSz.Width() / 2 + rVisArea.Left();
+ aStartPos.setX( aDocSz.Width() / 2 + rVisArea.Left() );
if(rVisArea.Height() > aDocSz.Height())
- aStartPos.Y() = aDocSz.Height() / 2 + rVisArea.Top();
+ aStartPos.setY( aDocSz.Height() / 2 + rVisArea.Top() );
return aStartPos;
}
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 4e45d29dfbd5..90673645e40a 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -113,19 +113,19 @@ SwInputWindow::SwInputWindow(vcl::Window* pParent, SfxDispatcher const * pDispat
tools::Rectangle aItemRect( GetItemRect(FN_FORMULA_CALC) );
long nMaxHeight = std::max(aEditSize.Height(), aItemRect.GetHeight());
if( nMaxHeight+2 > aSizeTbx.Height() )
- aSizeTbx.Height() = nMaxHeight+2;
+ aSizeTbx.setHeight( nMaxHeight+2 );
Size aSize = GetSizePixel();
- aSize.Height() = aSizeTbx.Height();
+ aSize.setHeight( aSizeTbx.Height() );
SetSizePixel( aSize );
// align edit and item vcentered
Size aPosSize = aPos->GetSizePixel();
- aPosSize.Height() = nMaxHeight;
- aEditSize.Height() = nMaxHeight;
+ aPosSize.setHeight( nMaxHeight );
+ aEditSize.setHeight( nMaxHeight );
Point aPosPos = aPos->GetPosPixel();
Point aEditPos = aEdit->GetPosPixel();
- aPosPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1;
- aEditPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1;
+ aPosPos.setY( (aSize.Height() - nMaxHeight)/2 + 1 );
+ aEditPos.setY( (aSize.Height() - nMaxHeight)/2 + 1 );
aPos->SetPosSizePixel( aPosPos, aPosSize );
aEdit->SetPosSizePixel( aEditPos, aEditSize );
}
@@ -179,7 +179,7 @@ void SwInputWindow::Resize()
long nLeft = aEdit->GetPosPixel().X();
Size aEditSize = aEdit->GetSizePixel();
- aEditSize.Width() = std::max( static_cast<long>(nWidth - nLeft - 5), long(0) );
+ aEditSize.setWidth( std::max( static_cast<long>(nWidth - nLeft - 5), long(0) ) );
aEdit->SetSizePixel( aEditSize );
aEdit->Invalidate();
}
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index a084667ce87e..0e5254e41049 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -801,12 +801,12 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValidation,
{
Point aPos(aBoundRect.Pos());
long nTmp = aPos.X();
- aPos.X() = aPos.Y();
- aPos.Y() = nTmp;
+ aPos.setX( aPos.Y() );
+ aPos.setY( nTmp );
Size aSize(aBoundRect.SSize());
nTmp = aSize.Width();
- aSize.Width() = aSize.Height();
- aSize.Height() = nTmp;
+ aSize.setWidth( aSize.Height() );
+ aSize.setHeight( nTmp );
aBoundRect.Chg( aPos, aSize );
//exchange width/height to enable correct values
nTmp = rValidation.nWidth;
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 0ed1ec139f27..3d2e439b1083 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -347,8 +347,8 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.Put( aSzItm );
Size aSz( aSizeCopy.GetWidthPercent(), aSizeCopy.GetHeightPercent() );
- if( SwFormatFrameSize::SYNCED == aSz.Width() ) aSz.Width() = 0;
- if( SwFormatFrameSize::SYNCED == aSz.Height() ) aSz.Height() = 0;
+ if( SwFormatFrameSize::SYNCED == aSz.Width() ) aSz.setWidth( 0 );
+ if( SwFormatFrameSize::SYNCED == aSz.Height() ) aSz.setHeight( 0 );
aSzItm.SetSize( aSz );
aSzItm.SetWhich( SID_ATTR_GRAF_FRMSIZE_PERCENT );
diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx
index 1f8f9928a021..0d842fe8f8fd 100644
--- a/sw/source/uibase/shells/grfshex.cxx
+++ b/sw/source/uibase/shells/grfshex.cxx
@@ -102,10 +102,10 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq )
Size aSize;
if( rVisArea.Width() > aDocSz.Width())
- aPos.X() = aDocSz.Width() / 2 + rVisArea.Left();
+ aPos.setX( aDocSz.Width() / 2 + rVisArea.Left() );
if(rVisArea.Height() > aDocSz.Height())
- aPos.Y() = aDocSz.Height() / 2 + rVisArea.Top();
+ aPos.setY( aDocSz.Height() / 2 + rVisArea.Top() );
if( aPrefSize.Width() && aPrefSize.Height() )
{
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 58fcb9b33d52..57c63ba22ad2 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -394,8 +394,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
Size aWinSize = rEdtWin.GetSizePixel();
Point aStartPos(aWinSize.Width()/2, aWinSize.Height() / 2);
aStartPos = rEdtWin.PixelToLogic(aStartPos);
- aStartPos.X() -= 8 * MM50;
- aStartPos.Y() -= 4 * MM50;
+ aStartPos.AdjustX( -(8 * MM50) );
+ aStartPos.AdjustY( -(4 * MM50) );
Size aSize(16 * MM50, 8 * MM50);
GetShell().LockPaint();
GetShell().StartAllAction();
@@ -434,7 +434,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if(pArgs)
{
Size aSize(aMgr.GetSize());
- aSize.Width() = GetShell().GetAnyCurRect(CurRectType::PagePrt).Width();
+ aSize.setWidth( GetShell().GetAnyCurRect(CurRectType::PagePrt).Width() );
Point aPos = aMgr.GetPos();
RndStdIds eAnchor = RndStdIds::FLY_AT_PARA;
if(pArgs->GetItemState(nSlot, false, &pItem) == SfxItemState::SET)
diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx
index 283449964c5f..fa0dbd934e2c 100644
--- a/sw/source/uibase/table/chartins.cxx
+++ b/sw/source/uibase/table/chartins.cxx
@@ -78,13 +78,13 @@ Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSiz
if ( aDesktop.Bottom() - aObjAbs.Bottom() >= rDialogSize.Height() + aSpace.Height() )
{
// first preference: below the chart
- aRet.Y() = aObjAbs.Bottom() + aSpace.Height();
+ aRet.setY( aObjAbs.Bottom() + aSpace.Height() );
bCenterHor = true;
}
else if ( aObjAbs.Top() - aDesktop.Top() >= rDialogSize.Height() + aSpace.Height() )
{
// second preference: above the chart
- aRet.Y() = aObjAbs.Top() - rDialogSize.Height() - aSpace.Height();
+ aRet.setY( aObjAbs.Top() - rDialogSize.Height() - aSpace.Height() );
bCenterHor = true;
}
else
@@ -97,32 +97,32 @@ Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSiz
// if both fit, prefer right in RTL mode, left otherwise
bool bPutRight = bFitRight && ( bLayoutRTL || !bFitLeft );
if ( bPutRight )
- aRet.X() = aObjAbs.Right() + aSpace.Width();
+ aRet.setX( aObjAbs.Right() + aSpace.Width() );
else
- aRet.X() = aObjAbs.Left() - rDialogSize.Width() - aSpace.Width();
+ aRet.setX( aObjAbs.Left() - rDialogSize.Width() - aSpace.Width() );
// center vertically
- aRet.Y() = aObjAbs.Top() + ( aObjAbs.GetHeight() - rDialogSize.Height() ) / 2;
+ aRet.setY( aObjAbs.Top() + ( aObjAbs.GetHeight() - rDialogSize.Height() ) / 2 );
}
else
{
// doesn't fit on any edge - put at the bottom of the screen
- aRet.Y() = aDesktop.Bottom() - rDialogSize.Height();
+ aRet.setY( aDesktop.Bottom() - rDialogSize.Height() );
bCenterHor = true;
}
}
if ( bCenterHor )
- aRet.X() = aObjAbs.Left() + ( aObjAbs.GetWidth() - rDialogSize.Width() ) / 2;
+ aRet.setX( aObjAbs.Left() + ( aObjAbs.GetWidth() - rDialogSize.Width() ) / 2 );
// limit to screen (centering might lead to invalid positions)
if ( aRet.X() + rDialogSize.Width() - 1 > aDesktop.Right() )
- aRet.X() = aDesktop.Right() - rDialogSize.Width() + 1;
+ aRet.setX( aDesktop.Right() - rDialogSize.Width() + 1 );
if ( aRet.X() < aDesktop.Left() )
- aRet.X() = aDesktop.Left();
+ aRet.setX( aDesktop.Left() );
if ( aRet.Y() + rDialogSize.Height() - 1 > aDesktop.Bottom() )
- aRet.Y() = aDesktop.Bottom() - rDialogSize.Height() + 1;
+ aRet.setY( aDesktop.Bottom() - rDialogSize.Height() + 1 );
if ( aRet.Y() < aDesktop.Top() )
- aRet.Y() = aDesktop.Top();
+ aRet.setY( aDesktop.Top() );
}
return aRet;
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 5d96f855411b..6d8c4e14c27e 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1375,17 +1375,17 @@ void SwPagePreview::SetVisArea( const tools::Rectangle &rRect )
if(aLR.Top() < 0)
{
- aLR.Bottom() += std::abs(aLR.Top());
- aLR.Top() = 0;
+ aLR.AdjustBottom(std::abs(aLR.Top()) );
+ aLR.SetTop( 0 );
}
if(aLR.Left() < 0)
{
- aLR.Right() += std::abs(aLR.Left());
- aLR.Left() = 0;
+ aLR.AdjustRight(std::abs(aLR.Left()) );
+ aLR.SetLeft( 0 );
}
- if(aLR.Right() < 0) aLR.Right() = 0;
- if(aLR.Bottom() < 0) aLR.Bottom() = 0;
+ if(aLR.Right() < 0) aLR.SetRight( 0 );
+ if(aLR.Bottom() < 0) aLR.SetBottom( 0 );
if(aLR == m_aVisArea ||
// Ignore empty rectangle
( 0 == aLR.Bottom() - aLR.Top() && 0 == aLR.Right() - aLR.Left() ) )
@@ -1429,12 +1429,12 @@ IMPL_LINK( SwPagePreview, ScrollHdl, ScrollBar *, p, void )
sStateStr += OUString::number( nThmbPos );
Point aPos = pScrollbar->GetParent()->OutputToScreenPixel(
pScrollbar->GetPosPixel());
- aPos.Y() = pScrollbar->OutputToScreenPixel(pScrollbar->GetPointerPosPixel()).Y();
+ aPos.setY( pScrollbar->OutputToScreenPixel(pScrollbar->GetPointerPosPixel()).Y() );
tools::Rectangle aRect;
- aRect.Left() = aPos.X() -8;
- aRect.Right() = aRect.Left();
- aRect.Top() = aPos.Y();
- aRect.Bottom() = aRect.Top();
+ aRect.SetLeft( aPos.X() -8 );
+ aRect.SetRight( aRect.Left() );
+ aRect.SetTop( aPos.Y() );
+ aRect.SetBottom( aRect.Top() );
Help::ShowQuickHelp(pScrollbar, aRect, sStateStr,
QuickHelpFlags::Right|QuickHelpFlags::VCenter);
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 746dd72fb49b..a3775558fed1 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -161,7 +161,7 @@ static void lcl_PrintHeader( vcl::RenderContext &rOutDev, sal_Int32 nPages, sal_
aPageStr += " ";
aPageStr += OUString::number( nCurPage );
aPageStr += "]";
- aPos.X() += rOutDev.GetTextWidth( rTitle );
+ aPos.AdjustX(rOutDev.GetTextWidth( rTitle ) );
rOutDev.DrawText( aPos, aPageStr );
}
@@ -696,8 +696,8 @@ sal_Int32 SwSrcView::PrintSource(
const long nParaSpace = 10;
Size aPaperSz = pOutDev->GetOutputSize();
- aPaperSz.Width() -= (LMARGPRN + RMARGPRN);
- aPaperSz.Height() -= (TMARGPRN + BMARGPRN);
+ aPaperSz.AdjustWidth( -(LMARGPRN + RMARGPRN) );
+ aPaperSz.AdjustHeight( -(TMARGPRN + BMARGPRN) );
// nLinepPage is not true, if lines have to be wrapped...
const long nLinespPage = nLineHeight ? aPaperSz.Height() / nLineHeight : 1;
@@ -720,7 +720,7 @@ sal_Int32 SwSrcView::PrintSource(
const sal_Int32 nLines = (nLineLen+nCharspLine-1) / nCharspLine;
for ( sal_Int32 nLine = 0; nLine < nLines; ++nLine )
{
- aPos.Y() += nLineHeight;
+ aPos.AdjustY(nLineHeight );
if ( aPos.Y() > ( aPaperSz.Height() + TMARGPRN - nLineHeight/2 ) )
{
++nCurPage;
@@ -735,7 +735,7 @@ sal_Int32 SwSrcView::PrintSource(
pOutDev->DrawText( aPos, aLine.copy(nStart, nLen) );
}
}
- aPos.Y() += nParaSpace;
+ aPos.AdjustY(nParaSpace );
}
pOutDev->Pop();
diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx
index 6d1f08d7e296..c533427b67ca 100644
--- a/sw/source/uibase/uiview/swcli.cxx
+++ b/sw/source/uibase/uiview/swcli.cxx
@@ -142,8 +142,8 @@ void SwOleClient::ViewChanged()
const MapMode aObjMap( VCLUnoHelper::UnoEmbed2VCLMapUnit( GetObject()->getMapUnit( GetAspect() ) ) );
aVisSize = OutputDevice::LogicToLogic( aVisSize, aObjMap, aMyMap );
- aVisSize.Width() = long(aVisSize.Width() * GetScaleWidth());
- aVisSize.Height() = long(aVisSize.Height() * GetScaleHeight());
+ aVisSize.setWidth( long(aVisSize.Width() * GetScaleWidth()) );
+ aVisSize.setHeight( long(aVisSize.Height() * GetScaleHeight()) );
SwRect aRect( Point( LONG_MIN, LONG_MIN ), aVisSize );
rSh.LockView( true ); // Prevent scrolling in the EndAction
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 494949dbe62a..2dec6c0c5054 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1441,13 +1441,13 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
const SwTwips lBorder = IsDocumentBorder() ? DOCUMENTBORDER : 2 * DOCUMENTBORDER;
SwTwips nEditWidth = GetEditWin().GetOutputSize().Width();
if(nEditWidth > (m_aDocSz.Width() + lBorder ))
- aTopLeft.X() = ( m_aDocSz.Width() + lBorder - nEditWidth ) / 2;
+ aTopLeft.setX( ( m_aDocSz.Width() + lBorder - nEditWidth ) / 2 );
else
{
//check if the values are possible
long nXMax = m_pHScrollbar->GetRangeMax() - m_pHScrollbar->GetVisibleSize();
if( aTopLeft.X() > nXMax )
- aTopLeft.X() = nXMax < 0 ? 0 : nXMax;
+ aTopLeft.setX( nXMax < 0 ? 0 : nXMax );
}
SetVisArea( aTopLeft );
}
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index bf28fa0059c6..62212cae6083 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1385,9 +1385,9 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
const SwRect aPageRect( m_pWrtShell->GetAnyCurRect( CurRectType::PageCalc ) );
const SwRect aRootRect( m_pWrtShell->GetAnyCurRect( CurRectType::PagesArea ) ); // width of columns
Size aPageSize( aPageRect.SSize() );
- aPageSize.Width() += pMgr->HasNotes() && pMgr->ShowNotes() ?
+ aPageSize.AdjustWidth(pMgr->HasNotes() && pMgr->ShowNotes() ?
pMgr->GetSidebarWidth() + pMgr->GetSidebarBorderWidth() :
- 0;
+ 0 );
Size aRootSize( aRootRect.SSize() );
@@ -1398,7 +1398,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
const long nOf = pVOpt->GetDocumentBorder() * 2;
long nTmpWidth = bAutomaticViewLayout ? aPageSize.Width() : aRootSize.Width();
nTmpWidth += nOf;
- aPageSize.Height() += nOf;
+ aPageSize.AdjustHeight(nOf );
long nFac = aWindowSize.Width() * 100 / nTmpWidth;
long nVisPercent = aWindowSize.Height() * 100 / aPageSize.Height();
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 4366440bf8d4..b80b3008be62 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -123,16 +123,16 @@ void SwView::ExecDraw(SfxRequest& rReq)
const SwRect& rVisArea = m_pWrtShell->VisArea();
Point aStartPos = rVisArea.Center();
if(rVisArea.Width() > aDocSize.Width())
- aStartPos.X() = aDocSize.Width() / 2 + rVisArea.Left();
+ aStartPos.setX( aDocSize.Width() / 2 + rVisArea.Left() );
if(rVisArea.Height() > aDocSize.Height())
- aStartPos.Y() = aDocSize.Height() / 2 + rVisArea.Top();
+ aStartPos.setY( aDocSize.Height() / 2 + rVisArea.Top() );
//determine the size of the object
if(pObj->IsGroupObject())
{
const tools::Rectangle& rBoundRect = static_cast<SdrObjGroup*>(pObj)->GetCurrentBoundRect();
- aStartPos.X() -= rBoundRect.GetWidth()/2;
- aStartPos.Y() -= rBoundRect.GetHeight()/2;
+ aStartPos.AdjustX( -(rBoundRect.GetWidth()/2) );
+ aStartPos.AdjustY( -(rBoundRect.GetHeight()/2) );
}
// TODO: unmark all other
@@ -168,10 +168,10 @@ void SwView::ExecDraw(SfxRequest& rReq)
Size aPrefSize( pObj->GetSnapRect().GetSize() );
if( rVisArea.Width() > aDocSize.Width())
- aPos.X() = aDocSize.Width() / 2 + rVisArea.Left();
+ aPos.setX( aDocSize.Width() / 2 + rVisArea.Left() );
if(rVisArea.Height() > aDocSize.Height())
- aPos.Y() = aDocSize.Height() / 2 + rVisArea.Top();
+ aPos.setY( aDocSize.Height() / 2 + rVisArea.Top() );
if( aPrefSize.Width() && aPrefSize.Height() )
{
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 2057a113ad0c..1bcd1e5c6872 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -864,8 +864,8 @@ SwFieldDialog::SwFieldDialog( SwEditWin* parent, IFieldmark *fieldBM ) :
}
Size lbSize(aListBox->GetOptimalSize());
- lbSize.Width()+=50;
- lbSize.Height()+=20;
+ lbSize.AdjustWidth(50 );
+ lbSize.AdjustHeight(20 );
aListBox->SetSizePixel(lbSize);
aListBox->SetSelectHdl( LINK( this, SwFieldDialog, MyListBoxHandler ) );
aListBox->Show();
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index bf66c9d424a5..64973b481103 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -97,7 +97,7 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
//mod #i6193# added sidebar width
SwPostItMgr* pPostItMgr = GetPostItMgr();
if (pPostItMgr->HasNotes() && pPostItMgr->ShowNotes())
- aPageSize.Width() += pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth();
+ aPageSize.AdjustWidth(pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() );
const MapMode aTmpMap( MapUnit::MapTwip );
const Size aWindowSize( GetEditWin().PixelToLogic( rEditSize, aTmpMap ) );
@@ -105,13 +105,13 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
if( UseOnPage::Mirror == rDesc.GetUseOn() ) // mirrored pages
{
const SvxLRSpaceItem &rLeftLRSpace = rDesc.GetLeft().GetLRSpace();
- aPageSize.Width() += std::abs( rLeftLRSpace.GetLeft() - rLRSpace.GetLeft() );
+ aPageSize.AdjustWidth(std::abs( rLeftLRSpace.GetLeft() - rLRSpace.GetLeft() ) );
}
if( SvxZoomType::OPTIMAL == eZoomType )
{
if (!pPostItMgr->HasNotes() || !pPostItMgr->ShowNotes())
- aPageSize.Width() -= ( rLRSpace.GetLeft() + rLRSpace.GetRight() + nLeftOfst * 2 );
+ aPageSize.AdjustWidth( -( rLRSpace.GetLeft() + rLRSpace.GetRight() + nLeftOfst * 2 ) );
lLeftMargin = rLRSpace.GetLeft() + DOCUMENTBORDER + nLeftOfst;
nFac = aWindowSize.Width() * 100 / aPageSize.Width();
}
@@ -120,7 +120,7 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
const long nOf = DOCUMENTBORDER * 2;
long nTmpWidth = bAutomaticViewLayout ? aPageSize.Width() : aRootSize.Width();
nTmpWidth += nOf;
- aPageSize.Height() += nOf;
+ aPageSize.AdjustHeight(nOf );
nFac = aWindowSize.Width() * 100 / nTmpWidth;
if ( SvxZoomType::WHOLEPAGE == eZoomType )
@@ -163,18 +163,18 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
Point aPos;
if ( eZoomType == SvxZoomType::WHOLEPAGE )
- aPos.Y() = m_pWrtShell->GetAnyCurRect(CurRectType::Page).Top() - DOCUMENTBORDER;
+ aPos.setY( m_pWrtShell->GetAnyCurRect(CurRectType::Page).Top() - DOCUMENTBORDER );
else
{
// Make sure that the cursor is in the visible range, so that
// the scrolling will be performed only once.
- aPos.X() = lLeftMargin;
+ aPos.setX( lLeftMargin );
const SwRect &rCharRect = m_pWrtShell->GetCharRect();
if ( rCharRect.Top() > GetVisArea().Bottom() ||
rCharRect.Bottom() < aPos.Y() )
- aPos.Y() = rCharRect.Top() - rCharRect.Height();
+ aPos.setY( rCharRect.Top() - rCharRect.Height() );
else
- aPos.Y() = GetVisArea().Top();
+ aPos.setY( GetVisArea().Top() );
}
SetVisArea( aPos );
}
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index d2419aa4b2ee..c1ce4ffe4d1a 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -177,8 +177,8 @@ m_aDocSz = rSz;
if ( aNewVisArea.Right() >= lTmp )
{
lTmp = aNewVisArea.Right() - lTmp;
- aNewVisArea.Right() -= lTmp;
- aNewVisArea.Left() -= lTmp;
+ aNewVisArea.AdjustRight( -lTmp );
+ aNewVisArea.AdjustLeft( -lTmp );
bModified = true;
}
@@ -186,8 +186,8 @@ m_aDocSz = rSz;
if ( aNewVisArea.Bottom() >= lTmp )
{
lTmp = aNewVisArea.Bottom() - lTmp;
- aNewVisArea.Bottom() -= lTmp;
- aNewVisArea.Top() -= lTmp;
+ aNewVisArea.AdjustBottom( -lTmp );
+ aNewVisArea.AdjustTop( -lTmp );
bModified = true;
}
@@ -218,18 +218,18 @@ void SwView::SetVisArea( const tools::Rectangle &rRect, bool bUpdateScrollbar )
tools::Rectangle aLR = rRect;
if( aLR.Top() < lMin )
{
- aLR.Bottom() += lMin - aLR.Top();
- aLR.Top() = lMin;
+ aLR.AdjustBottom(lMin - aLR.Top() );
+ aLR.SetTop( lMin );
}
if( aLR.Left() < lMin )
{
- aLR.Right() += lMin - aLR.Left();
- aLR.Left() = lMin;
+ aLR.AdjustRight(lMin - aLR.Left() );
+ aLR.SetLeft( lMin );
}
if( aLR.Right() < 0 )
- aLR.Right() = 0;
+ aLR.SetRight( 0 );
if( aLR.Bottom() < 0 )
- aLR.Bottom() = 0;
+ aLR.SetBottom( 0 );
if( aLR == m_aVisArea )
return;
@@ -303,8 +303,8 @@ void SwView::SetVisArea( const Point &rPt, bool bUpdateScrollbar )
aPt = GetEditWin().LogicToPixel( aPt );
#if HAVE_FEATURE_DESKTOP
const long nTmp = GetWrtShell().IsFrameView() ? 4 : 8;
- aPt.X() -= aPt.X() % nTmp;
- aPt.Y() -= aPt.Y() % nTmp;
+ aPt.AdjustX( -(aPt.X() % nTmp) );
+ aPt.AdjustY( -(aPt.Y() % nTmp) );
#endif
aPt = GetEditWin().PixelToLogic( aPt );
@@ -356,35 +356,35 @@ void SwView::CalcPt( Point *pPt, const tools::Rectangle &rRect,
nYScroll = std::min(nYScroll, nCurHeight - nDesHeight); // If it is scarce, then scroll not too much.
if(nDesHeight > nCurHeight) // the height is not sufficient, then nYScroll is no longer of interest
{
- pPt->Y() = rRect.Top();
- pPt->Y() = std::max( lMin, pPt->Y() );
+ pPt->setY( rRect.Top() );
+ pPt->setY( std::max( lMin, pPt->Y() ) );
}
else if ( rRect.Top() < m_aVisArea.Top() ) // Upward shift
{
- pPt->Y() = rRect.Top() - (nRangeY != USHRT_MAX ? nRangeY : nYScroll);
- pPt->Y() = std::max( lMin, pPt->Y() );
+ pPt->setY( rRect.Top() - (nRangeY != USHRT_MAX ? nRangeY : nYScroll) );
+ pPt->setY( std::max( lMin, pPt->Y() ) );
}
else if( rRect.Bottom() > m_aVisArea.Bottom() ) // Downward shift
{
- pPt->Y() = rRect.Bottom() -
+ pPt->setY( rRect.Bottom() -
(m_aVisArea.GetHeight()) + ( nRangeY != USHRT_MAX ?
- nRangeY : nYScroll );
- pPt->Y() = SetVScrollMax( pPt->Y() );
+ nRangeY : nYScroll ) );
+ pPt->setY( SetVScrollMax( pPt->Y() ) );
}
long nXScroll = GetXScroll();
if ( rRect.Right() > m_aVisArea.Right() ) // Shift right
{
- pPt->X() = rRect.Right() -
+ pPt->setX( rRect.Right() -
(m_aVisArea.GetWidth()) +
- (nRangeX != USHRT_MAX ? nRangeX : nXScroll);
- pPt->X() = SetHScrollMax( pPt->X() );
+ (nRangeX != USHRT_MAX ? nRangeX : nXScroll) );
+ pPt->setX( SetHScrollMax( pPt->X() ) );
}
else if ( rRect.Left() < m_aVisArea.Left() ) // Shift left
{
- pPt->X() = rRect.Left() - (nRangeX != USHRT_MAX ? nRangeX : nXScroll);
- pPt->X() = std::max( ::GetLeftMargin( *this ) + nLeftOfst, pPt->X() );
- pPt->X() = std::min( rRect.Left() - nScrollX, pPt->X() );
- pPt->X() = std::max( 0L, pPt->X() );
+ pPt->setX( rRect.Left() - (nRangeX != USHRT_MAX ? nRangeX : nXScroll) );
+ pPt->setX( std::max( ::GetLeftMargin( *this ) + nLeftOfst, pPt->X() ) );
+ pPt->setX( std::min( rRect.Left() - nScrollX, pPt->X() ) );
+ pPt->setX( std::max( 0L, pPt->X() ) );
}
}
@@ -429,13 +429,13 @@ void SwView::Scroll( const tools::Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt
if ( nBottomDiff > 0 ) // Is there room below at all?
{ // then we move the upper edge and we remember this
nDiffY = aDlgRect.Bottom() - m_aVisArea.Top();
- m_aVisArea.Top() += nDiffY;
+ m_aVisArea.AdjustTop(nDiffY );
}
}
else
{
if ( nTopDiff > 0 ) // Is there room below at all?
- m_aVisArea.Bottom() = aDlgRect.Top(); // Modify the lower edge
+ m_aVisArea.SetBottom( aDlgRect.Top() ); // Modify the lower edge
}
}
}
@@ -455,8 +455,8 @@ void SwView::Scroll( const tools::Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt
aSize.Height()+ GetYScroll() > aVisSize.Height() ))
{
Point aPt( m_aVisArea.TopLeft() );
- aSize.Width() = std::min( aSize.Width(), aVisSize.Width() );
- aSize.Height()= std::min( aSize.Height(),aVisSize.Height());
+ aSize.setWidth( std::min( aSize.Width(), aVisSize.Width() ) );
+ aSize.setHeight( std::min( aSize.Height(),aVisSize.Height()) );
CalcPt( &aPt, tools::Rectangle( rRect.TopLeft(), aSize ),
static_cast< sal_uInt16 >((aVisSize.Width() - aSize.Width()) / 2),
@@ -465,11 +465,11 @@ void SwView::Scroll( const tools::Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt
if( m_bTopCursor )
{
const long nBorder = IsDocumentBorder() ? DOCUMENTBORDER : 0;
- aPt.Y() = std::min( std::max( nBorder, rRect.Top() ),
+ aPt.setY( std::min( std::max( nBorder, rRect.Top() ),
m_aDocSz.Height() + nBorder -
- m_aVisArea.GetHeight() );
+ m_aVisArea.GetHeight() ) );
}
- aPt.Y() -= nDiffY;
+ aPt.AdjustY( -nDiffY );
m_aVisArea = aOldVisArea;
SetVisArea( aPt );
return;
@@ -482,12 +482,12 @@ void SwView::Scroll( const tools::Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt
if( m_bTopCursor )
{
const long nBorder = IsDocumentBorder() ? DOCUMENTBORDER : 0;
- aPt.Y() = std::min( std::max( nBorder, rRect.Top() ),
+ aPt.setY( std::min( std::max( nBorder, rRect.Top() ),
m_aDocSz.Height() + nBorder -
- m_aVisArea.GetHeight() );
+ m_aVisArea.GetHeight() ) );
}
- aPt.Y() -= nDiffY;
+ aPt.AdjustY( -nDiffY );
m_aVisArea = aOldVisArea;
SetVisArea( aPt );
return;
@@ -496,22 +496,22 @@ void SwView::Scroll( const tools::Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt
//Center cursor
Point aPnt( m_aVisArea.TopLeft() );
// ... in Y-direction in any case
- aPnt.Y() += ( rRect.Top() + rRect.Bottom()
- - m_aVisArea.Top() - m_aVisArea.Bottom() ) / 2 - nDiffY;
+ aPnt.AdjustY(( rRect.Top() + rRect.Bottom()
+ - m_aVisArea.Top() - m_aVisArea.Bottom() ) / 2 - nDiffY );
// ... in X-direction, only if the rectangle protrudes over the right or left of the VisArea.
if ( rRect.Right() > m_aVisArea.Right() || rRect.Left() < m_aVisArea.Left() )
{
- aPnt.X() += ( rRect.Left() + rRect.Right()
- - m_aVisArea.Left() - m_aVisArea.Right() ) / 2;
- aPnt.X() = SetHScrollMax( aPnt.X() );
+ aPnt.AdjustX(( rRect.Left() + rRect.Right()
+ - m_aVisArea.Left() - m_aVisArea.Right() ) / 2 );
+ aPnt.setX( SetHScrollMax( aPnt.X() ) );
const SwTwips lMin = IsDocumentBorder() ? DOCUMENTBORDER : 0;
- aPnt.X() = std::max( (GetLeftMargin( *this ) - lMin) + nLeftOfst, aPnt.X() );
+ aPnt.setX( std::max( (GetLeftMargin( *this ) - lMin) + nLeftOfst, aPnt.X() ) );
}
m_aVisArea = aOldVisArea;
if( pCareWn )
{ // If we want to avoid only a dialogue, we do
// not want to go beyond the end of the document.
- aPnt.Y() = SetVScrollMax( aPnt.Y() );
+ aPnt.setY( SetVScrollMax( aPnt.Y() ) );
}
SetVisArea( aPnt );
}
@@ -572,8 +572,8 @@ long SwView::PageUp()
return 0;
Point aPos(m_aVisArea.TopLeft());
- aPos.Y() -= m_aVisArea.GetHeight() - (GetYScroll() / 2);
- aPos.Y() = std::max(0L, aPos.Y());
+ aPos.AdjustY( -(m_aVisArea.GetHeight() - (GetYScroll() / 2)) );
+ aPos.setY( std::max(0L, aPos.Y()) );
SetVisArea( aPos );
return 1;
}
@@ -583,8 +583,8 @@ long SwView::PageDown()
if ( !m_aVisArea.GetHeight() )
return 0;
Point aPos( m_aVisArea.TopLeft() );
- aPos.Y() += m_aVisArea.GetHeight() - (GetYScroll() / 2);
- aPos.Y() = SetVScrollMax( aPos.Y() );
+ aPos.AdjustY(m_aVisArea.GetHeight() - (GetYScroll() / 2) );
+ aPos.setY( SetVScrollMax( aPos.Y() ) );
SetVisArea( aPos );
return 1;
}
@@ -602,7 +602,7 @@ long SwView::PhyPageUp()
// If there is a difference, has been truncated --> then add one pixel,
// so that no residue of the previous page is visible.
if( aPt.Y() != aAlPt.Y() )
- aAlPt.Y() += 3 * GetEditWin().PixelToLogic( Size( 0, 1 ) ).Height();
+ aAlPt.AdjustY(3 * GetEditWin().PixelToLogic( Size( 0, 1 ) ).Height() );
SetVisArea( aAlPt );
}
return 1;
@@ -621,7 +621,7 @@ long SwView::PhyPageDown()
// If there is a difference, has been truncated --> then add one pixel,
// so that no residue of the previous page is visible.
if( aPt.Y() != aAlPt.Y() )
- aAlPt.Y() += 3 * GetEditWin().PixelToLogic( Size( 0, 1 ) ).Height();
+ aAlPt.AdjustY(3 * GetEditWin().PixelToLogic( Size( 0, 1 ) ).Height() );
SetVisArea( aAlPt );
}
return 1;
@@ -708,12 +708,12 @@ IMPL_LINK( SwView, ScrollHdl, ScrollBar *, p, void )
if( m_pWrtShell->GetPageCnt() > 1 )
{
tools::Rectangle aRect;
- aRect.Left() = pScrollbar->GetParent()->OutputToScreenPixel(
- pScrollbar->GetPosPixel() ).X() -8;
- aRect.Top() = pScrollbar->OutputToScreenPixel(
- pScrollbar->GetPointerPosPixel() ).Y();
- aRect.Right() = aRect.Left();
- aRect.Bottom() = aRect.Top();
+ aRect.SetLeft( pScrollbar->GetParent()->OutputToScreenPixel(
+ pScrollbar->GetPosPixel() ).X() -8 );
+ aRect.SetTop( pScrollbar->OutputToScreenPixel(
+ pScrollbar->GetPointerPosPixel() ).Y() );
+ aRect.SetRight( aRect.Left() );
+ aRect.SetBottom( aRect.Top() );
OUString sPageStr( GetPageStr( nPhNum, nVirtNum, sDisplay ));
SwContentAtPos aCnt( IsAttrAtPos::Outline );
@@ -773,10 +773,10 @@ void SwView::CalcVisArea( const Size &rOutPixel )
aTopLeft = GetEditWin().PixelToLogic( aTopLeft );
Point aBottomRight( GetEditWin().PixelToLogic( aRect.BottomRight() ) );
- aRect.Left() = aTopLeft.X();
- aRect.Top() = aTopLeft.Y();
- aRect.Right() = aBottomRight.X();
- aRect.Bottom() = aBottomRight.Y();
+ aRect.SetLeft( aTopLeft.X() );
+ aRect.SetTop( aTopLeft.Y() );
+ aRect.SetRight( aBottomRight.X() );
+ aRect.SetBottom( aBottomRight.Y() );
// The shifts to the right and/or below can now be incorrect
// (e.g. change zoom level, change view size).
@@ -787,8 +787,8 @@ void SwView::CalcVisArea( const Size &rOutPixel )
if ( aRect.Right() > lWidth )
{
long lDelta = aRect.Right() - lWidth;
- aRect.Left() -= lDelta;
- aRect.Right() -= lDelta;
+ aRect.AdjustLeft( -lDelta );
+ aRect.AdjustRight( -lDelta );
}
}
if ( aRect.Top() )
@@ -797,8 +797,8 @@ void SwView::CalcVisArea( const Size &rOutPixel )
if ( aRect.Bottom() > lHeight )
{
long lDelta = aRect.Bottom() - lHeight;
- aRect.Top() -= lDelta;
- aRect.Bottom() -= lDelta;
+ aRect.AdjustTop( -lDelta );
+ aRect.AdjustBottom( -lDelta );
}
}
SetVisArea( aRect );
@@ -869,12 +869,12 @@ void ViewResizePixel( const vcl::RenderContext &rRef,
Point aPos( rOfst.X(), rOfst.Y()+nHLinSzHeight );
if(bVRulerRight)
{
- aPos.X() += rSize.Width() - nVLinSzWidth;
+ aPos.AdjustX(rSize.Width() - nVLinSzWidth );
nStyle |= WB_RIGHT_ALIGNED;
}
Size aSize( nVLinSzWidth, rEditSz.Height() );
if(!aSize.Width())
- aSize.Width() = pVRuler->GetSizePixel().Width();
+ aSize.setWidth( pVRuler->GetSizePixel().Width() );
pVRuler->SetStyle(nStyle);
pVRuler->SetPosSizePixel( aPos, aSize );
if(!pVRuler->IsVisible())
@@ -885,9 +885,9 @@ void ViewResizePixel( const vcl::RenderContext &rRef,
{
Size aSize( rSize.Width(), nHLinSzHeight );
if ( nVBSzWidth && !bVRulerRight)
- aSize.Width() -= nVBSzWidth;
+ aSize.AdjustWidth( -nVBSzWidth );
if(!aSize.Height())
- aSize.Height() = pHRuler->GetSizePixel().Height();
+ aSize.setHeight( pHRuler->GetSizePixel().Height() );
pHRuler->SetPosSizePixel( rOfst, aSize );
// VCL calls no resize on invisible windows
// but that is not a good idea for the ruler
@@ -902,14 +902,14 @@ void ViewResizePixel( const vcl::RenderContext &rRef,
rOfst.Y()+rSize.Height()-nHBSzHeight );
if(bVRulerRight)
{
- aPos.X() += nVBSzWidth;
+ aPos.AdjustX(nVBSzWidth );
}
Size aSize( rSize.Width(), nHBSzHeight );
if ( nVBSzWidth )
- aSize.Width() -= nVBSzWidth;
+ aSize.AdjustWidth( -nVBSzWidth );
rHScrollbar.SetPosSizePixel( aPos, aSize );
- aScrollFillPos.Y() = aPos.Y();
+ aScrollFillPos.setY( aPos.Y() );
}
{
Point aPos( rOfst.X()+rSize.Width()-nVBSzWidth,
@@ -917,21 +917,21 @@ void ViewResizePixel( const vcl::RenderContext &rRef,
Size aSize( nVBSzWidth, rSize.Height() );
if(bVRulerRight)
{
- aPos.X() = rOfst.X();
+ aPos.setX( rOfst.X() );
if(bHRuler)
{
- aPos.Y() += nHLinSzHeight;
- aSize.Height() -= nHLinSzHeight;
+ aPos.AdjustY(nHLinSzHeight );
+ aSize.AdjustHeight( -nHLinSzHeight );
}
}
if ( nHBSzHeight )
- aSize.Height() -= nHBSzHeight;
+ aSize.AdjustHeight( -nHBSzHeight );
rVScrollbar.SetPosSizePixel( aPos, aSize );
- aPos.Y() += aSize.Height();
+ aPos.AdjustY(aSize.Height() );
- aScrollFillPos.X() = aPos.X();
+ aScrollFillPos.setX( aPos.X() );
}
rScrollBarBox.SetPosSizePixel(aScrollFillPos, Size(nVBSzWidth, nHBSzHeight));
@@ -951,8 +951,8 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize, bool )
{
SvBorder aBorder( GetBorderPixel() );
Size aSize( rSize );
- aSize.Width() -= (aBorder.Left() + aBorder.Right());
- aSize.Height() -= (aBorder.Top() + aBorder.Bottom());
+ aSize.AdjustWidth( -(aBorder.Left() + aBorder.Right()) );
+ aSize.AdjustHeight( -(aBorder.Top() + aBorder.Bottom()) );
Size aObjSizePixel = GetWindow()->LogicToPixel(aObjSize, MapMode(MapUnit::MapTwip));
SfxViewShell::SetZoomFactor( Fraction( aSize.Width(), aObjSizePixel.Width() ),
Fraction( aSize.Height(), aObjSizePixel.Height() ) );
@@ -971,16 +971,16 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize, bool )
{
Size aViewSize( aSz );
Point aViewPos( rOfst );
- aViewSize.Height() -= (aBorder.Top() + aBorder.Bottom());
- aViewSize.Width() -= (aBorder.Left() + aBorder.Right());
- aViewPos.X() += aBorder.Left();
- aViewPos.Y() += aBorder.Top();
+ aViewSize.AdjustHeight( -(aBorder.Top() + aBorder.Bottom()) );
+ aViewSize.AdjustWidth( -(aBorder.Left() + aBorder.Right()) );
+ aViewPos.AdjustX(aBorder.Left() );
+ aViewPos.AdjustY(aBorder.Top() );
GetEditWin().SetPosSizePixel( aViewPos, aViewSize );
}
else
{
- aSz.Height() += aBorder.Top() + aBorder.Bottom();
- aSz.Width() += aBorder.Left() + aBorder.Right();
+ aSz.AdjustHeight(aBorder.Top() + aBorder.Bottom() );
+ aSz.AdjustWidth(aBorder.Left() + aBorder.Right() );
}
Size aEditSz( GetEditWin().GetOutputSizePixel() );
@@ -1169,7 +1169,7 @@ bool SwView::UpdateScrollbars()
Size aTmpSz( m_aDocSz );
const long lOfst = bBorder ? 0 : DOCUMENTBORDER * 2;
- aTmpSz.Width() += lOfst; aTmpSz.Height() += lOfst;
+ aTmpSz.AdjustWidth(lOfst ); aTmpSz.AdjustHeight(lOfst );
{
const bool bVScrollVisible = m_pVScrollbar->IsVisible(true);
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 145a17cb8088..4fad05c26eda 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1787,7 +1787,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if(bVerticalWriting)
{
aRect.Pos() += Point(aTmpRect.Left(), aTmpRect.Top());
- aRect.Pos().Y() -= rPageRect.Top();
+ aRect.Pos().AdjustY( -(rPageRect.Top()) );
aColItem.SetLeft(aRect.Top());
aColItem.SetRight(nPageHeight - aRect.Bottom());
}
@@ -2014,18 +2014,18 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const sal_uInt16 nL = std::max< sal_uInt16 >(nLft, 0);
const sal_uInt16 nR = std::max< sal_uInt16 >(nRgt, 0);
- aRectangle.Left() = nL;
+ aRectangle.SetLeft( nL );
if(nNum > 1)
- aRectangle.Left() += aTabCols[nNum - 2];
+ aRectangle.AdjustLeft(aTabCols[nNum - 2] );
if(nNum)
- aRectangle.Left() += MINLAY;
+ aRectangle.AdjustLeft(MINLAY );
if(aTabCols.Count() <= nNum + 1 )
- aRectangle.Right() = nR;
+ aRectangle.SetRight( nR );
else
- aRectangle.Right() = nPageWidth - (nL + aTabCols[nNum + 1]);
+ aRectangle.SetRight( nPageWidth - (nL + aTabCols[nNum + 1]) );
if(nNum < aTabCols.Count())
- aRectangle.Right() += MINLAY;
+ aRectangle.AdjustRight(MINLAY );
}
else
{
@@ -2048,42 +2048,42 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const sal_uInt16 nOuterWidth = static_cast<sal_uInt16>(aAbsRect.Width());
int nWidth = 0,
nEnd = 0;
- aRectangle.Left() = 0;
+ aRectangle.SetLeft( 0 );
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
const SwColumn* pCol = &rCols[i];
const int nStart = pCol->GetLeft() + nWidth;
if(i == nNum - 2)
- aRectangle.Left() = nStart;
+ aRectangle.SetLeft( nStart );
nWidth += pCols->CalcColWidth( i, nTotalWidth );
nEnd = nWidth - pCol->GetRight();
}
- aRectangle.Right() = rPageRect.Right() - nEnd;
- aRectangle.Left() -= rPageRect.Left();
+ aRectangle.SetRight( rPageRect.Right() - nEnd );
+ aRectangle.AdjustLeft( -(rPageRect.Left()) );
if(nNum > 1)
{
- aRectangle.Left() += MINLAY;
- aRectangle.Left() += aRect.Left();
+ aRectangle.AdjustLeft(MINLAY );
+ aRectangle.AdjustLeft(aRect.Left() );
}
if(pFormat) // Range in frame - here you may up to the edge
aRectangle.Left() = aRectangle.Right() = 0;
else
{
// Move the rectangle to the correct absolute position.
- aRectangle.Left() += aAbsRect.Left();
- aRectangle.Right() -= aAbsRect.Left();
+ aRectangle.AdjustLeft(aAbsRect.Left() );
+ aRectangle.AdjustRight( -(aAbsRect.Left()) );
// Include distance to the border.
- aRectangle.Right() -= (nOuterWidth - nTotalWidth) / 2;
+ aRectangle.AdjustRight( -((nOuterWidth - nTotalWidth) / 2) );
}
if(nNum < rCols.size())
{
- aRectangle.Right() += MINLAY;
+ aRectangle.AdjustRight(MINLAY );
}
else
// Right is only the margin now.
- aRectangle.Right() = 0;
+ aRectangle.SetRight( 0 );
}
}
@@ -2105,18 +2105,18 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aRect.Pos() += rSh.GetAnyCurRect( CurRectType::FlyEmbedded,
pPt ).Pos();
- aRectangle.Left() = aRect.Left() - rPageRect.Left();
- aRectangle.Right() = rPageRect.Right() - aRect.Right();
+ aRectangle.SetLeft( aRect.Left() - rPageRect.Left() );
+ aRectangle.SetRight( rPageRect.Right() - aRect.Right() );
}
else if( bBrowse )
{
- aRectangle.Left() = rPagePrtRect.Left();
- aRectangle.Right() = nPageWidth - rPagePrtRect.Right();
+ aRectangle.SetLeft( rPagePrtRect.Left() );
+ aRectangle.SetRight( nPageWidth - rPagePrtRect.Right() );
}
else
{
- aRectangle.Left() = aPageLRSpace.GetLeft();
- aRectangle.Right() = aPageLRSpace.GetRight();
+ aRectangle.SetLeft( aPageLRSpace.GetLeft() );
+ aRectangle.SetRight( aPageLRSpace.GetRight() );
}
}
else
@@ -2183,31 +2183,31 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
if( bFrame || bColSct )
{
- aRectangle.Left() = aRect.Left() - rPageRect.Left() + nStart;
- aRectangle.Right() = nPageWidth - aRectangle.Left() - nEnd + nStart;
+ aRectangle.SetLeft( aRect.Left() - rPageRect.Left() + nStart );
+ aRectangle.SetRight( nPageWidth - aRectangle.Left() - nEnd + nStart );
}
else if(!bBrowse)
{
- aRectangle.Left() = aPageLRSpace.GetLeft() + nStart;
- aRectangle.Right() = nPageWidth - nEnd - aPageLRSpace.GetLeft();
+ aRectangle.SetLeft( aPageLRSpace.GetLeft() + nStart );
+ aRectangle.SetRight( nPageWidth - nEnd - aPageLRSpace.GetLeft() );
}
else
{
long nLeft = rPagePrtRect.Left();
- aRectangle.Left() = nStart + nLeft;
- aRectangle.Right() = nPageWidth - nEnd - nLeft;
+ aRectangle.SetLeft( nStart + nLeft );
+ aRectangle.SetRight( nPageWidth - nEnd - nLeft );
}
if(!bFrame)
{
- aRectangle.Left() += nBorder;
- aRectangle.Right() -= nBorder;
+ aRectangle.AdjustLeft(nBorder );
+ aRectangle.AdjustRight( -nBorder );
}
}
}
else if ( nFrameType & ( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER ))
{
- aRectangle.Left() = aPageLRSpace.GetLeft();
- aRectangle.Right() = aPageLRSpace.GetRight();
+ aRectangle.SetLeft( aPageLRSpace.GetLeft() );
+ aRectangle.SetRight( aPageLRSpace.GetRight() );
}
else
aRectangle.Left() = aRectangle.Right() = 0;
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index df78f47fc843..16fabb29760a 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -598,7 +598,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
if(!(rValue >>= nTmp) || nTmp < 10)
throw IllegalArgumentException();
Size aSize( mpViewOption->GetSnapSize() );
- aSize.Width() = convertMm100ToTwip( nTmp );
+ aSize.setWidth( convertMm100ToTwip( nTmp ) );
mpViewOption->SetSnapSize( aSize );
}
break;
@@ -608,7 +608,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
if(!(rValue >>= nTmp) || nTmp < 10)
throw IllegalArgumentException();
Size aSize( mpViewOption->GetSnapSize() );
- aSize.Height() = convertMm100ToTwip( nTmp );
+ aSize.setHeight( convertMm100ToTwip( nTmp ) );
mpViewOption->SetSnapSize( aSize );
}
break;
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 489073d55341..264cb7245b27 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2968,17 +2968,17 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
{
aPos = GetEntryPosition( pEntry );
- aPos.X() = GetTabPos( pEntry, pTab );
+ aPos.setX( GetTabPos( pEntry, pTab ) );
Size aSize( pItem->GetSize( this, pEntry ) );
if((aPos.X() + aSize.Width()) > GetSizePixel().Width())
- aSize.Width() = GetSizePixel().Width() - aPos.X();
+ aSize.setWidth( GetSizePixel().Width() - aPos.X() );
aPos = OutputToScreenPixel(aPos);
tools::Rectangle aItemRect( aPos, aSize );
if(bBalloon)
{
- aPos.X() += aSize.Width();
+ aPos.AdjustX(aSize.Width() );
Help::ShowBalloon( this, aPos, aItemRect, sEntry );
}
else
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 6eab5a4aac29..a4aeaf143853 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -508,17 +508,17 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
sEntry = m_aContextStrings[IDX_STR_BROKEN_LINK] + sEntry;
Point aEntryPos = GetEntryPosition( pEntry );
- aEntryPos.X() = GetTabPos( pEntry, pTab );
+ aEntryPos.setX( GetTabPos( pEntry, pTab ) );
Size aSize( pItem->GetSize( this, pEntry ) );
if((aEntryPos.X() + aSize.Width()) > GetSizePixel().Width())
- aSize.Width() = GetSizePixel().Width() - aEntryPos.X();
+ aSize.setWidth( GetSizePixel().Width() - aEntryPos.X() );
aEntryPos = OutputToScreenPixel(aEntryPos);
tools::Rectangle aItemRect( aEntryPos, aSize );
if(Help::IsBalloonHelpEnabled())
{
- aEntryPos.X() += aSize.Width();
+ aEntryPos.AdjustX(aSize.Width() );
Help::ShowBalloon( this, aEntryPos, aItemRect, sEntry );
}
else
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 7bb230d9725d..69d0f82981b0 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -546,7 +546,7 @@ void SwNavigationPI::ZoomOut()
Size aOptimalSize(GetOptimalSize());
Size aNewSize(pNav->GetOutputSizePixel());
- aNewSize.Height() = m_aExpandedSize.Height();
+ aNewSize.setHeight( m_aExpandedSize.Height() );
pNav->SetMinOutputSizePixel(aOptimalSize);
pNav->SetOutputSizePixel(aNewSize);
@@ -576,7 +576,7 @@ void SwNavigationPI::ZoomIn()
Size aOptimalSize(GetOptimalSize());
Size aNewSize(pNav->GetOutputSizePixel());
- aNewSize.Height() = aOptimalSize.Height();
+ aNewSize.setHeight( aOptimalSize.Height() );
pNav->SetMinOutputSizePixel(aOptimalSize);
pNav->SetOutputSizePixel(aNewSize);
@@ -651,7 +651,7 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
Size aItemWinSize( aFirstRect.Left() - aSecondRect.Left(),
aFirstRect.Bottom() - aFirstRect.Top() );
Size aOptimalSize(m_xEdit->get_preferred_size());
- aItemWinSize.Width() = std::max(aItemWinSize.Width(), aOptimalSize.Width());
+ aItemWinSize.setWidth( std::max(aItemWinSize.Width(), aOptimalSize.Width()) );
m_xEdit->SetSizePixel(aItemWinSize);
m_aContentToolBox->InsertSeparator(4);
m_aContentToolBox->InsertWindow( FN_PAGENUMBER, m_xEdit, ToolBoxItemBits::NONE, 4);
diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx b/sw/source/uibase/utlui/shdwcrsr.cxx
index 8180141cafbb..47e6613af6b0 100644
--- a/sw/source/uibase/utlui/shdwcrsr.cxx
+++ b/sw/source/uibase/utlui/shdwcrsr.cxx
@@ -61,9 +61,9 @@ void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, bool bLeft )
while( aPt1.Y() <= aPt2.Y() )
{
pWin->DrawLine( aPt1, aPt2 );
- aPt1.Y()++;
- aPt2.Y()--;
- aPt2.X() = aPt1.X() += nDiff;
+ aPt1.AdjustY( 1 );
+ aPt2.AdjustY( -1 );
+ aPt2.setX( aPt1.AdjustX(nDiff ) );
}
}
@@ -108,11 +108,11 @@ tools::Rectangle SwShadowCursor::GetRect() const
Size aSz( nWidth, nH );
if( text::HoriOrientation::RIGHT == nOldMode )
- aPt.X() -= aSz.Width();
+ aPt.AdjustX( -(aSz.Width()) );
else if( text::HoriOrientation::CENTER == nOldMode )
{
- aPt.X() -= aSz.Width();
- aSz.Width() *= 2;
+ aPt.AdjustX( -(aSz.Width()) );
+ aSz.setWidth( aSz.Width() * 2 );
}
return pWin->PixelToLogic( tools::Rectangle( aPt, aSz ) );
diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx
index a9360fe8dfb2..caca9733bc7a 100644
--- a/sw/source/uibase/utlui/viewlayoutctrl.cxx
+++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx
@@ -103,18 +103,18 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
const long nXOffset = (aRect.GetWidth() - nImageWidthSum) / 2;
const long nYOffset = (aControlRect.GetHeight() - mpImpl->maImageSingleColumn.GetSizePixel().Height()) / 2;
- aRect.Left() = aRect.Left() + nXOffset;
- aRect.Top() = aRect.Top() + nYOffset;
+ aRect.SetLeft( aRect.Left() + nXOffset );
+ aRect.SetTop( aRect.Top() + nYOffset );
// draw single column image:
pDev->DrawImage( aRect.TopLeft(), bSingleColumn ? mpImpl->maImageSingleColumn_Active : mpImpl->maImageSingleColumn );
// draw automatic image:
- aRect.Left() += mpImpl->maImageSingleColumn.GetSizePixel().Width();
+ aRect.AdjustLeft(mpImpl->maImageSingleColumn.GetSizePixel().Width() );
pDev->DrawImage( aRect.TopLeft(), bAutomatic ? mpImpl->maImageAutomatic_Active : mpImpl->maImageAutomatic );
// draw bookmode image:
- aRect.Left() += mpImpl->maImageAutomatic.GetSizePixel().Width();
+ aRect.AdjustLeft(mpImpl->maImageAutomatic.GetSizePixel().Width() );
pDev->DrawImage( aRect.TopLeft(), bBookMode ? mpImpl->maImageBookMode_Active : mpImpl->maImageBookMode );
}
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index 65b11dc743a3..91f629cddb25 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -102,7 +102,7 @@ bool SwWrtShell::Left( sal_uInt16 nMode, bool bSelect,
if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
Point aTmp( VisArea().Pos() );
- aTmp.X() -= VisArea().Width() * nReadOnlyScrollOfst / 100;
+ aTmp.AdjustX( -(VisArea().Width() * nReadOnlyScrollOfst / 100) );
m_rView.SetVisArea( aTmp );
return true;
}
@@ -119,8 +119,8 @@ bool SwWrtShell::Right( sal_uInt16 nMode, bool bSelect,
if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly() )
{
Point aTmp( VisArea().Pos() );
- aTmp.X() += VisArea().Width() * nReadOnlyScrollOfst / 100;
- aTmp.X() = m_rView.SetHScrollMax( aTmp.X() );
+ aTmp.AdjustX(VisArea().Width() * nReadOnlyScrollOfst / 100 );
+ aTmp.setX( m_rView.SetHScrollMax( aTmp.X() ) );
m_rView.SetVisArea( aTmp );
return true;
}
@@ -136,7 +136,7 @@ bool SwWrtShell::Up( bool bSelect, sal_uInt16 nCount, bool bBasicCall )
if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
Point aTmp( VisArea().Pos() );
- aTmp.Y() -= VisArea().Height() * nReadOnlyScrollOfst / 100;
+ aTmp.AdjustY( -(VisArea().Height() * nReadOnlyScrollOfst / 100) );
m_rView.SetVisArea( aTmp );
return true;
}
@@ -150,8 +150,8 @@ bool SwWrtShell::Down( bool bSelect, sal_uInt16 nCount, bool bBasicCall )
if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
Point aTmp( VisArea().Pos() );
- aTmp.Y() += VisArea().Height() * nReadOnlyScrollOfst / 100;
- aTmp.Y() = m_rView.SetVScrollMax( aTmp.Y() );
+ aTmp.AdjustY(VisArea().Height() * nReadOnlyScrollOfst / 100 );
+ aTmp.setY( m_rView.SetVScrollMax( aTmp.Y() ) );
m_rView.SetVisArea( aTmp );
return true;
}
@@ -165,7 +165,7 @@ bool SwWrtShell::LeftMargin( bool bSelect, bool bBasicCall )
if ( !bSelect && !bBasicCall && IsCursorReadonly() )
{
Point aTmp( VisArea().Pos() );
- aTmp.X() = DOCUMENTBORDER;
+ aTmp.setX( DOCUMENTBORDER );
m_rView.SetVisArea( aTmp );
return true;
}
@@ -181,9 +181,9 @@ bool SwWrtShell::RightMargin( bool bSelect, bool bBasicCall )
if ( !bSelect && !bBasicCall && IsCursorReadonly() )
{
Point aTmp( VisArea().Pos() );
- aTmp.X() = GetDocSize().Width() - VisArea().Width() + DOCUMENTBORDER;
+ aTmp.setX( GetDocSize().Width() - VisArea().Width() + DOCUMENTBORDER );
if( DOCUMENTBORDER > aTmp.X() )
- aTmp.X() = DOCUMENTBORDER;
+ aTmp.setX( DOCUMENTBORDER );
m_rView.SetVisArea( aTmp );
return true;
}
@@ -408,11 +408,11 @@ bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect)
if( !IsCursorVisible() )
// set CursorPos to top-/bottom left pos. So the pagescroll is not
// be dependent on the current cursor, but on the visarea.
- aPt.Y() = aTmpArea.Top() + aTmpArea.Height() / 2;
+ aPt.setY( aTmpArea.Top() + aTmpArea.Height() / 2 );
- aPt.Y() += lOffset;
+ aPt.AdjustY(lOffset );
m_aDest = GetContentPos(aPt,lOffset > 0);
- m_aDest.X() = aPt.X();
+ m_aDest.setX( aPt.X() );
m_bDestOnStack = true;
}
@@ -424,7 +424,7 @@ bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect)
//Place the cursor at the target position; remember that no target
//position is longer on the stack.
//The new visible region is to be determined beforehand.
- aTmpArea.Pos().Y() += lOffset;
+ aTmpArea.Pos().AdjustY(lOffset );
if( aTmpArea.IsInside(m_aDest) )
{
if( bSelect )
@@ -482,7 +482,7 @@ bool SwWrtShell::PopCursor(bool bUpdate, bool bSelect)
// If a predecessor is on the stack,
// use the flag for a valid position.
SwRect aTmpArea(VisArea());
- aTmpArea.Pos().Y() -= m_pCursorStack->lOffset;
+ aTmpArea.Pos().AdjustY( -(m_pCursorStack->lOffset) );
if( aTmpArea.IsInside( m_pCursorStack->aDocPos ) )
{
if( bSelect )
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index c8e9b93712b4..b68b4b77df00 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -303,8 +303,8 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter,
// Add the margin attributes to GrfSize,
// because these counts at the margin additionally
- aGrfSize.Width() += pFrameMgr->CalcWidthBorder();
- aGrfSize.Height()+= pFrameMgr->CalcHeightBorder();
+ aGrfSize.AdjustWidth(pFrameMgr->CalcWidthBorder() );
+ aGrfSize.AdjustHeight(pFrameMgr->CalcHeightBorder() );
const BigInt aTempWidth( aGrfSize.Width() );
const BigInt aTempHeight( aGrfSize.Height());
@@ -312,14 +312,14 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter,
// Fit width if necessary, scale down the height proportional thereafter.
if( aGrfSize.Width() > aBound.Width() )
{
- aGrfSize.Width() = aBound.Width();
- aGrfSize.Height() = BigInt(aBound.Width()) * aTempHeight / aTempWidth;
+ aGrfSize.setWidth( aBound.Width() );
+ aGrfSize.setHeight( BigInt(aBound.Width()) * aTempHeight / aTempWidth );
}
// Fit height if necessary, scale down the width proportional thereafter.
if( aGrfSize.Height() > aBound.Height() )
{
- aGrfSize.Height() = aBound.Height();
- aGrfSize.Width() = BigInt(aBound.Height()) * aTempWidth / aTempHeight;
+ aGrfSize.setHeight( aBound.Height() );
+ aGrfSize.setWidth( BigInt(aBound.Height()) * aTempWidth / aTempHeight );
}
pFrameMgr->SetSize( aGrfSize );
pFrameMgr->UpdateFlyFrame();
@@ -508,8 +508,8 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame
if ( aSz.Width() > aBound.Width() )
{
//Always limit proportional.
- aSz.Height() = aSz.Height() * aBound.Width() / aSz.Width();
- aSz.Width() = aBound.Width();
+ aSz.setHeight( aSz.Height() * aBound.Width() / aSz.Width() );
+ aSz.setWidth( aBound.Width() );
}
aFrameMgr.SetSize( aSz );
SwFlyFrameFormat *pFormat = SwFEShell::InsertObject( xRef, &aFrameMgr.GetAttrSet() );