summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-06-11 14:12:28 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-06-24 16:20:58 +0200
commit86a3470455c92353e731979c1743657731a23e10 (patch)
tree5304a25201af27daef56fcc63710d2d5ea00b009
parent8087b77debe5be2ee8124314e38bb77a2f0894f1 (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> (cherry picked from commit be2f539012d818eaa2d40a9cf199b53d32e1dee4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96149 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit f63a28dc13e234e7509fdb8986e45db14a2d32ec) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96189 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/source/core/undo/undobj.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index eb42e7dfbc0c..ae19a4d4c95a 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1627,14 +1627,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: */