sd/source/filter/eppt/pptx-animations.cxx | 5 ++++- sfx2/inc/SfxRedactionHelper.hxx | 3 +-- sfx2/source/doc/SfxRedactionHelper.cxx | 13 +++---------- 3 files changed, 8 insertions(+), 13 deletions(-)
New commits: commit d9522e6b7828c76953fb52cf8ec2229bb9afee72 Author: Karthik <[email protected]> AuthorDate: Thu Oct 9 22:58:31 2025 +0530 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Oct 30 11:35:51 2025 +0100 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]> (cherry picked from commit 8dce45fde0f23f2f3083b313676889016775d2aa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193078 Tested-by: Jenkins Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193133 diff --git a/sd/source/filter/eppt/pptx-animations.cxx b/sd/source/filter/eppt/pptx-animations.cxx index dbe264019c75..2bfcc8070a73 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) commit f3c228aced4f71088d562610f2c99797ea5e7227 Author: Karthik <[email protected]> AuthorDate: Tue Aug 19 14:22:46 2025 +0530 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Oct 30 11:35:35 2025 +0100 tdf#139331 Bug fix related to "Auto-Redact" Change-Id: I407239568fb7da948fe582f04673d4ef1b638b47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189901 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins (cherry picked from commit 21f017a95b56a86a73e2712903141b069f55d939) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193061 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx index a2d942f76628..c30593235014 100644 --- a/sfx2/inc/SfxRedactionHelper.hxx +++ b/sfx2/inc/SfxRedactionHelper.hxx @@ -110,8 +110,7 @@ public: * areas to be redacted. * */ static void searchImagesInMetaFile(const GDIMetaFile& rMtf, - std::vector<tools::Rectangle>& aRedactionRectangles, - const uno::Reference<XComponent>& xComponent); + std::vector<tools::Rectangle>& aRedactionRectangles); /* * Draws a redaction rectangle on the draw page referenced with its page number (0-based) diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx b/sfx2/source/doc/SfxRedactionHelper.cxx index f7e302fec5d8..520af6d465da 100644 --- a/sfx2/source/doc/SfxRedactionHelper.cxx +++ b/sfx2/source/doc/SfxRedactionHelper.cxx @@ -419,7 +419,7 @@ void SfxRedactionHelper::searchInMetaFile(const RedactionTarget& rRedactionTarge { if (rRedactionTarget.sType == RedactionTargetType::REDACTION_TARGET_IMAGE) { - searchImagesInMetaFile(rMtf, aRedactionRectangles, xComponent); + searchImagesInMetaFile(rMtf, aRedactionRectangles); return; } @@ -485,16 +485,9 @@ void SfxRedactionHelper::searchInMetaFile(const RedactionTarget& rRedactionTarge } void SfxRedactionHelper::searchImagesInMetaFile( - const GDIMetaFile& rMtf, std::vector<::tools::Rectangle>& aRedactionRectangles, - const uno::Reference<XComponent>& xComponent) + const GDIMetaFile& rMtf, std::vector<::tools::Rectangle>& aRedactionRectangles) { - OutputDevice* pOutputDevice - = SfxObjectShell::GetShellFromComponent(xComponent)->GetDocumentRefDev(); - pOutputDevice->Push(::vcl::PushFlags::ALL); - - MetaAction* pCurrAct; - - for (pCurrAct = const_cast<GDIMetaFile&>(rMtf).FirstAction(); pCurrAct; + for (MetaAction* pCurrAct = const_cast<GDIMetaFile&>(rMtf).FirstAction(); pCurrAct; pCurrAct = const_cast<GDIMetaFile&>(rMtf).NextAction()) { tools::Rectangle aImageRect;
