From f8c12eca80b1faa65f130dfc64c303dcf88a3ac9 Mon Sep 17 00:00:00 2001 From: Szabolcs Toth Date: Mon, 6 Jan 2020 15:43:03 +0100 Subject: tdf#120344 DOCX: fix font style of numbering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (numbers and letters) when list items use different font type by direct formatting, solving also the mixed and changing numbering style during editing. Change-Id: I7ebf125bb1b67cbb33078a4e218798e7ffc06260 Co-Author: Balázs Nádasdy (NISZ) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86277 Tested-by: Jenkins Reviewed-by: László Németh --- sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docx | Bin 0 -> 13217 bytes sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docx (limited to 'sw') diff --git a/sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docx b/sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docx new file mode 100644 index 000000000000..74bcd59e24c6 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx index 48257077f0c3..478ee10310b7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx @@ -1070,6 +1070,23 @@ DECLARE_OOXMLEXPORT_TEST(testBottomBorders, "tdf129452_BottomBorders.docx") assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[2]/w:tcPr/w:tcBorders/w:bottom [@w:val = 'nil']", 0); } +DECLARE_OOXMLEXPORT_TEST(testFontTypes, "tdf120344_FontTypes.docx") +{ + // tdf#120344: Font type of numbering symbols can be different than the font type of the text. + + // Check the font type of the text, should be Consolas. + xmlDocPtr pXmlDocument = parseExport("word/document.xml"); + if (!pXmlDocument) + return; + assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/w:rPr/w:rFonts [@w:ascii='Consolas']", 1); + + // Now the font type of the numbering symbols, should be Arial Black. + xmlDocPtr qXmlDocument = parseExport("word/numbering.xml"); + if (!qXmlDocument) + return; + assertXPath(qXmlDocument, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:rPr/w:rFonts [@w:ascii='Arial Black']", 1); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit