diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-01-14 00:16:26 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-01-14 05:00:22 +0100 |
commit | 39dd42b5aa34d0960cdab0c9fd967d4ae5cc6801 (patch) | |
tree | 2ef14261c29e47ca05bb19f908496432def85491 /sw | |
parent | facfc2951ea9f4745edd4a6fb1cf97697f33f40a (diff) |
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@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
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; |