From 70f3c595cae858e97616bf1f23adea8a75e42d4b Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 16 Nov 2015 20:41:32 +0100 Subject: 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 --- sw/qa/extras/ooxmlimport/data/tdf83300.docx | Bin 0 -> 9948 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 6 ++++++ 2 files changed, 6 insertions(+) create mode 100644 sw/qa/extras/ooxmlimport/data/tdf83300.docx (limited to 'sw') 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 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf83300.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 0a9d900472dc..8a11157ef8ed 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2909,6 +2909,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(getParagraph(1), "ParaStyleName")); +} + DECLARE_OOXMLIMPORT_TEST(testTdf85232, "tdf85232.docx") { uno::Reference xShapes(getShapeByName("Group 219"), uno::UNO_QUERY); -- cgit