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

New commits:
commit 50c496c8460bb91cfd38d7a312ffd092713614cb
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Tue Jun 7 12:21:28 2022 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Jun 7 14:37:45 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/+/135382
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index f1b2c2531897..854a9aaa03de 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -144,7 +144,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_pPaintRegion->pop_back();
                         return true;
                     }

Reply via email to