summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-04-21 11:40:20 +0200
committerJustin Luth <justin_luth@sil.org>2021-06-24 05:38:32 +0200
commitb8727666969156534c05b54a1addb54046969a50 (patch)
tree7de5bc0c3c58eab0250022f8cee206b3e2cec4d0 /sw
parent01ffaa6e02ebb0fc3aba75aafc56988127ade3ab (diff)
tdf#123405 doc import: inherit from all Outline styles
Good - an example document that proves that inheritance needs to happen with more than the first 9 items which contain the Heading styles that are most often associated with Chapter Numbering. Change-Id: I69ab1dd3fdab4d54695d9b321b0d2970509090a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114403 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ww8export/data/tdf106541_inheritOutlineNumbering.docbin0 -> 40448 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx7
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
3 files changed, 8 insertions, 1 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf106541_inheritOutlineNumbering.doc b/sw/qa/extras/ww8export/data/tdf106541_inheritOutlineNumbering.doc
new file mode 100644
index 000000000000..2fe243fe800a
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf106541_inheritOutlineNumbering.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index a09edd763fa1..2ecde65c6bfb 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -806,6 +806,13 @@ DECLARE_WW8EXPORT_TEST(testTdf106541_inheritChapterNumberingB, "tdf106541_inheri
CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString"));
}
+DECLARE_WW8EXPORT_TEST(testTdf106541_inheritOutlineNumbering, "tdf106541_inheritOutlineNumbering.doc")
+{
+ // The level and numbering are inherited from Level2.
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2, "This should be a sub-point."), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString"));
+}
+
DECLARE_WW8EXPORT_TEST(testTdf120394, "tdf120394.doc")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 9c9f06e62032..9721a3f8cf4d 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5921,7 +5921,7 @@ void SwWW8ImplReader::SetOutlineStyles()
// Copy inherited numbering info since LO drops inheritance after ChapterNumbering
// and only applies listLevel via style with the selected ChapterNumbering LFO.
bool bReRegister = false;
- if (rSI.m_nBase && rSI.m_nBase < 10 && rSI.m_nBase < m_vColl.size()
+ if (rSI.m_nBase && rSI.m_nBase < m_vColl.size()
&& m_vColl[rSI.m_nBase].HasWW8OutlineLevel())
{
if (rSI.m_nLFOIndex == USHRT_MAX)