diff options
26 files changed, 413 insertions, 413 deletions
diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx index 64ea287dc9ff..63a2fca3ef34 100644 --- a/editeng/source/accessibility/AccessibleStringWrap.cxx +++ b/editeng/source/accessibility/AccessibleStringWrap.cxx @@ -48,16 +48,16 @@ void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, tools::Rectangl { // create a caret bounding rect that has the height of the // current font and is one pixel wide. - rRect.Left() = mrDev.GetTextWidth(maText); - rRect.Top() = 0; + rRect.SetLeft( mrDev.GetTextWidth(maText) ); + rRect.SetTop( 0 ); rRect.SetSize( Size(mrDev.GetTextHeight(), 1) ); } else { long aXArray[2]; mrDev.GetCaretPositions( maText, aXArray, nIndex, 1 ); - rRect.Left() = 0; - rRect.Top() = 0; + rRect.SetLeft( 0 ); + rRect.SetTop( 0 ); rRect.SetSize( Size(mrDev.GetTextHeight(), labs(aXArray[0] - aXArray[1])) ); rRect.Move( std::min(aXArray[0], aXArray[1]), 0 ); } diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index d7caea2f78df..55fe0bac0114 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1027,14 +1027,14 @@ Size EditLine::CalcTextSize( ParaPortion& rParaPortion ) case PortionKind::HYPHENATOR: { aTmpSz = rPortion.GetSize(); - aSz.Width() += aTmpSz.Width(); + aSz.setWidth( aSz.Width() + aTmpSz.Width() ); if ( aSz.Height() < aTmpSz.Height() ) - aSz.Height() = aTmpSz.Height(); + aSz.setHeight( aTmpSz.Height() ); } break; case PortionKind::TAB: { - aSz.Width() += rPortion.GetSize().Width(); + aSz.setWidth( aSz.Width() + rPortion.GetSize().Width() ); } break; case PortionKind::LINEBREAK: break; diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 05c0ffa7f2dc..cd383839e4be 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -222,7 +222,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOri Point aStartPos( rStartPos ); if ( IsVertical() ) { - aStartPos.X() += GetPaperSize().Width(); + aStartPos.setX( aStartPos.X() + GetPaperSize().Width() ); aStartPos = Rotate( aStartPos, nOrientation, rStartPos ); } pImpEditEngine->Paint( pOutDev, aBigRect, aStartPos, false, nOrientation ); @@ -250,13 +250,13 @@ void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, Point aStartPos; if ( !IsVertical() ) { - aStartPos.X() = aOutRect.Left() - rStartDocPos.X(); - aStartPos.Y() = aOutRect.Top() - rStartDocPos.Y(); + aStartPos.setX( aOutRect.Left() - rStartDocPos.X() ); + aStartPos.setY( aOutRect.Top() - rStartDocPos.Y() ); } else { - aStartPos.X() = aOutRect.Right() + rStartDocPos.Y(); - aStartPos.Y() = aOutRect.Top() - rStartDocPos.X(); + aStartPos.setX( aOutRect.Right() + rStartDocPos.Y() ); + aStartPos.setY( aOutRect.Top() - rStartDocPos.X() ); } bool bClipRegion = pOutDev->IsClipRegion(); @@ -283,7 +283,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, { Size aPixSz( 1, 0 ); aPixSz = pOutDev->PixelToLogic( aPixSz ); - aClipRect.Right() += aPixSz.Width(); + aClipRect.SetRight( aClipRect.Right() + aPixSz.Width() ); aClipRect.Bottom() += aPixSz.Width(); } pOutDev->IntersectClipRegion( aClipRect ); @@ -1024,12 +1024,12 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v long nH = GetTextHeight( n ); Point P1( aViewStart.X() + n20 + n20*(n%2), aViewStart.Y() + aPos.Y() ); Point P2( P1 ); - P2.X() += n20; - P2.Y() += nH; + P2.setX( P2.X() + n20 ); + P2.setY( P2.Y() + nH ); pEditView->GetWindow()->SetLineColor(); pEditView->GetWindow()->SetFillColor( Color( (n%2) ? COL_YELLOW : COL_LIGHTGREEN ) ); pEditView->GetWindow()->DrawRect( tools::Rectangle( P1, P2 ) ); - aPos.Y() += nH; + aPos.setY( aPos.Y() + nH ); } } bDone = false; @@ -1346,7 +1346,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v aPos = pEditView->pImpEditView->GetWindowPos( aPos ); aPos = pEditView->pImpEditView->GetWindow()->LogicToPixel( aPos ); aPos = pEditView->GetWindow()->OutputToScreenPixel( aPos ); - aPos.Y() -= 3; + aPos.setY( aPos.Y() - 3 ); Help::ShowQuickHelp( pEditView->GetWindow(), tools::Rectangle( aPos, Size( 1, 1 ) ), aComplete, QuickHelpFlags::Bottom|QuickHelpFlags::Left ); } } @@ -1784,13 +1784,13 @@ void EditEngine::StripPortions() { if( IsTopToBottom() ) { - aBigRect.Right() = 0; - aBigRect.Left() = -0x7FFFFFFF; + aBigRect.SetRight( 0 ); + aBigRect.SetLeft( -0x7FFFFFFF ); } else { - aBigRect.Top() = -0x7FFFFFFF; - aBigRect.Bottom() = 0; + aBigRect.SetTop( -0x7FFFFFFF ); + aBigRect.SetBottom( 0 ); } } pImpEditEngine->Paint( aTmpDev.get(), aBigRect, Point(), true ); @@ -1887,10 +1887,10 @@ void EditEngine::SetControlWord( EEControlBits nWord ) pNode->DestroyWrongList(); if ( bWrongs ) { - pImpEditEngine->aInvalidRect.Left() = 0; - pImpEditEngine->aInvalidRect.Right() = pImpEditEngine->GetPaperSize().Width(); - pImpEditEngine->aInvalidRect.Top() = nY+1; - pImpEditEngine->aInvalidRect.Bottom() = nY+pPortion->GetHeight()-1; + pImpEditEngine->aInvalidRect.SetLeft( 0 ); + pImpEditEngine->aInvalidRect.SetRight( pImpEditEngine->GetPaperSize().Width() ); + pImpEditEngine->aInvalidRect.SetTop( nY+1 ); + pImpEditEngine->aInvalidRect.SetBottom( nY+pPortion->GetHeight()-1 ); pImpEditEngine->UpdateViews( pImpEditEngine->pActiveView ); } nY += pPortion->GetHeight(); @@ -1928,13 +1928,13 @@ Point EditEngine::GetDocPos( const Point& rPaperPos ) const { if ( IsTopToBottom() ) { - aDocPos.X() = rPaperPos.Y(); - aDocPos.Y() = GetPaperSize().Width() - rPaperPos.X(); + aDocPos.setX( rPaperPos.Y() ); + aDocPos.setY( GetPaperSize().Width() - rPaperPos.X() ); } else { - aDocPos.X() = rPaperPos.Y(); - aDocPos.Y() = rPaperPos.X(); + aDocPos.setX( rPaperPos.Y() ); + aDocPos.setY( rPaperPos.X() ); } } return aDocPos; @@ -1956,7 +1956,7 @@ Point EditEngine::GetDocPosTopLeft( sal_Int32 nParagraph ) { // Correct it if large Bullet. const EditLine& rFirstLine = pPPortion->GetLines()[0]; - aPoint.X() = rFirstLine.GetStartPosX(); + aPoint.setX( rFirstLine.GetStartPosX() ); } else { @@ -1967,10 +1967,10 @@ Point EditEngine::GetDocPosTopLeft( sal_Int32 nParagraph ) short nX = static_cast<short>(rLRItem.GetTextLeft() + rLRItem.GetTextFirstLineOfst() + nSpaceBefore); - aPoint.X() = pImpEditEngine->GetXValue( nX - ); + aPoint.setX( pImpEditEngine->GetXValue( nX + ) ); } - aPoint.Y() = pImpEditEngine->GetParaPortions().GetYOffset( pPPortion ); + aPoint.setY( pImpEditEngine->GetParaPortions().GetYOffset( pPPortion ) ); } return aPoint; } @@ -2400,7 +2400,7 @@ tools::Rectangle EditEngine::GetCharacterBounds( const EPosition& rPos ) const aBounds = pImpEditEngine->PaMtoEditCursor( EditPaM( pNode, rPos.nIndex ), GetCursorFlags::TextOnly ); tools::Rectangle aR2 = pImpEditEngine->PaMtoEditCursor( EditPaM( pNode, rPos.nIndex+1 ), GetCursorFlags::TextOnly|GetCursorFlags::EndOfLine ); if ( aR2.Right() > aBounds.Right() ) - aBounds.Right() = aR2.Right(); + aBounds.SetRight( aR2.Right() ); } return aBounds; } diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index cb202fd07c73..6101753bedee 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -196,9 +196,9 @@ tools::Rectangle EditView::GetInvalidateRect() const { tools::Rectangle aRect( pImpEditView->aOutArea ); long nMore = pImpEditView->GetWindow()->PixelToLogic( Size( pImpEditView->GetInvalidateMore(), 0 ) ).Width(); - aRect.Left() -= nMore; + aRect.SetLeft( aRect.Left() - nMore ); aRect.Right() += nMore; - aRect.Top() -= nMore; + aRect.SetTop( aRect.Top() - nMore ); aRect.Bottom() += nMore; return aRect; } diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 5e4ce991659c..dbae6305901a 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -55,9 +55,9 @@ static inline void lcl_AllignToPixel( Point& rPoint, OutputDevice const * pOutDe rPoint = pOutDev->LogicToPixel( rPoint ); if ( nDiffX ) - rPoint.X() += nDiffX; + rPoint.setX( rPoint.X() + nDiffX ); if ( nDiffY ) - rPoint.Y() += nDiffY; + rPoint.setY( rPoint.Y() + nDiffY ); rPoint = pOutDev->PixelToLogic( rPoint ); } @@ -251,7 +251,7 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion, // Text > Paper width ( over large fields ) tools::Rectangle aTmpOutArea( aOutArea ); if ( aTmpOutArea.GetWidth() > pEditEngine->pImpEditEngine->GetPaperSize().Width() ) - aTmpOutArea.Right() = aTmpOutArea.Left() + pEditEngine->pImpEditEngine->GetPaperSize().Width(); + aTmpOutArea.SetRight( aTmpOutArea.Left() + pEditEngine->pImpEditEngine->GetPaperSize().Width() ); pTarget->IntersectClipRegion( aTmpOutArea ); if ( pOutWin->GetCursor() ) @@ -322,7 +322,7 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion, Point aTopLeft( aTmpRect.TopLeft() ); Point aBottomRight( aTmpRect.BottomRight() ); - aTopLeft.Y() += nParaStart; + aTopLeft.setY( aTopLeft.Y() + nParaStart ); aBottomRight.Y() += nParaStart; // Only paint if in the visible range ... @@ -336,8 +336,8 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion, if ( !bPartOfLine ) { Range aLineXPosStartEnd = pEditEngine->GetLineXPosStartEnd(pTmpPortion, &rLine); - aTopLeft.X() = aLineXPosStartEnd.Min(); - aBottomRight.X() = aLineXPosStartEnd.Max(); + aTopLeft.setX( aLineXPosStartEnd.Min() ); + aBottomRight.setX( aLineXPosStartEnd.Max() ); ImplDrawHighlightRect( pTarget, aTopLeft, aBottomRight, pPolyPoly ); } else @@ -558,20 +558,20 @@ Point ImpEditView::GetDocPos( const Point& rWindowPos ) const if ( !pEditEngine->pImpEditEngine->IsVertical() ) { - aPoint.X() = rWindowPos.X() - aOutArea.Left() + GetVisDocLeft(); - aPoint.Y() = rWindowPos.Y() - aOutArea.Top() + GetVisDocTop(); + aPoint.setX( rWindowPos.X() - aOutArea.Left() + GetVisDocLeft() ); + aPoint.setY( rWindowPos.Y() - aOutArea.Top() + GetVisDocTop() ); } else { if (pEditEngine->pImpEditEngine->IsTopToBottom()) { - aPoint.X() = rWindowPos.Y() - aOutArea.Top() + GetVisDocLeft(); - aPoint.Y() = aOutArea.Right() - rWindowPos.X() + GetVisDocTop(); + aPoint.setX( rWindowPos.Y() - aOutArea.Top() + GetVisDocLeft() ); + aPoint.setY( aOutArea.Right() - rWindowPos.X() + GetVisDocTop() ); } else { - aPoint.X() = aOutArea.Bottom() - rWindowPos.Y() + GetVisDocLeft(); - aPoint.Y() = rWindowPos.X() - aOutArea.Left() + GetVisDocTop(); + aPoint.setX( aOutArea.Bottom() - rWindowPos.Y() + GetVisDocLeft() ); + aPoint.setY( rWindowPos.X() - aOutArea.Left() + GetVisDocTop() ); } } @@ -585,20 +585,20 @@ Point ImpEditView::GetWindowPos( const Point& rDocPos ) const if ( !pEditEngine->pImpEditEngine->IsVertical() ) { - aPoint.X() = rDocPos.X() + aOutArea.Left() - GetVisDocLeft(); - aPoint.Y() = rDocPos.Y() + aOutArea.Top() - GetVisDocTop(); + aPoint.setX( rDocPos.X() + aOutArea.Left() - GetVisDocLeft() ); + aPoint.setY( rDocPos.Y() + aOutArea.Top() - GetVisDocTop() ); } else { if (pEditEngine->pImpEditEngine->IsTopToBottom()) { - aPoint.X() = aOutArea.Right() - rDocPos.Y() + GetVisDocTop(); - aPoint.Y() = rDocPos.X() + aOutArea.Top() - GetVisDocLeft(); + aPoint.setX( aOutArea.Right() - rDocPos.Y() + GetVisDocTop() ); + aPoint.setY( rDocPos.X() + aOutArea.Top() - GetVisDocLeft() ); } else { - aPoint.X() = aOutArea.Left() + rDocPos.Y() - GetVisDocTop(); - aPoint.Y() = aOutArea.Bottom() - rDocPos.X() + GetVisDocLeft(); + aPoint.setX( aOutArea.Left() + rDocPos.Y() - GetVisDocTop() ); + aPoint.setY( aOutArea.Bottom() - rDocPos.X() + GetVisDocLeft() ); } } @@ -640,9 +640,9 @@ void ImpEditView::SetOutputArea( const tools::Rectangle& rRect ) aNewRect = pOutWin->PixelToLogic( aNewRect ); aOutArea = aNewRect; if ( aOutArea.Right() < aOutArea.Left() ) - aOutArea.Right() = aOutArea.Left(); + aOutArea.SetRight( aOutArea.Left() ); if ( aOutArea.Bottom() < aOutArea.Top() ) - aOutArea.Bottom() = aOutArea.Top(); + aOutArea.SetBottom( aOutArea.Top() ); if ( DoBigScroll() ) SetScrollDiffX( static_cast<sal_uInt16>(aOutArea.GetWidth()) * 3 / 10 ); @@ -736,28 +736,28 @@ void ImpEditView::RecalcOutputArea() if ( DoAutoWidth() ) { if ( pEditEngine->pImpEditEngine->GetStatus().AutoPageWidth() ) - aNewSz.Width() = pEditEngine->pImpEditEngine->GetPaperSize().Width(); + aNewSz.setWidth( pEditEngine->pImpEditEngine->GetPaperSize().Width() ); switch ( eAnchorMode ) { case EEAnchorMode::TopLeft: case EEAnchorMode::VCenterLeft: case EEAnchorMode::BottomLeft: { - aNewTopLeft.X() = aAnchorPoint.X(); + aNewTopLeft.setX( aAnchorPoint.X() ); } break; case EEAnchorMode::TopHCenter: case EEAnchorMode::VCenterHCenter: case EEAnchorMode::BottomHCenter: { - aNewTopLeft.X() = aAnchorPoint.X() - aNewSz.Width() / 2; + aNewTopLeft.setX( aAnchorPoint.X() - aNewSz.Width() / 2 ); } break; case EEAnchorMode::TopRight: case EEAnchorMode::VCenterRight: case EEAnchorMode::BottomRight: { - aNewTopLeft.X() = aAnchorPoint.X() - aNewSz.Width() - 1; + aNewTopLeft.setX( aAnchorPoint.X() - aNewSz.Width() - 1 ); } break; } @@ -767,28 +767,28 @@ void ImpEditView::RecalcOutputArea() if ( DoAutoHeight() ) { if ( pEditEngine->pImpEditEngine->GetStatus().AutoPageHeight() ) - aNewSz.Height() = pEditEngine->pImpEditEngine->GetPaperSize().Height(); + aNewSz.setHeight( pEditEngine->pImpEditEngine->GetPaperSize().Height() ); switch ( eAnchorMode ) { case EEAnchorMode::TopLeft: case EEAnchorMode::TopHCenter: case EEAnchorMode::TopRight: { - aNewTopLeft.Y() = aAnchorPoint.Y(); + aNewTopLeft.setY( aAnchorPoint.Y() ); } break; case EEAnchorMode::VCenterLeft: case EEAnchorMode::VCenterHCenter: case EEAnchorMode::VCenterRight: { - aNewTopLeft.Y() = aAnchorPoint.Y() - aNewSz.Height() / 2; + aNewTopLeft.setY( aAnchorPoint.Y() - aNewSz.Height() / 2 ); } break; case EEAnchorMode::BottomLeft: case EEAnchorMode::BottomHCenter: case EEAnchorMode::BottomRight: { - aNewTopLeft.Y() = aAnchorPoint.Y() - aNewSz.Height() - 1; + aNewTopLeft.setY( aAnchorPoint.Y() - aNewSz.Height() - 1 ); } break; } @@ -813,21 +813,21 @@ void ImpEditView::CalcAnchorPoint() case EEAnchorMode::VCenterLeft: case EEAnchorMode::BottomLeft: { - aAnchorPoint.X() = aOutArea.Left(); + aAnchorPoint.setX( aOutArea.Left() ); } break; case EEAnchorMode::TopHCenter: case EEAnchorMode::VCenterHCenter: case EEAnchorMode::BottomHCenter: { - aAnchorPoint.X() = aOutArea.Left() + (aOutArea.GetWidth()-1) / 2; + aAnchorPoint.setX( aOutArea.Left() + (aOutArea.GetWidth()-1) / 2 ); } break; case EEAnchorMode::TopRight: case EEAnchorMode::VCenterRight: case EEAnchorMode::BottomRight: { - aAnchorPoint.X() = aOutArea.Right(); + aAnchorPoint.setX( aOutArea.Right() ); } break; } @@ -839,21 +839,21 @@ void ImpEditView::CalcAnchorPoint() case EEAnchorMode::TopHCenter: case EEAnchorMode::TopRight: { - aAnchorPoint.Y() = aOutArea.Top(); + aAnchorPoint.setY( aOutArea.Top() ); } break; case EEAnchorMode::VCenterLeft: case EEAnchorMode::VCenterHCenter: case EEAnchorMode::VCenterRight: { - aAnchorPoint.Y() = aOutArea.Top() + (aOutArea.GetHeight()-1) / 2; + aAnchorPoint.setY( aOutArea.Top() + (aOutArea.GetHeight()-1) / 2 ); } break; case EEAnchorMode::BottomLeft: case EEAnchorMode::BottomHCenter: case EEAnchorMode::BottomRight: { - aAnchorPoint.Y() = aOutArea.Bottom() - 1; + aAnchorPoint.setY( aOutArea.Bottom() - 1 ); } break; } @@ -907,13 +907,13 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) if ( aPaM.GetNode()->Len() && ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) { // If we are behind a portion, and the next portion has other direction, we must change position... - aEditCursor.Left() = aEditCursor.Right() = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GetCursorFlags::TextOnly|GetCursorFlags::PreferPortionStart ).Left(); + aEditCursor.SetLeft( aEditCursor.Right() = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GetCursorFlags::TextOnly|GetCursorFlags::PreferPortionStart ).Left() ); sal_Int32 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, true ); const TextPortion& rTextPortion = pParaPortion->GetTextPortions()[nTextPortion]; if ( rTextPortion.GetKind() == PortionKind::TAB ) { - aEditCursor.Right() += rTextPortion.GetSize().Width(); + aEditCursor.SetRight( aEditCursor.Right() + rTextPortion.GetSize().Width() ); } else { @@ -921,14 +921,14 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) tools::Rectangle aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GetCursorFlags::TextOnly ); if ( aTmpRect.Top() != aEditCursor.Top() ) aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GetCursorFlags::TextOnly|GetCursorFlags::EndOfLine ); - aEditCursor.Right() = aTmpRect.Left(); + aEditCursor.SetRight( aTmpRect.Left() ); } } } long nMaxHeight = !IsVertical() ? aOutArea.GetHeight() : aOutArea.GetWidth(); if ( aEditCursor.GetHeight() > nMaxHeight ) { - aEditCursor.Bottom() = aEditCursor.Top() + nMaxHeight - 1; + aEditCursor.SetBottom( aEditCursor.Top() + nMaxHeight - 1 ); } if ( bGotoCursor ) // && (!pEditEngine->pImpEditEngine->GetStatus().AutoPageSize() ) ) { @@ -942,7 +942,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) // Text > Paper width ( over large fields ) long nMaxTextWidth = !IsVertical() ? pEditEngine->pImpEditEngine->GetPaperSize().Width() : pEditEngine->pImpEditEngine->GetPaperSize().Height(); if ( aTmpVisArea.GetWidth() > nMaxTextWidth ) - aTmpVisArea.Right() = aTmpVisArea.Left() + nMaxTextWidth; + aTmpVisArea.SetRight( aTmpVisArea.Left() + nMaxTextWidth ); if ( aEditCursor.Bottom() > aTmpVisArea.Bottom() ) { // Scroll up, here positive @@ -1032,9 +1032,9 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) ( aEditCursor.Top() < GetVisDocBottom() ) ) { if ( aEditCursor.Bottom() > GetVisDocBottom() ) - aEditCursor.Bottom() = GetVisDocBottom(); + aEditCursor.SetBottom( GetVisDocBottom() ); if ( aEditCursor.Top() < GetVisDocTop() ) - aEditCursor.Top() = GetVisDocTop(); + aEditCursor.SetTop( GetVisDocTop() ); } long nOnePixel = pOutWin->PixelToLogic( Size( 1, 0 ) ).Width(); @@ -1048,23 +1048,23 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) GetCursor()->SetPos( aCursorRect.TopLeft() ); Size aCursorSz( aCursorRect.GetSize() ); // Rectangle is inclusive - aCursorSz.Width()--; + aCursorSz.setWidth( --aCursorSz.Width() ); aCursorSz.Height()--; if ( !aCursorSz.Width() || !aCursorSz.Height() ) { long nCursorSz = pOutWin->GetSettings().GetStyleSettings().GetCursorSize(); nCursorSz = pOutWin->PixelToLogic( Size( nCursorSz, 0 ) ).Width(); if ( !aCursorSz.Width() ) - aCursorSz.Width() = nCursorSz; + aCursorSz.setWidth( nCursorSz ); if ( !aCursorSz.Height() ) - aCursorSz.Height() = nCursorSz; + aCursorSz.setHeight( nCursorSz ); } // #111036# Let VCL do orientation for cursor, otherwise problem when cursor has direction flag if ( IsVertical() ) { Size aOldSz( aCursorSz ); - aCursorSz.Width() = aOldSz.Height(); - aCursorSz.Height() = aOldSz.Width(); + aCursorSz.setWidth( aOldSz.Height() ); + aCursorSz.setHeight( aOldSz.Width() ); GetCursor()->SetPos( aCursorRect.TopRight() ); GetCursor()->SetOrientation( IsTopToBottom() ? 2700 : 900 ); } @@ -1166,19 +1166,19 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck ) // Vertical: if ( !IsVertical() ) { - aNewVisArea.Top() -= ndY; + aNewVisArea.SetTop( aNewVisArea.Top() - ndY ); aNewVisArea.Bottom() -= ndY; } else { if( IsTopToBottom() ) { - aNewVisArea.Top() += ndX; + aNewVisArea.SetTop( aNewVisArea.Top() + ndX ); aNewVisArea.Bottom() += ndX; } else { - aNewVisArea.Top() -= ndX; + aNewVisArea.SetTop( aNewVisArea.Top() - ndX ); aNewVisArea.Bottom() -= ndX; } } @@ -1194,19 +1194,19 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck ) // Horizontal: if ( !IsVertical() ) { - aNewVisArea.Left() -= ndX; + aNewVisArea.SetLeft( aNewVisArea.Left() - ndX ); aNewVisArea.Right() -= ndX; } else { if (IsTopToBottom()) { - aNewVisArea.Left() -= ndY; + aNewVisArea.SetLeft( aNewVisArea.Left() - ndY ); aNewVisArea.Right() -= ndY; } else { - aNewVisArea.Left() += ndY; + aNewVisArea.SetLeft( aNewVisArea.Left() + ndY ); aNewVisArea.Right() += ndY; } } @@ -1787,7 +1787,7 @@ void ImpEditView::ShowDDCursor( const tools::Rectangle& rRect ) // Save background ... tools::Rectangle aSaveRect( GetWindow()->LogicToPixel( rRect ) ); // prefer to save some more ... - aSaveRect.Right() += 1; + aSaveRect.SetRight( aSaveRect.Right() + 1 ); aSaveRect.Bottom() += 1; #ifdef DBG_UTIL @@ -2212,20 +2212,20 @@ void ImpEditView::dragOver(const css::datatransfer::dnd::DropTargetDragEvent& rD aEditCursor = GetWindow()->LogicToPixel( tools::Rectangle( aStartPos, aEndPos ) ); if ( !pEditEngine->IsVertical() ) { - aEditCursor.Top()--; - aEditCursor.Bottom()++; + aEditCursor.SetTop( --aEditCursor.Top() ); + aEditCursor.SetBottom( ++aEditCursor.Bottom() ); } else { if( IsTopToBottom() ) { - aEditCursor.Left()--; - aEditCursor.Right()++; + aEditCursor.SetLeft( --aEditCursor.Left() ); + aEditCursor.SetRight( ++aEditCursor.Right() ); } else { - aEditCursor.Left()++; - aEditCursor.Right()--; + aEditCursor.SetLeft( ++aEditCursor.Left() ); + aEditCursor.SetRight( --aEditCursor.Right() ); } } aEditCursor = GetWindow()->PixelToLogic( aEditCursor ); @@ -2235,7 +2235,7 @@ void ImpEditView::dragOver(const css::datatransfer::dnd::DropTargetDragEvent& rD aEditCursor = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM ); Point aTopLeft( GetWindowPos( aEditCursor.TopLeft() ) ); aEditCursor.SetPos( aTopLeft ); - aEditCursor.Right() = aEditCursor.Left() + pDragAndDropInfo->nCursorWidth; + aEditCursor.SetRight( aEditCursor.Left() + pDragAndDropInfo->nCursorWidth ); aEditCursor = GetWindow()->LogicToPixel( aEditCursor ); aEditCursor = GetWindow()->PixelToLogic( aEditCursor ); } diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 148335c2efce..deb4fe4d7242 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1396,11 +1396,11 @@ EditPaM ImpEditEngine::PageUp( const EditPaM& rPaM, EditView const * pView ) { tools::Rectangle aRect = PaMtoEditCursor( rPaM ); Point aTopLeft = aRect.TopLeft(); - aTopLeft.Y() -= pView->GetVisArea().GetHeight() *9/10; + aTopLeft.setY( aTopLeft.Y() - pView->GetVisArea().GetHeight() *9/10 ); aTopLeft.X() += nOnePixelInRef; if ( aTopLeft.Y() < 0 ) { - aTopLeft.Y() = 0; + aTopLeft.setY( 0 ); } return GetPaM( aTopLeft ); } @@ -1409,12 +1409,12 @@ EditPaM ImpEditEngine::PageDown( const EditPaM& rPaM, EditView const * pView ) { tools::Rectangle aRect = PaMtoEditCursor( rPaM ); Point aBottomRight = aRect.BottomRight(); - aBottomRight.Y() += pView->GetVisArea().GetHeight() *9/10; + aBottomRight.setY( aBottomRight.Y() + pView->GetVisArea().GetHeight() *9/10 ); aBottomRight.X() += nOnePixelInRef; long nHeight = GetTextHeight(); if ( aBottomRight.Y() > nHeight ) { - aBottomRight.Y() = nHeight-2; + aBottomRight.setY( nHeight-2 ); } return GetPaM( aBottomRight ); } @@ -3033,7 +3033,7 @@ tools::Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nF else { aEditCursor = GetEditCursor( pPortion, aPaM.GetIndex(), nFlags ); - aEditCursor.Top() += nY; + aEditCursor.SetTop( aEditCursor.Top() + nY ); aEditCursor.Bottom() += nY; return aEditCursor; } @@ -3057,7 +3057,7 @@ EditPaM ImpEditEngine::GetPaM( Point aDocPos, bool bSmart ) if ( nY > aDocPos.Y() ) { nY -= nTmpHeight; - aDocPos.Y() -= nY; + aDocPos.setY( aDocPos.Y() - nY ); // Skip invisible Portions: while ( pPortion && !pPortion->IsVisible() ) { @@ -4222,9 +4222,9 @@ tools::Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 tools::Rectangle aEditCursor; - aEditCursor.Top() = nY; + aEditCursor.SetTop( nY ); nY += pLine->GetHeight(); - aEditCursor.Bottom() = nY-1; + aEditCursor.SetBottom( nY-1 ); // Search within the line... long nX; @@ -4244,12 +4244,12 @@ tools::Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nX = GetXPos( pPortion, pLine, nIndex, bool( nFlags & GetCursorFlags::PreferPortionStart ) ); } - aEditCursor.Left() = aEditCursor.Right() = nX; + aEditCursor.SetLeft( aEditCursor.Right() = nX ); if ( nFlags & GetCursorFlags::TextOnly ) - aEditCursor.Top() = aEditCursor.Bottom() - pLine->GetTxtHeight() + 1; + aEditCursor.SetTop( aEditCursor.Bottom() - pLine->GetTxtHeight() + 1 ); else - aEditCursor.Top() = aEditCursor.Bottom() - std::min( pLine->GetTxtHeight(), pLine->GetHeight() ) + 1; + aEditCursor.SetTop( aEditCursor.Bottom() - std::min( pLine->GetTxtHeight(), pLine->GetHeight() ) + 1 ); return aEditCursor; } @@ -4265,15 +4265,15 @@ void ImpEditEngine::SetValidPaperSize( const Size& rNewSz ) // Minimum/Maximum width: if ( aPaperSize.Width() < nMinWidth ) - aPaperSize.Width() = nMinWidth; + aPaperSize.setWidth( nMinWidth ); else if ( aPaperSize.Width() > nMaxWidth ) - aPaperSize.Width() = nMaxWidth; + aPaperSize.setWidth( nMaxWidth ); // Minimum/Maximum height: if ( aPaperSize.Height() < nMinHeight ) - aPaperSize.Height() = nMinHeight; + aPaperSize.setHeight( nMinHeight ); else if ( aPaperSize.Height() > nMaxHeight ) - aPaperSize.Height() = nMaxHeight; + aPaperSize.setHeight( nMaxHeight ); } void ImpEditEngine::IndentBlock( EditView* pEditView, bool bRight ) diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 668b34ab552c..7d61e9a1dfe2 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -120,8 +120,8 @@ Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin ) aTranslatedPos -= rOrigin; // Rotation... - aRotatedPos.X() = static_cast<long>( nCos*aTranslatedPos.X() + nSin*aTranslatedPos.Y() ); - aRotatedPos.Y() = static_cast<long>(- ( nSin*aTranslatedPos.X() - nCos*aTranslatedPos.Y() )); + aRotatedPos.setX( static_cast<long>( nCos*aTranslatedPos.X() + nSin*aTranslatedPos.Y() ) ); + aRotatedPos.setY( static_cast<long>(- ( nSin*aTranslatedPos.X() - nCos*aTranslatedPos.Y() )) ); aTranslatedPos = aRotatedPos; // Translation... @@ -187,8 +187,8 @@ static void lcl_DrawRedLines( OutputDevice* pOutDev, // the positions a little bit in y direction... long nOnePixel = pOutDev->PixelToLogic( Size( 0, 1 ) ).Height(); long nCorrect = 2*nOnePixel; - aPnt1.Y() -= nCorrect; - aPnt1.X() -= nCorrect; + aPnt1.setY( aPnt1.Y() - nCorrect ); + aPnt1.setX( aPnt1.X() - nCorrect ); } if ( nStart > nIndex ) { @@ -197,10 +197,10 @@ static void lcl_DrawRedLines( OutputDevice* pOutDev, // since for RTL portions rPnt is on the visual right end of the portion // (i.e. at the start of the first RTL char) we need to subtract the offset // for RTL portions... - aPnt1.X() += (bIsRightToLeft ? -1 : 1) * pDXArray[ nStart - nIndex - 1 ]; + aPnt1.setX( aPnt1.X() + (bIsRightToLeft ? -1 : 1) * pDXArray[ nStart - nIndex - 1 ] ); } else - aPnt1.Y() += pDXArray[ nStart - nIndex - 1 ]; + aPnt1.setY( aPnt1.Y() + pDXArray[ nStart - nIndex - 1 ] ); } Point aPnt2( rPnt ); DBG_ASSERT( nEnd > nIndex, "RedLine: aPnt2?" ); @@ -209,10 +209,10 @@ static void lcl_DrawRedLines( OutputDevice* pOutDev, // since for RTL portions rPnt is on the visual right end of the portion // (i.e. at the start of the first RTL char) we need to subtract the offset // for RTL portions... - aPnt2.X() += (bIsRightToLeft ? -1 : 1) * pDXArray[ nEnd - nIndex - 1 ]; + aPnt2.setX( aPnt2.X() + (bIsRightToLeft ? -1 : 1) * pDXArray[ nEnd - nIndex - 1 ] ); } else - aPnt2.Y() += pDXArray[ nEnd - nIndex - 1 ]; + aPnt2.setY( aPnt2.Y() + pDXArray[ nEnd - nIndex - 1 ] ); if ( nOrientation ) { aPnt1 = Rotate( aPnt1, nOrientation, rOrigin ); @@ -237,8 +237,8 @@ static Point lcl_ImplCalcRotatedPos( Point rPos, Point rOrigin, double nSin, dou Point aTranslatedPos( rPos); aTranslatedPos -= rOrigin; - aRotatedPos.X() = static_cast<long>( nCos*aTranslatedPos.X() + nSin*aTranslatedPos.Y() ); - aRotatedPos.Y() = static_cast<long>(- ( nSin*aTranslatedPos.X() - nCos*aTranslatedPos.Y() )); + aRotatedPos.setX( static_cast<long>( nCos*aTranslatedPos.X() + nSin*aTranslatedPos.Y() ) ); + aRotatedPos.setY( static_cast<long>(- ( nSin*aTranslatedPos.X() - nCos*aTranslatedPos.Y() )) ); aTranslatedPos = aRotatedPos; // Translation... aTranslatedPos += rOrigin; @@ -412,12 +412,12 @@ void ImpEditEngine::FormatDoc() } else { - aInvalidRect.Bottom() = nY + pParaPortion->GetHeight(); + aInvalidRect.SetBottom( nY + pParaPortion->GetHeight() ); } } else if ( bGrow ) { - aInvalidRect.Bottom() = nY + pParaPortion->GetHeight(); + aInvalidRect.SetBottom( nY + pParaPortion->GetHeight() ); } nY += pParaPortion->GetHeight(); } @@ -432,13 +432,13 @@ void ImpEditEngine::FormatDoc() aStatus.GetStatusWord() |= !IsVertical() ? EditStatusFlags::TextHeightChanged : EditStatusFlags::TEXTWIDTHCHANGED; if ( nNewHeight < nCurTextHeight ) { - aInvalidRect.Bottom() = static_cast<long>(std::max( nNewHeight, nCurTextHeight )); + aInvalidRect.SetBottom( static_cast<long>(std::max( nNewHeight, nCurTextHeight )) ); if ( aInvalidRect.IsEmpty() ) { - aInvalidRect.Top() = 0; + aInvalidRect.SetTop( 0 ); // Left and Right are not evaluated, are however set due to IsEmpty. - aInvalidRect.Left() = 0; - aInvalidRect.Right() = !IsVertical() ? aPaperSize.Width() : aPaperSize.Height(); + aInvalidRect.SetLeft( 0 ); + aInvalidRect.SetRight( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ); } } @@ -456,9 +456,9 @@ void ImpEditEngine::FormatDoc() { Size aSz( pImpView->GetOutputArea().GetWidth(), nCurTextHeight ); if ( aSz.Height() > aMaxAutoPaperSize.Height() ) - aSz.Height() = aMaxAutoPaperSize.Height(); + aSz.setHeight( aMaxAutoPaperSize.Height() ); else if ( aSz.Height() < aMinAutoPaperSize.Height() ) - aSz.Height() = aMinAutoPaperSize.Height(); + aSz.setHeight( aMinAutoPaperSize.Height() ); pImpView->ResetOutputArea( tools::Rectangle( pImpView->GetOutputArea().TopLeft(), aSz ) ); } @@ -508,9 +508,9 @@ void ImpEditEngine::CheckAutoPageSize() { Size aPrevPaperSize( GetPaperSize() ); if ( GetStatus().AutoPageWidth() ) - aPaperSize.Width() = !IsVertical() ? CalcTextWidth( true ) : GetTextHeight(); + aPaperSize.setWidth( !IsVertical() ? CalcTextWidth( true ) : GetTextHeight() ); if ( GetStatus().AutoPageHeight() ) - aPaperSize.Height() = !IsVertical() ? GetTextHeight() : CalcTextWidth( true ); + aPaperSize.setHeight( !IsVertical() ? GetTextHeight() : CalcTextWidth( true ) ); SetValidPaperSize( aPaperSize ); // consider Min, Max @@ -537,15 +537,15 @@ void ImpEditEngine::CheckAutoPageSize() Size aInvSize = aPaperSize; if ( aPaperSize.Width() < aPrevPaperSize.Width() ) - aInvSize.Width() = aPrevPaperSize.Width(); + aInvSize.setWidth( aPrevPaperSize.Width() ); if ( aPaperSize.Height() < aPrevPaperSize.Height() ) - aInvSize.Height() = aPrevPaperSize.Height(); + aInvSize.setHeight( aPrevPaperSize.Height() ); Size aSz( aInvSize ); if ( IsVertical() ) { - aSz.Width() = aInvSize.Height(); - aSz.Height() = aInvSize.Width(); + aSz.setWidth( aInvSize.Height() ); + aSz.setHeight( aInvSize.Width() ); } aInvalidRect = tools::Rectangle( Point(), aSz ); @@ -934,7 +934,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) nTmpWidth -= rPrev.GetSize().Width(); nTmpPos = nTmpPos - rPrev.GetLen(); rPrev.SetLen(rPrev.GetLen() + nTmpLen); - rPrev.GetSize().Width() = -1; + rPrev.GetSize().setWidth( -1 ); } DBG_ASSERT( nTmpPortion < pParaPortion->GetTextPortions().Count(), "No more Portions left!" ); @@ -997,11 +997,11 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) pPortion->SetKind(PortionKind::TAB); pPortion->SetExtraValue( aCurrentTab.aTabStop.GetFill() ); - pPortion->GetSize().Width() = aCurrentTab.nTabPos - (nTmpWidth+nStartX); + pPortion->GetSize().setWidth( aCurrentTab.nTabPos - (nTmpWidth+nStartX) ); // Height needed... SeekCursor( pNode, nTmpPos+1, aTmpFont ); - pPortion->GetSize().Height() = aTmpFont.QuickGetTextSize( GetRefDevice(), OUString(), 0, 0 ).Height(); + pPortion->GetSize().setHeight( aTmpFont.QuickGetTextSize( GetRefDevice(), OUString(), 0, 0 ).Height() ); DBG_ASSERT( pPortion->GetSize().Width() >= 0, "Tab incorrectly calculated!" ); @@ -1013,7 +1013,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) { // What now? // make the tab fitting - pPortion->GetSize().Width() = nXWidth-nOldTmpWidth; + pPortion->GetSize().setWidth( nXWidth-nOldTmpWidth ); nTmpWidth = nXWidth-1; bEOL = true; bBrokenLine = true; @@ -1027,7 +1027,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) case EE_FEATURE_LINEBR: { DBG_ASSERT( pPortion, "?!" ); - pPortion->GetSize().Width() = 0; + pPortion->GetSize().setWidth( 0 ); bEOL = true; bLineBreak = true; pPortion->SetKind( PortionKind::LINEBREAK ); @@ -1159,9 +1159,9 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) { Size aSize( aTmpFont.QuickGetTextSize( GetRefDevice(), pParaPortion->GetNode()->GetString(), nTmpPos, nPortionLen, pBuf.get() )); - pPortion->GetSize().Width() += aSize.Width(); + pPortion->GetSize().setWidth( pPortion->GetSize().Width() + aSize.Width() ); if (pPortion->GetSize().Height() < aSize.Height()) - pPortion->GetSize().Height() = aSize.Height(); + pPortion->GetSize().setHeight( aSize.Height() ); } else { @@ -1171,9 +1171,9 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) // #i9050# Do Kerning also behind portions... if ( ( aTmpFont.GetFixKerning() > 0 ) && ( ( nTmpPos + nPortionLen ) < pNode->Len() ) ) - pPortion->GetSize().Width() += aTmpFont.GetFixKerning(); + pPortion->GetSize().setWidth( pPortion->GetSize().Width() + aTmpFont.GetFixKerning() ); if ( IsFixedCellHeight() ) - pPortion->GetSize().Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() ); + pPortion->GetSize().setHeight( ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() ) ); } if ( bCalcCharPositions ) { @@ -1209,7 +1209,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) { long nExtraSpace = pPortion->GetSize().Height()/5; nExtraSpace = GetXValue( nExtraSpace ); - pPortion->GetSize().Width() += nExtraSpace; + pPortion->GetSize().setWidth( pPortion->GetSize().Width() + nExtraSpace ); nTmpWidth += nExtraSpace; } } @@ -1254,7 +1254,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) aCurrentTab.bValid = false; } TextPortion& rTabPortion = pParaPortion->GetTextPortions()[aCurrentTab.nTabPortion]; - rTabPortion.GetSize().Width() = aCurrentTab.nTabPos - aCurrentTab.nStartPosX - nW - nStartX; + rTabPortion.GetSize().setWidth( aCurrentTab.nTabPos - aCurrentTab.nStartPosX - nW - nStartX ); nTmpWidth = aCurrentTab.nStartPosX + rTabPortion.GetSize().Width() + nWidthAfterTab; } @@ -1382,9 +1382,9 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) ImplInitDigitMode(pRefDev, aTmpFont.GetLanguage()); if ( IsFixedCellHeight() ) - aTextSize.Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() ); + aTextSize.setHeight( ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() ) ); else - aTextSize.Height() = aTmpFont.GetPhysTxtSize( pRefDev ).Height(); + aTextSize.setHeight( aTmpFont.GetPhysTxtSize( pRefDev ).Height() ); pLine->SetHeight( static_cast<sal_uInt16>(aTextSize.Height()) ); } @@ -1505,7 +1505,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) sal_Int32 nPosInArray = pLine->GetEnd()-1-pLine->GetStart(); long nNewValue = ( nPosInArray ? pLine->GetCharPosArray()[ nPosInArray-1 ] : 0 ) + n; pLine->GetCharPosArray()[ nPosInArray ] = nNewValue; - rTP.GetSize().Width() += n; + rTP.GetSize().setWidth( rTP.GetSize().Width() + n ); } pLine->SetTextWidth( aTextSize.Width() ); @@ -1726,7 +1726,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion ) TextPortion* pDummyPortion = new TextPortion( 0 ); pDummyPortion->GetSize() = aTmpFont.GetPhysTxtSize( pRefDev ); if ( IsFixedCellHeight() ) - pDummyPortion->GetSize().Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() ); + pDummyPortion->GetSize().setHeight( ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() ) ); pParaPortion->GetTextPortions().Append(pDummyPortion); FormatterFontMetric aFormatterMetrics; RecalcFormatterFontMetrics( aFormatterMetrics, aTmpFont ); @@ -2062,7 +2062,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te DBG_ASSERT( rTP.GetKind() == PortionKind::TEXT, "BlankRubber: No TextPortion!" ); DBG_ASSERT( nBreakPos > pLine->GetStart(), "SplitTextPortion at the beginning of the line?" ); sal_Int32 nPosInArray = nBreakPos - 1 - pLine->GetStart(); - rTP.GetSize().Width() = ( nPosInArray && ( rTP.GetLen() > 1 ) ) ? pLine->GetCharPosArray()[ nPosInArray-1 ] : 0; + rTP.GetSize().setWidth( ( nPosInArray && ( rTP.GetLen() > 1 ) ) ? pLine->GetCharPosArray()[ nPosInArray-1 ] : 0 ); pLine->GetCharPosArray()[ nPosInArray ] = rTP.GetSize().Width(); } else if ( bHyphenated ) @@ -2079,16 +2079,16 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te pHyphPortion->SetLen( nAltDelChar ); if (cAlternateReplChar && !bAltFullLeft) pHyphPortion->SetExtraValue( cAlternateReplChar ); // Correct width of the portion above: - rPrev.GetSize().Width() = - pLine->GetCharPosArray()[ nBreakPos-1 - pLine->GetStart() - nAltDelChar ]; + rPrev.GetSize().setWidth( + pLine->GetCharPosArray()[ nBreakPos-1 - pLine->GetStart() - nAltDelChar ] ); } // Determine the width of the Hyph-Portion: SvxFont aFont; SeekCursor( pParaPortion->GetNode(), nBreakPos, aFont ); aFont.SetPhysFont( GetRefDevice() ); - pHyphPortion->GetSize().Height() = GetRefDevice()->GetTextHeight(); - pHyphPortion->GetSize().Width() = GetRefDevice()->GetTextWidth( aHyphText ); + pHyphPortion->GetSize().setHeight( GetRefDevice()->GetTextHeight() ); + pHyphPortion->GetSize().setWidth( GetRefDevice()->GetTextWidth( aHyphText ) ); pParaPortion->GetTextPortions().Insert(++nEndPortion, pHyphPortion); } @@ -2169,7 +2169,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, // For the last character the portion must stop behind the blank // => Simplify correction: DBG_ASSERT( ( nPortionStart + rLastPortion.GetLen() ) == ( nLastChar+1 ), "Blank actually not at the end of the portion!?"); - rLastPortion.GetSize().Width() -= nBlankWidth; + rLastPortion.GetSize().setWidth( rLastPortion.GetSize().Width() - nBlankWidth ); nRemainingSpace += nBlankWidth; } pLine->GetCharPosArray()[nLastChar-nFirstChar] -= nBlankWidth; @@ -2194,9 +2194,9 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, TextPortion& rLastPortion = pParaPortion->GetTextPortions()[ nPortion ]; // The width of the portion: - rLastPortion.GetSize().Width() += nMore4Everyone; + rLastPortion.GetSize().setWidth( rLastPortion.GetSize().Width() + nMore4Everyone ); if ( nSomeExtraSpace ) - rLastPortion.GetSize().Width()++; + rLastPortion.GetSize().setWidth( ++rLastPortion.GetSize().Width() ); // Correct positions in array // Even for kashidas just change positions, VCL will then draw the kashida automatically @@ -2377,7 +2377,7 @@ sal_Int32 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_Int32 nPos { // No new GetTextSize, instead use values from the Array: DBG_ASSERT( nPos > pCurLine->GetStart(), "SplitTextPortion at the beginning of the line?" ); - pTextPortion->GetSize().Width() = pCurLine->GetCharPosArray()[ nPos-pCurLine->GetStart()-1 ]; + pTextPortion->GetSize().setWidth( pCurLine->GetCharPosArray()[ nPos-pCurLine->GetStart()-1 ] ); if ( pTextPortion->GetExtraInfos() && pTextPortion->GetExtraInfos()->bCompressed ) { @@ -2394,7 +2394,7 @@ sal_Int32 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_Int32 nPos } } else - pTextPortion->GetSize().Width() = -1; + pTextPortion->GetSize().setWidth( -1 ); return nSplitPortion; } @@ -2533,7 +2533,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_Int32 nSta FindPortion( nStartPos, nPortionStart ); TextPortion& rTP = pParaPortion->GetTextPortions()[ nTP ]; rTP.SetLen( rTP.GetLen() + nNewChars ); - rTP.GetSize().Width() = -1; + rTP.GetSize().setWidth( -1 ); } } else @@ -2599,7 +2599,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_Int32 nSta TextPortion& rPrev = pParaPortion->GetTextPortions()[nLastPortion - 1]; DBG_ASSERT( rPrev.GetKind() == PortionKind::TEXT, "Portion?!" ); rPrev.SetLen( rPrev.GetLen() + pTP->GetLen() ); - rPrev.GetSize().Width() = -1; + rPrev.GetSize().setWidth( -1 ); } pParaPortion->GetTextPortions().Remove( nLastPortion ); } @@ -2680,7 +2680,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo rFont.SetPitch( rFontItem.GetPitch() ); rFont.SetCharSet( rFontItem.GetCharSet() ); Size aSz( rFont.GetFontSize() ); - aSz.Height() = static_cast<const SvxFontHeightItem&>(pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ) ) ).GetHeight(); + aSz.setHeight( static_cast<const SvxFontHeightItem&>(pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ) ) ).GetHeight() ); rFont.SetFontSize( aSz ); rFont.SetWeight( static_cast<const SvxWeightItem&>(pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ))).GetWeight() ); rFont.SetItalic( static_cast<const SvxPostureItem&>(pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_ITALIC, nScriptType ))).GetPosture() ); @@ -2781,7 +2781,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo { if ( nStretchY != 100 ) { - aRealSz.Height() *= nStretchY; + aRealSz.setHeight( aRealSz.Height() * nStretchY ); aRealSz.Height() /= 100; } if ( nStretchX != 100 ) @@ -2789,12 +2789,12 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo if ( nStretchX == nStretchY && nRelWidth == 100 ) { - aRealSz.Width() = 0; + aRealSz.setWidth( 0 ); } else { - aRealSz.Width() *= nStretchX; - aRealSz.Width() /= 100; + aRealSz.setWidth( aRealSz.Width() * nStretchX ); + aRealSz.setWidth( aRealSz.Width() / 100 ); // Also the Kerning: (long due to handle Interim results) long nKerning = rFont.GetFixKerning(); @@ -2827,7 +2827,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo } if ( nRelWidth != 100 ) { - aRealSz.Width() *= nRelWidth; + aRealSz.setWidth( aRealSz.Width() * nRelWidth ); aRealSz.Width() /= 100; } rFont.SetFontSize( aRealSz ); @@ -3023,13 +3023,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po bool bEndOfParagraphWritten(false); if ( !IsVertical() ) - aStartPos.Y() += pPortion->GetFirstLineOffset(); + aStartPos.setY( aStartPos.Y() + pPortion->GetFirstLineOffset() ); else { if( IsTopToBottom() ) - aStartPos.X() -= pPortion->GetFirstLineOffset(); + aStartPos.setX( aStartPos.X() - pPortion->GetFirstLineOffset() ); else - aStartPos.X() += pPortion->GetFirstLineOffset(); + aStartPos.setX( aStartPos.X() + pPortion->GetFirstLineOffset() ); } Point aParaStart( aStartPos ); @@ -3047,29 +3047,29 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po aTmpPos = aStartPos; if ( !IsVertical() ) { - aTmpPos.X() += pLine->GetStartPosX(); - aTmpPos.Y() += pLine->GetMaxAscent(); - aStartPos.Y() += pLine->GetHeight(); + aTmpPos.setX( aTmpPos.X() + pLine->GetStartPosX() ); + aTmpPos.setY( aTmpPos.Y() + pLine->GetMaxAscent() ); + aStartPos.setY( aStartPos.Y() + pLine->GetHeight() ); if (nLine != nLastLine) - aStartPos.Y() += nVertLineSpacing; + aStartPos.setY( aStartPos.Y() + nVertLineSpacing ); } else { if ( IsTopToBottom() ) { - aTmpPos.Y() += pLine->GetStartPosX(); - aTmpPos.X() -= pLine->GetMaxAscent(); - aStartPos.X() -= pLine->GetHeight(); + aTmpPos.setY( aTmpPos.Y() + pLine->GetStartPosX() ); + aTmpPos.setX( aTmpPos.X() - pLine->GetMaxAscent() ); + aStartPos.setX( aStartPos.X() - pLine->GetHeight() ); if (nLine != nLastLine) - aStartPos.X() -= nVertLineSpacing; + aStartPos.setX( aStartPos.X() - nVertLineSpacing ); } else { - aTmpPos.Y() -= pLine->GetStartPosX(); - aTmpPos.X() += pLine->GetMaxAscent(); - aStartPos.X() += pLine->GetHeight(); + aTmpPos.setY( aTmpPos.Y() - pLine->GetStartPosX() ); + aTmpPos.setX( aTmpPos.X() + pLine->GetMaxAscent() ); + aStartPos.setX( aStartPos.X() + pLine->GetHeight() ); if (nLine != nLastLine) - aStartPos.X() += nVertLineSpacing; + aStartPos.setX( aStartPos.X() + nVertLineSpacing ); } } @@ -3106,7 +3106,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po long nPortionXOffset = GetPortionXOffset( pPortion, pLine, nPortion ); if ( !IsVertical() ) { - aTmpPos.X() = aStartPos.X() + nPortionXOffset; + aTmpPos.setX( aStartPos.X() + nPortionXOffset ); if ( aTmpPos.X() > aClipRect.Right() ) break; // No further output in line necessary } @@ -3114,13 +3114,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po { if( IsTopToBottom() ) { - aTmpPos.Y() = aStartPos.Y() + nPortionXOffset; + aTmpPos.setY( aStartPos.Y() + nPortionXOffset ); if ( aTmpPos.Y() > aClipRect.Bottom() ) break; // No further output in line necessary } else { - aTmpPos.Y() = aStartPos.Y() - nPortionXOffset; + aTmpPos.setY( aStartPos.Y() - nPortionXOffset ); if (aTmpPos.Y() < aClipRect.Top()) break; // No further output in line necessary } @@ -3209,40 +3209,40 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po Point aTopLeftRectPos( aTmpPos ); if ( !IsVertical() ) { - aTopLeftRectPos.X() += nAdvanceX; - aTopLeftRectPos.Y() += nAdvanceY; + aTopLeftRectPos.setX( aTopLeftRectPos.X() + nAdvanceX ); + aTopLeftRectPos.setY( aTopLeftRectPos.Y() + nAdvanceY ); } else { if( IsTopToBottom() ) { - aTopLeftRectPos.Y() -= nAdvanceX; - aTopLeftRectPos.X() += nAdvanceY; + aTopLeftRectPos.setY( aTopLeftRectPos.Y() - nAdvanceX ); + aTopLeftRectPos.setX( aTopLeftRectPos.X() + nAdvanceY ); } else { - aTopLeftRectPos.Y() += nAdvanceX; - aTopLeftRectPos.X() -= nAdvanceY; + aTopLeftRectPos.setY( aTopLeftRectPos.Y() + nAdvanceX ); + aTopLeftRectPos.setX( aTopLeftRectPos.X() - nAdvanceY ); } } Point aBottomRightRectPos( aTopLeftRectPos ); if ( !IsVertical() ) { - aBottomRightRectPos.X() += 2 * nHalfBlankWidth; - aBottomRightRectPos.Y() += pLine->GetHeight(); + aBottomRightRectPos.setX( aBottomRightRectPos.X() + 2 * nHalfBlankWidth ); + aBottomRightRectPos.setY( aBottomRightRectPos.Y() + pLine->GetHeight() ); } else { if (IsTopToBottom()) { - aBottomRightRectPos.X() += pLine->GetHeight(); - aBottomRightRectPos.Y() -= 2 * nHalfBlankWidth; + aBottomRightRectPos.setX( aBottomRightRectPos.X() + pLine->GetHeight() ); + aBottomRightRectPos.setY( aBottomRightRectPos.Y() - 2 * nHalfBlankWidth ); } else { - aBottomRightRectPos.X() -= pLine->GetHeight(); - aBottomRightRectPos.Y() += 2 * nHalfBlankWidth; + aBottomRightRectPos.setX( aBottomRightRectPos.X() - pLine->GetHeight() ); + aBottomRightRectPos.setY( aBottomRightRectPos.Y() + 2 * nHalfBlankWidth ); } } @@ -3272,14 +3272,14 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po const long nAddX = nHalfBlankWidth - aSlashSize.Width() / 2; if ( !IsVertical() ) { - aSlashPos.X() = aTopLeftRectPos.X() + nAddX; + aSlashPos.setX( aTopLeftRectPos.X() + nAddX ); } else { if (IsTopToBottom()) - aSlashPos.Y() = aTopLeftRectPos.Y() + nAddX; + aSlashPos.setY( aTopLeftRectPos.Y() + nAddX ); else - aSlashPos.Y() = aTopLeftRectPos.Y() - nAddX; + aSlashPos.setY( aTopLeftRectPos.Y() - nAddX ); } aTmpFont.QuickDrawText( pOutDev, aSlashPos, aSlash, 0, 1 ); @@ -3326,20 +3326,20 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po if ( !IsVertical() ) { - aStartPos.Y() += nMaxAscent; - aTmpPos.Y() += nMaxAscent; + aStartPos.setY( aStartPos.Y() + nMaxAscent ); + aTmpPos.setY( aTmpPos.Y() + nMaxAscent ); } else { if (IsTopToBottom()) { - aTmpPos.X() -= nMaxAscent; - aStartPos.X() -= nMaxAscent; + aTmpPos.setX( aTmpPos.X() - nMaxAscent ); + aStartPos.setX( aStartPos.X() - nMaxAscent ); } else { - aTmpPos.X() += nMaxAscent; - aStartPos.X() += nMaxAscent; + aTmpPos.setX( aTmpPos.X() + nMaxAscent ); + aStartPos.setX( aStartPos.X() + nMaxAscent ); } } } @@ -3404,7 +3404,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po // In RTL portions spell markup pos should be at the start of the // first chara as well. That is on the right end of the portion if (rTextPortion.IsRightToLeft()) - aRedLineTmpPos.X() += rTextPortion.GetSize().Width(); + aRedLineTmpPos.setX( aRedLineTmpPos.X() + rTextPortion.GetSize().Width() ); if ( bStripOnly ) { @@ -3515,13 +3515,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po { long nDiff = aTmpFont.GetFontSize().Height() * aTmpFont.GetEscapement() / 100L; if ( !IsVertical() ) - aOutPos.Y() -= nDiff; + aOutPos.setY( aOutPos.Y() - nDiff ); else { if (IsTopToBottom()) - aOutPos.X() += nDiff; + aOutPos.setX( aOutPos.X() + nDiff ); else - aOutPos.X() -= nDiff; + aOutPos.setX( aOutPos.X() - nDiff ); } aRedLineTmpPos = aOutPos; aTmpFont.SetEscapement( 0 ); @@ -3590,7 +3590,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po && rTextPortion.GetExtraInfos() && rTextPortion.GetExtraInfos()->bCompressed && rTextPortion.GetExtraInfos()->bFirstCharIsRightPunktuation ) { - aRealOutPos.X() += rTextPortion.GetExtraInfos()->nPortionOffsetX; + aRealOutPos.setX( aRealOutPos.X() + rTextPortion.GetExtraInfos()->nPortionOffsetX ); } // RTL portions with (#i37132#) @@ -3607,7 +3607,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po if ( bDrawFrame ) { Point aTopLeft( aTmpPos ); - aTopLeft.Y() -= pLine->GetMaxAscent(); + aTopLeft.setY( aTopLeft.Y() - pLine->GetMaxAscent() ); if ( nOrientation ) aTopLeft = lcl_ImplCalcRotatedPos( aTopLeft, aOrigin, nSin, nCos ); tools::Rectangle aRect( aTopLeft, rTextPortion.GetSize() ); @@ -3627,7 +3627,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po if ( auto pUrlField = dynamic_cast< const SvxURLField* >( pFieldData ) ) { Point aTopLeft( aTmpPos ); - aTopLeft.Y() -= pLine->GetMaxAscent(); + aTopLeft.setY( aTopLeft.Y() - pLine->GetMaxAscent() ); tools::Rectangle aRect( aTopLeft, rTextPortion.GetSize() ); vcl::PDFExtOutDevBookmarkEntry aBookmark; @@ -3650,12 +3650,12 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po { long nShift = (_nEsc * aTmpFont.GetFontSize().Height()) / 100L; if( !IsVertical() ) - aRedLineTmpPos.Y() -= nShift; + aRedLineTmpPos.setY( aRedLineTmpPos.Y() - nShift ); else if (IsTopToBottom()) - aRedLineTmpPos.X() += nShift; + aRedLineTmpPos.setX( aRedLineTmpPos.X() + nShift ); else - aRedLineTmpPos.X() -= nShift; + aRedLineTmpPos.setX( aRedLineTmpPos.X() - nShift ); } } Color aOldColor( pOutDev->GetLineColor() ); @@ -3770,13 +3770,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po if ( ( nLine != nLastLine ) && !aStatus.IsOutliner() ) { if ( !IsVertical() ) - aStartPos.Y() += nSBL; + aStartPos.setY( aStartPos.Y() + nSBL ); else { if( IsTopToBottom() ) - aStartPos.X() -= nSBL; + aStartPos.setX( aStartPos.X() - nSBL ); else - aStartPos.X() += nSBL; + aStartPos.setX( aStartPos.X() + nSBL ); } } @@ -3794,13 +3794,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po const SvxULSpaceItem& rULItem = pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE ); long nUL = GetYValue( rULItem.GetLower() ); if ( !IsVertical() ) - aStartPos.Y() += nUL; + aStartPos.setY( aStartPos.Y() + nUL ); else { if (IsTopToBottom()) - aStartPos.X() -= nUL; + aStartPos.setX( aStartPos.X() - nUL ); else - aStartPos.X() += nUL; + aStartPos.setX( aStartPos.X() + nUL ); } } @@ -3828,13 +3828,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po else { if ( !IsVertical() ) - aStartPos.Y() += nParaHeight; + aStartPos.setY( aStartPos.Y() + nParaHeight ); else { if (IsTopToBottom()) - aStartPos.X() -= nParaHeight; + aStartPos.setX( aStartPos.X() - nParaHeight ); else - aStartPos.X() += nParaHeight; + aStartPos.setX( aStartPos.X() + nParaHeight ); } } @@ -3870,7 +3870,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const tools::Rectangle& rRect, Ou if ( !IsVertical() ) { aStartPos = pView->GetOutputArea().TopLeft(); - aStartPos.X() -= pView->GetVisDocLeft(); + aStartPos.setX( aStartPos.X() - pView->GetVisDocLeft() ); aStartPos.Y() -= pView->GetVisDocTop(); } else @@ -3878,13 +3878,13 @@ void ImpEditEngine::Paint( ImpEditView* pView, const tools::Rectangle& rRect, Ou if( IsTopToBottom() ) { aStartPos = pView->GetOutputArea().TopRight(); - aStartPos.X() += pView->GetVisDocTop(); + aStartPos.setX( aStartPos.X() + pView->GetVisDocTop() ); aStartPos.Y() -= pView->GetVisDocLeft(); } else { aStartPos = pView->GetOutputArea().BottomLeft(); - aStartPos.X() -= pView->GetVisDocTop(); + aStartPos.setX( aStartPos.X() - pView->GetVisDocTop() ); aStartPos.Y() += pView->GetVisDocLeft(); } } @@ -3899,7 +3899,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const tools::Rectangle& rRect, Ou if ( aClipRect.Left() > nMaxX ) return; if ( aClipRect.Right() > nMaxX ) - aClipRect.Right() = nMaxX; + aClipRect.SetRight( nMaxX ); } bool bClipRegion = pTarget->IsClipRegion(); @@ -4043,10 +4043,10 @@ EditSelection ImpEditEngine::MoveParagraphs( Range aOldPositions, sal_Int32 nNew if (pUpperPortion && pLowerPortion) { aInvalidRect = tools::Rectangle(); // make empty - aInvalidRect.Left() = 0; - aInvalidRect.Right() = aPaperSize.Width(); - aInvalidRect.Top() = GetParaPortions().GetYOffset( pUpperPortion ); - aInvalidRect.Bottom() = GetParaPortions().GetYOffset( pLowerPortion ) + pLowerPortion->GetHeight(); + aInvalidRect.SetLeft( 0 ); + aInvalidRect.SetRight( aPaperSize.Width() ); + aInvalidRect.SetTop( GetParaPortions().GetYOffset( pUpperPortion ) ); + aInvalidRect.SetBottom( GetParaPortions().GetYOffset( pLowerPortion ) + pLowerPortion->GetHeight() ); UpdateViews( pCurView ); } @@ -4183,9 +4183,9 @@ long ImpEditEngine::CalcVertLineSpacing(Point& rStartPos) const { if( IsTopToBottom() ) // Shift the text to the right for the asian layout mode. - rStartPos.X() += nTotalSpace; + rStartPos.setX( rStartPos.X() + nTotalSpace ); else - rStartPos.X() -= nTotalSpace; + rStartPos.setX( rStartPos.X() - nTotalSpace ); } return nTotalSpace / (nTotalLineCount-1); @@ -4578,7 +4578,7 @@ bool ImpEditEngine::ImplCalcAsianCompression(ContentNode* pNode, if ( bCompressed && ( n100thPercentFromMax == 10000 ) ) pTextPortion->GetExtraInfos()->nWidthFullCompression = nNewPortionWidth; - pTextPortion->GetSize().Width() = nNewPortionWidth; + pTextPortion->GetSize().setWidth( nNewPortionWidth ); if ( pTextPortion->GetExtraInfos() && ( n100thPercentFromMax != 10000 ) ) { @@ -4588,7 +4588,7 @@ bool ImpEditEngine::ImplCalcAsianCompression(ContentNode* pNode, nShrink /= 10000; long nNewWidth = pTextPortion->GetExtraInfos()->nOrgWidth - nShrink; if ( nNewWidth < pTextPortion->GetSize().Width() ) - pTextPortion->GetSize().Width() = nNewWidth; + pTextPortion->GetSize().setWidth( nNewWidth ); } } return bCompressed; @@ -4629,7 +4629,7 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* { pTP = pTP2; pTP->GetExtraInfos()->bCompressed = false; - pTP->GetSize().Width() = pTP->GetExtraInfos()->nOrgWidth; + pTP->GetSize().setWidth( pTP->GetExtraInfos()->nOrgWidth ); if ( nCompressPercent ) { sal_Int32 nTxtPortion = pParaPortion->GetTextPortions().GetPos( pTP ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 2a995e8eb307..81f329cf999d 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -2360,10 +2360,10 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC tools::Rectangle aStartCursor( PaMtoEditCursor( aStartPaM ) ); tools::Rectangle aEndCursor( PaMtoEditCursor( aEndPaM ) ); DBG_ASSERT( aInvalidRect.IsEmpty(), "InvalidRect set!" ); - aInvalidRect.Left() = 0; - aInvalidRect.Right() = GetPaperSize().Width(); - aInvalidRect.Top() = aStartCursor.Top(); - aInvalidRect.Bottom() = aEndCursor.Bottom(); + aInvalidRect.SetLeft( 0 ); + aInvalidRect.SetRight( GetPaperSize().Width() ); + aInvalidRect.SetTop( aStartCursor.Top() ); + aInvalidRect.SetBottom( aEndCursor.Bottom() ); if ( pActiveView && pActiveView->HasSelection() ) { // Then no output through VDev. diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 1e76f58d4faa..0ed13e1088af 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -261,7 +261,7 @@ bool SvxSizeItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) if(!(rVal >>= nVal )) return false; - aSize.Width() = bConvert ? convertMm100ToTwip(nVal) : nVal; + aSize.setWidth( bConvert ? convertMm100ToTwip(nVal) : nVal ); } break; case MID_SIZE_HEIGHT: @@ -270,7 +270,7 @@ bool SvxSizeItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) if(!(rVal >>= nVal)) return true; - aSize.Height() = bConvert ? convertMm100ToTwip(nVal) : nVal; + aSize.setHeight( bConvert ? convertMm100ToTwip(nVal) : nVal ); } break; default: OSL_FAIL("Wrong MemberId!"); @@ -337,8 +337,8 @@ bool SvxSizeItem::GetPresentation void SvxSizeItem::ScaleMetrics( long nMult, long nDiv ) { - aSize.Width() = Scale( aSize.Width(), nMult, nDiv ); - aSize.Height() = Scale( aSize.Height(), nMult, nDiv ); + aSize.setWidth( Scale( aSize.Width(), nMult, nDiv ) ); + aSize.setHeight( Scale( aSize.Height(), nMult, nDiv ) ); } diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 3e5fc65907ea..891113ddf396 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -407,7 +407,7 @@ void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem, if(pSize) aGraphicSize = *pSize; else - aGraphicSize.Width() = aGraphicSize.Height() = 0; + aGraphicSize.setWidth( aGraphicSize.Height() = 0 ); } void SvxNumberFormat::SetGraphic( const OUString& rName ) @@ -419,7 +419,7 @@ void SvxNumberFormat::SetGraphic( const OUString& rName ) if( eVertOrient == text::VertOrientation::NONE ) eVertOrient = text::VertOrientation::TOP; - aGraphicSize.Width() = aGraphicSize.Height() = 0; + aGraphicSize.setWidth( aGraphicSize.Height() = 0 ); } sal_Int16 SvxNumberFormat::GetVertOrient() const diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 5f1da109f15f..f46caa736174 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -78,7 +78,7 @@ void SvxFont::DrawArrow( OutputDevice &rOut, const tools::Rectangle& rRect, Point aNxt( bLeft ? nRight : nLeft, nTop ); aPoly.Insert( 0, aTmp ); aPoly.Insert( 0, aNxt ); - aNxt.Y() = nBottom; + aNxt.setY( nBottom ); aPoly.Insert( 0, aNxt ); aPoly.Insert( 0, aTmp ); Color aOldLineColor = rOut.GetLineColor(); @@ -372,7 +372,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const OUString &rTxt, } if( IsKern() && ( nLen > 1 ) ) - aTxtSize.Width() += ( ( nLen-1 ) * long( nKern ) ); + aTxtSize.setWidth( aTxtSize.Width() + ( ( nLen-1 ) * long( nKern ) ) ); return aTxtSize; } @@ -409,7 +409,7 @@ Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt, if( IsKern() && ( nLen > 1 ) ) { - aTxtSize.Width() += ( ( nLen-1 ) * long( nKern ) ); + aTxtSize.setWidth( aTxtSize.Width() + ( ( nLen-1 ) * long( nKern ) ) ); if ( pDXArray ) { @@ -462,9 +462,9 @@ void SvxFont::QuickDrawText( OutputDevice *pOut, nDiff /= 100; if ( !IsVertical() ) - aPos.Y() -= nDiff; + aPos.setY( aPos.Y() - nDiff ); else - aPos.X() += nDiff; + aPos.setX( aPos.X() + nDiff ); } if( IsCapital() ) @@ -516,7 +516,7 @@ void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter, else nTmpEsc = nEsc; Size aSize = GetFontSize(); - aPos.Y() -= ( nTmpEsc * aSize.Height() ) / 100; + aPos.setY( aPos.Y() - ( nTmpEsc * aSize.Height() ) / 100 ); } Font aOldFont( ChgPhysFont( pOut ) ); Font aOldPrnFont( ChgPhysFont( pPrinter ) ); @@ -602,7 +602,7 @@ void SvxDoGetCapitalSize::Do( const OUString &_rTxt, const sal_Int32 _nIdx, pFont->SetPhysFont( pOut ); aPartSize.setWidth( pOut->GetTextWidth( _rTxt, _nIdx, _nLen ) ); aPartSize.setHeight( pOut->GetTextHeight() ); - aTxtSize.Height() = aPartSize.Height(); + aTxtSize.setHeight( aPartSize.Height() ); pFont->SetPropr( nProp ); pFont->SetPhysFont( pOut ); } @@ -611,7 +611,7 @@ void SvxDoGetCapitalSize::Do( const OUString &_rTxt, const sal_Int32 _nIdx, aPartSize.setWidth( pOut->GetTextWidth( _rTxt, _nIdx, _nLen ) ); aPartSize.setHeight( pOut->GetTextHeight() ); } - aTxtSize.Width() += aPartSize.Width(); + aTxtSize.setWidth( aTxtSize.Width() + aPartSize.Width() ); aTxtSize.Width() += ( _nLen * long( nKern ) ); } @@ -678,7 +678,7 @@ void SvxDoDrawCapital::DoSpace( const bool bDraw ) void SvxDoDrawCapital::SetSpace() { if ( pFont->IsWordLineMode() ) - aSpacePos.X() = aPos.X(); + aSpacePos.setX( aPos.X() ); } void SvxDoDrawCapital::Do( const OUString &_rTxt, const sal_Int32 _nIdx, @@ -704,7 +704,7 @@ void SvxDoDrawCapital::Do( const OUString &_rTxt, const sal_Int32 _nIdx, long nWidth = aPartSize.Width(); if ( nKern ) { - aPos.X() += (nKern/2); + aPos.setX( aPos.X() + (nKern/2) ); if ( _nLen ) nWidth += (_nLen*long(nKern)); } pOut->DrawStretchText(aPos,nWidth-nKern,_rTxt,_nIdx,_nLen); @@ -716,7 +716,7 @@ void SvxDoDrawCapital::Do( const OUString &_rTxt, const sal_Int32 _nIdx, pFont->SetPropr( nProp ); pFont->SetPhysFont( pOut ); - aPos.X() += nWidth-(nKern/2); + aPos.setX( aPos.X() + nWidth-(nKern/2) ); } /************************************************************************* diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index b14c9e70d5ce..78112d85dfac 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -501,7 +501,7 @@ void Outliner::SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY ) { Paragraph* pPara = pParaList->GetParagraph( nPara ); if ( pPara ) - pPara->aBulSize.Width() = -1; + pPara->aBulSize.setWidth( -1 ); } pEditEngine->SetGlobalCharStretching( nX, nY ); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index f83ec948ee52..2c15120b5c85 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -670,7 +670,7 @@ void Outliner::ImplCheckNumBulletItem( sal_Int32 nPara ) { Paragraph* pPara = pParaList->GetParagraph( nPara ); if (pPara) - pPara->aBulSize.Width() = -1; + pPara->aBulSize.setWidth( -1 ); } void Outliner::ImplSetLevelDependentStyleSheet( sal_Int32 nPara ) @@ -908,24 +908,24 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, if ( !bVertical ) { // aTextPos.Y() = rStartPos.Y() + aBulletArea.Bottom(); - aTextPos.Y() = rStartPos.Y() + ( bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent ); + aTextPos.setY( rStartPos.Y() + ( bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent ) ); if ( !bRightToLeftPara ) - aTextPos.X() = rStartPos.X() + aBulletArea.Left(); + aTextPos.setX( rStartPos.X() + aBulletArea.Left() ); else - aTextPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Right(); + aTextPos.setX( rStartPos.X() + GetPaperSize().Width() - aBulletArea.Right() ); } else { if (bTopToBottom) { // aTextPos.X() = rStartPos.X() - aBulletArea.Bottom(); - aTextPos.X() = rStartPos.X() - (bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent); - aTextPos.Y() = rStartPos.Y() + aBulletArea.Left(); + aTextPos.setX( rStartPos.X() - (bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent) ); + aTextPos.setY( rStartPos.Y() + aBulletArea.Left() ); } else { - aTextPos.X() = rStartPos.X() + (bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent); - aTextPos.Y() = rStartPos.Y() + aBulletArea.Left(); + aTextPos.setX( rStartPos.X() + (bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent) ); + aTextPos.setY( rStartPos.Y() + aBulletArea.Left() ); } } @@ -940,8 +940,8 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, // Translation... aTextPos -= rOrigin; // Rotation... - aRotatedPos.X()=static_cast<long>(nCos*aTextPos.X() + nSin*aTextPos.Y()); - aRotatedPos.Y()=static_cast<long>(- (nSin*aTextPos.X() - nCos*aTextPos.Y())); + aRotatedPos.setX(static_cast<long>(nCos*aTextPos.X() + nSin*aTextPos.Y()) ); + aRotatedPos.setY(static_cast<long>(- (nSin*aTextPos.X() - nCos*aTextPos.Y())) ); aTextPos = aRotatedPos; // Translation... aTextPos += rOrigin; @@ -967,7 +967,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, { // aTextPos is Bottom, go to Baseline FontMetric aMetric(pOutDev->GetFontMetric()); - aTextPos.Y() -= aMetric.GetDescent(); + aTextPos.setY( aTextPos.Y() - aMetric.GetDescent() ); } DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), pBuf.get(), @@ -987,23 +987,23 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, Point aBulletPos; if ( !bVertical ) { - aBulletPos.Y() = rStartPos.Y() + aBulletArea.Top(); + aBulletPos.setY( rStartPos.Y() + aBulletArea.Top() ); if ( !bRightToLeftPara ) - aBulletPos.X() = rStartPos.X() + aBulletArea.Left(); + aBulletPos.setX( rStartPos.X() + aBulletArea.Left() ); else - aBulletPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Right(); + aBulletPos.setX( rStartPos.X() + GetPaperSize().Width() - aBulletArea.Right() ); } else { if (bTopToBottom) { - aBulletPos.X() = rStartPos.X() - aBulletArea.Bottom(); - aBulletPos.Y() = rStartPos.Y() + aBulletArea.Left(); + aBulletPos.setX( rStartPos.X() - aBulletArea.Bottom() ); + aBulletPos.setY( rStartPos.Y() + aBulletArea.Left() ); } else { - aBulletPos.X() = rStartPos.X() + aBulletArea.Top(); - aBulletPos.Y() = rStartPos.Y() - aBulletArea.Right(); + aBulletPos.setX( rStartPos.X() + aBulletArea.Top() ); + aBulletPos.setY( rStartPos.Y() - aBulletArea.Right() ); } } @@ -1041,20 +1041,20 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, Point aStartPos, aEndPos; if ( !bVertical ) { - aStartPos.Y() = rStartPos.Y() + aBulletArea.Bottom(); + aStartPos.setY( rStartPos.Y() + aBulletArea.Bottom() ); if ( !bRightToLeftPara ) - aStartPos.X() = rStartPos.X() + aBulletArea.Right(); + aStartPos.setX( rStartPos.X() + aBulletArea.Right() ); else - aStartPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Left(); + aStartPos.setX( rStartPos.X() + GetPaperSize().Width() - aBulletArea.Left() ); aEndPos = aStartPos; - aEndPos.X() += nWidth; + aEndPos.setX( aEndPos.X() + nWidth ); } else { - aStartPos.X() = rStartPos.X() - aBulletArea.Bottom(); - aStartPos.Y() = rStartPos.Y() + aBulletArea.Right(); + aStartPos.setX( rStartPos.X() - aBulletArea.Bottom() ); + aStartPos.setY( rStartPos.Y() + aBulletArea.Right() ); aEndPos = aStartPos; - aEndPos.Y() += nWidth; + aEndPos.setY( aEndPos.Y() + nWidth ); } const Color& rOldLineColor = pOutDev->GetLineColor(); @@ -1072,10 +1072,10 @@ void Outliner::InvalidateBullet(sal_Int32 nPara) { Point aPos( pView->pEditView->GetWindowPosTopLeft(nPara ) ); tools::Rectangle aRect( pView->GetOutputArea() ); - aRect.Right() = aPos.X(); - aRect.Top() = aPos.Y(); - aRect.Bottom() = aPos.Y(); - aRect.Bottom() += nLineHeight; + aRect.SetRight( aPos.X() ); + aRect.SetTop( aPos.Y() ); + aRect.SetBottom( aPos.Y() ); + aRect.SetBottom( aRect.Bottom() + nLineHeight ); pView->GetWindow()->Invalidate( aRect ); } @@ -1411,8 +1411,8 @@ Size Outliner::ImplGetBulletSize( sal_Int32 nPara ) vcl::Font aBulletFont( ImpCalcBulletFont( nPara ) ); vcl::Font aRefFont( pRefDev->GetFont()); pRefDev->SetFont( aBulletFont ); - pPara->aBulSize.Width() = pRefDev->GetTextWidth( aBulletText ); - pPara->aBulSize.Height() = pRefDev->GetTextHeight(); + pPara->aBulSize.setWidth( pRefDev->GetTextWidth( aBulletText ) ); + pPara->aBulSize.setHeight( pRefDev->GetTextHeight() ); pRefDev->SetFont( aRefFont ); } else @@ -1510,7 +1510,7 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo const short nSpaceBefore = pFmt->GetAbsLSpace() + pFmt->GetFirstLineOffset(); const SvxLRSpaceItem& rLR = pEditEngine->GetParaAttrib( nPara, bOutlineMode ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE ); - aTopLeft.X() = rLR.GetTextLeft() + rLR.GetTextFirstLineOfst() + nSpaceBefore; + aTopLeft.setX( rLR.GetTextLeft() + rLR.GetTextFirstLineOfst() + nSpaceBefore ); long nBulletWidth = std::max( static_cast<long>(-rLR.GetTextFirstLineOfst()), static_cast<long>((-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance()) ); if ( nBulletWidth < aBulletSize.Width() ) // The Bullet creates its space @@ -1523,7 +1523,7 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SvxAdjust::Left ) ) || ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SvxAdjust::Right ) ) ) { - aTopLeft.X() = pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth; + aTopLeft.setX( pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth ); } } @@ -1531,10 +1531,10 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo ParagraphInfos aInfos = pEditEngine->GetParagraphInfos( nPara ); if ( aInfos.bValid ) { - aTopLeft.Y() = /* aInfos.nFirstLineOffset + */ // nFirstLineOffset is already added to the StartPos (PaintBullet) from the EditEngine + aTopLeft.setY( /* aInfos.nFirstLineOffset + */ // nFirstLineOffset is already added to the StartPos (PaintBullet) from the EditEngine aInfos.nFirstLineHeight - aInfos.nFirstLineTextHeight + aInfos.nFirstLineTextHeight / 2 - - aBulletSize.Height() / 2; + - aBulletSize.Height() / 2 ); // may prefer to print out on the baseline ... if( ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ) && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_CHAR_SPECIAL ) ) { @@ -1546,8 +1546,8 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo pRefDev->SetFont( aBulletFont ); FontMetric aMetric( pRefDev->GetFontMetric() ); // Leading on the first line ... - aTopLeft.Y() = /* aInfos.nFirstLineOffset + */ aInfos.nFirstLineMaxAscent; - aTopLeft.Y() -= aMetric.GetAscent(); + aTopLeft.setY( /* aInfos.nFirstLineOffset + */ aInfos.nFirstLineMaxAscent ); + aTopLeft.setY( aTopLeft.Y() - aMetric.GetAscent() ); pRefDev->SetFont( aOldFont ); } } @@ -1556,15 +1556,15 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo // Horizontal: if( pFmt->GetNumAdjust() == SvxAdjust::Right ) { - aTopLeft.X() += nBulletWidth - aBulletSize.Width(); + aTopLeft.setX( aTopLeft.X() + nBulletWidth - aBulletSize.Width() ); } else if( pFmt->GetNumAdjust() == SvxAdjust::Center ) { - aTopLeft.X() += ( nBulletWidth - aBulletSize.Width() ) / 2; + aTopLeft.setX( aTopLeft.X() + ( nBulletWidth - aBulletSize.Width() ) / 2 ); } if ( aTopLeft.X() < 0 ) // then push - aTopLeft.X() = 0; + aTopLeft.setX( 0 ); aBulletArea = tools::Rectangle( aTopLeft, aBulletSize ); } @@ -1572,22 +1572,22 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo { Size aBulletSize( aBulletArea.GetSize() ); Point aBulletDocPos( aBulletArea.TopLeft() ); - aBulletDocPos.Y() += pEditEngine->GetDocPosTopLeft( nPara ).Y(); + aBulletDocPos.setY( aBulletDocPos.Y() + pEditEngine->GetDocPosTopLeft( nPara ).Y() ); Point aBulletPos( aBulletDocPos ); if ( IsVertical() ) { - aBulletPos.Y() = aBulletDocPos.X(); - aBulletPos.X() = GetPaperSize().Width() - aBulletDocPos.Y(); + aBulletPos.setY( aBulletDocPos.X() ); + aBulletPos.setX( GetPaperSize().Width() - aBulletDocPos.Y() ); // Rotate: - aBulletPos.X() -= aBulletSize.Height(); + aBulletPos.setX( aBulletPos.X() - aBulletSize.Height() ); Size aSz( aBulletSize ); - aBulletSize.Width() = aSz.Height(); - aBulletSize.Height() = aSz.Width(); + aBulletSize.setWidth( aSz.Height() ); + aBulletSize.setHeight( aSz.Width() ); } else if ( pEditEngine->IsRightToLeft( nPara ) ) { - aBulletPos.X() = GetPaperSize().Width() - aBulletDocPos.X() - aBulletSize.Width(); + aBulletPos.setX( GetPaperSize().Width() - aBulletDocPos.X() - aBulletSize.Width() ); } aBulletArea = tools::Rectangle( aBulletPos, aBulletSize ); @@ -1896,7 +1896,7 @@ void Outliner::SetFlatMode( bool bFlat ) if( bFlat != pEditEngine->IsFlatMode() ) { for ( sal_Int32 nPara = pParaList->GetParagraphCount(); nPara; ) - pParaList->GetParagraph( --nPara )->aBulSize.Width() = -1; + pParaList->GetParagraph( --nPara )->aBulSize.setWidth( -1 ); pEditEngine->SetFlatMode( bFlat ); } diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 49db7d25280c..49fc054d51da 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -254,9 +254,9 @@ sal_Int32 OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTa Point aPaperPos( aMousePosWin ); tools::Rectangle aOutArea = pEditView->GetOutputArea(); tools::Rectangle aVisArea = pEditView->GetVisArea(); - aPaperPos.X() -= aOutArea.Left(); + aPaperPos.setX( aPaperPos.X() - aOutArea.Left() ); aPaperPos.X() += aVisArea.Left(); - aPaperPos.Y() -= aOutArea.Top(); + aPaperPos.setY( aPaperPos.Y() - aOutArea.Top() ); aPaperPos.Y() += aVisArea.Top(); bool bBullet; diff --git a/editeng/source/uno/unoviwou.cxx b/editeng/source/uno/unoviwou.cxx index 6cb02472b3c3..0172b40ae4de 100644 --- a/editeng/source/uno/unoviwou.cxx +++ b/editeng/source/uno/unoviwou.cxx @@ -88,7 +88,7 @@ Point SvxDrawOutlinerViewForwarder::LogicToPixel( const Point& rPoint, const Map Point aPoint1( rPoint ); Point aTextOffset( GetTextOffset() ); - aPoint1.X() += aTextOffset.X(); + aPoint1.setX( aPoint1.X() + aTextOffset.X() ); aPoint1.Y() += aTextOffset.Y(); MapMode aMapMode(pOutDev->GetMapMode()); @@ -115,7 +115,7 @@ Point SvxDrawOutlinerViewForwarder::PixelToLogic( const Point& rPoint, const Map rMapMode ) ); Point aTextOffset( GetTextOffset() ); - aPoint2.X() -= aTextOffset.X(); + aPoint2.setX( aPoint2.X() - aTextOffset.X() ); aPoint2.Y() -= aTextOffset.Y(); return aPoint2; diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx index 38b26086993d..1d62fb1e342d 100644 --- a/emfio/source/reader/emfreader.cxx +++ b/emfio/source/reader/emfreader.cxx @@ -927,8 +927,8 @@ namespace emfio sal_Int32 nTmpW(0), nTmpH(0); mpInputStream->ReadUInt32( nStyle ).ReadInt32( nTmpW ).ReadInt32( nTmpH ); - aSize.Width() = nTmpW; - aSize.Height() = nTmpH; + aSize.setWidth( nTmpW ); + aSize.setHeight( nTmpH ); if ( aSize.Width() ) aLineInfo.SetWidth( aSize.Width() ); diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index efbfe52364f7..b265849f24e6 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -288,12 +288,12 @@ namespace emfio if (nHeight) { double fHeight = (static_cast<double>(aFontSize.Height()) * rFont.lfHeight ) / nHeight; - aFontSize.Height() = static_cast<sal_Int32>( fHeight + 0.5 ); + aFontSize.setHeight( static_cast<sal_Int32>( fHeight + 0.5 ) ); } } // Convert height to positive - aFontSize.Height() = std::abs(aFontSize.Height()); + aFontSize.setHeight( std::abs(aFontSize.Height()) ); aFont.SetFontSize(aFontSize); }; @@ -511,7 +511,7 @@ namespace emfio const auto nHeight = aFontSize.Height(); if (nHeight < 0) - aFontSize.Height() = o3tl::saturating_toggle_sign(nHeight); + aFontSize.setHeight( o3tl::saturating_toggle_sign(nHeight) ); rFont.SetFontSize( aFontSize ); @@ -755,7 +755,7 @@ namespace emfio if ( pLineStyle->aLineInfo.GetStyle() == LineStyle::Dash ) { - aSize.Width() += 1; + aSize.setWidth( aSize.Width() + 1 ); long nDotLen = ImplMap( aSize ).Width(); pLineStyle->aLineInfo.SetDistance( nDotLen ); pLineStyle->aLineInfo.SetDotLen( nDotLen ); @@ -1517,8 +1517,8 @@ namespace emfio // check whether there is a font rotation applied via transformation Point aP1( ImplMap( Point() ) ); Point aP2( ImplMap( Point( 0, 100 ) ) ); - aP2.X() -= aP1.X(); - aP2.Y() -= aP1.Y(); + aP2.setX( aP2.X() - aP1.X() ); + aP2.setY( aP2.Y() - aP1.Y() ); double fX = aP2.X(); double fY = aP2.Y(); if ( fX ) @@ -1549,16 +1549,16 @@ namespace emfio if( nLen > 1 ) nTextWidth += pDXArry[ nLen - 2 ]; // tdf#39894: We should consider the distance to next character cell origin - aActPosDelta.X() = pDXArry[ nLen - 1 ]; + aActPosDelta.setX( pDXArry[ nLen - 1 ] ); if ( pDYArry ) { - aActPosDelta.Y() = pDYArry[ nLen - 1 ]; + aActPosDelta.setY( pDYArry[ nLen - 1 ] ); } } else { nTextWidth = pVDev->GetTextWidth( rText ); - aActPosDelta.X() = nTextWidth; + aActPosDelta.setX( nTextWidth ); } if( mnTextAlign & TA_UPDATECP ) diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx index eed575ef2bed..bd584af39fde 100644 --- a/emfio/source/reader/wmfreader.cxx +++ b/emfio/source/reader/wmfreader.cxx @@ -120,15 +120,15 @@ namespace { Point aSource(rSource); if (nMapMode == MM_HIMETRIC) - aSource.Y() = -rSource.Y(); + aSource.setY( -rSource.Y() ); if (aSource.X() < rPlaceableBound.Left()) - rPlaceableBound.Left() = aSource.X(); + rPlaceableBound.SetLeft( aSource.X() ); if (aSource.X() > rPlaceableBound.Right()) - rPlaceableBound.Right() = aSource.X(); + rPlaceableBound.SetRight( aSource.X() ); if (aSource.Y() < rPlaceableBound.Top()) - rPlaceableBound.Top() = aSource.Y(); + rPlaceableBound.SetTop( aSource.Y() ); if (aSource.Y() > rPlaceableBound.Bottom()) - rPlaceableBound.Bottom() = aSource.Y(); + rPlaceableBound.SetBottom( aSource.Y() ); } void GetWinExtMax(const tools::Rectangle& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode) @@ -160,7 +160,7 @@ namespace emfio Point aBR, aTL; aBR = ReadYX(); aTL = ReadYX(); - aBR.X()--; + aBR.setX( --aBR.X() ); aBR.Y()--; return tools::Rectangle( aTL, aBR ); } @@ -1111,8 +1111,8 @@ namespace emfio aMemoryStream.ReadInt32( nTmpX ) .ReadInt32( nTmpY ) .ReadUInt32( nStringLen ); - aPt.X() = nTmpX; - aPt.Y() = nTmpY; + aPt.setX( nTmpX ); + aPt.setY( nTmpY ); if ( ( static_cast< sal_uInt64 >( nStringLen ) * sizeof( sal_Unicode ) ) < ( nEscLen - aMemoryStream.Tell() ) ) { @@ -1257,13 +1257,13 @@ namespace emfio // BoundRect mpInputStream->ReadInt16( nVal ); - aPlaceableBound.Left() = nVal; + aPlaceableBound.SetLeft( nVal ); mpInputStream->ReadInt16( nVal ); - aPlaceableBound.Top() = nVal; + aPlaceableBound.SetTop( nVal ); mpInputStream->ReadInt16( nVal ); - aPlaceableBound.Right() = nVal; + aPlaceableBound.SetRight( nVal ); mpInputStream->ReadInt16( nVal ); - aPlaceableBound.Bottom() = nVal; + aPlaceableBound.SetBottom( nVal ); // inch mpInputStream->ReadUInt16( mnUnitsPerInch ); @@ -1839,10 +1839,10 @@ namespace emfio } else { - rPlaceableBound.Left() = 0; - rPlaceableBound.Top() = 0; - rPlaceableBound.Right() = aMaxWidth; - rPlaceableBound.Bottom() = aMaxWidth; + rPlaceableBound.SetLeft( 0 ); + rPlaceableBound.SetTop( 0 ); + rPlaceableBound.SetRight( aMaxWidth ); + rPlaceableBound.SetBottom( aMaxWidth ); SAL_INFO("vcl.wmf", "Default dimension " " t: " << rPlaceableBound.Left() << " l: " << rPlaceableBound.Top() << " b: " << rPlaceableBound.Right() << " r: " << rPlaceableBound.Bottom()); diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 04a8f6f960e6..feac99a016e5 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -192,7 +192,7 @@ BibToolBar::BibToolBar(vcl::Window* pParent, Link<void*,void> aLink) SetOutStyle(TOOLBOX_STYLE_FLAT); Size a2Size(GetOutputSizePixel()); - a2Size.Width()=100; + a2Size.setWidth(100 ); aLBSource->SetSizePixel(a2Size); aLBSource->SetDropDownLineCount(9); aLBSource->Show(); @@ -584,9 +584,9 @@ void BibToolBar::AdjustToolBox() Size aOldSize = GetSizePixel(); Size aSize = CalcWindowSizePixel(); if ( !aSize.Width() ) - aSize.Width() = aOldSize.Width(); + aSize.setWidth( aOldSize.Width() ); else if ( !aSize.Height() ) - aSize.Height() = aOldSize.Height(); + aSize.setHeight( aOldSize.Height() ); Size aTbSize = GetSizePixel(); if ( diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index 67b9d6801dda..65e4396bcbfa 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -210,8 +210,8 @@ namespace pcr if ( m_bIndentTitle ) { Size aIndent( m_pTheParent->LogicToPixel(Size(8, 0), MapMode(MapUnit::MapAppFont)) ); - aTitlePos.X() += aIndent.Width(); - aTitleSize.Width() -= aIndent.Width(); + aTitlePos.setX( aTitlePos.X() + aIndent.Width() ); + aTitleSize.setWidth( aTitleSize.Width() - aIndent.Width() ); } m_aFtTitle->SetPosSizePixel( aTitlePos, aTitleSize ); } @@ -225,7 +225,7 @@ namespace pcr Size aControlSize( m_aOutputSize.Width() - 4 - m_nNameWidth - nBrowseButtonSize - 4, m_pControlWindow->GetSizePixel().Height() ); if ( m_pAdditionalBrowseButton ) - aControlSize.Width() -= nBrowseButtonSize + 4; + aControlSize.setWidth( aControlSize.Width() - nBrowseButtonSize + 4 ); m_pControlWindow->SetSizePixel( aControlSize ); } @@ -237,7 +237,7 @@ namespace pcr if ( m_pAdditionalBrowseButton ) { - aButtonPos.X() -= nBrowseButtonSize + 4; + aButtonPos.setX( aButtonPos.X() - nBrowseButtonSize + 4 ); m_pAdditionalBrowseButton->SetPosSizePixel( aButtonPos, aButtonSize ); } } diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 07a39b20988a..091102090dce 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -426,7 +426,7 @@ namespace pcr tools::Rectangle aLinesArea( aPlayground ); if ( bPositionHelpWindow ) { - aLinesArea.Bottom() -= nHelpWindowHeight; + aLinesArea.SetBottom( aLinesArea.Bottom() - nHelpWindowHeight ); aLinesArea.Bottom() -= aHelpWindowDistance.Height(); } m_aLinesPlayground->SetPosSizePixel( aLinesArea.TopLeft(), aLinesArea.GetSize() ); @@ -447,11 +447,11 @@ namespace pcr Size aVScrollSize( m_aVScroll->GetSizePixel() ); // adjust the playground's width - aLinesArea.Right() -= aVScrollSize.Width(); + aLinesArea.SetRight( aLinesArea.Right() - aVScrollSize.Width() ); m_aLinesPlayground->SetPosSizePixel( aLinesArea.TopLeft(), aLinesArea.GetSize() ); // position the scrollbar - aVScrollSize.Height() = aLinesArea.GetHeight(); + aVScrollSize.setHeight( aLinesArea.GetHeight() ); Point aVScrollPos( aLinesArea.GetWidth(), 0 ); m_aVScroll->SetPosSizePixel( aVScrollPos, aVScrollSize ); } @@ -472,7 +472,7 @@ namespace pcr if ( bPositionHelpWindow ) { tools::Rectangle aHelpArea( aPlayground ); - aHelpArea.Top() = aLinesArea.Bottom() + aHelpWindowDistance.Height(); + aHelpArea.SetTop( aLinesArea.Bottom() + aHelpWindowDistance.Height() ); m_pHelpWindow->SetPosSizePixel( aHelpArea.TopLeft(), aHelpArea.GetSize() ); } } @@ -554,9 +554,9 @@ namespace pcr Size aSize(m_aLinesPlayground->GetOutputSizePixel()); Point aPos(0, m_nYOffset); - aSize.Height() = m_nRowHeight; + aSize.setHeight( m_nRowHeight ); - aPos.Y() += _nIndex * m_nRowHeight; + aPos.setY( aPos.Y() + _nIndex * m_nRowHeight ); if ( _nIndex < m_aLines.size() ) { diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx index 91ee10a9d886..68f8b944178a 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.cxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx @@ -130,11 +130,11 @@ namespace pcr tools::Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() ); tools::Rectangle aSeparatorArea( aPlayground ); - aSeparatorArea.Bottom() = aSeparatorArea.Top() + LogicToPixel(Size(0, 8), MapMode(MapUnit::MapAppFont)).Height(); + aSeparatorArea.SetBottom( aSeparatorArea.Top() + LogicToPixel(Size(0, 8), MapMode(MapUnit::MapAppFont)).Height() ); m_aSeparator->SetPosSizePixel( aSeparatorArea.TopLeft(), aSeparatorArea.GetSize() ); tools::Rectangle aTextArea( aPlayground ); - aTextArea.Top() = aSeparatorArea.Bottom() + a3AppFont.Height(); + aTextArea.SetTop( aSeparatorArea.Bottom() + a3AppFont.Height() ); m_aHelpText->SetPosSizePixel( aTextArea.TopLeft(), aTextArea.GetSize() ); } diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index b1c3152b80c9..cbe3735c4982 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -368,7 +368,7 @@ namespace pcr if ( impl_textHitTest( rMEvt.GetPosPixel() ) ) m_aMouseButtonDownPos = rMEvt.GetPosPixel(); else - m_aMouseButtonDownPos.X() = m_aMouseButtonDownPos.Y() = -1; + m_aMouseButtonDownPos.setX( m_aMouseButtonDownPos.Y() = -1 ); } diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 2daec50a5215..6cdfba834fd6 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -315,13 +315,13 @@ Point GridWindow::transform( double x, double y ) { Point aRet; - aRet.X() = static_cast<long>( ( x - m_fMinX ) * + aRet.setX( static_cast<long>( ( x - m_fMinX ) * static_cast<double>(m_aGridArea.GetWidth()) / ( m_fMaxX - m_fMinX ) - + m_aGridArea.Left() ); - aRet.Y() = static_cast<long>( + + m_aGridArea.Left() ) ); + aRet.setY( static_cast<long>( m_aGridArea.Bottom() - ( y - m_fMinY ) * - static_cast<double>(m_aGridArea.GetHeight()) / ( m_fMaxY - m_fMinY ) ); + static_cast<double>(m_aGridArea.GetHeight()) / ( m_fMaxY - m_fMinY ) ) ); return aRet; } @@ -465,7 +465,7 @@ void GridWindow::drawGrid(vcl::RenderContext& rRenderContext) std::sprintf(pBuf, "%g", fX); OUString aMark(pBuf, strlen(pBuf), osl_getThreadTextEncoding()); Size aTextSize(rRenderContext.GetTextWidth(aMark), rRenderContext.GetTextHeight()); - aPt.X() -= aTextSize.Width() / 2; + aPt.setX( aPt.X() - aTextSize.Width() / 2 ); aPt.Y() += aTextSize.Height() / 2; rRenderContext.DrawText(aPt, aMark); } @@ -478,7 +478,7 @@ void GridWindow::drawGrid(vcl::RenderContext& rRenderContext) std::sprintf(pBuf, "%g", fY); OUString aMark(pBuf, strlen(pBuf), osl_getThreadTextEncoding()); Size aTextSize(rRenderContext.GetTextWidth(aMark), rRenderContext.GetTextHeight()); - aPt.X() -= aTextSize.Width() + 2; + aPt.setX( aPt.X() - aTextSize.Width() + 2 ); aPt.Y() -= aTextSize.Height() / 2; rRenderContext.DrawText(aPt, aMark); } @@ -545,20 +545,20 @@ void GridWindow::MouseMove( const MouseEvent& rEvt ) if( m_nDragIndex == 0 || m_nDragIndex == m_aHandles.size() - 1) { - aPoint.X() = m_aHandles[m_nDragIndex].maPos.X(); + aPoint.setX( m_aHandles[m_nDragIndex].maPos.X() ); } else { if(aPoint.X() < m_aGridArea.Left()) - aPoint.X() = m_aGridArea.Left(); + aPoint.setX( m_aGridArea.Left() ); else if(aPoint.X() > m_aGridArea.Right()) - aPoint.X() = m_aGridArea.Right(); + aPoint.setX( m_aGridArea.Right() ); } if( aPoint.Y() < m_aGridArea.Top() ) - aPoint.Y() = m_aGridArea.Top(); + aPoint.setY( m_aGridArea.Top() ); else if( aPoint.Y() > m_aGridArea.Bottom() ) - aPoint.Y() = m_aGridArea.Bottom(); + aPoint.setY( m_aGridArea.Bottom() ); if( aPoint != m_aHandles[m_nDragIndex].maPos ) { diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 5a35b7f1026b..06d53fb23522 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -154,25 +154,25 @@ public: { Point aPoint(0, Y); aPoint = GetPixelPos(aPoint); - maTopLeft.Y() = aPoint.Y(); + maTopLeft.setY( aPoint.Y() ); } void ChangePreviewLogicTopLeftX(long X) { Point aPoint(X, 0); aPoint = GetPixelPos(aPoint); - maTopLeft.X() = aPoint.X(); + maTopLeft.setX( aPoint.X() ); } void ChangePreviewLogicBottomRightY(long Y) { Point aPoint(0, Y); aPoint = GetPixelPos(aPoint); - maBottomRight.Y() = aPoint.Y(); + maBottomRight.setY( aPoint.Y() ); } void ChangePreviewLogicBottomRightX(long X) { Point aPoint(X, 0); aPoint = GetPixelPos(aPoint); - maBottomRight.X() = aPoint.X(); + maBottomRight.setX( aPoint.X() ); } void SetPreviewLogicRect(const Point& rTopLeft, const Point &rBottomRight) { @@ -477,10 +477,10 @@ void SaneDlg::InitFields() pField->SetCustomUnitText("Pixel"); } switch( i ) { - case 0: aTopLeft.X() = static_cast<int>(fValue);break; - case 1: aTopLeft.Y() = static_cast<int>(fValue);break; - case 2: aBottomRight.X() = static_cast<int>(fValue);break; - case 3: aBottomRight.Y() = static_cast<int>(fValue);break; + case 0: aTopLeft.setX( static_cast<int>(fValue) );break; + case 1: aTopLeft.setY( static_cast<int>(fValue) );break; + case 2: aBottomRight.setX( static_cast<int>(fValue) );break; + case 3: aBottomRight.setY( static_cast<int>(fValue) );break; } } double *pDouble = nullptr; @@ -497,19 +497,19 @@ void SaneDlg::InitFields() delete [] pDouble; } switch( i ) { - case 0: aMinTopLeft.X() = pField->GetMin();break; - case 1: aMinTopLeft.Y() = pField->GetMin();break; - case 2: aMaxBottomRight.X() = pField->GetMax();break; - case 3: aMaxBottomRight.Y() = pField->GetMax();break; + case 0: aMinTopLeft.setX( pField->GetMin() );break; + case 1: aMinTopLeft.setY( pField->GetMin() );break; + case 2: aMaxBottomRight.setX( pField->GetMax() );break; + case 3: aMaxBottomRight.setY( pField->GetMax() );break; } } else { switch( i ) { - case 0: aMinTopLeft.X() = static_cast<int>(fValue);break; - case 1: aMinTopLeft.Y() = static_cast<int>(fValue);break; - case 2: aMaxBottomRight.X() = static_cast<int>(fValue);break; - case 3: aMaxBottomRight.Y() = static_cast<int>(fValue);break; + case 0: aMinTopLeft.setX( static_cast<int>(fValue) );break; + case 1: aMinTopLeft.setY( static_cast<int>(fValue) );break; + case 2: aMaxBottomRight.setX( static_cast<int>(fValue) );break; + case 3: aMaxBottomRight.setY( static_cast<int>(fValue) );break; } } pField->Enable(); @@ -520,14 +520,14 @@ void SaneDlg::InitFields() pField->SetMin( 0 ); switch( i ) { case 0: - aMinTopLeft.X() = 0; - aTopLeft.X() = 0; + aMinTopLeft.setX( 0 ); + aTopLeft.setX( 0 ); pField->SetMax( PREVIEW_WIDTH ); pField->SetValue( 0 ); break; case 1: - aMinTopLeft.Y() = 0; - aTopLeft.Y() = 0; + aMinTopLeft.setY( 0 ); + aTopLeft.setY( 0 ); pField->SetMax( PREVIEW_HEIGHT ); pField->SetValue( 0 ); break; @@ -1096,33 +1096,33 @@ void ScanPreview::MouseMove(const MouseEvent& rMEvt) switch( meDragDirection ) { case TopLeft: maTopLeft = aMousePos; break; - case Top: maTopLeft.Y() = aMousePos.Y(); break; + case Top: maTopLeft.setY( aMousePos.Y() ); break; case TopRight: - maTopLeft.Y() = aMousePos.Y(); - maBottomRight.X() = aMousePos.X(); + maTopLeft.setY( aMousePos.Y() ); + maBottomRight.setX( aMousePos.X() ); break; - case Right: maBottomRight.X() = aMousePos.X(); break; + case Right: maBottomRight.setX( aMousePos.X() ); break; case BottomRight: maBottomRight = aMousePos; break; - case Bottom: maBottomRight.Y() = aMousePos.Y(); break; + case Bottom: maBottomRight.setY( aMousePos.Y() ); break; case BottomLeft: - maTopLeft.X() = aMousePos.X(); - maBottomRight.Y() = aMousePos.Y(); + maTopLeft.setX( aMousePos.X() ); + maBottomRight.setY( aMousePos.Y() ); break; - case Left: maTopLeft.X() = aMousePos.X(); break; + case Left: maTopLeft.setX( aMousePos.X() ); break; default: break; } int nSwap; if( maTopLeft.X() > maBottomRight.X() ) { nSwap = maTopLeft.X(); - maTopLeft.X() = maBottomRight.X(); - maBottomRight.X() = nSwap; + maTopLeft.setX( maBottomRight.X() ); + maBottomRight.setX( nSwap ); } if( maTopLeft.Y() > maBottomRight.Y() ) { nSwap = maTopLeft.Y(); - maTopLeft.Y() = maBottomRight.Y(); - maBottomRight.Y() = nSwap; + maTopLeft.setY( maBottomRight.Y() ); + maBottomRight.setY( nSwap ); } Invalidate(); mpParentDialog->UpdateScanArea(false); @@ -1152,7 +1152,7 @@ void ScanPreview::MouseButtonDown( const MouseEvent& rMEvt ) aMousePixel.X() < nMiddleX + RECT_SIZE_PIX ) { meDragDirection = Top; - aMousePixel.Y() = maTopLeft.Y(); + aMousePixel.setY( maTopLeft.Y() ); mbIsDragging = true; } else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX && @@ -1170,14 +1170,14 @@ void ScanPreview::MouseButtonDown( const MouseEvent& rMEvt ) aMousePixel.X() < maTopLeft.X() + RECT_SIZE_PIX ) { meDragDirection = Left; - aMousePixel.X() = maTopLeft.X(); + aMousePixel.setX( maTopLeft.X() ); mbIsDragging = true; } else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX && aMousePixel.X() <= maBottomRight.X() ) { meDragDirection = Right; - aMousePixel.X() = maBottomRight.X(); + aMousePixel.setX( maBottomRight.X() ); mbIsDragging = true; } } @@ -1195,7 +1195,7 @@ void ScanPreview::MouseButtonDown( const MouseEvent& rMEvt ) aMousePixel.X() < nMiddleX + RECT_SIZE_PIX ) { meDragDirection = Bottom; - aMousePixel.Y() = maBottomRight.Y(); + aMousePixel.setY( maBottomRight.Y() ); mbIsDragging = true; } else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX && @@ -1266,17 +1266,17 @@ Point ScanPreview::GetLogicPos(const Point& rIn) const { Point aConvert = PixelToLogic(rIn, MapMode(MapUnit::MapAppFont)); if( aConvert.X() < 0 ) - aConvert.X() = 0; + aConvert.setX( 0 ); if( aConvert.X() >= PREVIEW_WIDTH ) - aConvert.X() = PREVIEW_WIDTH-1; + aConvert.setX( PREVIEW_WIDTH-1 ); if( aConvert.Y() < 0 ) - aConvert.Y() = 0; + aConvert.setY( 0 ); if( aConvert.Y() >= PREVIEW_HEIGHT ) - aConvert.Y() = PREVIEW_HEIGHT-1; + aConvert.setY( PREVIEW_HEIGHT-1 ); - aConvert.X() *= ( maMaxBottomRight.X() - maMinTopLeft.X() ); + aConvert.setX( aConvert.X() * ( maMaxBottomRight.X() - maMinTopLeft.X() ) ); aConvert.X() /= PREVIEW_WIDTH; - aConvert.Y() *= ( maMaxBottomRight.Y() - maMinTopLeft.Y() ); + aConvert.setY( aConvert.Y() * ( maMaxBottomRight.Y() - maMinTopLeft.Y() ) ); aConvert.Y() /= PREVIEW_HEIGHT; return aConvert; } diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index ebfa1bf42a4d..9f202fb20170 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -837,12 +837,12 @@ void BubbleWindow::Show( bool bVisible, ShowFlags nFlags ) Point aPos; aPos.X() = maTipPos.X() - aWindowSize.Width() + TIP_RIGHT_OFFSET; - aPos.Y() = maTipPos.Y(); + aPos.setY( maTipPos.Y() ); Point aScreenPos = GetParent()->OutputToAbsoluteScreenPixel( aPos ); if ( aScreenPos.X() < 0 ) { mnTipOffset = aScreenPos.X(); - aPos.X() -= mnTipOffset; + aPos.setX( aPos.X() - mnTipOffset ); } SetPosSizePixel( aPos, aWindowSize ); @@ -881,8 +881,8 @@ void BubbleWindow::RecalcTextRects() 3 * BUBBLE_BORDER + TIP_HEIGHT ); if ( aTotalSize.Height() > maMaxTextSize.Height() ) { - maMaxTextSize.Width() = maMaxTextSize.Width() * 3 / 2; - maMaxTextSize.Height() = maMaxTextSize.Height() * 3 / 2; + maMaxTextSize.setWidth( maMaxTextSize.Width() * 3 / 2 ); + maMaxTextSize.setHeight( maMaxTextSize.Height() * 3 / 2 ); } else bFinished = true; |