[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 7 14:55:01 UTC 2019


 vcl/source/outdev/rect.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit fb974bc968b3a1a95f8e621776076522ec719dc6
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Nov 7 14:11:35 2019 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Thu Nov 7 15:54:22 2019 +0100

    Drawing calc grid misses pixels on bottom and right; fix.
    
    Don't attempt to offset empty rectangles causing serious problems.
    
    Change-Id: I6fcac11f5f5e03f7edc0662cf4e06e7f8a109f00
    Reviewed-on: https://gerrit.libreoffice.org/82220
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 63a876eb2bdb..45c38c5d23d3 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -224,10 +224,6 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
 
     tools::Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() );
     aDstRect.Intersection( rRect );
-    // FIXME: seems we have an off-by-one around the border
-    // here with the cairo / svp backend at least.
-    aDstRect.AdjustRight(1);
-    aDstRect.AdjustBottom(1);
 
     if( aDstRect.IsEmpty() || ImplIsRecordLayout() )
         return;
@@ -241,6 +237,11 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
     if( mbOutputClipped )
         return;
 
+    // FIXME: seems we have an off-by-one around the border
+    // here with the cairo / svp backend at least.
+    aDstRect.AdjustRight(1);
+    aDstRect.AdjustBottom(1);
+
     const long nDistX = std::max( rDist.Width(), 1L );
     const long nDistY = std::max( rDist.Height(), 1L );
     long nX = ( rRect.Left() >= aDstRect.Left() ) ? rRect.Left() : ( rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX );


More information about the Libreoffice-commits mailing list