summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-05-08 13:32:46 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-05-08 14:32:11 +0200
commit69c52bc5b7973a2e414209470f5bf9b66dcc4f30 (patch)
tree1bff15f50586412234a84255a24209af95cd0c91
parentaec4128cccb1c16f793df065a31a98f3b112d256 (diff)
sw: convert some usage of Point::X/Y to Point::set/getX/Y
As I understand it, Point::X/Y() basically provide direct access to the position, so they come without the usual benefits of getter/setter methods. Change-Id: I6d5bfd4f20ab8c7377419dcf5aac2c4ea0e9db05
-rw-r--r--sw/source/core/access/acccontext.cxx8
-rw-r--r--sw/source/core/access/accdoc.cxx4
-rw-r--r--sw/source/core/access/accpara.cxx20
-rw-r--r--sw/source/core/access/acctable.cxx12
-rw-r--r--sw/source/core/bastyp/swrect.cxx8
-rw-r--r--sw/source/core/crsr/crsrsh.cxx42
-rw-r--r--sw/source/core/crsr/crstrvl.cxx16
-rw-r--r--sw/source/core/crsr/swcrsr.cxx12
-rw-r--r--sw/source/core/crsr/trvlcol.cxx4
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx4
-rw-r--r--sw/source/core/crsr/viscrs.cxx8
-rw-r--r--sw/source/core/doc/docdraw.cxx18
-rw-r--r--sw/source/core/doc/docfly.cxx8
-rw-r--r--sw/source/core/doc/notxtfrm.cxx16
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx4
-rw-r--r--sw/source/core/draw/dflyobj.cxx4
-rw-r--r--sw/source/core/draw/dpage.cxx4
-rw-r--r--sw/source/core/draw/dview.cxx2
-rw-r--r--sw/source/core/frmedt/fecopy.cxx10
-rw-r--r--sw/source/core/frmedt/fefly1.cxx28
-rw-r--r--sw/source/core/frmedt/feshview.cxx74
-rw-r--r--sw/source/core/frmedt/fetab.cxx20
-rw-r--r--sw/source/core/frmedt/fews.cxx78
-rw-r--r--sw/source/core/frmedt/tblsel.cxx24
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx4
-rw-r--r--sw/source/core/layout/calcmove.cxx38
-rw-r--r--sw/source/core/layout/fly.cxx16
-rw-r--r--sw/source/core/layout/flycnt.cxx24
-rw-r--r--sw/source/core/layout/flyincnt.cxx4
-rw-r--r--sw/source/core/layout/frmtool.cxx6
-rw-r--r--sw/source/core/layout/pagechg.cxx27
-rw-r--r--sw/source/core/layout/paintfrm.cxx26
32 files changed, 291 insertions, 282 deletions
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index e80e97b91cb0..87532893ebdf 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -770,8 +770,8 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleContext::getAccessibleAtPoint
{
SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root
Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() );
- aPixPoint.X() += aPixPos.X();
- aPixPoint.Y() += aPixPos.Y();
+ aPixPoint.setX(aPixPoint.getX() + aPixPos.getX());
+ aPixPoint.setY(aPixPoint.getY() + aPixPos.getY());
}
const SwAccessibleChild aChild( GetChildAtPixel( aPixPoint, *(GetMap()) ) );
@@ -844,7 +844,7 @@ awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(sal_Bool bRelative)
{
SwRect aParentLogBounds( GetBounds( *(GetMap()), pParent ) ); // twip rel to doc root
Point aParentPixPos( GetMap()->CoreToPixel( aParentLogBounds.SVRect() ).TopLeft() );
- aPixBounds.Move( -aParentPixPos.X(), -aParentPixPos.Y() );
+ aPixBounds.Move( -aParentPixPos.getX(), -aParentPixPos.getY() );
}
}
@@ -881,7 +881,7 @@ awt::Point SAL_CALL SwAccessibleContext::getLocationOnScreen()
/* getBoundsImpl already checked that GetWindow returns valid pointer. */
aPixPos = GetWindow()->OutputToAbsoluteScreenPixel(aPixPos);
- awt::Point aPoint(aPixPos.X(), aPixPos.Y());
+ awt::Point aPoint(aPixPos.getX(), aPixPos.getY());
return aPoint;
}
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 78981f851050..746146bef5a9 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -202,7 +202,7 @@ awt::Point SAL_CALL SwAccessibleDocumentBase::getLocation()
CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
Point aPixPos( pWin->GetWindowExtentsRelative( pWin->GetAccessibleParentWindow() ).TopLeft() );
- awt::Point aLoc( aPixPos.X(), aPixPos.Y() );
+ awt::Point aLoc( aPixPos.getX(), aPixPos.getY() );
return aLoc;
}
@@ -218,7 +218,7 @@ awt::Point SAL_CALL SwAccessibleDocumentBase::getLocation()
CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
Point aPixPos( pWin->GetWindowExtentsRelative( 0 ).TopLeft() );
- awt::Point aLoc( aPixPos.X(), aPixPos.Y() );
+ awt::Point aLoc( aPixPos.getX(), aPixPos.getY() );
return aLoc;
}
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 5dba314cf271..3b6ef33fdbff 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1625,7 +1625,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root
Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() );
- aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() );
+ aScreenRect.Move( -aFrmPixPos.getX(), -aFrmPixPos.getY() );
// convert into AWT Rectangle
return awt::Rectangle(
@@ -1662,8 +1662,8 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
Point aPoint( rPoint.X, rPoint.Y );
SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root
Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() );
- aPoint.X() += aPixPos.X();
- aPoint.Y() += aPixPos.Y();
+ aPoint.setX(aPoint.getX() + aPixPos.getX());
+ aPoint.setY(aPoint.getY() + aPixPos.getY());
MapMode aMapMode = pWin->GetMapMode();
Point aCorePoint( GetMap()->PixelToCore( aPoint ) );
if( !aLogBounds.IsInside( aCorePoint ) )
@@ -1700,17 +1700,17 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
bool bVert = pFrm->IsVertical();
bool bR2L = pFrm->IsRightToLeft();
- if ( (!bVert && aResultRect.Pos().X() > aCorePoint.X()) ||
- ( bVert && aResultRect.Pos().Y() > aCorePoint.Y()) ||
- ( bR2L && aResultRect.Right() < aCorePoint.X()) )
+ if ( (!bVert && aResultRect.Pos().getX() > aCorePoint.getX()) ||
+ ( bVert && aResultRect.Pos().getY() > aCorePoint.getY()) ||
+ ( bR2L && aResultRect.Right() < aCorePoint.getX()) )
{
SwIndex aIdxPrev( pNode, nIndex - 1);
SwPosition aPosPrev( *pNode, aIdxPrev );
SwRect aResultRectPrev;
pFrm->GetCharRect( aResultRectPrev, aPosPrev );
- if ( (!bVert && aResultRectPrev.Pos().X() < aCorePoint.X() && aResultRect.Pos().Y() == aResultRectPrev.Pos().Y()) ||
- ( bVert && aResultRectPrev.Pos().Y() < aCorePoint.Y() && aResultRect.Pos().X() == aResultRectPrev.Pos().X()) ||
- ( bR2L && aResultRectPrev.Right() > aCorePoint.X() && aResultRect.Pos().Y() == aResultRectPrev.Pos().Y()) )
+ if ( (!bVert && aResultRectPrev.Pos().getX() < aCorePoint.getX() && aResultRect.Pos().getY() == aResultRectPrev.Pos().getY()) ||
+ ( bVert && aResultRectPrev.Pos().getY() < aCorePoint.getY() && aResultRect.Pos().getX() == aResultRectPrev.Pos().getX()) ||
+ ( bR2L && aResultRectPrev.Right() > aCorePoint.getX() && aResultRect.Pos().getY() == aResultRectPrev.Pos().getY()) )
aPos = aPosPrev;
}
}
@@ -2535,7 +2535,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret()
SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root
Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() );
- aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() );
+ aScreenRect.Move( -aFrmPixPos.getX(), -aFrmPixPos.getY() );
// convert into AWT Rectangle
const awt::Rectangle aCursorRect( aScreenRect.Left(),
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 8992690826ec..f74473002c7e 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -154,14 +154,14 @@ void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm )
// #i77106#
if ( IncludeRow( *pLower ) )
{
- maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() );
+ maRows.insert( pLower->Frm().Top() - maTabFrmPos.getY() );
CollectData( pLower );
}
}
else if( pLower->IsCellFrm() &&
rLower.IsAccessible( mbIsInPagePreview ) )
{
- maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() );
+ maColumns.insert( pLower->Frm().Left() - maTabFrmPos.getX() );
}
else
{
@@ -352,9 +352,9 @@ void SwAccessibleTableData_Impl::GetSelection(
::std::advance( aStt,
static_cast< Int32Set_Impl::difference_type >( nStart ) );
if( bColumns )
- aArea.Left( *aStt + aPos.X() );
+ aArea.Left( *aStt + aPos.getX() );
else
- aArea.Top( *aStt + aPos.Y() );
+ aArea.Top( *aStt + aPos.getY() );
}
if( nEnd < static_cast< sal_Int32 >( rRowsOrColumns.size() ) )
{
@@ -362,9 +362,9 @@ void SwAccessibleTableData_Impl::GetSelection(
::std::advance( aEnd,
static_cast< Int32Set_Impl::difference_type >( nEnd ) );
if( bColumns )
- aArea.Right( *aEnd + aPos.X() - 1 );
+ aArea.Right( *aEnd + aPos.getX() - 1 );
else
- aArea.Bottom( *aEnd + aPos.Y() - 1 );
+ aArea.Bottom( *aEnd + aPos.getY() - 1 );
}
GetSelection( aPos, aArea, rSelBoxes, mpTabFrm, rSelHdl, bColumns );
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 40db66c52168..a403c46272a7 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -140,12 +140,12 @@ void SwRect::Justify()
{
if ( m_Size.getHeight() < 0 )
{
- m_Point.Y() += m_Size.getHeight() + 1;
+ m_Point.setY(m_Point.getY() + m_Size.getHeight() + 1);
m_Size.setHeight(-m_Size.getHeight());
}
if ( m_Size.getWidth() < 0 )
{
- m_Point.X() += m_Size.getWidth() + 1;
+ m_Point.setX(m_Point.getX() + m_Size.getWidth() + 1);
m_Size.setWidth(-m_Size.getWidth());
}
}
@@ -167,9 +167,9 @@ 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.X() -= nSub; }
+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.Y() -= nSub; }
+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::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 c32250c6fea9..574ac81b6659 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1164,8 +1164,8 @@ void SwCrsrShell::VisPortChgd( const SwRect & rRect )
m_pVisCrsr->Hide();
m_bVisPortChgd = sal_True;
- m_aOldRBPos.X() = VisArea().Right();
- m_aOldRBPos.Y() = VisArea().Bottom();
+ m_aOldRBPos.setX(VisArea().Right());
+ m_aOldRBPos.setY(VisArea().Bottom());
// For not having problems with the SV cursor, Update() is called for the
// Window in ViewShell::VisPo...
@@ -1423,14 +1423,14 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
m_pTblCrsr->Show();
// set Cursor-Points to the new Positions
- m_pTblCrsr->GetPtPos().X() = m_aCharRect.Left();
- m_pTblCrsr->GetPtPos().Y() = m_aCharRect.Top();
+ m_pTblCrsr->GetPtPos().setX(m_aCharRect.Left());
+ m_pTblCrsr->GetPtPos().setY(m_aCharRect.Top());
if( m_bSVCrsrVis )
{
- m_aCrsrHeight.X() = 0;
- m_aCrsrHeight.Y() = aTmpState.aRealHeight.Y() < 0 ?
- -m_aCharRect.Width() : m_aCharRect.Height();
+ m_aCrsrHeight.setX(0);
+ m_aCrsrHeight.setY(aTmpState.aRealHeight.getY() < 0 ?
+ -m_aCharRect.Width() : m_aCharRect.Height());
m_pVisCrsr->Show(); // show again
}
m_eMvState = MV_NONE; // state for cursor travelling - GetCrsrOfst
@@ -1631,15 +1631,15 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
m_aCrsrHeight = aTmpState.aRealHeight;
else
{
- m_aCrsrHeight.X() = 0;
- m_aCrsrHeight.Y() = aTmpState.aRealHeight.Y() < 0 ?
- -m_aCharRect.Width() : m_aCharRect.Height();
+ m_aCrsrHeight.setX(0);
+ m_aCrsrHeight.setY(aTmpState.aRealHeight.getY() < 0 ?
+ -m_aCharRect.Width() : m_aCharRect.Height());
}
}
else
{
- m_aCrsrHeight.X() = 0;
- m_aCrsrHeight.Y() = m_aCharRect.Height();
+ m_aCrsrHeight.setX(0);
+ m_aCrsrHeight.setY(m_aCharRect.Height());
}
if( !bFirst && aOld == m_aCharRect )
@@ -1657,8 +1657,8 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
bFirst = false;
// update cursor Points to the new Positions
- pShellCrsr->GetPtPos().X() = m_aCharRect.Left();
- pShellCrsr->GetPtPos().Y() = m_aCharRect.Top();
+ pShellCrsr->GetPtPos().setX(m_aCharRect.Left());
+ pShellCrsr->GetPtPos().setY(m_aCharRect.Top());
if( !(eFlags & SwCrsrShell::UPDOWN )) // delete old Pos. of Up/Down
{
@@ -1751,9 +1751,9 @@ void SwCrsrShell::RefreshBlockCursor()
if( pFrm )
{
if( pFrm->IsVertical() )
- aPt.Y() = pFrm->Frm().Top() + GetUpDownX();
+ aPt.setY(pFrm->Frm().Top() + GetUpDownX());
else
- aPt.X() = pFrm->Frm().Left() + GetUpDownX();
+ aPt.setX(pFrm->Frm().Left() + GetUpDownX());
}
aMk = rBlock.GetMkPos();
}
@@ -2262,8 +2262,8 @@ sal_Bool SwCrsrShell::SetVisCrsr( const Point &rPt )
m_aCrsrHeight = aTmpState.aRealHeight;
else
{
- m_aCrsrHeight.X() = 0;
- m_aCrsrHeight.Y() = m_aCharRect.Height();
+ m_aCrsrHeight.setX(0);
+ m_aCrsrHeight.setY(m_aCharRect.Height());
}
m_pVisCrsr->SetDragCrsr( true );
@@ -2601,12 +2601,12 @@ void SwCrsrShell::MakeSelVisible()
{
SwRect aTmp( m_aCharRect );
long nDiff = m_aCharRect.Height() - VisArea().Height();
- if( nDiff < m_aCrsrHeight.X() )
+ if( nDiff < m_aCrsrHeight.getX() )
aTmp.Top( nDiff + m_aCharRect.Top() );
else
{
- aTmp.Top( m_aCrsrHeight.X() + m_aCharRect.Top() );
- aTmp.Height( m_aCrsrHeight.Y() );
+ aTmp.Top( m_aCrsrHeight.getX() + m_aCharRect.Top() );
+ aTmp.Height( m_aCrsrHeight.getY() );
}
if( !aTmp.HasArea() )
{
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 6e9d24d2446e..a206d0c0a485 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -87,13 +87,13 @@ bool SwCrsrShell::GotoNextNum()
pFrm->Calc();
if( pFrm->IsVertical() )
{
- aPt.X() = m_aCharRect.Center().X();
- aPt.Y() = pFrm->Frm().Top() + m_nUpDownX;
+ aPt.setX(m_aCharRect.Center().getX());
+ aPt.setY(pFrm->Frm().Top() + m_nUpDownX);
}
else
{
- aPt.Y() = m_aCharRect.Center().Y();
- aPt.X() = pFrm->Frm().Left() + m_nUpDownX;
+ aPt.setY(m_aCharRect.Center().getY());
+ aPt.setX(pFrm->Frm().Left() + m_nUpDownX);
}
pFrm->GetCrsrOfst( m_pCurCrsr->GetPoint(), aPt );
bRet = !m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
@@ -127,13 +127,13 @@ bool SwCrsrShell::GotoPrevNum()
pFrm->Calc();
if( pFrm->IsVertical() )
{
- aPt.X() = m_aCharRect.Center().X();
- aPt.Y() = pFrm->Frm().Top() + m_nUpDownX;
+ aPt.setX(m_aCharRect.Center().getX());
+ aPt.setY(pFrm->Frm().Top() + m_nUpDownX);
}
else
{
- aPt.Y() = m_aCharRect.Center().Y();
- aPt.X() = pFrm->Frm().Left() + m_nUpDownX;
+ aPt.setY(m_aCharRect.Center().getY());
+ aPt.setX(pFrm->Frm().Left() + m_nUpDownX);
}
pFrm->GetCrsrOfst( m_pCurCrsr->GetPoint(), aPt );
bRet = !m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 54715ed1ed7b..73a9edd60f0f 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1774,8 +1774,8 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
aPt = aTmpRect.Pos();
nUpDownX = pFrm->IsVertical() ?
- aPt.Y() - pFrm->Frm().Top() :
- aPt.X() - pFrm->Frm().Left();
+ aPt.getY() - pFrm->Frm().Top() :
+ aPt.getX() - pFrm->Frm().Left();
}
// It is allowed to move footnotes in other footnotes but not sections
@@ -1825,15 +1825,15 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
pFrm->GetCharRect( aTmpRect, *GetPoint(), &eTmpState );
if ( pFrm->IsVertical() )
{
- aPt.X() = aTmpRect.Center().X();
+ aPt.setX(aTmpRect.Center().getX());
pFrm->Calc();
- aPt.Y() = pFrm->Frm().Top() + nUpDownX;
+ aPt.setY(pFrm->Frm().Top() + nUpDownX);
}
else
{
- aPt.Y() = aTmpRect.Center().Y();
+ aPt.setY(aTmpRect.Center().getY());
pFrm->Calc();
- aPt.X() = pFrm->Frm().Left() + nUpDownX;
+ aPt.setX(pFrm->Frm().Left() + nUpDownX);
}
pFrm->GetCrsrOfst( GetPoint(), aPt, &eTmpState );
}
diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx
index ef7865653a25..d45d5938420b 100644
--- a/sw/source/core/crsr/trvlcol.cxx
+++ b/sw/source/core/crsr/trvlcol.cxx
@@ -98,8 +98,8 @@ sal_Bool SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol
Point aPt( pCnt->Frm().Pos() + pCnt->Prt().Pos() );
if( fnPosCol == GetColumnEnd )
{
- aPt.X() += pCnt->Prt().Width();
- aPt.Y() += pCnt->Prt().Height();
+ aPt.setX(aPt.getX() + pCnt->Prt().Width());
+ aPt.setY(aPt.getY() + pCnt->Prt().Height());
}
pCnt->GetCrsrOfst( m_pCurCrsr->GetPoint(), aPt );
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 3a88cf6264b1..40a17edcdfc4 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -322,9 +322,9 @@ sal_Bool SwCrsrShell::GotoFlyAnchor()
aTmpRect = pFrm->Frm();
Point aPt( aTmpRect.Left(), aTmpRect.Top() +
( aTmpRect.Bottom() - aTmpRect.Top() ) / 2 );
- aPt.X() = aPt.X() > (pFrm->Frm().Left() + (pFrm->Frm().SSize().Width() / 2 ))
+ aPt.setX(aPt.getX() > (pFrm->Frm().Left() + (pFrm->Frm().SSize().Width() / 2 ))
? pFrm->Frm().Right()
- : pFrm->Frm().Left();
+ : pFrm->Frm().Left());
const SwPageFrm* pPageFrm = pFrm->FindPageFrm();
const SwCntntFrm* pFndFrm = pPageFrm->GetCntntPos( aPt, sal_False, sal_True );
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 271d6981b4d4..7c2d1de09c98 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -104,23 +104,23 @@ void SwVisCrsr::Hide()
void SwVisCrsr::_SetPosAndShow()
{
SwRect aRect;
- long nTmpY = pCrsrShell->m_aCrsrHeight.Y();
+ long nTmpY = pCrsrShell->m_aCrsrHeight.getY();
if( 0 > nTmpY )
{
nTmpY = -nTmpY;
aTxtCrsr.SetOrientation( 900 );
aRect = SwRect( pCrsrShell->m_aCharRect.Pos(),
Size( pCrsrShell->m_aCharRect.Height(), nTmpY ) );
- aRect.Pos().X() += pCrsrShell->m_aCrsrHeight.X();
+ aRect.Pos().setX(aRect.Pos().getX() + pCrsrShell->m_aCrsrHeight.getX());
if( pCrsrShell->IsOverwriteCrsr() )
- aRect.Pos().Y() += aRect.Width();
+ aRect.Pos().setY(aRect.Pos().getY() + aRect.Width());
}
else
{
aTxtCrsr.SetOrientation( 0 );
aRect = SwRect( pCrsrShell->m_aCharRect.Pos(),
Size( pCrsrShell->m_aCharRect.Width(), nTmpY ) );
- aRect.Pos().Y() += pCrsrShell->m_aCrsrHeight.X();
+ aRect.Pos().setY(aRect.Pos().getY() + pCrsrShell->m_aCrsrHeight.getX());
}
// check if cursor should show the current cursor bidi level
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index a1475951ad37..7419baf66bd7 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -148,23 +148,23 @@ static void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
{
if ( bR2L ) {
//FRMDIR_VERT_TOP_LEFT
- nHoriRelPos = aObjRect.Left() - aAnchorPos.X();
- nVertRelPos = aObjRect.Top() - aAnchorPos.Y();
+ nHoriRelPos = aObjRect.Left() - aAnchorPos.getX();
+ nVertRelPos = aObjRect.Top() - aAnchorPos.getY();
} else {
//FRMDIR_VERT_TOP_RIGHT
- nHoriRelPos = aObjRect.Top() - aAnchorPos.Y();
- nVertRelPos = aAnchorPos.X() - aObjRect.Right();
+ nHoriRelPos = aObjRect.Top() - aAnchorPos.getY();
+ nVertRelPos = aAnchorPos.getX() - aObjRect.Right();
}
}
else if ( bR2L )
{
- nHoriRelPos = aAnchorPos.X() - aObjRect.Right();
- nVertRelPos = aObjRect.Top() - aAnchorPos.Y();
+ nHoriRelPos = aAnchorPos.getX() - aObjRect.Right();
+ nVertRelPos = aObjRect.Top() - aAnchorPos.getY();
}
else
{
- nHoriRelPos = aObjRect.Left() - aAnchorPos.X();
- nVertRelPos = aObjRect.Top() - aAnchorPos.Y();
+ nHoriRelPos = aObjRect.Left() - aAnchorPos.getX();
+ nVertRelPos = aObjRect.Top() - aAnchorPos.getY();
}
//End of SCMS
}
@@ -246,7 +246,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
// grouped.
Point aAnchorPos( pObj->GetAnchorPos() );
pObj->NbcSetAnchorPos( Point( 0, 0 ) );
- pObj->NbcMove( Size( aAnchorPos.X(), aAnchorPos.Y() ) );
+ pObj->NbcMove( Size( aAnchorPos.getX(), aAnchorPos.getY() ) );
}
pFmt = MakeDrawFrmFmt( OUString("DrawObject"),
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 7ac644eaf610..132480c1714e 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -315,7 +315,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, bool bNewFrms
aOldH.GetPos() == ((SwFmtHoriOrient*)pItem)->GetPos() ))
{
SwTwips nPos = (FLY_AS_CHAR == nOld) ? 0 : aOldH.GetPos();
- nPos += aOldAnchorPos.X() - aNewAnchorPos.X();
+ nPos += aOldAnchorPos.getX() - aNewAnchorPos.getX();
if( pItem )
{
@@ -337,7 +337,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, bool bNewFrms
aOldV.GetPos() == ((SwFmtVertOrient*)pItem)->GetPos() ) )
{
SwTwips nPos = (FLY_AS_CHAR == nOld) ? 0 : aOldV.GetPos();
- nPos += aOldAnchorPos.Y() - aNewAnchorPos.Y();
+ nPos += aOldAnchorPos.getY() - aNewAnchorPos.getY();
if( pItem )
{
SwFmtVertOrient* pV = (SwFmtVertOrient*)pItem;
@@ -692,7 +692,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
SwCrsrMoveState aState( MV_SETONLYTEXT );
SwPosition aPos( GetNodes() );
Point aPoint( aPt );
- aPoint.X() -= 1;
+ aPoint.setX(aPoint.getX() - 1);
GetCurrentLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
// consider that drawing objects can be in
// header/footer. Thus, <GetFrm()> by left-top-corner
@@ -746,7 +746,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
bUnmark = ( 0 != i );
Point aPoint( aPt );
- aPoint.X() -= 1; // Do not load in the DrawObj!
+ aPoint.setX(aPoint.getX() - 1); // Do not load in the DrawObj!
aNewAnch.SetType( FLY_AS_CHAR );
SwPosition aPos( *((SwCntntFrm*)pNewAnchorFrm)->GetNode() );
if ( pNewAnchorFrm->Frm().IsInside( aPoint ) )
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index ced0f108a3ee..b433e8e32dfb 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -307,13 +307,13 @@ static void lcl_CalcRect( Point& rPt, Size& rDim, sal_uInt16 nMirror )
{
if( nMirror == RES_MIRROR_GRAPH_VERT || nMirror == RES_MIRROR_GRAPH_BOTH )
{
- rPt.X() += rDim.Width() -1;
+ rPt.setX(rPt.getX() + rDim.Width() -1);
rDim.Width() = -rDim.Width();
}
if( nMirror == RES_MIRROR_GRAPH_HOR || nMirror == RES_MIRROR_GRAPH_BOTH )
{
- rPt.Y() += rDim.Height() -1;
+ rPt.setY(rPt.getY() + rDim.Height() -1);
rDim.Height() = -rDim.Height();
}
}
@@ -403,12 +403,12 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
// Set the "visible" rectangle first
if ( nLeftCrop > 0 )
{
- aVisPt.X() += nLeftCrop;
+ aVisPt.setX(aVisPt.getX() + nLeftCrop);
aVisSz.Width() -= nLeftCrop;
}
if ( nTopCrop > 0 )
{
- aVisPt.Y() += nTopCrop;
+ aVisPt.setY(aVisPt.getY() + nTopCrop);
aVisSz.Height() -= nTopCrop;
}
if ( nRightCrop > 0 )
@@ -423,9 +423,9 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
if ( pOrigRect )
{
Size aTmpSz( aGrfSz );
- aGrfPt.X() += nLeftCrop;
+ aGrfPt.setX(aGrfPt.getY() + nLeftCrop);
aTmpSz.Width() -= nLeftCrop + nRightCrop;
- aGrfPt.Y() += nTopCrop;
+ aGrfPt.setY(aGrfPt.getY() + nTopCrop);
aTmpSz.Height()-= nTopCrop + nBottomCrop;
if( RES_MIRROR_GRAPH_DONT != nMirror )
@@ -511,8 +511,8 @@ sal_Bool SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos,
{
if ( pCMS->bRealHeight )
{
- pCMS->aRealHeight.Y() = rRect.Height();
- pCMS->aRealHeight.X() = 0;
+ pCMS->aRealHeight.setY(rRect.Height());
+ pCMS->aRealHeight.setX(0);
}
}
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index ccdaf72d1a27..916a70fb1831 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -160,8 +160,8 @@ const PolyPolygon *SwNoTxtNode::HasContour() const
// #i102238#
if ( nGrfDPIx != 0 && nGrfDPIy != 0 )
{
- rPoly[i] = Point( rPoly[i].X() * pOutDev->ImplGetDPIX() / nGrfDPIx,
- rPoly[i].Y() * pOutDev->ImplGetDPIY() / nGrfDPIy );
+ rPoly[i] = Point( rPoly[i].getX() * pOutDev->ImplGetDPIX() / nGrfDPIx,
+ rPoly[i].getY() * pOutDev->ImplGetDPIY() / nGrfDPIy );
}
}
else
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 0733af1ccd8e..18337b209e28 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -879,8 +879,8 @@ SdrObject* SwVirtFlyDrawObj::CheckMacroHit( const SdrObjMacroHitRec& rRec ) cons
if( aRect.IsInside( rRec.aPos ) )
{
- aRect.Pos().X() += rRec.nTol;
- aRect.Pos().Y() += rRec.nTol;
+ 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;
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index cee0e0dabaa2..ff1fcde712a6 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -167,8 +167,8 @@ sal_Bool SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
// without MapMode-Offset, without Offset, w ... !!!!!
aPt = pWindow->LogicToPixel(
aPt, MapMode( MAP_TWIP ) );
- ((( sTxt += '?' ) += OUString::number( aPt.X() ))
- += ',' ) += OUString::number( aPt.Y() );
+ ((( sTxt += '?' ) += OUString::number( aPt.getX() ))
+ += ',' ) += OUString::number( aPt.getY() );
}
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 694f91521117..6cbd572ee37a 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -730,7 +730,7 @@ const SwFrm* SwDrawView::CalcAnchor()
}
else if ( !bFly )
{
- const SwRect aRect( aPt.X(), aPt.Y(), 1, 1 );
+ const SwRect aRect( aPt.getX(), aPt.getY(), 1, 1 );
SwDrawContact* pContact = (SwDrawContact*)GetUserCall(pObj);
if ( pContact->GetAnchorFrm( pObj ) &&
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 0bedb7389015..3fa4a73870ee 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -396,8 +396,8 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
aPos -= rSttPt - pObj->GetSnapRect().TopLeft();
// OD 2004-04-05 #i26791# - change attributes instead of
// direct positioning
- pFmt->SetFmtAttr( SwFmtHoriOrient( aPos.X(), text::HoriOrientation::NONE, text::RelOrientation::FRAME ) );
- pFmt->SetFmtAttr( SwFmtVertOrient( aPos.Y(), text::VertOrientation::NONE, text::RelOrientation::FRAME ) );
+ pFmt->SetFmtAttr( SwFmtHoriOrient( aPos.getX(), text::HoriOrientation::NONE, text::RelOrientation::FRAME ) );
+ pFmt->SetFmtAttr( SwFmtVertOrient( aPos.getY(), text::VertOrientation::NONE, text::RelOrientation::FRAME ) );
// #i47455# - notify draw frame format
// that position attributes are already set.
if ( pFmt->ISA(SwDrawFrmFmt) )
@@ -541,8 +541,8 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
Point aPos( rInsPt );
aPos -= aNewAnch;
aPos -= rSttPt - pFly->Frm().Pos();
- pFlyFmt->SetFmtAttr( SwFmtHoriOrient( aPos.X(),text::HoriOrientation::NONE, text::RelOrientation::FRAME ) );
- pFlyFmt->SetFmtAttr( SwFmtVertOrient( aPos.Y(),text::VertOrientation::NONE, text::RelOrientation::FRAME ) );
+ pFlyFmt->SetFmtAttr( SwFmtHoriOrient( aPos.getX(),text::HoriOrientation::NONE, text::RelOrientation::FRAME ) );
+ pFlyFmt->SetFmtAttr( SwFmtVertOrient( aPos.getY(),text::VertOrientation::NONE, text::RelOrientation::FRAME ) );
}
const Point aPt( pDestShell->GetCrsrDocPos() );
@@ -1401,7 +1401,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
pNewObj->NbcResize( aNewRect.TopLeft(), aScaleWidth, aScaleHeight);
Point aVec = aOldObjRect.TopLeft() - aNewRect.TopLeft();
- pNewObj->NbcMove(Size(aVec.X(), aVec.Y()));
+ pNewObj->NbcMove(Size(aVec.getX(), aVec.getY()));
if( pNewObj->ISA( SdrUnoObj ) )
pNewObj->SetLayer( GetDoc()->GetControlsId() );
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index ed33b5c79460..7fc3756b5ec7 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -138,7 +138,7 @@ static sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& r
// textnode should be found, as only in those
// a content bound frame can be anchored
SwCrsrMoveState aState( MV_SETONLYTEXT );
- aTmpPnt.X() -= 1; // do not land in the fly!
+ aTmpPnt.setX(aTmpPnt.getX() - 1); // do not land in the fly!
if( !pNewAnch->GetCrsrOfst( &aPos, aTmpPnt, &aState ) )
{
SwCntntNode* pCNd = ((SwCntntFrm*)pNewAnch)->GetNode();
@@ -158,7 +158,7 @@ static sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& r
// search nearest SwFlyFrm
SwCrsrMoveState aState( MV_SETONLYTEXT );
SwPosition aPos( rDoc.GetNodes() );
- aTmpPnt.X() -= 1; // do not land in the fly!
+ aTmpPnt.setX(aTmpPnt.getX() - 1); // do not land in the fly!
rDoc.GetCurrentLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState ); //swmod 071108//swmod 071225
pNewAnch = ::FindAnchor(
aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( rFrm.getRootFrm(), 0, 0, sal_False ),
@@ -325,7 +325,7 @@ const SwFrmFmt* SwFEShell::IsFlyInFly()
SwNodeIndex aSwNodeIndex( GetDoc()->GetNodes() );
SwPosition aPos( aSwNodeIndex );
Point aPoint( aTmpPos );
- aPoint.X() -= 1; //do not land in the fly!!
+ aPoint.setX(aPoint.getX() - 1); //do not land in the fly!!
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
// determine text frame by left-top-corner of object
pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(), &aTmpPos, 0, sal_False );
@@ -367,11 +367,11 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos )
Point aOrient( pAnch->Frm().Pos() );
if ( pFly->IsFlyInCntFrm() )
- aOrient.X() = rAbsPos.X();
+ aOrient.setX(rAbsPos.getX());
// calculate RelPos.
- aOrient.X() = rAbsPos.X() - aOrient.X();
- aOrient.Y() = rAbsPos.Y() - aOrient.Y();
+ aOrient.setX(rAbsPos.getX() - aOrient.getX());
+ aOrient.setY(rAbsPos.getY() - aOrient.getY());
pFly->ChgRelPos( aOrient );
}
CallChgLnk(); // call the AttrChangeNotify on the UI-side.
@@ -1436,8 +1436,8 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
if ( rRect.Top() != LONG_MIN && rRect.Pos() != aPt && !bPosProt )
{
aPt = rRect.Pos();
- aPt.X() -= pFly->Prt().Left();
- aPt.Y() -= pFly->Prt().Top();
+ aPt.setX(aPt.getX() - pFly->Prt().Left());
+ aPt.setY(aPt.getY() - pFly->Prt().Top());
// in case of paragraph-bound Flys, starting from the new position,
// a new anchor is to be set. The anchor and the new RelPos are
@@ -1449,8 +1449,8 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
const SwFrmFmt *pFmt = pFly->GetFmt();
const SwFmtVertOrient &rVert = pFmt->GetVertOrient();
const SwFmtHoriOrient &rHori = pFmt->GetHoriOrient();
- const long lXDiff = aPt.X() - pFly->Frm().Left();
- const long lYDiff = aPt.Y() - pFly->Frm().Top();
+ const long lXDiff = aPt.getX() - pFly->Frm().Left();
+ const long lYDiff = aPt.getY() - pFly->Frm().Top();
const Point aTmp( rHori.GetPos() + lXDiff,
rVert.GetPos() + lYDiff );
pFly->ChgRelPos( aTmp );
@@ -1601,8 +1601,8 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, String* pURL,
// without MapMode-Offset, without Offset, o ... !!!!!
aPt = GetOut()->LogicToPixel(
aPt, MapMode( MAP_TWIP ) );
- ((( *pURL += '?' ) += OUString::number( aPt.X() ))
- += ',' ) += OUString::number(aPt.Y() );
+ ((( *pURL += '?' ) += OUString::number( aPt.getX() ))
+ += ',' ) += OUString::number(aPt.getY() );
}
}
pRet = pFly->GetFmt();
@@ -1865,10 +1865,10 @@ sal_Bool SwFEShell::ReplaceSdrObj( const String& rGrfName, const String& rFltNam
std::max( nHeight, long(MINFLY) )));
if( SFX_ITEM_SET != aFrmSet.GetItemState( RES_HORI_ORIENT ))
- aFrmSet.Put( SwFmtHoriOrient( aRelPos.X(), text::HoriOrientation::NONE, text::RelOrientation::FRAME ));
+ aFrmSet.Put( SwFmtHoriOrient( aRelPos.getX(), text::HoriOrientation::NONE, text::RelOrientation::FRAME ));
if( SFX_ITEM_SET != aFrmSet.GetItemState( RES_VERT_ORIENT ))
- aFrmSet.Put( SwFmtVertOrient( aRelPos.Y(), text::VertOrientation::NONE, text::RelOrientation::FRAME ));
+ aFrmSet.Put( SwFmtVertOrient( aRelPos.getY(), text::VertOrientation::NONE, text::RelOrientation::FRAME ));
}
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 4c979791352d..f477af7a612b 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -170,7 +170,7 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb
// For simplicity we put the cursor next to the upper-left
// corner.
Point aPt( pOldSelFly->Frm().Pos() );
- aPt.X() -= 1;
+ aPt.setX(aPt.getX() - 1);
bool bUnLockView = !IsViewLocked();
LockView( sal_True );
SetCrsr( aPt, sal_True );
@@ -266,12 +266,12 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb
|*
*************************************************************************/
-#define LESS_X( aPt1, aPt2, bOld ) ( aPt1.X() < aPt2.X() || \
- ( aPt1.X() == aPt2.X() && ( aPt1.Y() < aPt2.Y() || \
- ( aPt1.Y() == aPt2.Y() && bOld ) ) ) )
-#define LESS_Y( aPt1, aPt2, bOld ) ( aPt1.Y() < aPt2.Y() || \
- ( aPt1.Y() == aPt2.Y() && ( aPt1.X() < aPt2.X() || \
- ( aPt1.X() == aPt2.X() && bOld ) ) ) )
+#define LESS_X( aPt1, aPt2, bOld ) ( aPt1.getX() < aPt2.getX() || \
+ ( aPt1.getX() == aPt2.getX() && ( aPt1.getY() < aPt2.getY() || \
+ ( aPt1.getY() == aPt2.getY() && bOld ) ) ) )
+#define LESS_Y( aPt1, aPt2, bOld ) ( aPt1.getY() < aPt2.getY() || \
+ ( aPt1.getY() == aPt2.getY() && ( aPt1.getX() < aPt2.getX() || \
+ ( aPt1.getX() == aPt2.getX() && bOld ) ) ) )
sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
{
@@ -1390,9 +1390,9 @@ const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_
// Special case if another object is on same Y.
if( aCurPos != aPos && // only when it is not me
- aCurPos.Y() == aPos.Y() && // Y positions equal
- (bNext? (aCurPos.X() > aPos.X()) : // lies next to me
- (aCurPos.X() < aPos.X())) ) // " reverse
+ aCurPos.getY() == aPos.getY() && // Y positions equal
+ (bNext? (aCurPos.getX() > aPos.getX()) : // lies next to me
+ (aCurPos.getX() < aPos.getX())) ) // " reverse
{
aBestPos = Point( nTmp, nTmp );
SdrObjListIter aTmpIter( *pList, bFlat ? IM_FLAT : IM_DEEPNOGROUPS );
@@ -1411,10 +1411,10 @@ const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_
aCurPos = pTmpObj->GetCurrentBoundRect().TopLeft();
if( aCurPos != aPos && aCurPos.Y() == aPos.Y() &&
- (bNext? (aCurPos.X() > aPos.X()) : // lies next to me
- (aCurPos.X() < aPos.X())) && // " reverse
- (bNext? (aCurPos.X() < aBestPos.X()) : // better as best
- (aCurPos.X() > aBestPos.X())) ) // " reverse
+ (bNext? (aCurPos.getX() > aPos.getX()) : // lies next to me
+ (aCurPos.getX() < aPos.getX())) && // " reverse
+ (bNext? (aCurPos.getX() < aBestPos.getX()) : // better as best
+ (aCurPos.getX() > aBestPos.getX())) ) // " reverse
{
aBestPos = aCurPos;
pBest = pTmpObj;
@@ -1424,32 +1424,32 @@ const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_
}
if( (
- (bNext? (aPos.Y() < aCurPos.Y()) : // only below me
- (aPos.Y() > aCurPos.Y())) && // " reverse
- (bNext? (aBestPos.Y() > aCurPos.Y()) : // closer below
- (aBestPos.Y() < aCurPos.Y()))
+ (bNext? (aPos.getY() < aCurPos.getY()) : // only below me
+ (aPos.getY() > aCurPos.getY())) && // " reverse
+ (bNext? (aBestPos.getY() > aCurPos.getY()) : // closer below
+ (aBestPos.getY() < aCurPos.getY()))
) || // " reverse
- (aBestPos.Y() == aCurPos.Y() &&
- (bNext? (aBestPos.X() > aCurPos.X()) : // further left
- (aBestPos.X() < aCurPos.X())))) // " reverse
+ (aBestPos.getY() == aCurPos.getY() &&
+ (bNext? (aBestPos.getX() > aCurPos.getX()) : // further left
+ (aBestPos.getX() < aCurPos.getX())))) // " reverse
{
aBestPos = aCurPos;
pBest = pObj;
}
- if( (bNext? (aTopPos.Y() > aCurPos.Y()) : // higher as best
- (aTopPos.Y() < aCurPos.Y())) || // " reverse
- (aTopPos.Y() == aCurPos.Y() &&
- (bNext? (aTopPos.X() > aCurPos.X()) : // further left
- (aTopPos.X() < aCurPos.X())))) // " reverse
+ if( (bNext? (aTopPos.getY() > aCurPos.getY()) : // higher as best
+ (aTopPos.getY() < aCurPos.getY())) || // " reverse
+ (aTopPos.getY() == aCurPos.getY() &&
+ (bNext? (aTopPos.getX() > aCurPos.getX()) : // further left
+ (aTopPos.getX() < aCurPos.getX())))) // " reverse
{
aTopPos = aCurPos;
pTop = pObj;
}
}
// unfortunately nothing found
- if( (bNext? (aBestPos.X() == LONG_MAX) : (aBestPos.X() == 0)) )
+ if( (bNext? (aBestPos.getX() == LONG_MAX) : (aBestPos.getX() == 0)) )
pBest = pTop;
}
@@ -1630,7 +1630,7 @@ sal_Bool SwFEShell::ImpEndCreate()
{
SwPosition aPos( GetDoc()->GetNodes() );
SwCrsrMoveState aState( MV_SETONLYTEXT );
- Point aPoint( aPt.X(), aPt.Y() + rBound.GetHeight()/2 );
+ Point aPoint( aPt.getX(), aPt.getY() + rBound.GetHeight()/2 );
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); //swmod 080317
// characterbinding not allowed in readonly-content
@@ -2864,13 +2864,13 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const
aInnerPoly.append(basegfx::B2DPoint(aRect.Left(), aRect.Bottom()));
- const basegfx::B2DPoint aCenterBottom(aRect.Center().X(), aRect.Bottom());
+ const basegfx::B2DPoint aCenterBottom(aRect.Center().getX(), aRect.Bottom());
aInnerPoly.appendBezierSegment(
aCenterBottom,
aCenterBottom,
- basegfx::B2DPoint(aRect.Center().X(), aRect.Center().Y()));
+ basegfx::B2DPoint(aRect.Center().getX(), aRect.Center().getY()));
- const basegfx::B2DPoint aCenterTop(aRect.Center().X(), aRect.Top());
+ const basegfx::B2DPoint aCenterTop(aRect.Center().getX(), aRect.Top());
aInnerPoly.appendBezierSegment(
aCenterTop,
aCenterTop,
@@ -2888,11 +2888,11 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const
aInnerPoly.appendBezierSegment(
basegfx::B2DPoint(aRect.Left(), aRect.Top()),
- basegfx::B2DPoint(aRect.Center().X(), aRect.Top()),
- basegfx::B2DPoint(aRect.Center().X(), aRect.Center().Y()));
+ basegfx::B2DPoint(aRect.Center().getX(), aRect.Top()),
+ basegfx::B2DPoint(aRect.Center().getX(), aRect.Center().getY()));
aInnerPoly.appendBezierSegment(
- basegfx::B2DPoint(aRect.Center().X(), aRect.Bottom()),
+ basegfx::B2DPoint(aRect.Center().getX(), aRect.Bottom()),
basegfx::B2DPoint(aRect.Right(), aRect.Bottom()),
basegfx::B2DPoint(aRect.Right(), aRect.Top()));
@@ -2919,7 +2919,7 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const
if(OBJ_PLIN == eSdrObjectKind)
{
- aInnerPoly.append(basegfx::B2DPoint(aRect.Center().X(), aRect.Bottom()));
+ aInnerPoly.append(basegfx::B2DPoint(aRect.Center().getX(), aRect.Bottom()));
}
else
{
@@ -2933,8 +2933,8 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const
{
sal_Int32 nYMiddle((aRect.Top() + aRect.Bottom()) / 2);
basegfx::B2DPolygon aTempPoly;
- aTempPoly.append(basegfx::B2DPoint(aRect.TopLeft().X(), nYMiddle));
- aTempPoly.append(basegfx::B2DPoint(aRect.BottomRight().X(), nYMiddle));
+ aTempPoly.append(basegfx::B2DPoint(aRect.TopLeft().getX(), nYMiddle));
+ aTempPoly.append(basegfx::B2DPoint(aRect.BottomRight().getX(), nYMiddle));
aPoly.append(aTempPoly);
}
break;
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index bbf751670506..24424386ba21 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -1807,19 +1807,19 @@ static Point lcl_ProjectOntoClosestTableFrm( const SwTabFrm& rTab, const Point&
// project onto closest line:
if ( bLeft || bRight )
{
- aRet.X() = aMin1.X();
- if ( aRet.Y() > aMin2.Y() )
- aRet.Y() = aMin2.Y();
- else if ( aRet.Y() < aMin1.Y() )
- aRet.Y() = aMin1.Y();
+ aRet.setX(aMin1.getX());
+ if ( aRet.getY() > aMin2.getY() )
+ aRet.setY(aMin2.getY());
+ else if ( aRet.getY() < aMin1.getY() )
+ aRet.setY(aMin1.getY());
}
else
{
- aRet.Y() = aMin1.Y();
- if ( aRet.X() > aMin2.X() )
- aRet.X() = aMin2.X();
- else if ( aRet.X() < aMin1.X() )
- aRet.X() = aMin1.X();
+ aRet.setY(aMin1.getY());
+ if ( aRet.getX() > aMin2.getX() )
+ aRet.setX(aMin2.getX());
+ else if ( aRet.getX() < aMin1.getX() )
+ aRet.setX(aMin1.getX());
}
return aRet;
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index cb89b35547b3..4593b69ac257 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -933,7 +933,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
aPos.X() = aVertEnvironRect.Right();
if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
{
- aPos.X() -= rVertEnvironLayFrm.GetRightMargin();
+ aPos.setX(aPos.getX() - rVertEnvironLayFrm.GetRightMargin());
}
}
else if ( bVertL2R )
@@ -941,7 +941,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
aPos.X() = aVertEnvironRect.Left();
if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
{
- aPos.X() += rVertEnvironLayFrm.GetLeftMargin();
+ aPos.setX(aPos.getX() + rVertEnvironLayFrm.GetLeftMargin());
}
}
else
@@ -949,12 +949,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
aPos.Y() = aVertEnvironRect.Top();
if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
{
- aPos.Y() += rVertEnvironLayFrm.GetTopMargin();
+ aPos.setY(aPos.getY() + rVertEnvironLayFrm.GetTopMargin());
// add height of page header
const SwFrm* pTmpFrm = rVertEnvironLayFrm.Lower();
if ( pTmpFrm->IsHeaderFrm() )
{
- aPos.Y() += pTmpFrm->Frm().Height();
+ aPos.setY(aPos.getY() + pTmpFrm->Frm().Height());
}
}
}
@@ -1004,11 +1004,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
if ( bVert || bVertL2R )
{
- aPos.X() = nTop;
+ aPos.setX(nTop);
}
else
{
- aPos.Y() = nTop;
+ aPos.setY(nTop);
}
}
@@ -1034,11 +1034,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
nLeft = (aChRect.*fnRect->fnGetLeft)();
if ( bVert || bVertL2R )
{
- aPos.Y() = nLeft;
+ aPos.setY(nLeft);
}
else
{
- aPos.X() = nLeft;
+ aPos.setX(nLeft);
}
}
if ( bVert || bVertL2R )
@@ -1095,35 +1095,35 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
case text::RelOrientation::FRAME_RIGHT:
{
- aPos.Y() += pFrm->Prt().Height();
+ aPos.setY(aPos.getY() + pFrm->Prt().Height());
aPos += (pFrm->Prt().*fnRect->fnGetPos)();
break;
}
case text::RelOrientation::PRINT_AREA:
{
aPos += (pFrm->Prt().*fnRect->fnGetPos)();
- aPos.Y() += nBaseOfstForFly;
+ aPos.setY(aPos.getY() + nBaseOfstForFly);
break;
}
case text::RelOrientation::PAGE_RIGHT:
{
- aPos.Y() = pPage->Frm().Top() + pPage->Prt().Bottom();
+ aPos.setY(pPage->Frm().Top() + pPage->Prt().Bottom());
break;
}
case text::RelOrientation::PAGE_PRINT_AREA:
{
- aPos.Y() = pPage->Frm().Top() + pPage->Prt().Top();
+ aPos.setY(pPage->Frm().Top() + pPage->Prt().Top());
break;
}
case text::RelOrientation::PAGE_LEFT:
case text::RelOrientation::PAGE_FRAME:
{
- aPos.Y() = pPage->Frm().Top();
+ aPos.setY(pPage->Frm().Top());
break;
}
case text::RelOrientation::FRAME:
{
- aPos.Y() += nBaseOfstForFly;
+ aPos.setY(aPos.getY() + nBaseOfstForFly);
break;
}
default: break;
@@ -1133,14 +1133,14 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
switch ( _eHoriRelOrient )
{
- case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrm->Prt().Left(); break;
+ case text::RelOrientation::FRAME_RIGHT: aPos.setX(aPos.getX() + pFrm->Prt().Left()); break;
case text::RelOrientation::FRAME:
- case text::RelOrientation::FRAME_LEFT: aPos.X() += pFrm->Frm().Width(); break;
- case text::RelOrientation::PRINT_AREA: aPos.X() += pFrm->Prt().Right(); break;
+ case text::RelOrientation::FRAME_LEFT: aPos.setX(aPos.getX() + pFrm->Frm().Width()); break;
+ case text::RelOrientation::PRINT_AREA: aPos.setX(aPos.getX() + pFrm->Prt().Right()); break;
case text::RelOrientation::PAGE_LEFT:
- case text::RelOrientation::PAGE_FRAME: aPos.X() = pPage->Frm().Right(); break;
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() = pPage->Frm().Left()
- + pPage->Prt().Left(); break;
+ case text::RelOrientation::PAGE_FRAME: aPos.setX(pPage->Frm().Right()); break;
+ case text::RelOrientation::PAGE_PRINT_AREA: aPos.setX(pPage->Frm().Left()
+ + pPage->Prt().Left()); break;
default: break;
}
}
@@ -1149,32 +1149,32 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::FRAME_LEFT:
- aPos.X() = pFrm->Frm().Left() +
- pFrm->Prt().Left();
+ aPos.setX(pFrm->Frm().Left() +
+ pFrm->Prt().Left());
break;
case text::RelOrientation::PRINT_AREA:
- aPos.X() = pFrm->Frm().Left() + pFrm->Prt().Left() +
- pFrm->Prt().Width();
- aPos.X() += nBaseOfstForFly;
+ aPos.setX(pFrm->Frm().Left() + pFrm->Prt().Left() +
+ pFrm->Prt().Width());
+ aPos.setX(aPos.getX() + nBaseOfstForFly);
break;
case text::RelOrientation::PAGE_LEFT:
- aPos.X() = pPage->Frm().Left() + pPage->Prt().Left();
+ aPos.setX(pPage->Frm().Left() + pPage->Prt().Left());
break;
case text::RelOrientation::PAGE_PRINT_AREA:
- aPos.X() = pPage->Frm().Left() + pPage->Prt().Left() +
- pPage->Prt().Width() ;
+ aPos.setX(pPage->Frm().Left() + pPage->Prt().Left() +
+ pPage->Prt().Width());
break;
case text::RelOrientation::PAGE_RIGHT:
case text::RelOrientation::PAGE_FRAME:
- aPos.X() = pPage->Frm().Right();
+ aPos.setX(pPage->Frm().Right());
break;
case text::RelOrientation::FRAME:
- aPos.X() += nBaseOfstForFly;
+ aPos.setX(aPos.getX() + nBaseOfstForFly);
break;
default: break;
}
@@ -1189,20 +1189,20 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
break;
case text::RelOrientation::PRINT_AREA:
aPos += pFrm->Prt().Pos();
- aPos.X() += nBaseOfstForFly;
+ aPos.setX(aPos.getX() + nBaseOfstForFly);
break;
case text::RelOrientation::PAGE_RIGHT:
- aPos.X() = pPage->Frm().Left() + pPage->Prt().Right();
+ aPos.setX(pPage->Frm().Left() + pPage->Prt().Right());
break;
case text::RelOrientation::PAGE_PRINT_AREA:
- aPos.X() = pPage->Frm().Left() + pPage->Prt().Left();
+ aPos.setX(pPage->Frm().Left() + pPage->Prt().Left());
break;
case text::RelOrientation::PAGE_LEFT:
case text::RelOrientation::PAGE_FRAME:
- aPos.X() = pPage->Frm().Left();
+ aPos.setX(pPage->Frm().Left());
break;
case text::RelOrientation::FRAME:
- aPos.X() += nBaseOfstForFly;
+ aPos.setX(aPos.getX() + nBaseOfstForFly);
break;
default: break;
}
@@ -1212,13 +1212,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
if( !_opRef )
{
if( bVertic && !bVerticalL2R )
- _orRect.Pos( aPos.X() - _orRect.Width() - _orRect.Left(), _orRect.Top() - aPos.Y() );
+ _orRect.Pos( aPos.getX() - _orRect.Width() - _orRect.Left(), _orRect.Top() - aPos.getY() );
else if( bVerticalL2R )
- _orRect.Pos( _orRect.Left() - aPos.X(), _orRect.Top() - aPos.Y() );
+ _orRect.Pos( _orRect.Left() - aPos.getX(), _orRect.Top() - aPos.getY() );
else if ( bRTL )
- _orRect.Pos( - ( _orRect.Right() - aPos.X() ), _orRect.Top() - aPos.Y() );
+ _orRect.Pos( - ( _orRect.Right() - aPos.getX() ), _orRect.Top() - aPos.getY() );
else
- _orRect.Pos( _orRect.Left() - aPos.X(), _orRect.Top() - aPos.Y() );
+ _orRect.Pos( _orRect.Left() - aPos.getX(), _orRect.Top() - aPos.getY() );
if( _bMirror )
_orRect.Pos( -_orRect.Right(), _orRect.Top() );
}
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index f0687c88e75e..48c252028b76 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -329,33 +329,33 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
const Point aBottomLeft( pCell->Frm().BottomLeft() );
const Point aBottomRight( pCell->Frm().BottomRight() );
- if ( aTopLeft.Y() < aCurrentTopLeft.Y() ||
- ( aTopLeft.Y() == aCurrentTopLeft.Y() &&
- aTopLeft.X() < aCurrentTopLeft.X() ) )
+ if ( aTopLeft.getY() < aCurrentTopLeft.getY() ||
+ ( aTopLeft.getY() == aCurrentTopLeft.getY() &&
+ aTopLeft.getX() < aCurrentTopLeft.getX() ) )
{
aCurrentTopLeft = aTopLeft;
pCurrentTopLeftFrm = static_cast<const SwCellFrm*>( pCell );
}
- if ( aTopRight.Y() < aCurrentTopRight.Y() ||
- ( aTopRight.Y() == aCurrentTopRight.Y() &&
- aTopRight.X() > aCurrentTopRight.X() ) )
+ if ( aTopRight.getY() < aCurrentTopRight.getY() ||
+ ( aTopRight.getY() == aCurrentTopRight.getY() &&
+ aTopRight.getX() > aCurrentTopRight.getX() ) )
{
aCurrentTopRight = aTopRight;
pCurrentTopRightFrm = static_cast<const SwCellFrm*>( pCell );
}
- if ( aBottomLeft.Y() > aCurrentBottomLeft.Y() ||
- ( aBottomLeft.Y() == aCurrentBottomLeft.Y() &&
- aBottomLeft.X() < aCurrentBottomLeft.X() ) )
+ if ( aBottomLeft.getY() > aCurrentBottomLeft.getY() ||
+ ( aBottomLeft.getY() == aCurrentBottomLeft.getY() &&
+ aBottomLeft.getX() < aCurrentBottomLeft.getX() ) )
{
aCurrentBottomLeft = aBottomLeft;
pCurrentBottomLeftFrm = static_cast<const SwCellFrm*>( pCell );
}
- if ( aBottomRight.Y() > aCurrentBottomRight.Y() ||
- ( aBottomRight.Y() == aCurrentBottomRight.Y() &&
- aBottomRight.X() > aCurrentBottomRight.X() ) )
+ if ( aBottomRight.getY() > aCurrentBottomRight.getY() ||
+ ( aBottomRight.getY() == aCurrentBottomRight.getY() &&
+ aBottomRight.getX() > aCurrentBottomRight.getX() ) )
{
aCurrentBottomRight = aBottomRight;
pCurrentBottomRightFrm = static_cast<const SwCellFrm*>( pCell );
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 574cc7cca21d..62a3deaf8ae0 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -528,8 +528,8 @@ void SwAnchoredDrawObject::_SetDrawObjAnchor()
if ( aNewAnchorPos != aCurrAnchorPos )
{
// determine movement to be applied after setting the new anchor position
- Size aMove( aCurrAnchorPos.X() - aNewAnchorPos.X(),
- aCurrAnchorPos.Y() - aNewAnchorPos.Y() );
+ Size aMove( aCurrAnchorPos.getX() - aNewAnchorPos.getX(),
+ aCurrAnchorPos.getY() - aNewAnchorPos.getY() );
// set new anchor position
DrawObj()->SetAnchorPos( aNewAnchorPos );
// correct object position, caused by setting new anchor position
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 884bfbad4226..b0b927616bd5 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -547,23 +547,23 @@ void SwFrm::MakePos()
// cells may now leave their uppers
if( bVert && FRM_CELL & nMyType && !mbReverse )
- maFrm.Pos().X() -= maFrm.Width() -pPrv->Frm().Width();
+ maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width() -pPrv->Frm().Width());
}
else if( bVert && FRM_NOTE_VERT & nMyType )
{
if( mbReverse )
- maFrm.Pos().X() += pPrv->Frm().Width();
+ maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width());
else
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
if ( bVertL2R )
- maFrm.Pos().X() += pPrv->Frm().Width();
+ maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width());
else
- maFrm.Pos().X() -= maFrm.Width();
+ maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width());
}
}
else
- maFrm.Pos().Y() += pPrv->Frm().Height();
+ maFrm.Pos().setY(maFrm.Pos().getY() + pPrv->Frm().Height());
}
else if ( GetUpper() )
{
@@ -602,17 +602,17 @@ void SwFrm::MakePos()
// cells may now leave their uppers
if( bVert && FRM_CELL & nMyType && !mbReverse )
- maFrm.Pos().X() -= maFrm.Width() -pPrv->Frm().Width();
+ maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width() -pPrv->Frm().Width());
}
else if( bVert && FRM_NOTE_VERT & nMyType )
{
if( mbReverse )
- maFrm.Pos().X() += pPrv->Frm().Width();
+ maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width());
else
- maFrm.Pos().X() -= maFrm.Width();
+ maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width());
}
else
- maFrm.Pos().Y() += pPrv->Frm().Height();
+ maFrm.Pos().setY(maFrm.Pos().getY() + pPrv->Frm().Height());
}
else
{
@@ -621,22 +621,25 @@ void SwFrm::MakePos()
if( FRM_NEIGHBOUR & nMyType && IsRightToLeft() )
{
if( bVert )
- maFrm.Pos().Y() += GetUpper()->Prt().Height()
- - maFrm.Height();
+ maFrm.Pos().setY(maFrm.Pos().getY() + GetUpper()->Prt().Height()
+ - maFrm.Height());
else
- maFrm.Pos().X() += GetUpper()->Prt().Width()
- - maFrm.Width();
+ maFrm.Pos().setX(maFrm.Pos().getY() + GetUpper()->Prt().Width()
+ - maFrm.Width());
}
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
else if( bVert && !bVertL2R && FRM_NOTE_VERT & nMyType && !mbReverse )
- maFrm.Pos().X() -= maFrm.Width() - GetUpper()->Prt().Width();
+ maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width() - GetUpper()->Prt().Width());
}
}
else
- maFrm.Pos().X() = maFrm.Pos().Y() = 0;
+ {
+ maFrm.Pos().setX(0);
+ maFrm.Pos().setY(0);
+ }
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if( IsBodyFrm() && bVert && !bVertL2R && !mbReverse && GetUpper() )
- maFrm.Pos().X() += GetUpper()->Prt().Width() - maFrm.Width();
+ maFrm.Pos().setX(maFrm.Pos().getX() + GetUpper()->Prt().Width() - maFrm.Width());
mbValidPos = sal_True;
}
}
@@ -966,7 +969,8 @@ sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
if( (Prt().*fnRect->fnGetHeight)() )
((SwTxtFrm*)this)->HideHidden();
- Prt().Pos().X() = Prt().Pos().Y() = 0;
+ Prt().Pos().setX(0);
+ Prt().Pos().setY(0);
(Prt().*fnRect->fnSetWidth)( (Frm().*fnRect->fnGetWidth)() );
(Prt().*fnRect->fnSetHeight)( 0 );
nUpper = -( (Frm().*fnRect->fnGetHeight)() );
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index f72a1eeb4e4c..d92184988db4 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -177,7 +177,8 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) :
//Und erstmal in den Wald stellen die Kiste, damit bei neuen Dokument nicht
//unnoetig viel formatiert wird.
- Frm().Pos().X() = Frm().Pos().Y() = FAR_AWAY;
+ Frm().Pos().setX(FAR_AWAY);
+ Frm().Pos().setY(FAR_AWAY);
}
void SwFlyFrm::Chain( SwFrm* _pAnch )
@@ -1324,7 +1325,8 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
if ( Frm().Top() == FAR_AWAY && Frm().Left() == FAR_AWAY )
{
//Sicherheitsschaltung wegnehmen (siehe SwFrm::CTor)
- Frm().Pos().X() = Frm().Pos().Y() = 0;
+ Frm().Pos().setX(0);
+ Frm().Pos().setY(0);
// #i68520#
InvalidateObjRectWithSpaces();
}
@@ -2678,7 +2680,7 @@ sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour,
else
aNewPoint = pOutDev->LogicToLogic( rPoly[ i ], aGrfMap, aDispMap );
- rPoly[ i ] = Point( FRound( aNewPoint.X() * fScaleX ), FRound( aNewPoint.Y() * fScaleY ) );
+ rPoly[ i ] = Point( FRound( aNewPoint.getX() * fScaleX ), FRound( aNewPoint.getY() * fScaleY ) );
}
}
}
@@ -2750,17 +2752,17 @@ const SwRect SwFlyFrm::GetObjBoundRect() const
// #i68520#
bool SwFlyFrm::_SetObjTop( const SwTwips _nTop )
{
- const bool bChanged( Frm().Pos().Y() != _nTop );
+ const bool bChanged( Frm().Pos().getY() != _nTop );
- Frm().Pos().Y() = _nTop;
+ Frm().Pos().setY(_nTop);
return bChanged;
}
bool SwFlyFrm::_SetObjLeft( const SwTwips _nLeft )
{
- const bool bChanged( Frm().Pos().X() != _nLeft );
+ const bool bChanged( Frm().Pos().getX() != _nLeft );
- Frm().Pos().X() = _nLeft;
+ Frm().Pos().setX(_nLeft);
return bChanged;
}
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 41057cdf31d2..32c6f89a9016 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -1039,14 +1039,14 @@ static void lcl_PointToPrt( Point &rPoint, const SwFrm *pFrm )
{
SwRect aTmp( pFrm->Prt() );
aTmp += pFrm->Frm().Pos();
- if ( rPoint.X() < aTmp.Left() )
- rPoint.X() = aTmp.Left();
- else if ( rPoint.X() > aTmp.Right() )
- rPoint.X() = aTmp.Right();
- if ( rPoint.Y() < aTmp.Top() )
- rPoint.Y() = aTmp.Top();
- else if ( rPoint.Y() > aTmp.Bottom() )
- rPoint.Y() = aTmp.Bottom();
+ if ( rPoint.getX() < aTmp.Left() )
+ rPoint.setX(aTmp.Left());
+ else if ( rPoint.getX() > aTmp.Right() )
+ rPoint.setX(aTmp.Right());
+ if ( rPoint.getY() < aTmp.Top() )
+ rPoint.setY(aTmp.Top());
+ else if ( rPoint.getY() > aTmp.Bottom() )
+ rPoint.setY(aTmp.Bottom());
}
@@ -1214,7 +1214,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
Point aNew( rNew );
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() )
- aNew.X() += Frm().Width();
+ aNew.setX(aNew.getX() + Frm().Width());
SwCntntFrm *pCnt = (SwCntntFrm*)::FindAnchor( GetAnchorFrm(), aNew );
if( pCnt->IsProtected() )
pCnt = (SwCntntFrm*)GetAnchorFrm();
@@ -1229,9 +1229,9 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
( !bRTL != !GetAnchorFrm()->IsRightToLeft() ) )
{
if( bVert || bRTL )
- aNew.X() += Frm().Width();
+ aNew.setX(aNew.getX() + Frm().Width());
else
- aNew.X() -= Frm().Width();
+ aNew.setX(aNew.getX() - Frm().Width());
}
if ( pCnt->IsInDocBody() )
@@ -1305,7 +1305,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
if ( pUp->IsVertLR() )
- nDiff += pUp->Prt().Width() - pFollow->GetRelPos().X();
+ nDiff += pUp->Prt().Width() - pFollow->GetRelPos().getX();
else
nDiff += pFollow->Frm().Left() + pFollow->Frm().Width()
- pUp->Frm().Left() - pUp->Prt().Left();
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 671c249e1bf2..a0d9a3f71e39 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -47,9 +47,9 @@ SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) :
// OD 2004-05-27 #i26791# - member <aRelPos> moved to <SwAnchoredObject>
Point aRelPos;
if( pAnch && pAnch->IsVertical() )
- aRelPos.X() = pAnch->IsReverse() ? nRel : -nRel;
+ aRelPos.setX(pAnch->IsReverse() ? nRel : -nRel);
else
- aRelPos.Y() = nRel;
+ aRelPos.setY(nRel);
SetCurrRelPos( aRelPos );
}
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index a45fcaa8c69c..aee7e44a7811 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -3435,8 +3435,8 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt1
// nocht nicht "formatiert" sind
if( !bCalcFrm && nFrmType & FRM_FLY &&
((SwFlyFrm*)pTmpFrm)->GetAnchorFrm() &&
- FAR_AWAY == pTmpFrm->Frm().Pos().X() &&
- FAR_AWAY == pTmpFrm->Frm().Pos().Y() )
+ FAR_AWAY == pTmpFrm->Frm().Pos().getX() &&
+ FAR_AWAY == pTmpFrm->Frm().Pos().getY() )
aCalcRect = ((SwFlyFrm*)pTmpFrm)->GetAnchorFrm()->Frm();
else
aCalcRect = pTmpFrm->Frm();
@@ -3450,7 +3450,7 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt1
// Point not in rectangle. Compare distances:
const Point aCalcRectCenter = aCalcRect.Center();
const Point aDiff = aCalcRectCenter - *pPoint;
- const sal_uInt64 nCurrentDist = aDiff.X() * aDiff.X() + aDiff.Y() * aDiff.Y(); // opt: no sqrt
+ const sal_uInt64 nCurrentDist = aDiff.getX() * aDiff.getX() + aDiff.getY() * aDiff.getY(); // opt: no sqrt
if ( !pMinFrm || nCurrentDist < nMinDist )
{
pMinFrm = pTmpFrm;
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 5421332650bb..304bbcbece10 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -120,7 +120,7 @@ void SwBodyFrm::Format( const SwBorderAttrs * )
Frm().Height( nHeight );
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frm().Width() )
- Frm().Pos().X() += Frm().Width() - nWidth;
+ Frm().Pos().setX(Frm().Pos().getX() + Frm().Width() - nWidth);
Frm().Width( nWidth );
}
@@ -169,7 +169,8 @@ void SwBodyFrm::Format( const SwBorderAttrs * )
}
if( bNoGrid )
{
- Prt().Pos().X() = Prt().Pos().Y() = 0;
+ Prt().Pos().setX(0);
+ Prt().Pos().setY(0);
Prt().Height( Frm().Height() );
Prt().Width( Frm().Width() );
}
@@ -1691,11 +1692,13 @@ void SwRootFrm::MakeAll()
{
if ( !mbValidPos )
{ mbValidPos = sal_True;
- maFrm.Pos().X() = maFrm.Pos().Y() = DOCUMENTBORDER;
+ maFrm.Pos().setX(DOCUMENTBORDER);
+ maFrm.Pos().setY(DOCUMENTBORDER);
}
if ( !mbValidPrtArea )
{ mbValidPrtArea = sal_True;
- maPrt.Pos().X() = maPrt.Pos().Y() = 0;
+ maPrt.Pos().setX(0);
+ maPrt.Pos().setY(0);
maPrt.SSize( maFrm.SSize() );
}
if ( !mbValidSize )
@@ -2118,7 +2121,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
maPageRects.clear();
- const long nBorder = Frm().Pos().X();
+ const long nBorder = Frm().Pos().getX();
const long nVisWidth = mnViewWidth - 2 * nBorder;
const long nGapBetweenPages = GAPBETWEENPAGES;
@@ -2288,10 +2291,10 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
// RTL view layout: Calculate mirrored page position
if ( bRTL )
{
- const long nXOffsetInRow = aNewPagePos.X() - nRowStart;
- aNewPagePos.X() = nRowEnd - nXOffsetInRow - nCurrentPageWidth;
+ const long nXOffsetInRow = aNewPagePos.getX() - nRowStart;
+ aNewPagePos.setX(nRowEnd - nXOffsetInRow - nCurrentPageWidth);
aNewPagePosWithLeftOffset = aNewPagePos;
- aNewPagePosWithLeftOffset.X() += nLeftPageAddOffset;
+ aNewPagePosWithLeftOffset.setX(aNewPagePosWithLeftOffset.getX() + nLeftPageAddOffset);
}
if ( aNewPagePosWithLeftOffset != aOldPagePos )
@@ -2307,12 +2310,12 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
const bool bLastColumn = pPageToAdjust->GetNext() == pEndOfRow;
const bool bLastRow = !pEndOfRow;
- nMinPageLeft = std::min( nMinPageLeft, aNewPagePos.X() );
- nMaxPageRight = std::max( nMaxPageRight, aNewPagePos.X() + nCurrentPageWidth);
+ nMinPageLeft = std::min( nMinPageLeft, aNewPagePos.getX() );
+ nMaxPageRight = std::max( nMaxPageRight, aNewPagePos.getX() + nCurrentPageWidth);
// border of nGapBetweenPages around the current page:
- SwRect aPageRectWithBorders( aNewPagePos.X() - nGapBetweenPages,
- aNewPagePos.Y(),
+ SwRect aPageRectWithBorders( aNewPagePos.getX() - nGapBetweenPages,
+ aNewPagePos.getY(),
pPageToAdjust->Frm().SSize().Width() + nGapBetweenPages + nSidebarWidth,
nCurrentRowHeight );
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 45b0fd41214d..2ca8e9b091c5 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5416,11 +5416,11 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
bool bBorder = bLeft || bRight;
while( nY < aInter.Top() )
{
- aTmp.Pos().Y() = nY;
+ aTmp.Pos().setY(nY);
if( bGrid )
{
nY += nGrid;
- SwTwips nPosY = std::max( aInter.Top(), aTmp.Pos().Y() );
+ SwTwips nPosY = std::max( aInter.Top(), aTmp.Pos().getY() );
SwTwips nHeight = std::min(nBottom, nY ) - nPosY;
if( nHeight )
{
@@ -5453,7 +5453,7 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
nY += nRuby;
if( bBorder )
{
- SwTwips nPos = std::max(aInter.Top(),aTmp.Pos().Y());
+ SwTwips nPos = std::max(aInter.Top(),aTmp.Pos().getY());
SwTwips nH = std::min( nBottom, nY ) - nPos;
SwRect aVert( Point( aGrid.Left(), nPos ),
Size( 1, nH ) );
@@ -5463,7 +5463,7 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
PaintBorderLine(rRect,aVert,this,pCol);
if( bRight )
{
- aVert.Pos().X() = nGridRight;
+ aVert.Pos().setX(nGridRight);
PaintBorderLine(rRect,aVert,this,pCol);
}
}
@@ -5473,33 +5473,33 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
}
while( nY <= nBottom )
{
- aTmp.Pos().Y() = nY;
+ aTmp.Pos().setY(nY);
PaintBorderLine( rRect, aTmp, this, pCol);
if( bGrid )
{
nY += nGrid;
- SwTwips nHeight = std::min(nBottom, nY) - aTmp.Pos().Y();
+ SwTwips nHeight = std::min(nBottom, nY) - aTmp.Pos().getY();
if( nHeight )
{
if( bCell )
{
- SwRect aVert( Point( nX, aTmp.Pos().Y() ),
+ SwRect aVert( Point( nX, aTmp.Pos().getY() ),
Size( 1, nHeight ) );
while( aVert.Left() <= nRight )
{
PaintBorderLine( rRect, aVert, this, pCol);
- aVert.Pos().X() += nGridWidth; //for textgrid refactor
+ aVert.Pos().setX(aVert.Pos().getX() + nGridWidth); //for textgrid refactor
}
}
else if( bBorder )
{
SwRect aVert( Point( aGrid.Left(),
- aTmp.Pos().Y() ), Size( 1, nHeight ) );
+ aTmp.Pos().getY() ), Size( 1, nHeight ) );
if( bLeft )
PaintBorderLine(rRect,aVert,this,pCol);
if( bRight )
{
- aVert.Pos().X() = nGridRight;
+ aVert.Pos().setX(nGridRight);
PaintBorderLine(rRect,aVert,this,pCol);
}
}
@@ -5520,7 +5520,7 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
PaintBorderLine(rRect,aVert,this,pCol);
if( bRight )
{
- aVert.Pos().X() = nGridRight;
+ aVert.Pos().setX(nGridRight);
PaintBorderLine(rRect,aVert,this,pCol);
}
}
@@ -6467,7 +6467,7 @@ static drawinglayer::primitive2d::Primitive2DSequence lcl_CreatePageAreaDelimite
basegfx::B2DVector aHorizVector( aXOffDirs[i], 0.0 );
basegfx::B2DVector aVertVector( 0.0, aYOffDirs[i] );
- basegfx::B2DPoint aBPoint( aPoints[i].X(), aPoints[i].Y() );
+ basegfx::B2DPoint aBPoint( aPoints[i].X(), aPoints[i].getY() );
basegfx::B2DPolygon aPolygon;
aPolygon.append( aBPoint + aHorizVector * nLineLength );
@@ -6522,7 +6522,7 @@ static drawinglayer::primitive2d::Primitive2DSequence lcl_CreateColumnAreaDelimi
basegfx::B2DVector aHorizVector( aXOffDirs[i], 0.0 );
basegfx::B2DVector aVertVector( 0.0, aYOffDirs[i] );
- basegfx::B2DPoint aBPoint( aPoints[i].X(), aPoints[i].Y() );
+ basegfx::B2DPoint aBPoint( aPoints[i].getX(), aPoints[i].getY() );
basegfx::B2DPolygon aPolygon;
aPolygon.append( aBPoint + aHorizVector * nLineLength );