diff options
-rw-r--r-- | sw/qa/extras/layout/data/tdf117923.doc | bin | 0 -> 29696 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 15 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 3 | ||||
-rw-r--r-- | test/source/xmltesttools.cxx | 7 |
4 files changed, 24 insertions, 1 deletions
diff --git a/sw/qa/extras/layout/data/tdf117923.doc b/sw/qa/extras/layout/data/tdf117923.doc Binary files differnew file mode 100644 index 000000000000..c43cf40c9f52 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf117923.doc diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 2356832cc4ba..1ff1c23c6df4 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -24,6 +24,7 @@ public: void testTableExtrusion2(); void testTdf116848(); void testTdf117245(); + void testTdf117923(); CPPUNIT_TEST_SUITE(SwLayoutWriter); CPPUNIT_TEST(testTdf116830); @@ -34,6 +35,7 @@ public: CPPUNIT_TEST(testTableExtrusion2); CPPUNIT_TEST(testTdf116848); CPPUNIT_TEST(testTdf117245); + CPPUNIT_TEST(testTdf117923); CPPUNIT_TEST_SUITE_END(); private: @@ -194,6 +196,19 @@ void SwLayoutWriter::testTdf117245() assertXPath(pXmlDoc, "/root/page/body/txt[2]/LineBreak", 1); } +void SwLayoutWriter::testTdf117923() +{ + createDoc("tdf117923.doc"); + xmlDocPtr pXmlDoc = parseLayoutDump(); + + // Check that we actually test the line we need + assertXPathContent(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]", "GHI GHI GHI GHI"); + assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]/Special", "nType", "POR_NUMBER"); + assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]/Special", "rText", "2."); + // The numbering height was 960. + assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]/Special", "nHeight", "220"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index c2a7c02f7f5b..301c37a12409 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1795,6 +1795,9 @@ void SwWW8ImplReader::ImportDop() m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::TAB_COMPAT, true); // #i24363# tab stops relative to indent m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::TABS_RELATIVE_TO_INDENT, false); + // tdf#117923 + m_rDoc.getIDocumentSettingAccess().set( + DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, true); // Import Default Tabs long nDefTabSiz = m_xWDop->dxaTab; diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx index 45347b0c111b..c3e314e49ed4 100644 --- a/test/source/xmltesttools.cxx +++ b/test/source/xmltesttools.cxx @@ -88,7 +88,12 @@ OUString XmlTestTools::getXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath) xmlXPathNodeSetGetLength(pXmlNodes) > 0); xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0]; - OUString s(convert((pXmlNode->children[0]).content)); + xmlNodePtr pXmlChild = pXmlNode->children; + OUString s; + while (pXmlChild && pXmlChild->type != XML_TEXT_NODE) + pXmlChild = pXmlChild->next; + if (pXmlChild && pXmlChild->type == XML_TEXT_NODE) + s = convert(pXmlChild->content); xmlXPathFreeObject(pXmlObj); return s; } |