diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-01-10 13:20:40 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-01-10 14:13:05 +0100 |
commit | 04b2310aaa094794ceedaa1bb6ff1823a2d29d3e (patch) | |
tree | 6ed8c727ef149a6443a06cca064e7612340a33fb /sw/inc/IDocumentContentOperations.hxx | |
parent | d9c535ead688e9f156dbcf43948df08a69e218be (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/IDocumentContentOperations.hxx')
-rw-r--r-- | sw/inc/IDocumentContentOperations.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index f59b1f0eef89..6ba51df9f740 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -109,7 +109,7 @@ public: rPam. If false, then no such check will be performed, and it is assumed that the caller took care of verifying this constraint already. */ - virtual bool CopyRange(SwPaM& rPam, SwPosition& rPos, const bool bCopyAll, bool bCheckPos ) const = 0; + virtual bool CopyRange(SwPaM& rPam, SwPosition& rPos, const bool bCopyAll, bool bCheckPos, bool bCopyText ) const = 0; /** Delete section containing the node. */ |