tdf#116883: sw: unittest for lists with complex level format
Change-Id: I12a9cc1d08525536182227f26e5c44c7b8a4b319
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93125
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116883.docx b/sw/qa/extras/ooxmlexport/data/tdf116883.docx
new file mode 100644
index 0000000..52a9c42
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116883.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 19582a7..bdaac7d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -1002,6 +1002,50 @@ DECLARE_OOXMLEXPORT_TEST(testLanguageInGroupShape, "tdf131922_LanguageInGroupSha
"val", "de-DE");
}
DECLARE_OOXMLEXPORT_TEST(testTdf116883, "tdf116883.docx")
{
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>1>"), getProperty<OUString>(xPara, "ListLabelString"));
}
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>2>"), getProperty<OUString>(xPara, "ListLabelString"));
}
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>2>1>1>"), getProperty<OUString>(xPara, "ListLabelString"));
}
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(4), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>2>2>"), getProperty<OUString>(xPara, "ListLabelString"));
}
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>2>3>"), getProperty<OUString>(xPara, "ListLabelString"));
}
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(6), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>1)"), getProperty<OUString>(xPara, "ListLabelString"));
}
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(7), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>2)"), getProperty<OUString>(xPara, "ListLabelString"));
}
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(8), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>2>1<1)"), getProperty<OUString>(xPara, "ListLabelString"));
}
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(9), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>2.2)"), getProperty<OUString>(xPara, "ListLabelString"));
}
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(10), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>2.3)"), getProperty<OUString>(xPara, "ListLabelString"));
}
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */