sw/source/core/undo/undobj.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 81580e8850a1f256262edeaea990fb40c0dd637f Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Mon Jun 15 14:04:12 2020 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Wed Jun 17 10:53:25 2020 +0200 tdf#132321 tdf#133957 sw: for at-para fly, ignore anchor SwIndex ... because it's always 0, and not registered at the node; this fixes the case when it's anchored at a non-empty last node of a section. (follow-up to a0d0665060b75c1e7f0234b698c940d2f9d600f8) Change-Id: I627e11e84a2dcfc2944d3c9f3fd22e3c3785e505 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96350 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit b314735568c1e9ab8ca52413017425bc2ef12973) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96341 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 4974f25a467f..c46c93bbcec0 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1519,7 +1519,9 @@ static bool IsAtEndOfSection(SwPosition const& rAnchorPos) SwContentNode *const pNode(SwNodes::GoPrevious(&node)); assert(pNode); assert(rAnchorPos.nNode <= node); // last valid anchor pos is last content - return node == rAnchorPos.nNode && rAnchorPos.nContent == pNode->Len(); + return node == rAnchorPos.nNode + // at-para fly has no SwIndex! + && (rAnchorPos.nContent == pNode->Len() || rAnchorPos.nContent.GetIdxReg() == nullptr); } static bool IsAtStartOfSection(SwPosition const& rAnchorPos) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits