[Libreoffice-commits] core.git: vcl/inc vcl/osx vcl/qa vcl/source vcl/unx vcl/win

Noel Grandin noel.grandin at collabora.co.uk
Fri Mar 2 06:31:03 UTC 2018


 vcl/inc/osx/salprn.h                  |    4 ++--
 vcl/inc/salgdi.hxx                    |    3 +++
 vcl/inc/salprn.hxx                    |    4 ++--
 vcl/inc/unx/genprn.h                  |    4 ++--
 vcl/inc/win/salprn.h                  |    4 ++--
 vcl/osx/salframe.cxx                  |    8 ++++----
 vcl/osx/salnativewidgets.cxx          |   26 +++++++++++++-------------
 vcl/osx/salprn.cxx                    |   26 ++++++++++++++++----------
 vcl/qa/cppunit/complextext.cxx        |    3 +--
 vcl/source/control/scrbar.cxx         |   12 ++++++------
 vcl/source/edit/texteng.cxx           |    3 ++-
 vcl/source/edit/textview.cxx          |    3 ++-
 vcl/source/gdi/pdfwriter_impl.cxx     |    3 ++-
 vcl/source/gdi/print.cxx              |    4 ++--
 vcl/source/gdi/salgdilayout.cxx       |    8 +++++++-
 vcl/source/outdev/font.cxx            |    2 +-
 vcl/source/outdev/outdev.cxx          |    3 ++-
 vcl/source/outdev/text.cxx            |   16 ++++++++--------
 vcl/source/window/mouse.cxx           |    2 +-
 vcl/source/window/toolbox.cxx         |    6 +++++-
 vcl/source/window/window.cxx          |    2 +-
 vcl/unx/generic/print/genprnpsp.cxx   |   12 ++++++------
 vcl/win/gdi/DWriteTextRenderer.cxx    |    8 ++++----
 vcl/win/gdi/salfont.cxx               |    6 +++---
 vcl/win/gdi/salnativewidgets-luna.cxx |   30 +++++++++++++++---------------
 vcl/win/gdi/salprn.cxx                |   12 ++++++------
 vcl/win/gdi/winlayout.cxx             |   16 ++++++++--------
 vcl/win/window/salframe.cxx           |    8 ++++----
 28 files changed, 130 insertions(+), 108 deletions(-)

New commits:
commit 312c0abcff23a5bc7cf4442359ec48187ec06d48
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Feb 27 17:07:24 2018 +0200

    drop old tools/gen methods in vcl
    
    Change-Id: I863ce5ae46ae90f06780261fa17b087a7153c807
    Reviewed-on: https://gerrit.libreoffice.org/50445
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/inc/osx/salprn.h b/vcl/inc/osx/salprn.h
index b82095c7559f..8f9c04017a66 100644
--- a/vcl/inc/osx/salprn.h
+++ b/vcl/inc/osx/salprn.h
@@ -73,8 +73,8 @@ class AquaSalInfoPrinter : public SalInfoPrinter
     virtual bool                SetData( JobSetFlags i_nFlags, ImplJobSetup* i_pSetupData ) override;
     virtual void                GetPageInfo( const ImplJobSetup* i_pSetupData,
                                              long& o_rOutWidth, long& o_rOutHeight,
-                                             long& o_rPageOffX, long& o_rPageOffY,
-                                             long& o_rPageWidth, long& o_rPageHeight ) override;
+                                             Point& rPageOffset,
+                                             Size& rPaperSize ) override;
     virtual sal_uInt32          GetCapabilities( const ImplJobSetup* i_pSetupData, PrinterCapType i_nType ) override;
     virtual sal_uInt16          GetPaperBinCount( const ImplJobSetup* i_pSetupData ) override;
     virtual OUString            GetPaperBinName( const ImplJobSetup* i_pSetupData, sal_uInt16 i_nPaperBin ) override;
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 32b51f6630d9..655c3ea17aa1 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -203,6 +203,9 @@ public:
     void                        SetLayout( SalLayoutFlags aLayout ) { m_nLayout = aLayout;}
 
     void                        mirror( long& nX, const OutputDevice *pOutDev ) const;
+    // only called mirror2 to avoid ambiguity
+    SAL_WARN_UNUSED_RESULT
+    long                        mirror2( long nX, const OutputDevice *pOutDev ) const;
     void                        mirror( long& nX, long nWidth, const OutputDevice *pOutDev, bool bBack = false ) const;
     bool                        mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ) const;
     void                        mirror( tools::Rectangle& rRect, const OutputDevice*, bool bBack = false ) const;
diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx
index d8b4182f4fee..d9da1a6d80ed 100644
--- a/vcl/inc/salprn.hxx
+++ b/vcl/inc/salprn.hxx
@@ -72,8 +72,8 @@ public:
 
     virtual void                    GetPageInfo( const ImplJobSetup* pSetupData,
                                                  long& rOutWidth, long& rOutHeight,
-                                                 long& rPageOffX, long& rPageOffY,
-                                                 long& rPageWidth, long& rPageHeight ) = 0;
+                                                 Point& rPageOffset,
+                                                 Size& rPaperSize ) = 0;
     virtual sal_uInt32              GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) = 0;
     virtual sal_uInt16              GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0;
     virtual OUString                GetPaperBinName( const ImplJobSetup* pSetupData, sal_uInt16 nPaperBin ) = 0;
diff --git a/vcl/inc/unx/genprn.h b/vcl/inc/unx/genprn.h
index f741ca03effb..9d80de32f99b 100644
--- a/vcl/inc/unx/genprn.h
+++ b/vcl/inc/unx/genprn.h
@@ -45,8 +45,8 @@ public:
     virtual bool                    SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) override;
     virtual void                    GetPageInfo( const ImplJobSetup* pSetupData,
                                                  long& rOutWidth, long& rOutHeight,
-                                                 long& rPageOffX, long& rPageOffY,
-                                                 long& rPageWidth, long& rPageHeight ) override;
+                                                 Point& rPageOffset,
+                                                 Size& rPaperSize ) override;
     virtual sal_uInt32              GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) override;
     virtual sal_uInt16              GetPaperBinCount( const ImplJobSetup* pSetupData ) override;
     virtual OUString                GetPaperBinName( const ImplJobSetup* pSetupData, sal_uInt16 nPaperBin ) override;
diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h
index a1be0336e4c1..f9be4757ad13 100644
--- a/vcl/inc/win/salprn.h
+++ b/vcl/inc/win/salprn.h
@@ -60,8 +60,8 @@ public:
     virtual bool                    SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) override;
     virtual void                    GetPageInfo( const ImplJobSetup* pSetupData,
                                                  long& rOutWidth, long& rOutHeight,
-                                                 long& rPageOffX, long& rPageOffY,
-                                                 long& rPageWidth, long& rPageHeight ) override;
+                                                 Point& rPageOffset,
+                                                 Size& rPaperSize ) override;
     virtual sal_uInt32              GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) override;
     virtual sal_uInt16              GetPaperBinCount( const ImplJobSetup* pSetupData ) override;
     virtual OUString                GetPaperBinName( const ImplJobSetup* pSetupData, sal_uInt16 nPaperBin ) override;
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 5b00f7242900..7b5b203668d8 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1341,10 +1341,10 @@ void AquaSalFrame::GetWorkArea( tools::Rectangle& rRect )
         pScreen = [NSScreen mainScreen];
     NSRect aRect = [pScreen visibleFrame];
     CocoaToVCL( aRect );
-    rRect.Left()     = static_cast<long>(aRect.origin.x);
-    rRect.Top()      = static_cast<long>(aRect.origin.y);
-    rRect.Right()    = static_cast<long>(aRect.origin.x + aRect.size.width - 1);
-    rRect.Bottom()   = static_cast<long>(aRect.origin.y + aRect.size.height - 1);
+    rRect.SetLeft( static_cast<long>(aRect.origin.x) );
+    rRect.SetTop( static_cast<long>(aRect.origin.y) );
+    rRect.SetRight( static_cast<long>(aRect.origin.x + aRect.size.width - 1) );
+    rRect.SetBottom( static_cast<long>(aRect.origin.y + aRect.size.height - 1) );
 }
 
 SalPointerState AquaSalFrame::GetPointerState()
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index 811960f1b92e..9e5008703549 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -126,19 +126,19 @@ static bool AquaGetScrollRect( /* TODO: int nScreen, */  ControlPart nPart,
     switch( nPart )
     {
         case ControlPart::ButtonUp:
-            rResultRect.Bottom() = rResultRect.Top();
+            rResultRect.SetBottom( rResultRect.Top() );
             break;
 
         case ControlPart::ButtonDown:
-            rResultRect.Top() = rResultRect.Bottom();
+            rResultRect.SetTop( rResultRect.Bottom() );
             break;
 
         case ControlPart::ButtonLeft:
-            rResultRect.Right() = rResultRect.Left();
+            rResultRect.SetRight( rResultRect.Left() );
             break;
 
         case ControlPart::ButtonRight:
-            rResultRect.Left() = rResultRect.Right();
+            rResultRect.SetLeft( rResultRect.Right() );
             break;
 
         case ControlPart::TrackHorzArea:
@@ -1120,9 +1120,9 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
             {
                 tools::Rectangle aRect( aCtrlBoundRect );
                 if( aRect.GetHeight() < 16 )
-                    aRect.Bottom() = aRect.Top() + 9; // values taken from HIG for medium progress
+                    aRect.SetBottom( aRect.Top() + 9 ); // values taken from HIG for medium progress
                 else
-                    aRect.Bottom() = aRect.Top() + 15; // values taken from HIG for large progress
+                    aRect.SetBottom( aRect.Top() + 15 ); // values taken from HIG for large progress
                 rNativeBoundingRegion = aRect;
                 rNativeContentRegion = aRect;
                 toReturn = true;
@@ -1132,7 +1132,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
         case ControlType::IntroProgress:
             {
                 tools::Rectangle aRect( aCtrlBoundRect );
-                aRect.Bottom() = aRect.Top() + INTRO_PROGRESS_HEIGHT; // values taken from HIG for medium progress
+                aRect.SetBottom( aRect.Top() + INTRO_PROGRESS_HEIGHT ); // values taken from HIG for medium progress
                 rNativeBoundingRegion = aRect;
                 rNativeContentRegion = aRect;
                 toReturn = true;
@@ -1277,17 +1277,17 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
                     tools::Rectangle aRect(aCtrlBoundRect);
                     if( nStyle == DrawFrameStyle::DoubleIn )
                     {
-                        aRect.Left()    += 1;
-                        aRect.Top()     += 1;
+                        aRect.AdjustLeft(1);
+                        aRect.AdjustTop(1);
                         //rRect.Right() -= 1;
                         //rRect.Bottom()    -= 1;
                     }
                     else
                     {
-                        aRect.Left()    += 1;
-                        aRect.Top()     += 1;
-                        aRect.Right()   -= 1;
-                        aRect.Bottom()  -= 1;
+                        aRect.AdjustLeft(1);
+                        aRect.AdjustTop(1);
+                        aRect.AdjustRight(-1);
+                        aRect.AdjustBottom(-1);
                     }
 
                     rNativeContentRegion = aRect;
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index e77d2c39a3fc..b87585de91db 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -294,8 +294,8 @@ sal_uInt32 AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup*, PrinterCapT
 
 void AquaSalInfoPrinter::GetPageInfo( const ImplJobSetup*,
                                   long& o_rOutWidth, long& o_rOutHeight,
-                                  long& o_rPageOffX, long& o_rPageOffY,
-                                  long& o_rPageWidth, long& o_rPageHeight )
+                                  Point& rPageOffset,
+                                  Size& rPaperSize )
 {
     if( mpPrintInfo )
     {
@@ -305,20 +305,26 @@ void AquaSalInfoPrinter::GetPageInfo( const ImplJobSetup*,
                      fYScaling = static_cast<double>(nDPIY)/72.0;
 
         NSSize aPaperSize = [mpPrintInfo paperSize];
-        o_rPageWidth  = static_cast<long>( double(aPaperSize.width) * fXScaling );
-        o_rPageHeight = static_cast<long>( double(aPaperSize.height) * fYScaling );
+        rPaperSize.setWidth( static_cast<long>( double(aPaperSize.width) * fXScaling ) );
+        rPaperSize.setHeight( static_cast<long>( double(aPaperSize.height) * fYScaling ) );
 
         NSRect aImageRect = [mpPrintInfo imageablePageBounds];
-        o_rPageOffX   = static_cast<long>( aImageRect.origin.x * fXScaling );
-        o_rPageOffY   = static_cast<long>( (aPaperSize.height - aImageRect.size.height - aImageRect.origin.y) * fYScaling );
+        rPageOffset.setX( static_cast<long>( aImageRect.origin.x * fXScaling ) );
+        rPageOffset.setY( static_cast<long>( (aPaperSize.height - aImageRect.size.height - aImageRect.origin.y) * fYScaling ) );
         o_rOutWidth   = static_cast<long>( aImageRect.size.width * fXScaling );
         o_rOutHeight  = static_cast<long>( aImageRect.size.height * fYScaling );
 
         if( mePageOrientation == Orientation::Landscape )
         {
             std::swap( o_rOutWidth, o_rOutHeight );
-            std::swap( o_rPageWidth, o_rPageHeight );
-            std::swap( o_rPageOffX, o_rPageOffY );
+            // swap width and height
+            long n = rPaperSize.Width();
+            rPaperSize.setWidth(rPaperSize.Height());
+            rPaperSize.setHeight(n);
+            // swap offset x and y
+            n = rPageOffset.X();
+            rPageOffset.setX(rPageOffset.Y());
+            rPageOffset.setY(n);
         }
     }
 }
@@ -333,8 +339,8 @@ static Size getPageSize( vcl::PrinterController const & i_rController, sal_Int32
         {
             awt::Size aSize;
             aPageParms[ nProperty].Value >>= aSize;
-            aPageSize.Width() = aSize.Width;
-            aPageSize.Height() = aSize.Height;
+            aPageSize.setWidth( aSize.Width );
+            aPageSize.setHeight( aSize.Height );
             break;
         }
     }
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index a9795c742640..ad5d6ca1f48f 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -98,8 +98,7 @@ void VclComplexTextTest::testArabic()
     // if run on Win7 KVM QXL / Spice GUI, we "miss" the first pixel column?!
     if ( 1 == aBoundRect.Left() )
     {
-        long &rLeft = aTestRect.Left();
-        ++rLeft;
+        aTestRect.AdjustLeft(1);
     }
 #endif
     CPPUNIT_ASSERT_EQUAL(aTestRect, aBoundRect);
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index d7ba1353b531..f34201af2a03 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -272,9 +272,9 @@ void ScrollBar::ImplCalc( bool bUpdate )
             if( mnThumbPixRange > 0 )
             {
                 maPage1Rect.SetLeft( maTrackRect.Left() );
-                maPage1Rect.Bottom()    =
-                maPage2Rect.Bottom()    =
-                maThumbRect.Bottom()    = maTrackRect.Bottom();
+                maPage1Rect.SetBottom( maTrackRect.Bottom() );
+                maPage2Rect.SetBottom (maTrackRect.Bottom() );
+                maThumbRect.SetBottom( maTrackRect.Bottom() );
             }
             else
             {
@@ -313,9 +313,9 @@ void ScrollBar::ImplCalc( bool bUpdate )
             if( mnThumbPixRange > 0 )
             {
                 maPage1Rect.SetTop( maTrackRect.Top() );
-                maPage1Rect.Right()     =
-                maPage2Rect.Right()     =
-                maThumbRect.Right()     = maTrackRect.Right();
+                maPage1Rect.SetRight( maTrackRect.Right() );
+                maPage2Rect.SetRight( maTrackRect.Right() );
+                maThumbRect.SetRight( maTrackRect.Right() );
             }
             else
             {
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index e7c0d6d2614d..e382a514ee4c 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -911,7 +911,8 @@ tools::Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial,
 
     // search within the line
     long nX = ImpGetXPos( rPaM.GetPara(), pLine, rPaM.GetIndex(), bPreferPortionStart );
-    aEditCursor.Left() = aEditCursor.Right() = nX;
+    aEditCursor.SetLeft(nX);
+    aEditCursor.SetRight(nX);
     return aEditCursor;
 }
 
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 6485a91a7039..64ba0d31a8ce 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -1595,7 +1595,8 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec
         if ( !pNode->GetText().isEmpty() && ( aPaM.GetIndex() < pNode->GetText().getLength() ) )
         {
             // If we are behind a portion, and the next portion has other direction, we must change position...
-            aEditCursor.Left() = aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aPaM, false, true ).Left();
+            aEditCursor.SetLeft( mpImpl->mpTextEngine->GetEditCursor( aPaM, false, true ).Left() );
+            aEditCursor.SetRight( aEditCursor.Left() );
 
             TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
 
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index defecaa88642..bb9c819c4799 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -8776,7 +8776,8 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject )
     // Determination of shading axis
     // See: OutputDevice::ImplDrawLinearGradient for reference
     tools::Rectangle aRect;
-    aRect.Left() = aRect.Top() = 0;
+    aRect.SetLeft(0);
+    aRect.SetTop(0);
     aRect.SetRight( aSize.Width() );
     aRect.SetBottom( aSize.Height() );
 
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index e4a50bb36283..6286f3a67c2e 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -871,8 +871,8 @@ void Printer::ImplUpdatePageData()
     mpGraphics->GetResolution( mnDPIX, mnDPIY );
     mpInfoPrinter->GetPageInfo( &maJobSetup.ImplGetConstData(),
                                 mnOutWidth, mnOutHeight,
-                                maPageOffset.X(), maPageOffset.Y(),
-                                maPaperSize.Width(), maPaperSize.Height() );
+                                maPageOffset,
+                                maPaperSize );
 }
 
 void Printer::ImplUpdateFontList()
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 4efc812a0fce..48fb33ed5a6c 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -106,6 +106,12 @@ bool SalGraphics::drawTransformedBitmap(
     return false;
 }
 
+long SalGraphics::mirror2( long x, const OutputDevice *pOutDev ) const
+{
+    mirror(x, pOutDev);
+    return x;
+}
+
 void SalGraphics::mirror( long& x, const OutputDevice *pOutDev ) const
 {
     long w;
@@ -647,7 +653,7 @@ bool SalGraphics::HitTestNativeScrollbar( ControlPart nPart, const tools::Rectan
     {
         Point pt( aPos );
         tools::Rectangle rgn( rControlRegion );
-        mirror( pt.X(), pOutDev );
+        pt.setX( mirror2( pt.X(), pOutDev ) );
         mirror( rgn, pOutDev );
         return hitTestNativeControl( ControlType::Scrollbar, nPart, rgn, pt, rIsInside );
     }
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index f9a74da0988a..67fd6dcdf7ee 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1279,7 +1279,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
             if ( mpFontInstance->mnOrientation )
             {
                 Point aOriginPt(0, 0);
-                aOriginPt.RotateAround( aAdjPoint.X(), aAdjPoint.Y(), mpFontInstance->mnOrientation );
+                aOriginPt.RotateAround( aAdjPoint, mpFontInstance->mnOrientation );
             }
             aOutPoint += aAdjPoint;
             aOutPoint -= Point( nEmphasisWidth2, nEmphasisHeight2 );
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index d68fe55ad53b..4c556a10e08b 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -337,7 +337,8 @@ void OutputDevice::SetRefPoint()
         mpMetaFile->AddAction( new MetaRefPointAction( Point(), false ) );
 
     mbRefPoint = false;
-    maRefPoint.X() = maRefPoint.Y() = 0;
+    maRefPoint.setX(0);
+    maRefPoint.setY(0);
 
     if( mpAlphaVDev )
         mpAlphaVDev->SetRefPoint();
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index c897afeb6f10..ef7f4c249642 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -2384,14 +2384,14 @@ bool OutputDevice::GetTextBoundRect( tools::Rectangle& rRect,
             if( nWidthFactor > 1 )
             {
                 double fFactor = 1.0 / nWidthFactor;
-                aPixelRect.Left()
-                    = static_cast< long >(aPixelRect.Left() * fFactor);
-                aPixelRect.Right()
-                    = static_cast< long >(aPixelRect.Right() * fFactor);
-                aPixelRect.Top()
-                    = static_cast< long >(aPixelRect.Top() * fFactor);
-                aPixelRect.Bottom()
-                    = static_cast< long >(aPixelRect.Bottom() * fFactor);
+                aPixelRect.SetLeft(
+                    static_cast< long >(aPixelRect.Left() * fFactor) );
+                aPixelRect.SetRight(
+                    static_cast< long >(aPixelRect.Right() * fFactor) );
+                aPixelRect.SetTop(
+                    static_cast< long >(aPixelRect.Top() * fFactor) );
+                aPixelRect.SetBottom(
+                    static_cast< long >(aPixelRect.Bottom() * fFactor) );
             }
 
             Point aRotatedOfs( mnTextOffX, mnTextOffY );
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 2804bc1ceb54..8ce2cec21168 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -531,7 +531,7 @@ void Window::SetPointerPosPixel( const Point& rPos )
             pOutDev->ReMirror( aPos );
         }
         // mirroring is required here, SetPointerPos bypasses SalGraphics
-        mpGraphics->mirror( aPos.X(), this );
+        aPos.setX( mpGraphics->mirror2( aPos.X(), this ) );
     }
     else if( ImplIsAntiparallel() )
     {
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index da263ec2a7b8..35c8e3a7c2af 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1625,7 +1625,11 @@ bool ToolBox::ImplCalcItem()
             if ( item.meType == ToolBoxItemType::BUTTON || item.meType == ToolBoxItemType::SPACE )
             {
                 // add borders
-                ImplAddButtonBorder( item.maItemSize.Width(), item.maItemSize.Height(), mpData->mbNativeButtons );
+                long w = item.maItemSize.Width();
+                long h = item.maItemSize.Height();
+                ImplAddButtonBorder( w, h, mpData->mbNativeButtons );
+                item.maItemSize.setWidth(w);
+                item.maItemSize.setHeight(h);
 
                 if( item.meType == ToolBoxItemType::BUTTON )
                 {
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 51861d6c3dff..e02328d17938 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1502,7 +1502,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
         OutputDevice *pOutDev = GetOutDev();
         if( pOutDev->HasMirroredGraphics() )
         {
-            mpGraphics->mirror( aPtDev.X(), this );
+            aPtDev.setX( mpGraphics->mirror2( aPtDev.X(), this ) );
 
             // #106948# always mirror our pos if our parent is not mirroring, even
             // if we are also not mirroring
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index beb1781f39b8..f8951f4ea160 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -698,8 +698,8 @@ bool PspSalInfoPrinter::SetData(
 void PspSalInfoPrinter::GetPageInfo(
     const ImplJobSetup* pJobSetup,
     long& rOutWidth, long& rOutHeight,
-    long& rPageOffX, long& rPageOffY,
-    long& rPageWidth, long& rPageHeight )
+    Point& rPageOffset,
+    Size& rPaperSize )
 {
     if( ! pJobSetup )
         return;
@@ -728,10 +728,10 @@ return;
         aData.m_pParser->getMargins( aPaper, top, bottom, right, left );
     }
 
-    rPageWidth  = width * nDPI / 72;
-    rPageHeight = height * nDPI / 72;
-    rPageOffX   = left * nDPI / 72;
-    rPageOffY   = top * nDPI / 72;
+    rPaperSize.setWidth( width * nDPI / 72 );
+    rPaperSize.setHeight( height * nDPI / 72 );
+    rPageOffset.setX( left * nDPI / 72 );
+    rPageOffset.setY( top * nDPI / 72 );
     rOutWidth   = ( width  - left - right ) * nDPI / 72;
     rOutHeight  = ( height - top  - bottom ) * nDPI / 72;
 
diff --git a/vcl/win/gdi/DWriteTextRenderer.cxx b/vcl/win/gdi/DWriteTextRenderer.cxx
index f043b72ce4f7..25530c00aa84 100644
--- a/vcl/win/gdi/DWriteTextRenderer.cxx
+++ b/vcl/win/gdi/DWriteTextRenderer.cxx
@@ -386,10 +386,10 @@ std::vector<tools::Rectangle> D2DWriteTextOutRenderer::GetGlyphInkBoxes(uint16_t
                    bottom = INT32(m.advanceHeight) - m.verticalOriginY - m.bottomSideBearing;
 
         // Scale to screen space.
-        pOut->Left()   = std::floor(left * mlfEmHeight / aFontMetrics.designUnitsPerEm);
-        pOut->Top()    = std::floor(top * mlfEmHeight / aFontMetrics.designUnitsPerEm);
-        pOut->Right()  = std::ceil(right * mlfEmHeight / aFontMetrics.designUnitsPerEm);
-        pOut->Bottom() = std::ceil(bottom * mlfEmHeight / aFontMetrics.designUnitsPerEm);
+        pOut->SetLeft( std::floor(left * mlfEmHeight / aFontMetrics.designUnitsPerEm) );
+        pOut->SetTop( std::floor(top * mlfEmHeight / aFontMetrics.designUnitsPerEm) );
+        pOut->SetRight( std::ceil(right * mlfEmHeight / aFontMetrics.designUnitsPerEm) );
+        pOut->SetBottom( std::ceil(bottom * mlfEmHeight / aFontMetrics.designUnitsPerEm) );
 
         ++pOut;
     }
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 809db1b711f7..35fb6a3fb3d4 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1345,8 +1345,8 @@ bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle
 
     rRect = tools::Rectangle( Point( +aGM.gmptGlyphOrigin.x, -aGM.gmptGlyphOrigin.y ),
         Size( aGM.gmBlackBoxX, aGM.gmBlackBoxY ) );
-    rRect.Right()  += 1;
-    rRect.Bottom() += 1;
+    rRect.AdjustRight(1);
+    rRect.AdjustBottom(1);
     return true;
 }
 
@@ -1506,7 +1506,7 @@ bool WinSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph,
 
         // convert y-coordinates W32 -> VCL
         for( int i = 0; i < nPnt; ++i )
-            pPoints[i].Y() = -pPoints[i].Y();
+            pPoints[i].setY(-pPoints[i].Y());
 
         // insert into polypolygon
         tools::Polygon aPoly( nPnt, pPoints, (bHasOfflinePoints ? pFlags : nullptr) );
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index 864e6041d48c..848fc42fe1f5 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -1372,9 +1372,9 @@ bool WinSalGraphics::getNativeControlRegion(  ControlType nType,
             tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, CP_DROPDOWNBUTTON,
                                                CBXS_NORMAL, aBoxRect ) );
             if( aRect.GetHeight() > aBoxRect.GetHeight() )
-                aBoxRect.Bottom() = aBoxRect.Top() + aRect.GetHeight();
+                aBoxRect.SetBottom( aBoxRect.Top() + aRect.GetHeight() );
             if( aRect.GetWidth() > aBoxRect.GetWidth() )
-                aBoxRect.Right() = aBoxRect.Left() + aRect.GetWidth();
+                aBoxRect.SetRight( aBoxRect.Left() + aRect.GetWidth() );
             rNativeContentRegion = aBoxRect;
             rNativeBoundingRegion = rNativeContentRegion;
             if( !aRect.IsEmpty() )
@@ -1402,12 +1402,12 @@ bool WinSalGraphics::getNativeControlRegion(  ControlType nType,
 
                 if( aRect.GetHeight() && nFontHeight )
                 {
-                    aRect.Bottom() += aRect.GetHeight();
-                    aRect.Bottom() += nFontHeight;
+                    aRect.AdjustBottom(aRect.GetHeight());
+                    aRect.AdjustBottom(nFontHeight);
                     if( aRect.GetHeight() > aBoxRect.GetHeight() )
-                        aBoxRect.Bottom() = aBoxRect.Top() + aRect.GetHeight();
+                        aBoxRect.SetBottom( aBoxRect.Top() + aRect.GetHeight() );
                     if( aRect.GetWidth() > aBoxRect.GetWidth() )
-                        aBoxRect.Right() = aBoxRect.Left() + aRect.GetWidth();
+                        aBoxRect.SetRight( aBoxRect.Left() + aRect.GetWidth() );
                     rNativeContentRegion = aBoxRect;
                     rNativeBoundingRegion = rNativeContentRegion;
                         bRet = TRUE;
@@ -1451,7 +1451,7 @@ bool WinSalGraphics::getNativeControlRegion(  ControlType nType,
             {
                 long nW = aThumbRect.GetWidth();
                 tools::Rectangle aRect( rControlRegion );
-                aRect.Right() = aRect.Left() + nW - 1;
+                aRect.SetRight( aRect.Left() + nW - 1 );
                 rNativeContentRegion = aRect;
                 rNativeBoundingRegion = rNativeContentRegion;
             }
@@ -1459,7 +1459,7 @@ bool WinSalGraphics::getNativeControlRegion(  ControlType nType,
             {
                 long nH = aThumbRect.GetHeight();
                 tools::Rectangle aRect( rControlRegion );
-                aRect.Bottom() = aRect.Top() + nH - 1;
+                aRect.SetBottom( aRect.Top() + nH - 1 );
                 rNativeContentRegion = aRect;
                 rNativeBoundingRegion = rNativeContentRegion;
             }
@@ -1472,26 +1472,26 @@ bool WinSalGraphics::getNativeControlRegion(  ControlType nType,
         tools::Rectangle aControlRect( rControlRegion );
         rNativeContentRegion = aControlRect;
 
-        --aControlRect.Bottom();
+        aControlRect.AdjustBottom(-1);
 
         if( rControlValue.getType() == ControlType::TabItem )
         {
             const TabitemValue *pValue = static_cast<const TabitemValue*>(&rControlValue);
             if ( pValue->isBothAligned() )
-                --aControlRect.Right();
+                aControlRect.AdjustRight(-1);
 
             if ( nState & ControlState::SELECTED )
             {
-                aControlRect.Left() -= 2;
+                aControlRect.AdjustLeft(-2);
                 if ( pValue && !pValue->isBothAligned() )
                 {
                     if ( pValue->isLeftAligned() || pValue->isNotAligned() )
-                        aControlRect.Right() += 2;
+                        aControlRect.AdjustRight(2);
                     if ( pValue->isRightAligned() )
-                        aControlRect.Right() += 1;
+                        aControlRect.AdjustRight(1);
                 }
-                aControlRect.Top() -= 2;
-                aControlRect.Bottom() += 2;
+                aControlRect.AdjustTop(-2);
+                aControlRect.AdjustBottom(2);
             }
         }
         rNativeBoundingRegion = aControlRect;
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 3a0b664953a6..7ba4ff25e418 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1264,18 +1264,18 @@ sal_uInt32 WinSalInfoPrinter::GetCapabilities( const ImplJobSetup* pSetupData, P
 
 void WinSalInfoPrinter::GetPageInfo( const ImplJobSetup*,
                                   long& rOutWidth, long& rOutHeight,
-                                  long& rPageOffX, long& rPageOffY,
-                                  long& rPageWidth, long& rPageHeight )
+                                  Point& rPageOffset,
+                                  Size& rPaperSize )
 {
     HDC hDC = mhDC;
 
     rOutWidth   = GetDeviceCaps( hDC, HORZRES );
     rOutHeight  = GetDeviceCaps( hDC, VERTRES );
 
-    rPageOffX   = GetDeviceCaps( hDC, PHYSICALOFFSETX );
-    rPageOffY   = GetDeviceCaps( hDC, PHYSICALOFFSETY );
-    rPageWidth  = GetDeviceCaps( hDC, PHYSICALWIDTH );
-    rPageHeight = GetDeviceCaps( hDC, PHYSICALHEIGHT );
+    rPageOffset.setX( GetDeviceCaps( hDC, PHYSICALOFFSETX ) );
+    rPageOffset.setY( GetDeviceCaps( hDC, PHYSICALOFFSETY ) );
+    rPaperSize.setWidth( GetDeviceCaps( hDC, PHYSICALWIDTH ) );
+    rPaperSize.setHeight( GetDeviceCaps( hDC, PHYSICALHEIGHT ) );
 }
 
 
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 2e56a96fa2dd..a89e77065361 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -132,17 +132,17 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, S
     // FIXME: really I don't get why 'vertical' makes any difference [!] what does it mean !?
     if (aElement.mbVertical)
     {
-        aElement.maLocation.Left() = 0;
-        aElement.maLocation.Right() = nBitmapWidth;
-        aElement.maLocation.Top() = nPos;
-        aElement.maLocation.Bottom() = nPos + aGlyphAdv[0] + aElement.maLeftOverhangs;
+        aElement.maLocation.SetLeft(0);
+        aElement.maLocation.SetRight(nBitmapWidth);
+        aElement.maLocation.SetTop(nPos);
+        aElement.maLocation.SetBottom( nPos + aGlyphAdv[0] + aElement.maLeftOverhangs );
     }
     else
     {
-        aElement.maLocation.Left() = nPos;
-        aElement.maLocation.Right() = aEnds[0];
-        aElement.maLocation.Top() = 0;
-        aElement.maLocation.Bottom() = bounds.getHeight() + aElement.getExtraSpace();
+        aElement.maLocation.SetLeft(nPos);
+        aElement.maLocation.SetRight(aEnds[0]);
+        aElement.maLocation.SetTop(0);
+        aElement.maLocation.SetBottom( bounds.getHeight() + aElement.getExtraSpace() );
     }
     nPos = aEnds[0];
 
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index b3da5d53d2d1..64b073f99139 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -1605,10 +1605,10 @@ void WinSalFrame::GetWorkArea( tools::Rectangle &rRect )
 {
     RECT aRect;
     ImplSalGetWorkArea( mhWnd, &aRect, nullptr );
-    rRect.Left()     = aRect.left;
-    rRect.Right()    = aRect.right-1;
-    rRect.Top()      = aRect.top;
-    rRect.Bottom()   = aRect.bottom-1;
+    rRect.SetLeft( aRect.left );
+    rRect.SetRight( aRect.right-1 );
+    rRect.SetTop( aRect.top );
+    rRect.SetBottom( aRect.bottom-1 );
 }
 
 void WinSalFrame::GetClientSize( long& rWidth, long& rHeight )


More information about the Libreoffice-commits mailing list