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

New commits:
commit 39dd42b5aa34d0960cdab0c9fd967d4ae5cc6801
Author: Tamás Zolnai <tamas.zol...@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 <c...@libreoffice.org>
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index e2c061f004ac..d073d21f5cb5 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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to