diff options
32 files changed, 282 insertions, 291 deletions
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index 87532893ebdf..e80e97b91cb0 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.setX(aPixPoint.getX() + aPixPos.getX()); - aPixPoint.setY(aPixPoint.getY() + aPixPos.getY()); + aPixPoint.X() += aPixPos.X(); + aPixPoint.Y() += aPixPos.Y(); } 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.getX(), -aParentPixPos.getY() ); + aPixBounds.Move( -aParentPixPos.X(), -aParentPixPos.Y() ); } } @@ -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.getX(), aPixPos.getY()); + awt::Point aPoint(aPixPos.X(), aPixPos.Y()); return aPoint; } diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 746146bef5a9..78981f851050 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.getX(), aPixPos.getY() ); + awt::Point aLoc( aPixPos.X(), aPixPos.Y() ); 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.getX(), aPixPos.getY() ); + awt::Point aLoc( aPixPos.X(), aPixPos.Y() ); return aLoc; } diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 3b6ef33fdbff..5dba314cf271 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.getX(), -aFrmPixPos.getY() ); + aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() ); // 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.setX(aPoint.getX() + aPixPos.getX()); - aPoint.setY(aPoint.getY() + aPixPos.getY()); + aPoint.X() += aPixPos.X(); + aPoint.Y() += aPixPos.Y(); 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().getX() > aCorePoint.getX()) || - ( bVert && aResultRect.Pos().getY() > aCorePoint.getY()) || - ( bR2L && aResultRect.Right() < aCorePoint.getX()) ) + if ( (!bVert && aResultRect.Pos().X() > aCorePoint.X()) || + ( bVert && aResultRect.Pos().Y() > aCorePoint.Y()) || + ( bR2L && aResultRect.Right() < aCorePoint.X()) ) { SwIndex aIdxPrev( pNode, nIndex - 1); SwPosition aPosPrev( *pNode, aIdxPrev ); SwRect aResultRectPrev; pFrm->GetCharRect( aResultRectPrev, aPosPrev ); - 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()) ) + 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()) ) 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.getX(), -aFrmPixPos.getY() ); + aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() ); // 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 f74473002c7e..8992690826ec 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.getY() ); + maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() ); CollectData( pLower ); } } else if( pLower->IsCellFrm() && rLower.IsAccessible( mbIsInPagePreview ) ) { - maColumns.insert( pLower->Frm().Left() - maTabFrmPos.getX() ); + maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() ); } 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.getX() ); + aArea.Left( *aStt + aPos.X() ); else - aArea.Top( *aStt + aPos.getY() ); + aArea.Top( *aStt + aPos.Y() ); } 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.getX() - 1 ); + aArea.Right( *aEnd + aPos.X() - 1 ); else - aArea.Bottom( *aEnd + aPos.getY() - 1 ); + aArea.Bottom( *aEnd + aPos.Y() - 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 a403c46272a7..40db66c52168 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.setY(m_Point.getY() + m_Size.getHeight() + 1); + m_Point.Y() += m_Size.getHeight() + 1; m_Size.setHeight(-m_Size.getHeight()); } if ( m_Size.getWidth() < 0 ) { - m_Point.setX(m_Point.getX() + m_Size.getWidth() + 1); + m_Point.X() += 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.setX(m_Point.getX() - nSub); } +void SwRect::SubLeft( const long nSub ){ m_Size.Width() += nSub; m_Point.X() -= nSub; } void SwRect::AddRight( const long nAdd ){ m_Size.Width() += nAdd; } -void SwRect::SubTop( const long nSub ){ m_Size.Height() += nSub; m_Point.setY(m_Point.getY() - nSub); } +void SwRect::SubTop( const long nSub ){ m_Size.Height() += nSub; m_Point.Y() -= 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 23b54f20f8f1..24b2d0e02161 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1169,8 +1169,8 @@ void SwCrsrShell::VisPortChgd( const SwRect & rRect ) m_pVisCrsr->Hide(); m_bVisPortChgd = sal_True; - m_aOldRBPos.setX(VisArea().Right()); - m_aOldRBPos.setY(VisArea().Bottom()); + m_aOldRBPos.X() = VisArea().Right(); + m_aOldRBPos.Y() = VisArea().Bottom(); // For not having problems with the SV cursor, Update() is called for the // Window in ViewShell::VisPo... @@ -1428,14 +1428,14 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd ) m_pTblCrsr->Show(); // set Cursor-Points to the new Positions - m_pTblCrsr->GetPtPos().setX(m_aCharRect.Left()); - m_pTblCrsr->GetPtPos().setY(m_aCharRect.Top()); + m_pTblCrsr->GetPtPos().X() = m_aCharRect.Left(); + m_pTblCrsr->GetPtPos().Y() = m_aCharRect.Top(); if( m_bSVCrsrVis ) { - m_aCrsrHeight.setX(0); - m_aCrsrHeight.setY(aTmpState.aRealHeight.getY() < 0 ? - -m_aCharRect.Width() : m_aCharRect.Height()); + m_aCrsrHeight.X() = 0; + m_aCrsrHeight.Y() = aTmpState.aRealHeight.Y() < 0 ? + -m_aCharRect.Width() : m_aCharRect.Height(); m_pVisCrsr->Show(); // show again } m_eMvState = MV_NONE; // state for cursor travelling - GetCrsrOfst @@ -1636,15 +1636,15 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd ) m_aCrsrHeight = aTmpState.aRealHeight; else { - m_aCrsrHeight.setX(0); - m_aCrsrHeight.setY(aTmpState.aRealHeight.getY() < 0 ? - -m_aCharRect.Width() : m_aCharRect.Height()); + m_aCrsrHeight.X() = 0; + m_aCrsrHeight.Y() = aTmpState.aRealHeight.Y() < 0 ? + -m_aCharRect.Width() : m_aCharRect.Height(); } } else { - m_aCrsrHeight.setX(0); - m_aCrsrHeight.setY(m_aCharRect.Height()); + m_aCrsrHeight.X() = 0; + m_aCrsrHeight.Y() = m_aCharRect.Height(); } if( !bFirst && aOld == m_aCharRect ) @@ -1662,8 +1662,8 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd ) bFirst = false; // update cursor Points to the new Positions - pShellCrsr->GetPtPos().setX(m_aCharRect.Left()); - pShellCrsr->GetPtPos().setY(m_aCharRect.Top()); + pShellCrsr->GetPtPos().X() = m_aCharRect.Left(); + pShellCrsr->GetPtPos().Y() = m_aCharRect.Top(); if( !(eFlags & SwCrsrShell::UPDOWN )) // delete old Pos. of Up/Down { @@ -1756,9 +1756,9 @@ void SwCrsrShell::RefreshBlockCursor() if( pFrm ) { if( pFrm->IsVertical() ) - aPt.setY(pFrm->Frm().Top() + GetUpDownX()); + aPt.Y() = pFrm->Frm().Top() + GetUpDownX(); else - aPt.setX(pFrm->Frm().Left() + GetUpDownX()); + aPt.X() = pFrm->Frm().Left() + GetUpDownX(); } aMk = rBlock.GetMkPos(); } @@ -2267,8 +2267,8 @@ sal_Bool SwCrsrShell::SetVisCrsr( const Point &rPt ) m_aCrsrHeight = aTmpState.aRealHeight; else { - m_aCrsrHeight.setX(0); - m_aCrsrHeight.setY(m_aCharRect.Height()); + m_aCrsrHeight.X() = 0; + m_aCrsrHeight.Y() = m_aCharRect.Height(); } m_pVisCrsr->SetDragCrsr( true ); @@ -2606,12 +2606,12 @@ void SwCrsrShell::MakeSelVisible() { SwRect aTmp( m_aCharRect ); long nDiff = m_aCharRect.Height() - VisArea().Height(); - if( nDiff < m_aCrsrHeight.getX() ) + if( nDiff < m_aCrsrHeight.X() ) aTmp.Top( nDiff + m_aCharRect.Top() ); else { - aTmp.Top( m_aCrsrHeight.getX() + m_aCharRect.Top() ); - aTmp.Height( m_aCrsrHeight.getY() ); + aTmp.Top( m_aCrsrHeight.X() + m_aCharRect.Top() ); + aTmp.Height( m_aCrsrHeight.Y() ); } if( !aTmp.HasArea() ) { diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index a206d0c0a485..6e9d24d2446e 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.setX(m_aCharRect.Center().getX()); - aPt.setY(pFrm->Frm().Top() + m_nUpDownX); + aPt.X() = m_aCharRect.Center().X(); + aPt.Y() = pFrm->Frm().Top() + m_nUpDownX; } else { - aPt.setY(m_aCharRect.Center().getY()); - aPt.setX(pFrm->Frm().Left() + m_nUpDownX); + aPt.Y() = m_aCharRect.Center().Y(); + aPt.X() = 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.setX(m_aCharRect.Center().getX()); - aPt.setY(pFrm->Frm().Top() + m_nUpDownX); + aPt.X() = m_aCharRect.Center().X(); + aPt.Y() = pFrm->Frm().Top() + m_nUpDownX; } else { - aPt.setY(m_aCharRect.Center().getY()); - aPt.setX(pFrm->Frm().Left() + m_nUpDownX); + aPt.Y() = m_aCharRect.Center().Y(); + aPt.X() = 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 73a9edd60f0f..54715ed1ed7b 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.getY() - pFrm->Frm().Top() : - aPt.getX() - pFrm->Frm().Left(); + aPt.Y() - pFrm->Frm().Top() : + aPt.X() - 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.setX(aTmpRect.Center().getX()); + aPt.X() = aTmpRect.Center().X(); pFrm->Calc(); - aPt.setY(pFrm->Frm().Top() + nUpDownX); + aPt.Y() = pFrm->Frm().Top() + nUpDownX; } else { - aPt.setY(aTmpRect.Center().getY()); + aPt.Y() = aTmpRect.Center().Y(); pFrm->Calc(); - aPt.setX(pFrm->Frm().Left() + nUpDownX); + aPt.X() = 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 d45d5938420b..ef7865653a25 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.setX(aPt.getX() + pCnt->Prt().Width()); - aPt.setY(aPt.getY() + pCnt->Prt().Height()); + aPt.X() += pCnt->Prt().Width(); + aPt.Y() += 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 40a17edcdfc4..3a88cf6264b1 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.setX(aPt.getX() > (pFrm->Frm().Left() + (pFrm->Frm().SSize().Width() / 2 )) + aPt.X() = aPt.X() > (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 7c2d1de09c98..271d6981b4d4 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.getY(); + long nTmpY = pCrsrShell->m_aCrsrHeight.Y(); if( 0 > nTmpY ) { nTmpY = -nTmpY; aTxtCrsr.SetOrientation( 900 ); aRect = SwRect( pCrsrShell->m_aCharRect.Pos(), Size( pCrsrShell->m_aCharRect.Height(), nTmpY ) ); - aRect.Pos().setX(aRect.Pos().getX() + pCrsrShell->m_aCrsrHeight.getX()); + aRect.Pos().X() += pCrsrShell->m_aCrsrHeight.X(); if( pCrsrShell->IsOverwriteCrsr() ) - aRect.Pos().setY(aRect.Pos().getY() + aRect.Width()); + aRect.Pos().Y() += aRect.Width(); } else { aTxtCrsr.SetOrientation( 0 ); aRect = SwRect( pCrsrShell->m_aCharRect.Pos(), Size( pCrsrShell->m_aCharRect.Width(), nTmpY ) ); - aRect.Pos().setY(aRect.Pos().getY() + pCrsrShell->m_aCrsrHeight.getX()); + aRect.Pos().Y() += pCrsrShell->m_aCrsrHeight.X(); } // 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 7419baf66bd7..a1475951ad37 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.getX(); - nVertRelPos = aObjRect.Top() - aAnchorPos.getY(); + nHoriRelPos = aObjRect.Left() - aAnchorPos.X(); + nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); } else { //FRMDIR_VERT_TOP_RIGHT - nHoriRelPos = aObjRect.Top() - aAnchorPos.getY(); - nVertRelPos = aAnchorPos.getX() - aObjRect.Right(); + nHoriRelPos = aObjRect.Top() - aAnchorPos.Y(); + nVertRelPos = aAnchorPos.X() - aObjRect.Right(); } } else if ( bR2L ) { - nHoriRelPos = aAnchorPos.getX() - aObjRect.Right(); - nVertRelPos = aObjRect.Top() - aAnchorPos.getY(); + nHoriRelPos = aAnchorPos.X() - aObjRect.Right(); + nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); } else { - nHoriRelPos = aObjRect.Left() - aAnchorPos.getX(); - nVertRelPos = aObjRect.Top() - aAnchorPos.getY(); + nHoriRelPos = aObjRect.Left() - aAnchorPos.X(); + nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); } //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.getX(), aAnchorPos.getY() ) ); + pObj->NbcMove( Size( aAnchorPos.X(), aAnchorPos.Y() ) ); } pFmt = MakeDrawFrmFmt( OUString("DrawObject"), diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 132480c1714e..7ac644eaf610 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.getX() - aNewAnchorPos.getX(); + nPos += aOldAnchorPos.X() - aNewAnchorPos.X(); 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.getY() - aNewAnchorPos.getY(); + nPos += aOldAnchorPos.Y() - aNewAnchorPos.Y(); 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.setX(aPoint.getX() - 1); + aPoint.X() -= 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.setX(aPoint.getX() - 1); // Do not load in the DrawObj! + aPoint.X() -= 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 b433e8e32dfb..ced0f108a3ee 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.setX(rPt.getX() + rDim.Width() -1); + rPt.X() += rDim.Width() -1; rDim.Width() = -rDim.Width(); } if( nMirror == RES_MIRROR_GRAPH_HOR || nMirror == RES_MIRROR_GRAPH_BOTH ) { - rPt.setY(rPt.getY() + rDim.Height() -1); + rPt.Y() += 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.setX(aVisPt.getX() + nLeftCrop); + aVisPt.X() += nLeftCrop; aVisSz.Width() -= nLeftCrop; } if ( nTopCrop > 0 ) { - aVisPt.setY(aVisPt.getY() + nTopCrop); + aVisPt.Y() += nTopCrop; aVisSz.Height() -= nTopCrop; } if ( nRightCrop > 0 ) @@ -423,9 +423,9 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, if ( pOrigRect ) { Size aTmpSz( aGrfSz ); - aGrfPt.setX(aGrfPt.getY() + nLeftCrop); + aGrfPt.X() += nLeftCrop; aTmpSz.Width() -= nLeftCrop + nRightCrop; - aGrfPt.setY(aGrfPt.getY() + nTopCrop); + aGrfPt.Y() += 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.setY(rRect.Height()); - pCMS->aRealHeight.setX(0); + pCMS->aRealHeight.Y() = rRect.Height(); + pCMS->aRealHeight.X() = 0; } } diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx index 916a70fb1831..ccdaf72d1a27 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].getX() * pOutDev->ImplGetDPIX() / nGrfDPIx, - rPoly[i].getY() * pOutDev->ImplGetDPIY() / nGrfDPIy ); + rPoly[i] = Point( rPoly[i].X() * pOutDev->ImplGetDPIX() / nGrfDPIx, + rPoly[i].Y() * pOutDev->ImplGetDPIY() / nGrfDPIy ); } } else diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 18337b209e28..0733af1ccd8e 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().setX(aRect.Pos().getX() + rRec.nTol); - aRect.Pos().setY(aRect.Pos().getY() + rRec.nTol); + aRect.Pos().X() += rRec.nTol; + aRect.Pos().Y() += 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 ff1fcde712a6..cee0e0dabaa2 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.getX() )) - += ',' ) += OUString::number( aPt.getY() ); + ((( sTxt += '?' ) += OUString::number( aPt.X() )) + += ',' ) += OUString::number( aPt.Y() ); } } diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 6cbd572ee37a..694f91521117 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.getX(), aPt.getY(), 1, 1 ); + const SwRect aRect( aPt.X(), aPt.Y(), 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 3fa4a73870ee..0bedb7389015 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.getX(), text::HoriOrientation::NONE, text::RelOrientation::FRAME ) ); - pFmt->SetFmtAttr( SwFmtVertOrient( aPos.getY(), text::VertOrientation::NONE, text::RelOrientation::FRAME ) ); + pFmt->SetFmtAttr( SwFmtHoriOrient( aPos.X(), text::HoriOrientation::NONE, text::RelOrientation::FRAME ) ); + pFmt->SetFmtAttr( SwFmtVertOrient( aPos.Y(), 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.getX(),text::HoriOrientation::NONE, text::RelOrientation::FRAME ) ); - pFlyFmt->SetFmtAttr( SwFmtVertOrient( aPos.getY(),text::VertOrientation::NONE, text::RelOrientation::FRAME ) ); + pFlyFmt->SetFmtAttr( SwFmtHoriOrient( aPos.X(),text::HoriOrientation::NONE, text::RelOrientation::FRAME ) ); + pFlyFmt->SetFmtAttr( SwFmtVertOrient( aPos.Y(),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.getX(), aVec.getY())); + pNewObj->NbcMove(Size(aVec.X(), aVec.Y())); 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 7fc3756b5ec7..ed33b5c79460 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.setX(aTmpPnt.getX() - 1); // do not land in the fly! + aTmpPnt.X() -= 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.setX(aTmpPnt.getX() - 1); // do not land in the fly! + aTmpPnt.X() -= 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.setX(aPoint.getX() - 1); //do not land in the fly!! + aPoint.X() -= 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.setX(rAbsPos.getX()); + aOrient.X() = rAbsPos.X(); // calculate RelPos. - aOrient.setX(rAbsPos.getX() - aOrient.getX()); - aOrient.setY(rAbsPos.getY() - aOrient.getY()); + aOrient.X() = rAbsPos.X() - aOrient.X(); + aOrient.Y() = rAbsPos.Y() - aOrient.Y(); 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.setX(aPt.getX() - pFly->Prt().Left()); - aPt.setY(aPt.getY() - pFly->Prt().Top()); + aPt.X() -= pFly->Prt().Left(); + aPt.Y() -= 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.getX() - pFly->Frm().Left(); - const long lYDiff = aPt.getY() - pFly->Frm().Top(); + const long lXDiff = aPt.X() - pFly->Frm().Left(); + const long lYDiff = aPt.Y() - 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.getX() )) - += ',' ) += OUString::number(aPt.getY() ); + ((( *pURL += '?' ) += OUString::number( aPt.X() )) + += ',' ) += OUString::number(aPt.Y() ); } } 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.getX(), text::HoriOrientation::NONE, text::RelOrientation::FRAME )); + aFrmSet.Put( SwFmtHoriOrient( aRelPos.X(), text::HoriOrientation::NONE, text::RelOrientation::FRAME )); if( SFX_ITEM_SET != aFrmSet.GetItemState( RES_VERT_ORIENT )) - aFrmSet.Put( SwFmtVertOrient( aRelPos.getY(), text::VertOrientation::NONE, text::RelOrientation::FRAME )); + aFrmSet.Put( SwFmtVertOrient( aRelPos.Y(), text::VertOrientation::NONE, text::RelOrientation::FRAME )); } diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index f477af7a612b..4c979791352d 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.setX(aPt.getX() - 1); + aPt.X() -= 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.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 ) ) ) ) +#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 ) ) ) ) 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.getY() == aPos.getY() && // Y positions equal - (bNext? (aCurPos.getX() > aPos.getX()) : // lies next to me - (aCurPos.getX() < aPos.getX())) ) // " reverse + aCurPos.Y() == aPos.Y() && // Y positions equal + (bNext? (aCurPos.X() > aPos.X()) : // lies next to me + (aCurPos.X() < aPos.X())) ) // " 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.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 + (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 { aBestPos = aCurPos; pBest = pTmpObj; @@ -1424,32 +1424,32 @@ const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_ } if( ( - (bNext? (aPos.getY() < aCurPos.getY()) : // only below me - (aPos.getY() > aCurPos.getY())) && // " reverse - (bNext? (aBestPos.getY() > aCurPos.getY()) : // closer below - (aBestPos.getY() < aCurPos.getY())) + (bNext? (aPos.Y() < aCurPos.Y()) : // only below me + (aPos.Y() > aCurPos.Y())) && // " reverse + (bNext? (aBestPos.Y() > aCurPos.Y()) : // closer below + (aBestPos.Y() < aCurPos.Y())) ) || // " reverse - (aBestPos.getY() == aCurPos.getY() && - (bNext? (aBestPos.getX() > aCurPos.getX()) : // further left - (aBestPos.getX() < aCurPos.getX())))) // " reverse + (aBestPos.Y() == aCurPos.Y() && + (bNext? (aBestPos.X() > aCurPos.X()) : // further left + (aBestPos.X() < aCurPos.X())))) // " reverse { aBestPos = aCurPos; pBest = pObj; } - 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 + 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 { aTopPos = aCurPos; pTop = pObj; } } // unfortunately nothing found - if( (bNext? (aBestPos.getX() == LONG_MAX) : (aBestPos.getX() == 0)) ) + if( (bNext? (aBestPos.X() == LONG_MAX) : (aBestPos.X() == 0)) ) pBest = pTop; } @@ -1630,7 +1630,7 @@ sal_Bool SwFEShell::ImpEndCreate() { SwPosition aPos( GetDoc()->GetNodes() ); SwCrsrMoveState aState( MV_SETONLYTEXT ); - Point aPoint( aPt.getX(), aPt.getY() + rBound.GetHeight()/2 ); + Point aPoint( aPt.X(), aPt.Y() + 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().getX(), aRect.Bottom()); + const basegfx::B2DPoint aCenterBottom(aRect.Center().X(), aRect.Bottom()); aInnerPoly.appendBezierSegment( aCenterBottom, aCenterBottom, - basegfx::B2DPoint(aRect.Center().getX(), aRect.Center().getY())); + basegfx::B2DPoint(aRect.Center().X(), aRect.Center().Y())); - const basegfx::B2DPoint aCenterTop(aRect.Center().getX(), aRect.Top()); + const basegfx::B2DPoint aCenterTop(aRect.Center().X(), 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().getX(), aRect.Top()), - basegfx::B2DPoint(aRect.Center().getX(), aRect.Center().getY())); + basegfx::B2DPoint(aRect.Center().X(), aRect.Top()), + basegfx::B2DPoint(aRect.Center().X(), aRect.Center().Y())); aInnerPoly.appendBezierSegment( - basegfx::B2DPoint(aRect.Center().getX(), aRect.Bottom()), + basegfx::B2DPoint(aRect.Center().X(), 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().getX(), aRect.Bottom())); + aInnerPoly.append(basegfx::B2DPoint(aRect.Center().X(), 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().getX(), nYMiddle)); - aTempPoly.append(basegfx::B2DPoint(aRect.BottomRight().getX(), nYMiddle)); + aTempPoly.append(basegfx::B2DPoint(aRect.TopLeft().X(), nYMiddle)); + aTempPoly.append(basegfx::B2DPoint(aRect.BottomRight().X(), nYMiddle)); aPoly.append(aTempPoly); } break; diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 24424386ba21..bbf751670506 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.setX(aMin1.getX()); - if ( aRet.getY() > aMin2.getY() ) - aRet.setY(aMin2.getY()); - else if ( aRet.getY() < aMin1.getY() ) - aRet.setY(aMin1.getY()); + aRet.X() = aMin1.X(); + if ( aRet.Y() > aMin2.Y() ) + aRet.Y() = aMin2.Y(); + else if ( aRet.Y() < aMin1.Y() ) + aRet.Y() = aMin1.Y(); } else { - aRet.setY(aMin1.getY()); - if ( aRet.getX() > aMin2.getX() ) - aRet.setX(aMin2.getX()); - else if ( aRet.getX() < aMin1.getX() ) - aRet.setX(aMin1.getX()); + aRet.Y() = aMin1.Y(); + if ( aRet.X() > aMin2.X() ) + aRet.X() = aMin2.X(); + else if ( aRet.X() < aMin1.X() ) + aRet.X() = aMin1.X(); } return aRet; diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 4593b69ac257..cb89b35547b3 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.setX(aPos.getX() - rVertEnvironLayFrm.GetRightMargin()); + aPos.X() -= 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.setX(aPos.getX() + rVertEnvironLayFrm.GetLeftMargin()); + aPos.X() += rVertEnvironLayFrm.GetLeftMargin(); } } else @@ -949,12 +949,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, aPos.Y() = aVertEnvironRect.Top(); if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) { - aPos.setY(aPos.getY() + rVertEnvironLayFrm.GetTopMargin()); + aPos.Y() += rVertEnvironLayFrm.GetTopMargin(); // add height of page header const SwFrm* pTmpFrm = rVertEnvironLayFrm.Lower(); if ( pTmpFrm->IsHeaderFrm() ) { - aPos.setY(aPos.getY() + pTmpFrm->Frm().Height()); + aPos.Y() += pTmpFrm->Frm().Height(); } } } @@ -1004,11 +1004,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } if ( bVert || bVertL2R ) { - aPos.setX(nTop); + aPos.X() = nTop; } else { - aPos.setY(nTop); + aPos.Y() = nTop; } } @@ -1034,11 +1034,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, nLeft = (aChRect.*fnRect->fnGetLeft)(); if ( bVert || bVertL2R ) { - aPos.setY(nLeft); + aPos.Y() = nLeft; } else { - aPos.setX(nLeft); + aPos.X() = nLeft; } } if ( bVert || bVertL2R ) @@ -1095,35 +1095,35 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { case text::RelOrientation::FRAME_RIGHT: { - aPos.setY(aPos.getY() + pFrm->Prt().Height()); + aPos.Y() += pFrm->Prt().Height(); aPos += (pFrm->Prt().*fnRect->fnGetPos)(); break; } case text::RelOrientation::PRINT_AREA: { aPos += (pFrm->Prt().*fnRect->fnGetPos)(); - aPos.setY(aPos.getY() + nBaseOfstForFly); + aPos.Y() += nBaseOfstForFly; break; } case text::RelOrientation::PAGE_RIGHT: { - aPos.setY(pPage->Frm().Top() + pPage->Prt().Bottom()); + aPos.Y() = pPage->Frm().Top() + pPage->Prt().Bottom(); break; } case text::RelOrientation::PAGE_PRINT_AREA: { - aPos.setY(pPage->Frm().Top() + pPage->Prt().Top()); + aPos.Y() = pPage->Frm().Top() + pPage->Prt().Top(); break; } case text::RelOrientation::PAGE_LEFT: case text::RelOrientation::PAGE_FRAME: { - aPos.setY(pPage->Frm().Top()); + aPos.Y() = pPage->Frm().Top(); break; } case text::RelOrientation::FRAME: { - aPos.setY(aPos.getY() + nBaseOfstForFly); + aPos.Y() += nBaseOfstForFly; break; } default: break; @@ -1133,14 +1133,14 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { switch ( _eHoriRelOrient ) { - case text::RelOrientation::FRAME_RIGHT: aPos.setX(aPos.getX() + pFrm->Prt().Left()); break; + case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrm->Prt().Left(); break; case text::RelOrientation::FRAME: - 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::FRAME_LEFT: aPos.X() += pFrm->Frm().Width(); break; + case text::RelOrientation::PRINT_AREA: aPos.X() += pFrm->Prt().Right(); break; case text::RelOrientation::PAGE_LEFT: - 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; + 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; default: break; } } @@ -1149,32 +1149,32 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::FRAME_LEFT: - aPos.setX(pFrm->Frm().Left() + - pFrm->Prt().Left()); + aPos.X() = pFrm->Frm().Left() + + pFrm->Prt().Left(); break; case text::RelOrientation::PRINT_AREA: - aPos.setX(pFrm->Frm().Left() + pFrm->Prt().Left() + - pFrm->Prt().Width()); - aPos.setX(aPos.getX() + nBaseOfstForFly); + aPos.X() = pFrm->Frm().Left() + pFrm->Prt().Left() + + pFrm->Prt().Width(); + aPos.X() += nBaseOfstForFly; break; case text::RelOrientation::PAGE_LEFT: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Left()); + aPos.X() = pPage->Frm().Left() + pPage->Prt().Left(); break; case text::RelOrientation::PAGE_PRINT_AREA: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Left() + - pPage->Prt().Width()); + aPos.X() = pPage->Frm().Left() + pPage->Prt().Left() + + pPage->Prt().Width() ; break; case text::RelOrientation::PAGE_RIGHT: case text::RelOrientation::PAGE_FRAME: - aPos.setX(pPage->Frm().Right()); + aPos.X() = pPage->Frm().Right(); break; case text::RelOrientation::FRAME: - aPos.setX(aPos.getX() + nBaseOfstForFly); + aPos.X() += nBaseOfstForFly; break; default: break; } @@ -1189,20 +1189,20 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, break; case text::RelOrientation::PRINT_AREA: aPos += pFrm->Prt().Pos(); - aPos.setX(aPos.getX() + nBaseOfstForFly); + aPos.X() += nBaseOfstForFly; break; case text::RelOrientation::PAGE_RIGHT: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Right()); + aPos.X() = pPage->Frm().Left() + pPage->Prt().Right(); break; case text::RelOrientation::PAGE_PRINT_AREA: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Left()); + aPos.X() = pPage->Frm().Left() + pPage->Prt().Left(); break; case text::RelOrientation::PAGE_LEFT: case text::RelOrientation::PAGE_FRAME: - aPos.setX(pPage->Frm().Left()); + aPos.X() = pPage->Frm().Left(); break; case text::RelOrientation::FRAME: - aPos.setX(aPos.getX() + nBaseOfstForFly); + aPos.X() += nBaseOfstForFly; break; default: break; } @@ -1212,13 +1212,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, if( !_opRef ) { if( bVertic && !bVerticalL2R ) - _orRect.Pos( aPos.getX() - _orRect.Width() - _orRect.Left(), _orRect.Top() - aPos.getY() ); + _orRect.Pos( aPos.X() - _orRect.Width() - _orRect.Left(), _orRect.Top() - aPos.Y() ); else if( bVerticalL2R ) - _orRect.Pos( _orRect.Left() - aPos.getX(), _orRect.Top() - aPos.getY() ); + _orRect.Pos( _orRect.Left() - aPos.X(), _orRect.Top() - aPos.Y() ); else if ( bRTL ) - _orRect.Pos( - ( _orRect.Right() - aPos.getX() ), _orRect.Top() - aPos.getY() ); + _orRect.Pos( - ( _orRect.Right() - aPos.X() ), _orRect.Top() - aPos.Y() ); else - _orRect.Pos( _orRect.Left() - aPos.getX(), _orRect.Top() - aPos.getY() ); + _orRect.Pos( _orRect.Left() - aPos.X(), _orRect.Top() - aPos.Y() ); 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 48c252028b76..f0687c88e75e 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.getY() < aCurrentTopLeft.getY() || - ( aTopLeft.getY() == aCurrentTopLeft.getY() && - aTopLeft.getX() < aCurrentTopLeft.getX() ) ) + if ( aTopLeft.Y() < aCurrentTopLeft.Y() || + ( aTopLeft.Y() == aCurrentTopLeft.Y() && + aTopLeft.X() < aCurrentTopLeft.X() ) ) { aCurrentTopLeft = aTopLeft; pCurrentTopLeftFrm = static_cast<const SwCellFrm*>( pCell ); } - if ( aTopRight.getY() < aCurrentTopRight.getY() || - ( aTopRight.getY() == aCurrentTopRight.getY() && - aTopRight.getX() > aCurrentTopRight.getX() ) ) + if ( aTopRight.Y() < aCurrentTopRight.Y() || + ( aTopRight.Y() == aCurrentTopRight.Y() && + aTopRight.X() > aCurrentTopRight.X() ) ) { aCurrentTopRight = aTopRight; pCurrentTopRightFrm = static_cast<const SwCellFrm*>( pCell ); } - if ( aBottomLeft.getY() > aCurrentBottomLeft.getY() || - ( aBottomLeft.getY() == aCurrentBottomLeft.getY() && - aBottomLeft.getX() < aCurrentBottomLeft.getX() ) ) + if ( aBottomLeft.Y() > aCurrentBottomLeft.Y() || + ( aBottomLeft.Y() == aCurrentBottomLeft.Y() && + aBottomLeft.X() < aCurrentBottomLeft.X() ) ) { aCurrentBottomLeft = aBottomLeft; pCurrentBottomLeftFrm = static_cast<const SwCellFrm*>( pCell ); } - if ( aBottomRight.getY() > aCurrentBottomRight.getY() || - ( aBottomRight.getY() == aCurrentBottomRight.getY() && - aBottomRight.getX() > aCurrentBottomRight.getX() ) ) + if ( aBottomRight.Y() > aCurrentBottomRight.Y() || + ( aBottomRight.Y() == aCurrentBottomRight.Y() && + aBottomRight.X() > aCurrentBottomRight.X() ) ) { 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 62a3deaf8ae0..574cc7cca21d 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.getX() - aNewAnchorPos.getX(), - aCurrAnchorPos.getY() - aNewAnchorPos.getY() ); + Size aMove( aCurrAnchorPos.X() - aNewAnchorPos.X(), + aCurrAnchorPos.Y() - aNewAnchorPos.Y() ); // 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 b0b927616bd5..884bfbad4226 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().setX(maFrm.Pos().getX() - maFrm.Width() -pPrv->Frm().Width()); + maFrm.Pos().X() -= maFrm.Width() -pPrv->Frm().Width(); } else if( bVert && FRM_NOTE_VERT & nMyType ) { if( mbReverse ) - maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width()); + maFrm.Pos().X() += pPrv->Frm().Width(); else //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin { if ( bVertL2R ) - maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width()); + maFrm.Pos().X() += pPrv->Frm().Width(); else - maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width()); + maFrm.Pos().X() -= maFrm.Width(); } } else - maFrm.Pos().setY(maFrm.Pos().getY() + pPrv->Frm().Height()); + maFrm.Pos().Y() += 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().setX(maFrm.Pos().getX() - maFrm.Width() -pPrv->Frm().Width()); + maFrm.Pos().X() -= maFrm.Width() -pPrv->Frm().Width(); } else if( bVert && FRM_NOTE_VERT & nMyType ) { if( mbReverse ) - maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width()); + maFrm.Pos().X() += pPrv->Frm().Width(); else - maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width()); + maFrm.Pos().X() -= maFrm.Width(); } else - maFrm.Pos().setY(maFrm.Pos().getY() + pPrv->Frm().Height()); + maFrm.Pos().Y() += pPrv->Frm().Height(); } else { @@ -621,25 +621,22 @@ void SwFrm::MakePos() if( FRM_NEIGHBOUR & nMyType && IsRightToLeft() ) { if( bVert ) - maFrm.Pos().setY(maFrm.Pos().getY() + GetUpper()->Prt().Height() - - maFrm.Height()); + maFrm.Pos().Y() += GetUpper()->Prt().Height() + - maFrm.Height(); else - maFrm.Pos().setX(maFrm.Pos().getY() + GetUpper()->Prt().Width() - - maFrm.Width()); + maFrm.Pos().X() += 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().setX(maFrm.Pos().getX() - maFrm.Width() - GetUpper()->Prt().Width()); + maFrm.Pos().X() -= maFrm.Width() - GetUpper()->Prt().Width(); } } else - { - maFrm.Pos().setX(0); - maFrm.Pos().setY(0); - } + maFrm.Pos().X() = maFrm.Pos().Y() = 0; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if( IsBodyFrm() && bVert && !bVertL2R && !mbReverse && GetUpper() ) - maFrm.Pos().setX(maFrm.Pos().getX() + GetUpper()->Prt().Width() - maFrm.Width()); + maFrm.Pos().X() += GetUpper()->Prt().Width() - maFrm.Width(); mbValidPos = sal_True; } } @@ -969,8 +966,7 @@ sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) if( (Prt().*fnRect->fnGetHeight)() ) ((SwTxtFrm*)this)->HideHidden(); - Prt().Pos().setX(0); - Prt().Pos().setY(0); + Prt().Pos().X() = Prt().Pos().Y() = 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 d92184988db4..f72a1eeb4e4c 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -177,8 +177,7 @@ 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().setX(FAR_AWAY); - Frm().Pos().setY(FAR_AWAY); + Frm().Pos().X() = Frm().Pos().Y() = FAR_AWAY; } void SwFlyFrm::Chain( SwFrm* _pAnch ) @@ -1325,8 +1324,7 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs ) if ( Frm().Top() == FAR_AWAY && Frm().Left() == FAR_AWAY ) { //Sicherheitsschaltung wegnehmen (siehe SwFrm::CTor) - Frm().Pos().setX(0); - Frm().Pos().setY(0); + Frm().Pos().X() = Frm().Pos().Y() = 0; // #i68520# InvalidateObjRectWithSpaces(); } @@ -2680,7 +2678,7 @@ sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour, else aNewPoint = pOutDev->LogicToLogic( rPoly[ i ], aGrfMap, aDispMap ); - rPoly[ i ] = Point( FRound( aNewPoint.getX() * fScaleX ), FRound( aNewPoint.getY() * fScaleY ) ); + rPoly[ i ] = Point( FRound( aNewPoint.X() * fScaleX ), FRound( aNewPoint.Y() * fScaleY ) ); } } } @@ -2752,17 +2750,17 @@ const SwRect SwFlyFrm::GetObjBoundRect() const // #i68520# bool SwFlyFrm::_SetObjTop( const SwTwips _nTop ) { - const bool bChanged( Frm().Pos().getY() != _nTop ); + const bool bChanged( Frm().Pos().Y() != _nTop ); - Frm().Pos().setY(_nTop); + Frm().Pos().Y() = _nTop; return bChanged; } bool SwFlyFrm::_SetObjLeft( const SwTwips _nLeft ) { - const bool bChanged( Frm().Pos().getX() != _nLeft ); + const bool bChanged( Frm().Pos().X() != _nLeft ); - Frm().Pos().setX(_nLeft); + Frm().Pos().X() = _nLeft; return bChanged; } diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 32c6f89a9016..41057cdf31d2 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.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()); + 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(); } @@ -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.setX(aNew.getX() + Frm().Width()); + aNew.X() += 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.setX(aNew.getX() + Frm().Width()); + aNew.X() += Frm().Width(); else - aNew.setX(aNew.getX() - Frm().Width()); + aNew.X() -= 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().getX(); + nDiff += pUp->Prt().Width() - pFollow->GetRelPos().X(); 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 a0d9a3f71e39..671c249e1bf2 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.setX(pAnch->IsReverse() ? nRel : -nRel); + aRelPos.X() = pAnch->IsReverse() ? nRel : -nRel; else - aRelPos.setY(nRel); + aRelPos.Y() = nRel; SetCurrRelPos( aRelPos ); } diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index f9337b13e268..ca95552e3331 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().getX() && - FAR_AWAY == pTmpFrm->Frm().Pos().getY() ) + FAR_AWAY == pTmpFrm->Frm().Pos().X() && + FAR_AWAY == pTmpFrm->Frm().Pos().Y() ) 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.getX() * aDiff.getX() + aDiff.getY() * aDiff.getY(); // opt: no sqrt + const sal_uInt64 nCurrentDist = aDiff.X() * aDiff.X() + aDiff.Y() * aDiff.Y(); // 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 304bbcbece10..5421332650bb 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().setX(Frm().Pos().getX() + Frm().Width() - nWidth); + Frm().Pos().X() += Frm().Width() - nWidth; Frm().Width( nWidth ); } @@ -169,8 +169,7 @@ void SwBodyFrm::Format( const SwBorderAttrs * ) } if( bNoGrid ) { - Prt().Pos().setX(0); - Prt().Pos().setY(0); + Prt().Pos().X() = Prt().Pos().Y() = 0; Prt().Height( Frm().Height() ); Prt().Width( Frm().Width() ); } @@ -1692,13 +1691,11 @@ void SwRootFrm::MakeAll() { if ( !mbValidPos ) { mbValidPos = sal_True; - maFrm.Pos().setX(DOCUMENTBORDER); - maFrm.Pos().setY(DOCUMENTBORDER); + maFrm.Pos().X() = maFrm.Pos().Y() = DOCUMENTBORDER; } if ( !mbValidPrtArea ) { mbValidPrtArea = sal_True; - maPrt.Pos().setX(0); - maPrt.Pos().setY(0); + maPrt.Pos().X() = maPrt.Pos().Y() = 0; maPrt.SSize( maFrm.SSize() ); } if ( !mbValidSize ) @@ -2121,7 +2118,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi maPageRects.clear(); - const long nBorder = Frm().Pos().getX(); + const long nBorder = Frm().Pos().X(); const long nVisWidth = mnViewWidth - 2 * nBorder; const long nGapBetweenPages = GAPBETWEENPAGES; @@ -2291,10 +2288,10 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi // RTL view layout: Calculate mirrored page position if ( bRTL ) { - const long nXOffsetInRow = aNewPagePos.getX() - nRowStart; - aNewPagePos.setX(nRowEnd - nXOffsetInRow - nCurrentPageWidth); + const long nXOffsetInRow = aNewPagePos.X() - nRowStart; + aNewPagePos.X() = nRowEnd - nXOffsetInRow - nCurrentPageWidth; aNewPagePosWithLeftOffset = aNewPagePos; - aNewPagePosWithLeftOffset.setX(aNewPagePosWithLeftOffset.getX() + nLeftPageAddOffset); + aNewPagePosWithLeftOffset.X() += nLeftPageAddOffset; } if ( aNewPagePosWithLeftOffset != aOldPagePos ) @@ -2310,12 +2307,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.getX() ); - nMaxPageRight = std::max( nMaxPageRight, aNewPagePos.getX() + nCurrentPageWidth); + nMinPageLeft = std::min( nMinPageLeft, aNewPagePos.X() ); + nMaxPageRight = std::max( nMaxPageRight, aNewPagePos.X() + nCurrentPageWidth); // border of nGapBetweenPages around the current page: - SwRect aPageRectWithBorders( aNewPagePos.getX() - nGapBetweenPages, - aNewPagePos.getY(), + SwRect aPageRectWithBorders( aNewPagePos.X() - nGapBetweenPages, + aNewPagePos.Y(), pPageToAdjust->Frm().SSize().Width() + nGapBetweenPages + nSidebarWidth, nCurrentRowHeight ); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 2ca8e9b091c5..45b0fd41214d 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().setY(nY); + aTmp.Pos().Y() = nY; if( bGrid ) { nY += nGrid; - SwTwips nPosY = std::max( aInter.Top(), aTmp.Pos().getY() ); + SwTwips nPosY = std::max( aInter.Top(), aTmp.Pos().Y() ); 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().getY()); + SwTwips nPos = std::max(aInter.Top(),aTmp.Pos().Y()); 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().setX(nGridRight); + aVert.Pos().X() = nGridRight; PaintBorderLine(rRect,aVert,this,pCol); } } @@ -5473,33 +5473,33 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const } while( nY <= nBottom ) { - aTmp.Pos().setY(nY); + aTmp.Pos().Y() = nY; PaintBorderLine( rRect, aTmp, this, pCol); if( bGrid ) { nY += nGrid; - SwTwips nHeight = std::min(nBottom, nY) - aTmp.Pos().getY(); + SwTwips nHeight = std::min(nBottom, nY) - aTmp.Pos().Y(); if( nHeight ) { if( bCell ) { - SwRect aVert( Point( nX, aTmp.Pos().getY() ), + SwRect aVert( Point( nX, aTmp.Pos().Y() ), Size( 1, nHeight ) ); while( aVert.Left() <= nRight ) { PaintBorderLine( rRect, aVert, this, pCol); - aVert.Pos().setX(aVert.Pos().getX() + nGridWidth); //for textgrid refactor + aVert.Pos().X() += nGridWidth; //for textgrid refactor } } else if( bBorder ) { SwRect aVert( Point( aGrid.Left(), - aTmp.Pos().getY() ), Size( 1, nHeight ) ); + aTmp.Pos().Y() ), Size( 1, nHeight ) ); if( bLeft ) PaintBorderLine(rRect,aVert,this,pCol); if( bRight ) { - aVert.Pos().setX(nGridRight); + aVert.Pos().X() = 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().setX(nGridRight); + aVert.Pos().X() = 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].getY() ); + basegfx::B2DPoint aBPoint( aPoints[i].X(), aPoints[i].Y() ); 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].getX(), aPoints[i].getY() ); + basegfx::B2DPoint aBPoint( aPoints[i].X(), aPoints[i].Y() ); basegfx::B2DPolygon aPolygon; aPolygon.append( aBPoint + aHorizVector * nLineLength ); |