summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSzabolcs Toth <szabolcs450@gmail.com>2020-01-06 15:43:03 +0100
committerLászló Németh <nemeth@numbertext.org>2020-01-10 14:25:15 +0100
commitf8c12eca80b1faa65f130dfc64c303dcf88a3ac9 (patch)
tree85e37ea75d6739aad765a118cfb79d04c48507c5 /sw
parent86be3422cd55fa9e44104f1628648061bb6a3495 (diff)
tdf#120344 DOCX: fix font style of numbering
(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 <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docxbin0 -> 13217 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx17
2 files changed, 17 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docx
Binary files 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: */