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

Tamás Zolnai tamas.zolnai at collabora.com
Mon Jan 15 16:43:09 UTC 2018


 sw/source/core/doc/docredln.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 3dc73ae6978521c3b334d5bbff44deb85bc6a108
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date:   Sun Jan 14 00:16:26 2018 +0100

    lok: Tile not invalidated with certain changes
    
    Calling FillRects caused this issue, which updates text area, so
    the invalidation, runing after that call, won't now where was the old text.
    We call invalidation here on the whole frame not only on the rects where
    the actual text is.
    
    Change-Id: I23db4b9579aa5710540b5d241506726630219b02
    Reviewed-on: https://gerrit.libreoffice.org/47848
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    (cherry picked from commit 39dd42b5aa34d0960cdab0c9fd967d4ae5cc6801)
    Reviewed-on: https://gerrit.libreoffice.org/47904
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index d30ebdb1cf1f..0803609ae963 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -393,6 +393,20 @@ void SwRedlineTable::LOKRedlineNotification(RedlineNotification nType, SwRangeRe
         aRedline.put("textRange", sRects.getStr());
 
         lcl_LOKInvalidateStartEndFrames(aCursor);
+
+        // When this notify method is called text invalidation is not done yet
+        // Calling FillRects updates the text area so invalidation will not run on the correct rects
+        // So we need to do an own invalidation here. It invalidates text frames continging the redlining
+        SwDoc* pDoc = pRedline->GetDoc();
+        SwViewShell* pSh;
+        if( pDoc && !pDoc->IsInDtor() &&
+            nullptr != ( pSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()) )
+        {
+            for(SwNodeIndex nIdx = pStartPos->nNode; nIdx <= pEndPos->nNode; ++nIdx)
+            {
+                pSh->InvalidateWindows( nIdx.GetNode().GetContentNode()->FindLayoutRect() );
+            }
+        }
     }
 
     boost::property_tree::ptree aTree;


More information about the Libreoffice-commits mailing list