diff options
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf146851_1.docx | bin | 0 -> 12378 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport17.cxx | 11 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 9 |
3 files changed, 17 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146851_1.docx b/sw/qa/extras/ooxmlexport/data/tdf146851_1.docx Binary files differnew file mode 100644 index 000000000000..b4456bf40074 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf146851_1.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx index 8b70d879f4b4..c6a795c0ab01 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx @@ -270,6 +270,17 @@ DECLARE_OOXMLEXPORT_TEST(testWPGBodyPr, "WPGbodyPr.docx") xInnerShape->getPropertyValue("TextRightDistance").get<sal_Int32>()); } +DECLARE_OOXMLEXPORT_TEST(testTdf146851_1, "tdf146851_1.docx") +{ + uno::Reference<beans::XPropertySet> xPara; + + xPara.set(getParagraph(1, "qwerty"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString")); + + xPara.set(getParagraph(2, "asdfg"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("1/"), getProperty<OUString>(xPara, "ListLabelString")); +} + DECLARE_OOXMLEXPORT_TEST(testTdf81507, "tdf81507.docx") { xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 8829aa52697f..1c79e0eece99 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -371,9 +371,12 @@ void AbstractListDef::AddLevel( sal_uInt16 nLvl ) if ( nLvl >= m_aLevels.size() ) m_aLevels.resize( nLvl+1 ); - ListLevel::Pointer pLevel( new ListLevel ); - m_pCurrentLevel = pLevel; - m_aLevels[nLvl] = pLevel; + if (!m_aLevels[nLvl]) + { + m_aLevels[nLvl] = new ListLevel; + } + + m_pCurrentLevel = m_aLevels[nLvl]; } uno::Sequence<uno::Sequence<beans::PropertyValue>> AbstractListDef::GetPropertyValues(bool bDefaults) |