sw/qa/extras/ooxmlexport/data/tdf130814.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 29 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+)
New commits: commit 911d6451730823aa15b0082eb94f1877755d6ca6 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Feb 24 11:37:44 2020 +0100 Commit: Xisco FaulĂ <xiscofa...@libreoffice.org> CommitDate: Mon Feb 24 21:02:56 2020 +0100 tdf#130814: Add unittest Change-Id: I9ed69e42cd7128aafc3621e51ce26249895629d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89335 Tested-by: Jenkins Reviewed-by: Xisco FaulĂ <xiscofa...@libreoffice.org> diff --git a/sw/qa/extras/ooxmlexport/data/tdf130814.docx b/sw/qa/extras/ooxmlexport/data/tdf130814.docx new file mode 100644 index 000000000000..30c17120ec27 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf130814.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index 537e5ad77dea..9a35092981ba 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -9,6 +9,7 @@ #include <swmodeltestbase.hxx> +#include <com/sun/star/awt/FontUnderline.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <IDocumentSettingAccess.hxx> @@ -59,6 +60,34 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123873, "tdf123873.docx") p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:drawing/wp:anchor/wp:wrapTopAndBottom"); } +DECLARE_OOXMLEXPORT_TEST(testTdf130814model, "tdf130814.docx") +{ + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x1F497D), getProperty<sal_Int32>(getRun(getParagraph(2), 1), "CharColor")); + CPPUNIT_ASSERT_EQUAL(double(16), getProperty<double>(getRun(getParagraph(2), 1), "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontUnderline::SINGLE, getProperty<sal_Int16>(getRun(getParagraph(2), 1), "CharUnderline")); + CPPUNIT_ASSERT_EQUAL(OUString("Candara"), getProperty<OUString>(getRun(getParagraph(2), 1), "CharFontName")); + CPPUNIT_ASSERT_EQUAL(OUString("Arial Unicode MS"), getProperty<OUString>(getRun(getParagraph(2), 1), "CharFontNameAsian")); +} + +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf130814ooxml, "tdf130814.docx") +{ + xmlDocPtr p_XmlDoc = parseExport("word/document.xml"); + CPPUNIT_ASSERT(p_XmlDoc); + assertXPath( + p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:rFonts", "eastAsia", "Arial Unicode MS"); + assertXPath( + p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:rFonts", "ascii", "Candara"); + assertXPath( + p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:rFonts", "hAnsi", "Candara"); + assertXPath( + p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:color", "val", "1F497D"); + assertXPath( + p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:sz", "val", "32"); + assertXPath( + p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:szCs", "val", "32"); + assertXPath( + p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:u", "val", "single"); +} DECLARE_OOXMLIMPORT_TEST(testTdf129888vml, "tdf129888vml.docx") { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits