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 7bd1864f63406cd922a5f87f637baa095b54f713 Author: Aron Budea <[email protected]> AuthorDate: Thu Oct 9 02:27:01 2025 +1030 Commit: Mike Kaganski <[email protected]> CommitDate: Thu Oct 9 06:36:03 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/+/192082 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Mike Kaganski <[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 5a0c7defd402..dd3b720d9b44 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 3420032bb224..a3f72667012d 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1593,7 +1593,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);
