summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-11-17 16:54:12 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-11-17 16:55:12 +0100
commitc03b691a7cd8eba128204c851b99e0b75c580c0c (patch)
treeecb0cc408f689c65170f91d707cedc291dd74939 /sw/qa
parent521185705d062e9526a8a3e0bc485c943e83eb0e (diff)
DOCX import: handle <w:numId> from parent styles as well
Without this, we may miss the <w:numId> of a paragraph and set no numbering style name; and that leads to not restarting numberings when needed. Change-Id: I9a4896266c5b7f1d7cc2adc43b84e227c004da7c
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/num-parent-style.docxbin0 -> 14002 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx6
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/num-parent-style.docx b/sw/qa/extras/ooxmlexport/data/num-parent-style.docx
new file mode 100644
index 000000000000..4b8c657afa3f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/num-parent-style.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 851d72efaaa9..39c559aac378 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -565,6 +565,12 @@ DECLARE_OOXMLEXPORT_TEST(testOoxmlCjklist35, "cjklist35.docx")
CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_LOWER_ZH, numFormat);
}
+DECLARE_OOXMLEXPORT_TEST(testNumParentStyle, "num-parent-style.docx")
+{
+ // This was "Outline", i.e. <w:numId> was not imported from the Heading 2 paragraph style.
+ CPPUNIT_ASSERT(getProperty<OUString>(getParagraph(4), "NumberingStyleName").startsWith("WWNum"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */