sw/source/core/undo/undobj.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 9227a7ba84b6c5323d45ff427cb0f90e16530be1 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Tue Jun 30 12:24:01 2020 +0200 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Tue Jun 30 17:26:31 2020 +0200 tdf#134404 sw: another subtlety with start/end of section (at-para flys) fix this problem by comparing the start/end of the selection instead of the anchor position, which always has an index of 0: 1. new document with image anchored to paragraph 2. insert one letter 3. press Enter 4. Backspace -> Image gone (regression from cc4b5091e739116a7ec83513fa1cd856f0130330) Change-Id: I1219a9f58ce19ea88d697c90c862fe9005318177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97511 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit 17aeb522f566cf225baa5ce524e747089f76728d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97498 diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 3a17d8d98f21..30fc2ed24b4d 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1634,14 +1634,14 @@ bool IsSelectFrameAnchoredAtPara(SwPosition const & rAnchorPos, && ((rStart.nNode != rEnd.nNode && rStart.nContent == 0 // but not if the selection is backspace/delete! && IsNotBackspaceHeuristic(rStart, rEnd)) - || (IsAtStartOfSection(rAnchorPos) && IsAtEndOfSection2(rEnd))))) + || (IsAtStartOfSection2(rStart) && IsAtEndOfSection2(rEnd))))) && ((rAnchorPos.nNode < rEnd.nNode) || (rAnchorPos.nNode == rEnd.nNode && !(nDelContentType & DelContentType::ExcludeFlyAtStartEnd) // special case: fully deleted node && ((rEnd.nNode != rStart.nNode && rEnd.nContent == rEnd.nNode.GetNode().GetTextNode()->Len() && IsNotBackspaceHeuristic(rStart, rEnd)) - || (IsAtEndOfSection(rAnchorPos) && IsAtStartOfSection2(rStart))))); + || (IsAtEndOfSection2(rEnd) && IsAtStartOfSection2(rStart))))); } bool IsFlySelectedByCursor(SwDoc const & rDoc, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits