[Libreoffice-commits] core.git: vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 19 06:27:51 UTC 2021


 vcl/source/outdev/outdev.cxx   |    4 +---
 vcl/source/window/clipping.cxx |    4 ++--
 vcl/source/window/paint.cxx    |    4 ++--
 3 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 9d60f23c7a7f6034eb3ce63b636d225a433e4080
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Mon Jan 18 18:42:27 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jan 19 07:27:04 2021 +0100

    use more GetOutputSizePixel
    
    Change-Id: I90ac482ad2a3f372998f70ee6e65e6349567cba8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109564
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index f95ca14bb5e4..6eab1dc7356d 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -528,10 +528,8 @@ void OutputDevice::drawOutDevDirect(const OutputDevice& rSrcDev, SalTwoRect& rPo
         return;
 
     // #102532# Offset only has to be pseudo window offset
-    const tools::Rectangle aSrcOutRect(Point(rSrcDev.mnOutOffX, rSrcDev.mnOutOffY),
-                                       Size(rSrcDev.mnOutWidth, rSrcDev.mnOutHeight));
 
-    AdjustTwoRect( rPosAry, aSrcOutRect );
+    AdjustTwoRect( rPosAry, rSrcDev.GetOutputRectPixel() );
 
     if ( rPosAry.mnSrcWidth && rPosAry.mnSrcHeight && rPosAry.mnDestWidth && rPosAry.mnDestHeight )
     {
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index fb5be87392eb..7b9330d18505 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -172,7 +172,7 @@ void Window::ImplClipBoundaries( vcl::Region& rRegion, bool bThis, bool bOverlap
     {
         // clip to frame if required
         if ( !mpWindowImpl->mbFrame )
-            rRegion.Intersect( tools::Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
+            rRegion.Intersect( tools::Rectangle( Point( 0, 0 ), mpWindowImpl->mpFrameWindow->GetOutputSizePixel() ) );
 
         if ( bOverlaps && !rRegion.IsEmpty() )
         {
@@ -630,7 +630,7 @@ void Window::ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Re
     if ( pWindow && !pWindow->mpWindowImpl->mbFrame )
     {
         aTempRegion = aRegion;
-        aTempRegion.Exclude( tools::Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
+        aTempRegion.Exclude( tools::Rectangle( Point( 0, 0 ), mpWindowImpl->mpFrameWindow->GetOutputSizePixel() ) );
         rRegion.Union( aTempRegion );
     }
 
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index c6d28435236e..48149f50b056 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -991,7 +991,7 @@ void Window::ImplUpdateAll()
     if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame )
     {
         Point aPoint( 0, 0 );
-        vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
+        vcl::Region aRegion( tools::Rectangle( aPoint, GetOutputSizePixel() ) );
         ImplInvalidateOverlapFrameRegion( aRegion );
         if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) )
             bFlush = true;
@@ -1294,7 +1294,7 @@ void Window::PaintImmediately()
     if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame )
     {
         Point aPoint( 0, 0 );
-        vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
+        vcl::Region aRegion( tools::Rectangle( aPoint, GetOutputSizePixel() ) );
         ImplInvalidateOverlapFrameRegion( aRegion );
         if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) )
             bFlush = true;


More information about the Libreoffice-commits mailing list