tdf#148052: sw_ooxmlexport17: add unittest
Change-Id: I4153e4598114e54481fc25d174c3ccb9394de6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132811 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
BIN
sw/qa/extras/ooxmlexport/data/tdf148052.docx
Normal file
BIN
sw/qa/extras/ooxmlexport/data/tdf148052.docx
Normal file
Binary file not shown.
@@ -350,6 +350,22 @@ DECLARE_OOXMLEXPORT_TEST(testTdf146851_2, "tdf146851_2.docx")
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("Schedule"), xTextField->getPresentation(false));
|
||||
}
|
||||
|
||||
DECLARE_OOXMLEXPORT_TEST(testTdf148052, "tdf148052.docx")
|
||||
{
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
|
||||
|
||||
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
|
||||
CPPUNIT_ASSERT(xFields->hasMoreElements());
|
||||
|
||||
uno::Reference<text::XTextField> xTextField(xFields->nextElement(), uno::UNO_QUERY);
|
||||
|
||||
// Without the fix in place, this test would have failed with
|
||||
// - Expected: 14. Aug 18
|
||||
// - Actual : 11. Apr 22
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("14. Aug 18"), xTextField->getPresentation(false));
|
||||
}
|
||||
|
||||
DECLARE_OOXMLEXPORT_TEST(testTdf148111, "tdf148111.docx")
|
||||
{
|
||||
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
|
||||
|
Reference in New Issue
Block a user