summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-01-10 16:03:43 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-01-10 17:20:23 +0100
commitc12358166a9bd88fe10feabca45a6ad3f65dff8e (patch)
treec1f99c98052fbbd8d8c063bf626b43a3115e860c /sw/qa
parentcd260db2ac2e96455df5bae00dc371565f16255b (diff)
DOCX import: fix lost objects anchored to an empty linked header
This is really similar to commit 04b2310aaa094794ceedaa1bb6ff1823a2d29d3e (DOCX import: fix lost objects anchored to the single para of a linked header, 2020-01-10), except here the header is not just a single-paragraph one, but has no text portions. Update text-copy.docx to have a header which is not only a single paragraph, but also has no character content. This keeps testing the original case, but now also tests the more strict case (single paragraph -> single empty paragraph). Change-Id: I11bb062e77af1a83f717225ea5b4daef39e5a672 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86552 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlimport/data/text-copy.docxbin16306 -> 16288 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport2.cxx1
2 files changed, 1 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/text-copy.docx b/sw/qa/extras/ooxmlimport/data/text-copy.docx
index 9c871e633517..03c0563b37fd 100644
--- a/sw/qa/extras/ooxmlimport/data/text-copy.docx
+++ b/sw/qa/extras/ooxmlimport/data/text-copy.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index 11243d14e33d..d75a8c0dc4fe 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -287,6 +287,7 @@ DECLARE_OOXMLIMPORT_TEST(testTextCopy, "text-copy.docx")
{
// The document has a header on the second page that is copied as part of the import process.
// The header has a single paragraph: make sure shapes anchored to it are not lost.
+ // Note that the single paragraph itself has no text portions.
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(),
uno::UNO_QUERY);