[Libreoffice-commits] core.git: editeng/source emfio/source extensions/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Feb 16 18:52:34 UTC 2018


 editeng/source/editeng/editdoc.cxx              |    4 
 editeng/source/editeng/editeng.cxx              |   14 +-
 editeng/source/editeng/editview.cxx             |    8 -
 editeng/source/editeng/impedit.cxx              |   56 ++++----
 editeng/source/editeng/impedit2.cxx             |   16 +-
 editeng/source/editeng/impedit3.cxx             |  154 ++++++++++++------------
 editeng/source/items/numitem.cxx                |    4 
 editeng/source/items/svxfont.cxx                |   18 +-
 editeng/source/outliner/outliner.cxx            |   18 +-
 editeng/source/outliner/outlvw.cxx              |    8 -
 editeng/source/uno/unoviwou.cxx                 |    8 -
 emfio/source/reader/mtftools.cxx                |    6 
 emfio/source/reader/wmfreader.cxx               |   12 -
 extensions/source/propctrlr/browserline.cxx     |    8 -
 extensions/source/propctrlr/browserlistbox.cxx  |    8 -
 extensions/source/propctrlr/browserpage.cxx     |    4 
 extensions/source/propctrlr/standardcontrol.cxx |    4 
 extensions/source/scanner/grid.cxx              |    8 -
 extensions/source/scanner/sanedlg.cxx           |   12 -
 extensions/source/update/ui/updatecheckui.cxx   |    4 
 20 files changed, 187 insertions(+), 187 deletions(-)

New commits:
commit 6d9d8a723f7d92057f26c884ced975f13fc90d8f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Feb 16 12:18:39 2018 +0200

    Revert "loplugin:changetoolsgen in editeng..extensions" and reapply plugin
    
    because I
    (a) forgot to insert parentheses which changes the meaning of some expressions and
    (b) I now use the AdjustFoo calls when changing unary operations, which reads much better
    
    This reverts commit 2096aac8b958db66b3ddce16b06dca87edc8ba0a.
    
    Change-Id: I4b5941c4119b95aaefb9180a0ca95a1dbb4ec317
    Reviewed-on: https://gerrit.libreoffice.org/49844
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 55fe0bac0114..50e16d6ba63b 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.setWidth( aSz.Width() + aTmpSz.Width() );
+                aSz.AdjustWidth(aTmpSz.Width() );
                 if ( aSz.Height() < aTmpSz.Height() )
                     aSz.setHeight( aTmpSz.Height() );
             }
             break;
             case PortionKind::TAB:
             {
-                aSz.setWidth( aSz.Width() + rPortion.GetSize().Width() );
+                aSz.AdjustWidth(rPortion.GetSize().Width() );
             }
             break;
             case PortionKind::LINEBREAK: break;
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index cd383839e4be..d434114b9119 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.setX( aStartPos.X() + GetPaperSize().Width() );
+        aStartPos.AdjustX(GetPaperSize().Width() );
         aStartPos = Rotate( aStartPos, nOrientation, rStartPos );
     }
     pImpEditEngine->Paint( pOutDev, aBigRect, aStartPos, false, nOrientation );
@@ -283,8 +283,8 @@ void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect,
             {
                 Size aPixSz( 1, 0 );
                 aPixSz = pOutDev->PixelToLogic( aPixSz );
-                aClipRect.SetRight( aClipRect.Right() + aPixSz.Width() );
-                aClipRect.Bottom() += aPixSz.Width();
+                aClipRect.AdjustRight(aPixSz.Width() );
+                aClipRect.AdjustBottom(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.setX( P2.X() + n20 );
-                        P2.setY( P2.Y() + nH );
+                        P2.AdjustX(n20 );
+                        P2.AdjustY(nH );
                         pEditView->GetWindow()->SetLineColor();
                         pEditView->GetWindow()->SetFillColor( Color( (n%2) ? COL_YELLOW : COL_LIGHTGREEN ) );
                         pEditView->GetWindow()->DrawRect( tools::Rectangle( P1, P2 ) );
-                        aPos.setY( aPos.Y() + nH );
+                        aPos.AdjustY(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.setY( aPos.Y() - 3 );
+                                    aPos.AdjustY( -3 );
                                     Help::ShowQuickHelp( pEditView->GetWindow(), tools::Rectangle( aPos, Size( 1, 1 ) ), aComplete, QuickHelpFlags::Bottom|QuickHelpFlags::Left );
                                 }
                             }
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 6101753bedee..c4af0dcafb17 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -196,10 +196,10 @@ tools::Rectangle EditView::GetInvalidateRect() const
     {
         tools::Rectangle aRect( pImpEditView->aOutArea );
         long nMore = pImpEditView->GetWindow()->PixelToLogic( Size( pImpEditView->GetInvalidateMore(), 0 ) ).Width();
-        aRect.SetLeft( aRect.Left() - nMore );
-        aRect.Right() += nMore;
-        aRect.SetTop( aRect.Top() - nMore );
-        aRect.Bottom() += nMore;
+        aRect.AdjustLeft( -nMore );
+        aRect.AdjustRight(nMore );
+        aRect.AdjustTop( -nMore );
+        aRect.AdjustBottom(nMore );
         return aRect;
     }
 }
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index dbae6305901a..80566aaab1a0 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.setX( rPoint.X() + nDiffX );
+        rPoint.AdjustX(nDiffX );
     if ( nDiffY )
-        rPoint.setY( rPoint.Y() + nDiffY );
+        rPoint.AdjustY(nDiffY );
 
     rPoint = pOutDev->PixelToLogic( rPoint );
 }
@@ -322,8 +322,8 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion,
             Point aTopLeft( aTmpRect.TopLeft() );
             Point aBottomRight( aTmpRect.BottomRight() );
 
-            aTopLeft.setY( aTopLeft.Y() + nParaStart );
-            aBottomRight.Y() += nParaStart;
+            aTopLeft.AdjustY(nParaStart );
+            aBottomRight.AdjustY(nParaStart );
 
             // Only paint if in the visible range ...
             if ( aTopLeft.Y() > GetVisDocBottom() )
@@ -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.SetLeft( aEditCursor.Right() = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GetCursorFlags::TextOnly|GetCursorFlags::PreferPortionStart ).Left() );
+            aEditCursor.Left() = 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.SetRight( aEditCursor.Right() + rTextPortion.GetSize().Width() );
+                aEditCursor.AdjustRight(rTextPortion.GetSize().Width() );
             }
             else
             {
@@ -1048,8 +1048,8 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
         GetCursor()->SetPos( aCursorRect.TopLeft() );
         Size aCursorSz( aCursorRect.GetSize() );
         // Rectangle is inclusive
-        aCursorSz.setWidth( --aCursorSz.Width() );
-        aCursorSz.Height()--;
+        aCursorSz.AdjustWidth( -1 );
+        aCursorSz.AdjustHeight( -1 );
         if ( !aCursorSz.Width() || !aCursorSz.Height() )
         {
             long nCursorSz = pOutWin->GetSettings().GetStyleSettings().GetCursorSize();
@@ -1166,20 +1166,20 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
     // Vertical:
     if ( !IsVertical() )
     {
-        aNewVisArea.SetTop( aNewVisArea.Top() - ndY );
-        aNewVisArea.Bottom() -= ndY;
+        aNewVisArea.AdjustTop( -ndY );
+        aNewVisArea.AdjustBottom( -ndY );
     }
     else
     {
         if( IsTopToBottom() )
         {
-            aNewVisArea.SetTop( aNewVisArea.Top() + ndX );
-            aNewVisArea.Bottom() += ndX;
+            aNewVisArea.AdjustTop(ndX );
+            aNewVisArea.AdjustBottom(ndX );
         }
         else
         {
-            aNewVisArea.SetTop( aNewVisArea.Top() - ndX );
-            aNewVisArea.Bottom() -= ndX;
+            aNewVisArea.AdjustTop( -ndX );
+            aNewVisArea.AdjustBottom( -ndX );
         }
     }
     if ( ( nRangeCheck == ScrollRangeCheck::PaperWidthTextSize ) && ( aNewVisArea.Bottom() > static_cast<long>(pEditEngine->pImpEditEngine->GetTextHeight()) ) )
@@ -1194,20 +1194,20 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
     // Horizontal:
     if ( !IsVertical() )
     {
-        aNewVisArea.SetLeft( aNewVisArea.Left() - ndX );
-        aNewVisArea.Right() -= ndX;
+        aNewVisArea.AdjustLeft( -ndX );
+        aNewVisArea.AdjustRight( -ndX );
     }
     else
     {
         if (IsTopToBottom())
         {
-            aNewVisArea.SetLeft( aNewVisArea.Left() - ndY );
-            aNewVisArea.Right() -= ndY;
+            aNewVisArea.AdjustLeft( -ndY );
+            aNewVisArea.AdjustRight( -ndY );
         }
         else
         {
-            aNewVisArea.SetLeft( aNewVisArea.Left() + ndY );
-            aNewVisArea.Right() += ndY;
+            aNewVisArea.AdjustLeft(ndY );
+            aNewVisArea.AdjustRight(ndY );
         }
     }
     if ( ( nRangeCheck == ScrollRangeCheck::PaperWidthTextSize ) && ( aNewVisArea.Right() > static_cast<long>(pEditEngine->pImpEditEngine->CalcTextWidth( false )) ) )
@@ -1787,8 +1787,8 @@ void ImpEditView::ShowDDCursor( const tools::Rectangle& rRect )
         // Save background ...
         tools::Rectangle aSaveRect( GetWindow()->LogicToPixel( rRect ) );
         // prefer to save some more ...
-        aSaveRect.SetRight( aSaveRect.Right() + 1 );
-        aSaveRect.Bottom() += 1;
+        aSaveRect.AdjustRight(1 );
+        aSaveRect.AdjustBottom(1 );
 
 #ifdef DBG_UTIL
         Size aNewSzPx( aSaveRect.GetSize() );
@@ -2212,20 +2212,20 @@ void ImpEditView::dragOver(const css::datatransfer::dnd::DropTargetDragEvent& rD
                     aEditCursor = GetWindow()->LogicToPixel( tools::Rectangle( aStartPos, aEndPos ) );
                     if ( !pEditEngine->IsVertical() )
                     {
-                        aEditCursor.SetTop( --aEditCursor.Top() );
-                        aEditCursor.SetBottom( ++aEditCursor.Bottom() );
+                        aEditCursor.AdjustTop( -1 );
+                        aEditCursor.AdjustBottom( 1 );
                     }
                     else
                     {
                         if( IsTopToBottom() )
                         {
-                            aEditCursor.SetLeft( --aEditCursor.Left() );
-                            aEditCursor.SetRight( ++aEditCursor.Right() );
+                            aEditCursor.AdjustLeft( -1 );
+                            aEditCursor.AdjustRight( 1 );
                         }
                         else
                         {
-                            aEditCursor.SetLeft( ++aEditCursor.Left() );
-                            aEditCursor.SetRight( --aEditCursor.Right() );
+                            aEditCursor.AdjustLeft( 1 );
+                            aEditCursor.AdjustRight( -1 );
                         }
                     }
                     aEditCursor = GetWindow()->PixelToLogic( aEditCursor );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index deb4fe4d7242..f89c27e21f92 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1396,8 +1396,8 @@ EditPaM ImpEditEngine::PageUp( const EditPaM& rPaM, EditView const * pView )
 {
     tools::Rectangle aRect = PaMtoEditCursor( rPaM );
     Point aTopLeft = aRect.TopLeft();
-    aTopLeft.setY( aTopLeft.Y() - pView->GetVisArea().GetHeight() *9/10 );
-    aTopLeft.X() += nOnePixelInRef;
+    aTopLeft.AdjustY( -(pView->GetVisArea().GetHeight() *9/10) );
+    aTopLeft.AdjustX(nOnePixelInRef );
     if ( aTopLeft.Y() < 0 )
     {
         aTopLeft.setY( 0 );
@@ -1409,8 +1409,8 @@ EditPaM ImpEditEngine::PageDown( const EditPaM& rPaM, EditView const * pView )
 {
     tools::Rectangle aRect = PaMtoEditCursor( rPaM );
     Point aBottomRight = aRect.BottomRight();
-    aBottomRight.setY( aBottomRight.Y() + pView->GetVisArea().GetHeight() *9/10 );
-    aBottomRight.X() += nOnePixelInRef;
+    aBottomRight.AdjustY(pView->GetVisArea().GetHeight() *9/10 );
+    aBottomRight.AdjustX(nOnePixelInRef );
     long nHeight = GetTextHeight();
     if ( aBottomRight.Y() > nHeight )
     {
@@ -3033,8 +3033,8 @@ tools::Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nF
         else
         {
             aEditCursor = GetEditCursor( pPortion, aPaM.GetIndex(), nFlags );
-            aEditCursor.SetTop( aEditCursor.Top() + nY );
-            aEditCursor.Bottom() += nY;
+            aEditCursor.AdjustTop(nY );
+            aEditCursor.AdjustBottom(nY );
             return aEditCursor;
         }
     }
@@ -3057,7 +3057,7 @@ EditPaM ImpEditEngine::GetPaM( Point aDocPos, bool bSmart )
         if ( nY > aDocPos.Y() )
         {
             nY -= nTmpHeight;
-            aDocPos.setY( aDocPos.Y() - nY );
+            aDocPos.AdjustY( -nY );
             // Skip invisible Portions:
             while ( pPortion && !pPortion->IsVisible() )
             {
@@ -4244,7 +4244,7 @@ tools::Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32
         nX = GetXPos( pPortion, pLine, nIndex, bool( nFlags & GetCursorFlags::PreferPortionStart ) );
     }
 
-    aEditCursor.SetLeft( aEditCursor.Right() = nX );
+    aEditCursor.Left() = aEditCursor.Right() = nX;
 
     if ( nFlags & GetCursorFlags::TextOnly )
         aEditCursor.SetTop( aEditCursor.Bottom() - pLine->GetTxtHeight() + 1 );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 7d61e9a1dfe2..46065dc88fa9 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -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.setY( aPnt1.Y() - nCorrect );
-                aPnt1.setX( aPnt1.X() - nCorrect );
+                aPnt1.AdjustY( -nCorrect );
+                aPnt1.AdjustX( -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.setX( aPnt1.X() + (bIsRightToLeft ? -1 : 1) * pDXArray[ nStart - nIndex - 1 ] );
+                    aPnt1.AdjustX((bIsRightToLeft ? -1 : 1) * pDXArray[ nStart - nIndex - 1 ] );
                 }
                 else
-                    aPnt1.setY( aPnt1.Y() + pDXArray[ nStart - nIndex - 1 ] );
+                    aPnt1.AdjustY(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.setX( aPnt2.X() + (bIsRightToLeft ? -1 : 1) * pDXArray[ nEnd - nIndex - 1 ] );
+                aPnt2.AdjustX((bIsRightToLeft ? -1 : 1) * pDXArray[ nEnd - nIndex - 1 ] );
             }
             else
-                aPnt2.setY( aPnt2.Y() + pDXArray[ nEnd - nIndex - 1 ] );
+                aPnt2.AdjustY(pDXArray[ nEnd - nIndex - 1 ] );
             if ( nOrientation )
             {
                 aPnt1 = Rotate( aPnt1, nOrientation, rOrigin );
@@ -1159,7 +1159,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
                     {
                          Size aSize( aTmpFont.QuickGetTextSize( GetRefDevice(),
                                 pParaPortion->GetNode()->GetString(), nTmpPos, nPortionLen, pBuf.get() ));
-                         pPortion->GetSize().setWidth( pPortion->GetSize().Width() + aSize.Width() );
+                         pPortion->GetSize().AdjustWidth(aSize.Width() );
                          if (pPortion->GetSize().Height() < aSize.Height())
                              pPortion->GetSize().setHeight( aSize.Height() );
                     }
@@ -1171,7 +1171,7 @@ 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().setWidth( pPortion->GetSize().Width() + aTmpFont.GetFixKerning() );
+                        pPortion->GetSize().AdjustWidth(aTmpFont.GetFixKerning() );
                     if ( IsFixedCellHeight() )
                         pPortion->GetSize().setHeight( ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() ) );
                 }
@@ -1209,7 +1209,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
                     {
                         long nExtraSpace = pPortion->GetSize().Height()/5;
                         nExtraSpace = GetXValue( nExtraSpace );
-                        pPortion->GetSize().setWidth( pPortion->GetSize().Width() + nExtraSpace );
+                        pPortion->GetSize().AdjustWidth(nExtraSpace );
                         nTmpWidth += nExtraSpace;
                     }
                 }
@@ -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().setWidth( rTP.GetSize().Width() + n );
+            rTP.GetSize().AdjustWidth(n );
         }
 
         pLine->SetTextWidth( aTextSize.Width() );
@@ -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().setWidth( rLastPortion.GetSize().Width() - nBlankWidth );
+            rLastPortion.GetSize().AdjustWidth( -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().setWidth( rLastPortion.GetSize().Width() + nMore4Everyone );
+            rLastPortion.GetSize().AdjustWidth(nMore4Everyone );
             if ( nSomeExtraSpace )
-                rLastPortion.GetSize().setWidth( ++rLastPortion.GetSize().Width() );
+                rLastPortion.GetSize().AdjustWidth( 1 );
 
             // Correct positions in array
             // Even for kashidas just change positions, VCL will then draw the kashida automatically
@@ -2781,8 +2781,8 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
         {
             if ( nStretchY != 100 )
             {
-                aRealSz.setHeight( aRealSz.Height() * nStretchY );
-                aRealSz.Height() /= 100;
+                aRealSz.setHeight( aRealSz.Height() * ( nStretchY) );
+                aRealSz.setHeight( aRealSz.Height() / 100 );
             }
             if ( nStretchX != 100 )
             {
@@ -2793,7 +2793,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
                 }
                 else
                 {
-                    aRealSz.setWidth( aRealSz.Width() * nStretchX );
+                    aRealSz.setWidth( aRealSz.Width() * ( nStretchX) );
                     aRealSz.setWidth( aRealSz.Width() / 100 );
 
                     // Also the Kerning: (long due to handle Interim results)
@@ -2828,7 +2828,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
         if ( nRelWidth != 100 )
         {
             aRealSz.setWidth( aRealSz.Width() * nRelWidth );
-            aRealSz.Width() /= 100;
+            aRealSz.setWidth( aRealSz.Width() / 100 );
         }
         rFont.SetFontSize( aRealSz );
         // Font is not restored ...
@@ -3023,13 +3023,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
             bool bEndOfParagraphWritten(false);
 
             if ( !IsVertical() )
-                aStartPos.setY( aStartPos.Y() + pPortion->GetFirstLineOffset() );
+                aStartPos.AdjustY(pPortion->GetFirstLineOffset() );
             else
             {
                 if( IsTopToBottom() )
-                    aStartPos.setX( aStartPos.X() - pPortion->GetFirstLineOffset() );
+                    aStartPos.AdjustX( -(pPortion->GetFirstLineOffset()) );
                 else
-                    aStartPos.setX( aStartPos.X() + pPortion->GetFirstLineOffset() );
+                    aStartPos.AdjustX(pPortion->GetFirstLineOffset() );
             }
 
             Point aParaStart( aStartPos );
@@ -3047,29 +3047,29 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
                 aTmpPos = aStartPos;
                 if ( !IsVertical() )
                 {
-                    aTmpPos.setX( aTmpPos.X() + pLine->GetStartPosX() );
-                    aTmpPos.setY( aTmpPos.Y() + pLine->GetMaxAscent() );
-                    aStartPos.setY( aStartPos.Y() + pLine->GetHeight() );
+                    aTmpPos.AdjustX(pLine->GetStartPosX() );
+                    aTmpPos.AdjustY(pLine->GetMaxAscent() );
+                    aStartPos.AdjustY(pLine->GetHeight() );
                     if (nLine != nLastLine)
-                        aStartPos.setY( aStartPos.Y() + nVertLineSpacing );
+                        aStartPos.AdjustY(nVertLineSpacing );
                 }
                 else
                 {
                     if ( IsTopToBottom() )
                     {
-                        aTmpPos.setY( aTmpPos.Y() + pLine->GetStartPosX() );
-                        aTmpPos.setX( aTmpPos.X() - pLine->GetMaxAscent() );
-                        aStartPos.setX( aStartPos.X() - pLine->GetHeight() );
+                        aTmpPos.AdjustY(pLine->GetStartPosX() );
+                        aTmpPos.AdjustX( -(pLine->GetMaxAscent()) );
+                        aStartPos.AdjustX( -(pLine->GetHeight()) );
                         if (nLine != nLastLine)
-                            aStartPos.setX( aStartPos.X() - nVertLineSpacing );
+                            aStartPos.AdjustX( -nVertLineSpacing );
                     }
                     else
                     {
-                        aTmpPos.setY( aTmpPos.Y() - pLine->GetStartPosX() );
-                        aTmpPos.setX( aTmpPos.X() + pLine->GetMaxAscent() );
-                        aStartPos.setX( aStartPos.X() + pLine->GetHeight() );
+                        aTmpPos.AdjustY( -(pLine->GetStartPosX()) );
+                        aTmpPos.AdjustX(pLine->GetMaxAscent() );
+                        aStartPos.AdjustX(pLine->GetHeight() );
                         if (nLine != nLastLine)
-                            aStartPos.setX( aStartPos.X() + nVertLineSpacing );
+                            aStartPos.AdjustX(nVertLineSpacing );
                     }
                 }
 
@@ -3209,40 +3209,40 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
                                                 Point aTopLeftRectPos( aTmpPos );
                                                 if ( !IsVertical() )
                                                 {
-                                                    aTopLeftRectPos.setX( aTopLeftRectPos.X() + nAdvanceX );
-                                                    aTopLeftRectPos.setY( aTopLeftRectPos.Y() + nAdvanceY );
+                                                    aTopLeftRectPos.AdjustX(nAdvanceX );
+                                                    aTopLeftRectPos.AdjustY(nAdvanceY );
                                                 }
                                                 else
                                                 {
                                                     if( IsTopToBottom() )
                                                     {
-                                                        aTopLeftRectPos.setY( aTopLeftRectPos.Y() - nAdvanceX );
-                                                        aTopLeftRectPos.setX( aTopLeftRectPos.X() + nAdvanceY );
+                                                        aTopLeftRectPos.AdjustY( -nAdvanceX );
+                                                        aTopLeftRectPos.AdjustX(nAdvanceY );
                                                     }
                                                     else
                                                     {
-                                                        aTopLeftRectPos.setY( aTopLeftRectPos.Y() + nAdvanceX );
-                                                        aTopLeftRectPos.setX( aTopLeftRectPos.X() - nAdvanceY );
+                                                        aTopLeftRectPos.AdjustY(nAdvanceX );
+                                                        aTopLeftRectPos.AdjustX( -nAdvanceY );
                                                     }
                                                 }
 
                                                 Point aBottomRightRectPos( aTopLeftRectPos );
                                                 if ( !IsVertical() )
                                                 {
-                                                    aBottomRightRectPos.setX( aBottomRightRectPos.X() + 2 * nHalfBlankWidth );
-                                                    aBottomRightRectPos.setY( aBottomRightRectPos.Y() + pLine->GetHeight() );
+                                                    aBottomRightRectPos.AdjustX(2 * nHalfBlankWidth );
+                                                    aBottomRightRectPos.AdjustY(pLine->GetHeight() );
                                                 }
                                                 else
                                                 {
                                                     if (IsTopToBottom())
                                                     {
-                                                        aBottomRightRectPos.setX( aBottomRightRectPos.X() + pLine->GetHeight() );
-                                                        aBottomRightRectPos.setY( aBottomRightRectPos.Y() - 2 * nHalfBlankWidth );
+                                                        aBottomRightRectPos.AdjustX(pLine->GetHeight() );
+                                                        aBottomRightRectPos.AdjustY( -(2 * nHalfBlankWidth) );
                                                     }
                                                     else
                                                     {
-                                                        aBottomRightRectPos.setX( aBottomRightRectPos.X() - pLine->GetHeight() );
-                                                        aBottomRightRectPos.setY( aBottomRightRectPos.Y() + 2 * nHalfBlankWidth );
+                                                        aBottomRightRectPos.AdjustX( -(pLine->GetHeight()) );
+                                                        aBottomRightRectPos.AdjustY(2 * nHalfBlankWidth );
                                                     }
                                                 }
 
@@ -3326,20 +3326,20 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
 
                                             if ( !IsVertical() )
                                             {
-                                                aStartPos.setY( aStartPos.Y() + nMaxAscent );
-                                                aTmpPos.setY( aTmpPos.Y() + nMaxAscent );
+                                                aStartPos.AdjustY(nMaxAscent );
+                                                aTmpPos.AdjustY(nMaxAscent );
                                             }
                                             else
                                             {
                                                 if (IsTopToBottom())
                                                 {
-                                                    aTmpPos.setX( aTmpPos.X() - nMaxAscent );
-                                                    aStartPos.setX( aStartPos.X() - nMaxAscent );
+                                                    aTmpPos.AdjustX( -nMaxAscent );
+                                                    aStartPos.AdjustX( -nMaxAscent );
                                                 }
                                                 else
                                                 {
-                                                    aTmpPos.setX( aTmpPos.X() + nMaxAscent );
-                                                    aStartPos.setX( aStartPos.X() + nMaxAscent );
+                                                    aTmpPos.AdjustX(nMaxAscent );
+                                                    aStartPos.AdjustX(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.setX( aRedLineTmpPos.X() + rTextPortion.GetSize().Width() );
+                                    aRedLineTmpPos.AdjustX(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.setY( aOutPos.Y() - nDiff );
+                                                aOutPos.AdjustY( -nDiff );
                                             else
                                             {
                                                 if (IsTopToBottom())
-                                                    aOutPos.setX( aOutPos.X() + nDiff );
+                                                    aOutPos.AdjustX(nDiff );
                                                 else
-                                                    aOutPos.setX( aOutPos.X() - nDiff );
+                                                    aOutPos.AdjustX( -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.setX( aRealOutPos.X() + rTextPortion.GetExtraInfos()->nPortionOffsetX );
+                                            aRealOutPos.AdjustX(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.setY( aTopLeft.Y() - pLine->GetMaxAscent() );
+                                            aTopLeft.AdjustY( -(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.setY( aTopLeft.Y() - pLine->GetMaxAscent() );
+                                                        aTopLeft.AdjustY( -(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.setY( aRedLineTmpPos.Y() - nShift );
+                                                    aRedLineTmpPos.AdjustY( -nShift );
                                                 else
                                                     if (IsTopToBottom())
-                                                        aRedLineTmpPos.setX( aRedLineTmpPos.X() + nShift );
+                                                        aRedLineTmpPos.AdjustX(nShift );
                                                     else
-                                                        aRedLineTmpPos.setX( aRedLineTmpPos.X() - nShift );
+                                                        aRedLineTmpPos.AdjustX( -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.setY( aStartPos.Y() + nSBL );
+                        aStartPos.AdjustY(nSBL );
                     else
                     {
                         if( IsTopToBottom() )
-                            aStartPos.setX( aStartPos.X() - nSBL );
+                            aStartPos.AdjustX( -nSBL );
                         else
-                            aStartPos.setX( aStartPos.X() + nSBL );
+                            aStartPos.AdjustX(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.setY( aStartPos.Y() + nUL );
+                    aStartPos.AdjustY(nUL );
                 else
                 {
                     if (IsTopToBottom())
-                        aStartPos.setX( aStartPos.X() - nUL );
+                        aStartPos.AdjustX( -nUL );
                     else
-                        aStartPos.setX( aStartPos.X() + nUL );
+                        aStartPos.AdjustX(nUL );
                 }
             }
 
@@ -3828,13 +3828,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
         else
         {
             if ( !IsVertical() )
-                aStartPos.setY( aStartPos.Y() + nParaHeight );
+                aStartPos.AdjustY(nParaHeight );
             else
             {
                 if (IsTopToBottom())
-                    aStartPos.setX( aStartPos.X() - nParaHeight );
+                    aStartPos.AdjustX( -nParaHeight );
                 else
-                    aStartPos.setX( aStartPos.X() + nParaHeight );
+                    aStartPos.AdjustX(nParaHeight );
             }
         }
 
@@ -3870,22 +3870,22 @@ void ImpEditEngine::Paint( ImpEditView* pView, const tools::Rectangle& rRect, Ou
     if ( !IsVertical() )
     {
         aStartPos = pView->GetOutputArea().TopLeft();
-        aStartPos.setX( aStartPos.X() - pView->GetVisDocLeft() );
-        aStartPos.Y() -= pView->GetVisDocTop();
+        aStartPos.AdjustX( -(pView->GetVisDocLeft()) );
+        aStartPos.AdjustY( -(pView->GetVisDocTop()) );
     }
     else
     {
         if( IsTopToBottom() )
         {
             aStartPos = pView->GetOutputArea().TopRight();
-            aStartPos.setX( aStartPos.X() + pView->GetVisDocTop() );
-            aStartPos.Y() -= pView->GetVisDocLeft();
+            aStartPos.AdjustX(pView->GetVisDocTop() );
+            aStartPos.AdjustY( -(pView->GetVisDocLeft()) );
         }
         else
         {
             aStartPos = pView->GetOutputArea().BottomLeft();
-            aStartPos.setX( aStartPos.X() - pView->GetVisDocTop() );
-            aStartPos.Y() += pView->GetVisDocLeft();
+            aStartPos.AdjustX( -(pView->GetVisDocTop()) );
+            aStartPos.AdjustY(pView->GetVisDocLeft() );
         }
     }
 
@@ -4183,9 +4183,9 @@ long ImpEditEngine::CalcVertLineSpacing(Point& rStartPos) const
     {
         if( IsTopToBottom() )
             // Shift the text to the right for the asian layout mode.
-            rStartPos.setX( rStartPos.X() + nTotalSpace );
+            rStartPos.AdjustX(nTotalSpace );
         else
-            rStartPos.setX( rStartPos.X() - nTotalSpace );
+            rStartPos.AdjustX( -nTotalSpace );
     }
 
     return nTotalSpace / (nTotalLineCount-1);
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 891113ddf396..3e5fc65907ea 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.setWidth( aGraphicSize.Height() = 0 );
+        aGraphicSize.Width() = 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.setWidth( aGraphicSize.Height() = 0 );
+    aGraphicSize.Width() = aGraphicSize.Height() = 0;
 }
 
 sal_Int16    SvxNumberFormat::GetVertOrient() const
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index f46caa736174..77a95bfac63a 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -372,7 +372,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const OUString &rTxt,
     }
 
     if( IsKern() && ( nLen > 1 ) )
-        aTxtSize.setWidth( aTxtSize.Width() + ( ( nLen-1 ) * long( nKern ) ) );
+        aTxtSize.AdjustWidth( ( nLen-1 ) * long( nKern ) );
 
     return aTxtSize;
 }
@@ -409,7 +409,7 @@ Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt,
 
     if( IsKern() && ( nLen > 1 ) )
     {
-        aTxtSize.setWidth( aTxtSize.Width() + ( ( nLen-1 ) * long( nKern ) ) );
+        aTxtSize.AdjustWidth( ( nLen-1 ) * long( nKern ) );
 
         if ( pDXArray )
         {
@@ -462,9 +462,9 @@ void SvxFont::QuickDrawText( OutputDevice *pOut,
         nDiff /= 100;
 
         if ( !IsVertical() )
-            aPos.setY( aPos.Y() - nDiff );
+            aPos.AdjustY( -nDiff );
         else
-            aPos.setX( aPos.X() + nDiff );
+            aPos.AdjustX(nDiff );
     }
 
     if( IsCapital() )
@@ -516,7 +516,7 @@ void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter,
         else
             nTmpEsc = nEsc;
         Size aSize = GetFontSize();
-        aPos.setY( aPos.Y() - ( nTmpEsc * aSize.Height() ) / 100 );
+        aPos.AdjustY( -(( nTmpEsc * aSize.Height() ) / 100) );
     }
     Font aOldFont( ChgPhysFont( pOut ) );
     Font aOldPrnFont( ChgPhysFont( pPrinter ) );
@@ -611,8 +611,8 @@ void SvxDoGetCapitalSize::Do( const OUString &_rTxt, const sal_Int32 _nIdx,
         aPartSize.setWidth( pOut->GetTextWidth( _rTxt, _nIdx, _nLen ) );
         aPartSize.setHeight( pOut->GetTextHeight() );
     }
-    aTxtSize.setWidth( aTxtSize.Width() + aPartSize.Width() );
-    aTxtSize.Width() += ( _nLen * long( nKern ) );
+    aTxtSize.AdjustWidth(aPartSize.Width() );
+    aTxtSize.AdjustWidth( _nLen * long( nKern ) );
 }
 
 Size SvxFont::GetCapitalSize( const OutputDevice *pOut, const OUString &rTxt,
@@ -704,7 +704,7 @@ void SvxDoDrawCapital::Do( const OUString &_rTxt, const sal_Int32 _nIdx,
     long nWidth = aPartSize.Width();
     if ( nKern )
     {
-        aPos.setX( aPos.X() + (nKern/2) );
+        aPos.AdjustX(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.setX( aPos.X() + nWidth-(nKern/2) );
+    aPos.AdjustX(nWidth-(nKern/2) );
 }
 
 /*************************************************************************
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 2c15120b5c85..5c310ceab03a 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -967,7 +967,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
                     {
                         // aTextPos is Bottom, go to Baseline
                         FontMetric aMetric(pOutDev->GetFontMetric());
-                        aTextPos.setY( aTextPos.Y() - aMetric.GetDescent() );
+                        aTextPos.AdjustY( -(aMetric.GetDescent()) );
                     }
 
                     DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), pBuf.get(),
@@ -1047,14 +1047,14 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
                 else
                     aStartPos.setX( rStartPos.X() + GetPaperSize().Width() - aBulletArea.Left() );
                 aEndPos = aStartPos;
-                aEndPos.setX( aEndPos.X() + nWidth );
+                aEndPos.AdjustX(nWidth );
             }
             else
             {
                 aStartPos.setX( rStartPos.X() - aBulletArea.Bottom() );
                 aStartPos.setY( rStartPos.Y() + aBulletArea.Right() );
                 aEndPos = aStartPos;
-                aEndPos.setY( aEndPos.Y() + nWidth );
+                aEndPos.AdjustY(nWidth );
             }
 
             const Color& rOldLineColor = pOutDev->GetLineColor();
@@ -1075,7 +1075,7 @@ void Outliner::InvalidateBullet(sal_Int32 nPara)
         aRect.SetRight( aPos.X() );
         aRect.SetTop( aPos.Y() );
         aRect.SetBottom( aPos.Y() );
-        aRect.SetBottom( aRect.Bottom() + nLineHeight );
+        aRect.AdjustBottom(nLineHeight );
 
         pView->GetWindow()->Invalidate( aRect );
     }
@@ -1547,7 +1547,7 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
                     FontMetric aMetric( pRefDev->GetFontMetric() );
                     // Leading on the first line ...
                     aTopLeft.setY( /* aInfos.nFirstLineOffset + */ aInfos.nFirstLineMaxAscent );
-                    aTopLeft.setY( aTopLeft.Y() - aMetric.GetAscent() );
+                    aTopLeft.AdjustY( -(aMetric.GetAscent()) );
                     pRefDev->SetFont( aOldFont );
                 }
             }
@@ -1556,11 +1556,11 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
         // Horizontal:
         if( pFmt->GetNumAdjust() == SvxAdjust::Right )
         {
-            aTopLeft.setX( aTopLeft.X() + nBulletWidth - aBulletSize.Width() );
+            aTopLeft.AdjustX(nBulletWidth - aBulletSize.Width() );
         }
         else if( pFmt->GetNumAdjust() == SvxAdjust::Center )
         {
-            aTopLeft.setX( aTopLeft.X() + ( nBulletWidth - aBulletSize.Width() ) / 2 );
+            aTopLeft.AdjustX(( nBulletWidth - aBulletSize.Width() ) / 2 );
         }
 
         if ( aTopLeft.X() < 0 )     // then push
@@ -1572,7 +1572,7 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
     {
         Size aBulletSize( aBulletArea.GetSize() );
         Point aBulletDocPos( aBulletArea.TopLeft() );
-        aBulletDocPos.setY( aBulletDocPos.Y() + pEditEngine->GetDocPosTopLeft( nPara ).Y() );
+        aBulletDocPos.AdjustY(pEditEngine->GetDocPosTopLeft( nPara ).Y() );
         Point aBulletPos( aBulletDocPos );
 
         if ( IsVertical() )
@@ -1580,7 +1580,7 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
             aBulletPos.setY( aBulletDocPos.X() );
             aBulletPos.setX( GetPaperSize().Width() - aBulletDocPos.Y() );
             // Rotate:
-            aBulletPos.setX( aBulletPos.X() - aBulletSize.Height() );
+            aBulletPos.AdjustX( -(aBulletSize.Height()) );
             Size aSz( aBulletSize );
             aBulletSize.setWidth( aSz.Height() );
             aBulletSize.setHeight( aSz.Width() );
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 49fc054d51da..a8fd9eb5d617 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -254,10 +254,10 @@ sal_Int32 OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTa
         Point aPaperPos( aMousePosWin );
         tools::Rectangle aOutArea = pEditView->GetOutputArea();
         tools::Rectangle aVisArea = pEditView->GetVisArea();
-        aPaperPos.setX( aPaperPos.X() - aOutArea.Left() );
-        aPaperPos.X() += aVisArea.Left();
-        aPaperPos.setY( aPaperPos.Y() - aOutArea.Top() );
-        aPaperPos.Y() += aVisArea.Top();
+        aPaperPos.AdjustX( -(aOutArea.Left()) );
+        aPaperPos.AdjustX(aVisArea.Left() );
+        aPaperPos.AdjustY( -(aOutArea.Top()) );
+        aPaperPos.AdjustY(aVisArea.Top() );
 
         bool bBullet;
         if ( pOwner->IsTextPos( aPaperPos, 0, &bBullet ) )
diff --git a/editeng/source/uno/unoviwou.cxx b/editeng/source/uno/unoviwou.cxx
index 0172b40ae4de..ca404db7b0b1 100644
--- a/editeng/source/uno/unoviwou.cxx
+++ b/editeng/source/uno/unoviwou.cxx
@@ -88,8 +88,8 @@ Point SvxDrawOutlinerViewForwarder::LogicToPixel( const Point& rPoint, const Map
         Point aPoint1( rPoint );
         Point aTextOffset( GetTextOffset() );
 
-        aPoint1.setX( aPoint1.X() + aTextOffset.X() );
-        aPoint1.Y() += aTextOffset.Y();
+        aPoint1.AdjustX(aTextOffset.X() );
+        aPoint1.AdjustY(aTextOffset.Y() );
 
         MapMode aMapMode(pOutDev->GetMapMode());
         Point aPoint2( OutputDevice::LogicToLogic( aPoint1, rMapMode,
@@ -115,8 +115,8 @@ Point SvxDrawOutlinerViewForwarder::PixelToLogic( const Point& rPoint, const Map
                                                    rMapMode ) );
         Point aTextOffset( GetTextOffset() );
 
-        aPoint2.setX( aPoint2.X() - aTextOffset.X() );
-        aPoint2.Y() -= aTextOffset.Y();
+        aPoint2.AdjustX( -(aTextOffset.X()) );
+        aPoint2.AdjustY( -(aTextOffset.Y()) );
 
         return aPoint2;
     }
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index b265849f24e6..81aa50e2bf04 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -755,7 +755,7 @@ namespace emfio
 
                     if ( pLineStyle->aLineInfo.GetStyle() == LineStyle::Dash )
                     {
-                        aSize.setWidth( aSize.Width() + 1 );
+                        aSize.AdjustWidth(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.setX( aP2.X() - aP1.X() );
-            aP2.setY( aP2.Y() - aP1.Y() );
+            aP2.AdjustX( -(aP1.X()) );
+            aP2.AdjustY( -(aP1.Y()) );
             double fX = aP2.X();
             double fY = aP2.Y();
             if ( fX )
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index bd584af39fde..233b2f5552a3 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -160,8 +160,8 @@ namespace emfio
         Point aBR, aTL;
         aBR = ReadYX();
         aTL = ReadYX();
-        aBR.setX( --aBR.X() );
-        aBR.Y()--;
+        aBR.AdjustX( -1 );
+        aBR.AdjustY( -1 );
         return tools::Rectangle( aTL, aBR );
     }
 
@@ -1479,10 +1479,10 @@ namespace emfio
         bool bRet = true;
 
         tools::Rectangle aBound;
-        aBound.Left()   = RECT_MAX;
-        aBound.Top()    = RECT_MAX;
-        aBound.Right()  = RECT_MIN;
-        aBound.Bottom() = RECT_MIN;
+        aBound.SetLeft( RECT_MAX );
+        aBound.SetTop( RECT_MAX );
+        aBound.SetRight( RECT_MIN );
+        aBound.SetBottom( RECT_MIN );
         bool bBoundsDetermined = false;
 
         auto nPos = pStm->Tell();
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index 65e4396bcbfa..0aeaadeaf707 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.setX( aTitlePos.X() + aIndent.Width() );
-                aTitleSize.setWidth( aTitleSize.Width() - aIndent.Width() );
+                aTitlePos.AdjustX(aIndent.Width() );
+                aTitleSize.AdjustWidth( -(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.setWidth( aControlSize.Width() - nBrowseButtonSize + 4 );
+                aControlSize.AdjustWidth( -(nBrowseButtonSize + 4) );
             m_pControlWindow->SetSizePixel( aControlSize );
         }
 
@@ -237,7 +237,7 @@ namespace pcr
 
             if ( m_pAdditionalBrowseButton )
             {
-                aButtonPos.setX( aButtonPos.X() - nBrowseButtonSize + 4 );
+                aButtonPos.AdjustX( -(nBrowseButtonSize + 4) );
                 m_pAdditionalBrowseButton->SetPosSizePixel( aButtonPos, aButtonSize );
             }
         }
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index 091102090dce..98ea5c3e5729 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -426,8 +426,8 @@ namespace pcr
         tools::Rectangle aLinesArea( aPlayground );
         if ( bPositionHelpWindow )
         {
-            aLinesArea.SetBottom( aLinesArea.Bottom() - nHelpWindowHeight );
-            aLinesArea.Bottom() -= aHelpWindowDistance.Height();
+            aLinesArea.AdjustBottom( -nHelpWindowHeight );
+            aLinesArea.AdjustBottom( -(aHelpWindowDistance.Height()) );
         }
         m_aLinesPlayground->SetPosSizePixel( aLinesArea.TopLeft(), aLinesArea.GetSize() );
 
@@ -447,7 +447,7 @@ namespace pcr
             Size aVScrollSize( m_aVScroll->GetSizePixel() );
 
             // adjust the playground's width
-            aLinesArea.SetRight( aLinesArea.Right() - aVScrollSize.Width() );
+            aLinesArea.AdjustRight( -(aVScrollSize.Width()) );
             m_aLinesPlayground->SetPosSizePixel( aLinesArea.TopLeft(), aLinesArea.GetSize() );
 
             // position the scrollbar
@@ -556,7 +556,7 @@ namespace pcr
 
         aSize.setHeight( m_nRowHeight );
 
-        aPos.setY( aPos.Y() + _nIndex * m_nRowHeight );
+        aPos.AdjustY(_nIndex * m_nRowHeight );
 
         if ( _nIndex < m_aLines.size() )
         {
diff --git a/extensions/source/propctrlr/browserpage.cxx b/extensions/source/propctrlr/browserpage.cxx
index 81caba5b3839..b25527e54e25 100644
--- a/extensions/source/propctrlr/browserpage.cxx
+++ b/extensions/source/propctrlr/browserpage.cxx
@@ -49,8 +49,8 @@ namespace pcr
     void OBrowserPage::Resize()
     {
         Size aSize( GetOutputSizePixel() );
-        aSize.Width() -= LAYOUT_BORDER_LEFT + LAYOUT_BORDER_RIGHT;
-        aSize.Height() -= LAYOUT_BORDER_TOP + LAYOUT_BORDER_BOTTOM;
+        aSize.AdjustWidth( -(LAYOUT_BORDER_LEFT + LAYOUT_BORDER_RIGHT) );
+        aSize.AdjustHeight( -(LAYOUT_BORDER_TOP + LAYOUT_BORDER_BOTTOM) );
         m_aListBox->SetPosSizePixel( Point( LAYOUT_BORDER_LEFT, LAYOUT_BORDER_TOP ), aSize );
     }
 
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index cbe3735c4982..26d154eb1880 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.setX( m_aMouseButtonDownPos.Y() = -1 );
+            m_aMouseButtonDownPos.X() = m_aMouseButtonDownPos.Y() = -1;
     }
 
 
@@ -1101,7 +1101,7 @@ namespace pcr
             aMePos = GetParent()->OutputToScreenPixel( aMePos );
             ::Size aSize=GetSizePixel();
             ::tools::Rectangle aRect(aMePos,aSize);
-            aSize.Height() = STD_HEIGHT;
+            aSize.setHeight( STD_HEIGHT );
             m_pFloatingEdit->SetOutputSizePixel(aSize);
             m_pFloatingEdit->StartPopupMode( aRect, FloatWinPopupFlags::Down );
 
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index 6cdfba834fd6..89091b8d8df0 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -465,8 +465,8 @@ 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.setX( aPt.X() - aTextSize.Width() / 2 );
-        aPt.Y() += aTextSize.Height() / 2;
+        aPt.AdjustX( -(aTextSize.Width() / 2) );
+        aPt.AdjustY(aTextSize.Height() / 2 );
         rRenderContext.DrawText(aPt, aMark);
     }
     // draw horizontal lines
@@ -478,8 +478,8 @@ 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.setX( aPt.X() - aTextSize.Width() + 2 );
-        aPt.Y() -= aTextSize.Height() / 2;
+        aPt.AdjustX( -(aTextSize.Width() + 2) );
+        aPt.AdjustY( -(aTextSize.Height() / 2) );
         rRenderContext.DrawText(aPt, aMark);
     }
 
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 06d53fb23522..13553c7b6f76 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -532,14 +532,14 @@ void SaneDlg::InitFields()
                     pField->SetValue( 0 );
                     break;
                 case 2:
-                    aMaxBottomRight.X() = PREVIEW_WIDTH;
-                    aBottomRight.X() = PREVIEW_WIDTH;
+                    aMaxBottomRight.setX( PREVIEW_WIDTH );
+                    aBottomRight.setX( PREVIEW_WIDTH );
                     pField->SetMax( PREVIEW_WIDTH );
                     pField->SetValue( PREVIEW_WIDTH );
                     break;
                 case 3:
-                    aMaxBottomRight.Y() = PREVIEW_HEIGHT;
-                    aBottomRight.Y() = PREVIEW_HEIGHT;
+                    aMaxBottomRight.setY( PREVIEW_HEIGHT );
+                    aBottomRight.setY( PREVIEW_HEIGHT );
                     pField->SetMax( PREVIEW_HEIGHT );
                     pField->SetValue( PREVIEW_HEIGHT );
                     break;
@@ -1275,9 +1275,9 @@ Point ScanPreview::GetLogicPos(const Point& rIn) const
         aConvert.setY( PREVIEW_HEIGHT-1 );
 
     aConvert.setX( aConvert.X() * ( maMaxBottomRight.X() - maMinTopLeft.X() ) );
-    aConvert.X() /= PREVIEW_WIDTH;
+    aConvert.setX( aConvert.X() / ( PREVIEW_WIDTH) );
     aConvert.setY( aConvert.Y() * ( maMaxBottomRight.Y() - maMinTopLeft.Y() ) );
-    aConvert.Y() /= PREVIEW_HEIGHT;
+    aConvert.setY( aConvert.Y() / ( PREVIEW_HEIGHT) );
     return aConvert;
 }
 
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 9f202fb20170..f6d9c1f2c1be 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -836,13 +836,13 @@ void BubbleWindow::Show( bool bVisible, ShowFlags nFlags )
         aWindowSize.setHeight( aImgSize.Height() + TIP_HEIGHT + 2 * BUBBLE_BORDER );
 
     Point aPos;
-    aPos.X() = maTipPos.X() - aWindowSize.Width() + TIP_RIGHT_OFFSET;
+    aPos.setX( maTipPos.X() - aWindowSize.Width() + TIP_RIGHT_OFFSET );
     aPos.setY( maTipPos.Y() );
     Point aScreenPos = GetParent()->OutputToAbsoluteScreenPixel( aPos );
     if ( aScreenPos.X() < 0 )
     {
         mnTipOffset = aScreenPos.X();
-        aPos.setX( aPos.X() - mnTipOffset );
+        aPos.AdjustX( -(mnTipOffset) );
     }
     SetPosSizePixel( aPos, aWindowSize );
 


More information about the Libreoffice-commits mailing list