diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-05-08 13:32:46 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-05-08 14:32:11 +0200 |
commit | 69c52bc5b7973a2e414209470f5bf9b66dcc4f30 (patch) | |
tree | 1bff15f50586412234a84255a24209af95cd0c91 /sw/source/core/layout/flycnt.cxx | |
parent | aec4128cccb1c16f793df065a31a98f3b112d256 (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
Diffstat (limited to 'sw/source/core/layout/flycnt.cxx')
-rw-r--r-- | sw/source/core/layout/flycnt.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
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(); |