sd/source/filter/eppt/pptx-animations.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 8dce45fde0f23f2f3083b313676889016775d2aa Author: Karthik <[email protected]> AuthorDate: Thu Oct 9 22:58:31 2025 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Tue Oct 14 17:31:04 2025 +0200 impress: fix PPT->PPTX time animate value interoperability issue Saving a PPT file as PPTX could sometimes corrupt the output because of negative animation time(ST_TLTimeAnimateValueTime). ST_TLTimeAnimateValueTime can't be negative ([ISO/IEC 29500-1] 19.7.39). The patch ensures that animation times values are non-negative during PPTX export Change-Id: I366a9acfc59231545737d67859dfcfd0a4beb886 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192122 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sd/source/filter/eppt/pptx-animations.cxx b/sd/source/filter/eppt/pptx-animations.cxx index 9c59cc2feec0..d8407b09c093 100644 --- a/sd/source/filter/eppt/pptx-animations.cxx +++ b/sd/source/filter/eppt/pptx-animations.cxx @@ -220,9 +220,12 @@ void WriteAnimateValues(const FSHelperPtr& pFS, const Reference<XAnimate>& rXAni SAL_INFO("sd.eppt", "animate value " << i << ": " << aKeyTimes[i]); if (aValues[i].hasValue()) { + // ST_TLTimeAnimateValueTime can't be negative ([ISO/IEC 29500-1] 19.7.39) + sal_uInt32 nTime = static_cast<sal_uInt32>(std::max(0.0, aKeyTimes[i] * 100000.0)); + pFS->startElementNS(XML_p, XML_tav, XML_fmla, sax_fastparser::UseIf(sFormula, !sFormula.isEmpty()), XML_tm, - OString::number(static_cast<sal_Int32>(aKeyTimes[i] * 100000.0))); + sax_fastparser::UseIf(OString::number(nTime), nTime != 0)); pFS->startElementNS(XML_p, XML_val); ValuePair aPair; if (aValues[i] >>= aPair)
