diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-05-17 09:17:02 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-05-20 18:59:38 +0000 |
commit | 76fbba8259b3daeb0543cca15c84d5df281e687c (patch) | |
tree | 0b897f4e70f5397789c6de9a02185744e3ca69b6 /sw/source/core/frmedt | |
parent | bd888a331b6eafbdf3225e15e47c1190bd5bd6b7 (diff) |
sw: convert some usage of Point::X/Y to Point::set/getX/Y, take two
69c52bc5b7973a2e414209470f5bf9b66dcc4f30 had some typos, and got
reverted in 78123a504b5215d061935d7b2771ba51e68cae0e, this does the
same, except those typos corrected, so vertical layout is still OK.
Change-Id: I79fe610e4cc8bbbddbd8415198d6309a93f4ba18
Reviewed-on: https://gerrit.libreoffice.org/3929
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sw/source/core/frmedt')
-rw-r--r-- | sw/source/core/frmedt/fecopy.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/frmedt/fefly1.cxx | 28 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 74 | ||||
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 20 | ||||
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 78 | ||||
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 24 |
6 files changed, 117 insertions, 117 deletions
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 2ffbc1d6b49c..535c67e7a1d6 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 ); |