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/doc | |
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/doc')
-rw-r--r-- | sw/source/core/doc/docdraw.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/doc/docfly.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/notxtfrm.cxx | 16 |
3 files changed, 21 insertions, 21 deletions
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); } } |