summaryrefslogtreecommitdiff
path: root/sw/inc/undobj.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-01-10 13:20:40 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-01-10 14:13:05 +0100
commit04b2310aaa094794ceedaa1bb6ff1823a2d29d3e (patch)
tree6ed8c727ef149a6443a06cca064e7612340a33fb /sw/inc/undobj.hxx
parentd9c535ead688e9f156dbcf43948df08a69e218be (diff)
DOCX import: fix lost objects anchored to the single para of a linked header
Regression from commit 08f13ab85b5c65b5dc8adfa15918fb3e426fcc3c (tdf#112202 writerfilter,sw: fix loss of headers, 2019-12-16), the problem is that on one hand, copyText() is meant to copy a complete XText (header, table cell, footnote, etc), OTOH the internal API use used only copies at-para anchored objects for complete text nodes, so a one-paragraph header will loose its anchored objects when a linked header is copied. Introduce a new "CopyText" flag that provides the expected copyText() behavior and use that when the copyText() UNO API is invoked, but leave the selection behavior unchanged. Perform the inclusive check in IsSelectFrameAnchoredAtPara(), opt in for that from SwXText::copyText(), the rest is just passing the flag around. Change-Id: Id727f7ca4f6121a7050340359716a52ecb4886f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86529 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/inc/undobj.hxx')
-rw-r--r--sw/inc/undobj.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index cde1e3a0ff35..5f261f68e8eb 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -137,9 +137,10 @@ enum class DelContentType : sal_uInt16
AllMask = 0x0b,
ExcludeFlyAtStartEnd = 0x40,
CheckNoCntnt = 0x80,
+ CopyText = 0x100,
};
namespace o3tl {
- template<> struct typed_flags<DelContentType> : is_typed_flags<DelContentType, 0xcb> {};
+ template<> struct typed_flags<DelContentType> : is_typed_flags<DelContentType, 0x1cb> {};
}
/// will DelContentIndex destroy a frame anchored at character at rAnchorPos?