summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-11-16 20:41:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-11-23 17:12:14 +0000
commit0750162d3dbdd1bbd01ad01c383a26199e58419a (patch)
treeb46b4d582164e80ec3f36a269b61adf0970ae982 /sw/qa
parentafa3f711d48d18c7132feed29a09c5665f305285 (diff)
tdf#83300 DOCX import: 'TOC Heading' should not be 'keep with next' by default
On one hand, neither our binary DOC import, nor Word maps the "TOC Heading" style to something special, and that's how the DOCX import added that property to some paragraphs in the document, moving the as-char picture from the first to the second page. OTOH, the DOCX export filter has a lcl_guessQFormat() function that explicitly assumes that such a style name exists in Writer document models, so again it doesn't make sense to handle this style name with special care. Change-Id: I3af548930f9683695fc3ad56b486e013f107d61a (cherry picked from commit 70f3c595cae858e97616bf1f23adea8a75e42d4b) Reviewed-on: https://gerrit.libreoffice.org/20037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf83300.docxbin0 -> 9948 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx6
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf83300.docx b/sw/qa/extras/ooxmlimport/data/tdf83300.docx
new file mode 100644
index 000000000000..aa3ad22d10fc
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf83300.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index d463bf4e9803..c56ed5e6cc03 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2836,6 +2836,12 @@ DECLARE_OOXMLIMPORT_TEST(testTdf94374, "hello.docx")
CPPUNIT_ASSERT(paste("tdf94374.docx", xEnd));
}
+DECLARE_OOXMLIMPORT_TEST(testTdf83300, "tdf83300.docx")
+{
+ // This was 'Contents Heading', which (in the original document) implied 'keep with next' on unexpected paragraphs.
+ CPPUNIT_ASSERT_EQUAL(OUString("TOC Heading"), getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+}
+
DECLARE_OOXMLIMPORT_TEST(testTdf85232, "tdf85232.docx")
{
uno::Reference<drawing::XShapes> xShapes(getShapeByName("Group 219"), uno::UNO_QUERY);