sd/qa/unit/data/odp/tdf133502.odp |binary sd/qa/unit/export-tests-ooxml2.cxx | 4 +++- sd/source/filter/eppt/pptx-epptooxml.cxx | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-)
New commits: commit 8602573b3b9509702d8df15128488e032e825c6e Author: Aron Budea <[email protected]> AuthorDate: Thu Oct 9 02:27:01 2025 +1030 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Oct 20 10:01:28 2025 +0200 tdf#168754 sd: escape comments exported to PPTX Change-Id: Ic0574980ec3d837f7747aaeb54fb8925aff2987f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192072 Tested-by: Jenkins Reviewed-by: Aron Budea <[email protected]> (cherry picked from commit 6cab4cb50cf67a8dd595fffa107968cb1bd9fd18) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192083 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sd/qa/unit/data/odp/tdf133502.odp b/sd/qa/unit/data/odp/tdf133502.odp index de72673049a9..e35358ddc8ea 100644 Binary files a/sd/qa/unit/data/odp/tdf133502.odp and b/sd/qa/unit/data/odp/tdf133502.odp differ diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 8ac9d5aaa94e..0cd28f8e9d61 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -984,7 +984,9 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf133502) save(u"Impress Office Open XML"_ustr); xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/comments/comment1.xml"_ustr); - assertXPathContent(pXmlDocRels, "/p:cmLst/p:cm/p:text", u"Test for creator-initials"); + // Without the fix to tdf#168754 the special characters would cause errors during parsing + assertXPathContent(pXmlDocRels, "/p:cmLst/p:cm/p:text", + u"Test for creator-initials < > & \" '"); // Without the fix in place, the comment position would have been 0,0 assertXPath(pXmlDocRels, "/p:cmLst/p:cm/p:pos", "x", u"2032"); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index e1ad8025586b..217acd8f10bc 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1587,7 +1587,7 @@ bool PowerPointExport::WriteComments(sal_uInt32 nPageNum) XML_y, OString::number(std::round(convertMm100ToMasterUnit(aRealPoint2D.Y * 100)))); pFS->startElementNS(XML_p, XML_text); - pFS->write(xText->getString()); + pFS->writeEscaped(xText->getString()); pFS->endElementNS(XML_p, XML_text); pFS->endElementNS(XML_p, XML_cm);
