sw/source/core/view/viewimp.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cccf3894bf8b7d47cec983a62a1f394724e82b3b
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Tue Jun 7 12:21:28 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Thu Jun 9 21:17:35 2022 +0200

    fix SwViewShellImp::AddPaintRect() rectangle compression (tdf#148255)
    
    Both the checks test whether a follow-up rectangle can be merged
    with the previous one by merging it at the bottom or the right of it,
    so the previous one should be always the top-left and the follow-up
    one should be the bottom-right.
    
    Change-Id: Ie5809595ec9bf28bd169fc503a6b391c6188d0b2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135468
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>
    (cherry picked from commit 0372da98bf9b2af82afc2e4ff919068bdcaae7db)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135385
    Tested-by: Andras Timar <andras.ti...@collabora.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index d86c06e23593..1436cf152ba3 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -149,7 +149,7 @@ bool SwViewShellImp::AddPaintRect( const SwRect &rRect )
                     if(last2.Top() == last.Top() && last2.Height() == 
last.Height()
                         && last2.Right() + 1 >= last.Left() && last2.Right() 
<= last2.Right())
                     {
-                        last2 = SwRect( last.TopLeft(), rRect.BottomRight());
+                        last2 = SwRect( last2.TopLeft(), last.BottomRight());
                         m_pRegion->pop_back();
                         return true;
                     }

Reply via email to