diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-06-11 14:12:28 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-06-11 19:10:03 +0200 |
commit | be2f539012d818eaa2d40a9cf199b53d32e1dee4 (patch) | |
tree | 6fcb24de9d13bb885ba2a95dcecd832ffe6163eb /sw | |
parent | cc4b5091e739116a7ec83513fa1cd856f0130330 (diff) |
tdf#132321 sw: adapt fly at-para deletion to at-char wrt. sections
971205dc2110c1c23ff1db1fc4041e2babf6fa9f changed at-char selection to
check that not only the start is at the start of the section or the
end is at the end of the section, but that both are true.
Let's do this for at-para flys too for consistency, changing what was
introduced with 91b2325808a75174f284c48c8b8afc118fad74e4.
Change-Id: I1ec93b076d729288ce0809d1cfc24379aa9591ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96125
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/undo/undobj.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 2fb9a44da30b..0de5562c3c46 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1631,14 +1631,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(rStart)))) + || (IsAtStartOfSection(rAnchorPos) && 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(rEnd)))); + || (IsAtEndOfSection(rAnchorPos) && IsAtStartOfSection2(rStart))))); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |