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

New commits:
commit 431dd62b7d1a4f8ca1a1833aa33c1f5f08a900a0
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Thu Apr 2 17:21:32 2020 +0200
Commit:     Thorsten Behrens <thorsten.behr...@cib.de>
CommitDate: Sun Apr 5 00:26:12 2020 +0200

    (related: tdf#130685) sw: adapt definition of sw_redlinehide index 0
    
    ... to the change to use the last node - not the first node - for
    paragraph properties.
    
    The problem is that if you move the cursor around at some step of 
reproducing the bug, this happens:
    sw/source/core/crsr/crsrsh.cxx:544: bool SwCursorShell::LRMargin(bool, 
bool): Assertion `sw::GetParaPropsNode(*GetLayout(), 
GetCursor_()->GetPoint()->nNode) == pTextNd' failed.
    
    For a fully deleted range, it looks more plausible to map index 0 to the 
end of the last node instead of the start of the first node now.
    
    This means that text will be inserted at the end of the last node too.
    
    (regression from fa5eb82b398e29ae033f7b7c8c8195dfc10cf5b0)
    
    Change-Id: Ica891aea658b85211397320a44c9c10b48ca2659
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91598
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit 58353884dc86bdb3c1464f8bbf8c3e131584b78a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91525
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index f47402d1b211..6d86d2253631 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1178,7 +1178,7 @@ MapViewToModel(MergedPara const& rMerged, TextFrameIndex 
const i_nIndex)
     assert(nIndex == 0 && "view index out of bounds");
     return pExtent
         ? std::make_pair(pExtent->pNode, pExtent->nEnd) //1-past-the-end index
-        : std::make_pair(rMerged.pFirstNode, sal_Int32(0));
+        : std::make_pair(const_cast<SwTextNode*>(rMerged.pLastNode), 
rMerged.pLastNode->Len());
 }
 
 TextFrameIndex MapModelToView(MergedPara const& rMerged, SwTextNode 
const*const pNode, sal_Int32 const nIndex)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to