sd/qa/unit/FontEmbeddingTest.cxx | 26 ++++++++++++++++++++++++++ sd/qa/unit/data/pptx/tdf167214.pptx |binary 2 files changed, 26 insertions(+)
New commits: commit f55650046598d64eb559c48815d5a9ead4def499 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Jun 26 19:34:40 2025 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Jun 27 11:13:29 2025 +0200 tdf#167214: sd_font_embedding: Add test Change-Id: I9f164b0f309821479f8381d2f62ac4578e34a867 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187070 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/qa/unit/FontEmbeddingTest.cxx b/sd/qa/unit/FontEmbeddingTest.cxx index 89c6583fcac5..75a12179fa8b 100644 --- a/sd/qa/unit/FontEmbeddingTest.cxx +++ b/sd/qa/unit/FontEmbeddingTest.cxx @@ -134,6 +134,32 @@ CPPUNIT_TEST_FIXTURE(FontEmbeddingTest, testExportEmbeddedFontsPPTX) #endif } +CPPUNIT_TEST_FIXTURE(FontEmbeddingTest, testTdf167214) +{ + auto verify = [this]() { + uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> xProps( + xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY_THROW); + + // Check state of the font embedding settings + CPPUNIT_ASSERT_EQUAL(true, xProps->getPropertyValue(u"EmbedFonts"_ustr).get<bool>()); + CPPUNIT_ASSERT_EQUAL(true, + xProps->getPropertyValue(u"EmbedOnlyUsedFonts"_ustr).get<bool>()); + CPPUNIT_ASSERT_EQUAL(true, + xProps->getPropertyValue(u"EmbedLatinScriptFonts"_ustr).get<bool>()); + CPPUNIT_ASSERT_EQUAL(true, + xProps->getPropertyValue(u"EmbedAsianScriptFonts"_ustr).get<bool>()); + CPPUNIT_ASSERT_EQUAL(true, + xProps->getPropertyValue(u"EmbedComplexScriptFonts"_ustr).get<bool>()); + }; + + createSdImpressDoc("pptx/tdf167214.pptx"); + verify(); + //Without the fix in place, it would crash at export time + saveAndReload(u"Impress Office Open XML"_ustr); + verify(); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/qa/unit/data/pptx/tdf167214.pptx b/sd/qa/unit/data/pptx/tdf167214.pptx new file mode 100644 index 000000000000..c8fbc593272c Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf167214.pptx differ