[Libreoffice-commits] core.git: Branch 'private/mst/sw_redlinehide_4b' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Dec 20 12:05:18 UTC 2018


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

New commits:
commit 5f55edb95ea874e50e5a60623b518bf9e7468ccf
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu Dec 20 12:57:24 2018 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Thu Dec 20 12:57:24 2018 +0100

    sw_redlinehide: don't return COMPLETE_STRING from MapModelToView()
    
    The anchor position of a fly frame can be on an empty node after the
    last non-deleted text, and SwAnchoredObject::CheckCharRect()
    needs to get a valid frame index for that.
    
    This can be reproduced with ooo69593-1.odt.
    
    Change-Id: I448bb49d64e72b0af24306bd7c45755aa631b57d

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 2d17e3ec723c..df2c47915eff 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1145,7 +1145,7 @@ TextFrameIndex MapModelToView(MergedPara const& rMerged, SwTextNode const*const
         assert(nIndex <= pNode->Len());
         return TextFrameIndex(0);
     }
-    return TextFrameIndex(COMPLETE_STRING);
+    return TextFrameIndex(rMerged.mergedText.getLength());
 }
 
 } // namespace sw


More information about the Libreoffice-commits mailing list