summaryrefslogtreecommitdiff
path: root/oox/qa
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2023-05-20 19:26:26 +0200
committerRegina Henschel <rb.henschel@t-online.de>2023-05-21 13:48:47 +0200
commit58926cc60c7868785c8db126fc199f6731269b86 (patch)
treebf2842a4576947ce076d310ae66d5863dfe0a0b4 /oox/qa
parentf0dbebc76b819adebf228fbdb0f25a6ee14187c9 (diff)
tdf#155412 ooxml export typeface attribute is mandatory
The attribute 'typeface' is required for <a:ea>, <a:cs> and <a:latin> elements, see CT_TextFont in ISO/IEC 29500-1:2016. Its value may be the empty string. Change-Id: I7c9316fa40ad6d1aabccb4191fee11be553c453b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152024 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'oox/qa')
-rw-r--r--oox/qa/unit/data/tdf155412_typeface.pptxbin0 -> 23138 bytes
-rw-r--r--oox/qa/unit/export.cxx16
2 files changed, 16 insertions, 0 deletions
diff --git a/oox/qa/unit/data/tdf155412_typeface.pptx b/oox/qa/unit/data/tdf155412_typeface.pptx
new file mode 100644
index 000000000000..30a486e70fff
--- /dev/null
+++ b/oox/qa/unit/data/tdf155412_typeface.pptx
Binary files differ
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
index 6992f6378a76..8a17f352716b 100644
--- a/oox/qa/unit/export.cxx
+++ b/oox/qa/unit/export.cxx
@@ -1316,6 +1316,22 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeColorTransparency)
assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:lumMod", "val", "75000");
assertXPath(pXmlDoc, sElement + "a:solidFill/a:schemeClr/a:alpha", "val", "20000");
}
+
+CPPUNIT_TEST_FIXTURE(Test, testThemeFontTypeface)
+{
+ // Saving the document had produced a file which PowerPoint wants to repair. The mandatory
+ // attribute 'typeface' was missing in the <a:ea> elements.
+
+ loadFromURL(u"tdf155412_typeface.pptx");
+
+ save("Impress Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/theme/theme1.xml");
+
+ // Make sure typeface is written.
+ OString sElement = "/a:theme/a:themeElements/a:fontScheme/";
+ assertXPath(pXmlDoc, sElement + "a:majorFont/a:ea", "typeface", "");
+ assertXPath(pXmlDoc, sElement + "a:minorFont/a:ea", "typeface", "");
+}
}
CPPUNIT_PLUGIN_IMPLEMENT();