oox/source/drawingml/shapecontext.cxx | 5 ++++- oox/source/export/drawingml.cxx | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-)
New commits: commit 2fb53eeef818ca2ab13fce74d7a2db9c44b48e7b Author: Karthik Godha <[email protected]> AuthorDate: Wed Nov 26 16:42:02 2025 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Wed Dec 3 18:19:41 2025 +0100 tdf#169694: Fix PPTX OLE animations import When loading a PPTX file animations related to OLE objects are not imported properly. Change-Id: I4656ee3c855459acedbd850c1c2104b532d59308 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194622 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit dc6a9c436dfca191fae67c31799e2b2d731551cf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194913 Tested-by: Jenkins diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index 2dc77a0e676f..91983e9d5413 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -72,8 +72,11 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const break; case XML_cNvPr: { + // If Shape ID is already assigned don't reassign it + if (mpShapePtr->getId().isEmpty()) + mpShapePtr->setId(rAttribs.getStringDefaulted(XML_id)); + mpShapePtr->setHidden( rAttribs.getBool( XML_hidden, false ) ); - mpShapePtr->setId( rAttribs.getStringDefaulted( XML_id ) ); mpShapePtr->setName( rAttribs.getStringDefaulted( XML_name ) ); mpShapePtr->setDescription( rAttribs.getStringDefaulted( XML_descr ) ); mpShapePtr->setTitle(rAttribs.getStringDefaulted(XML_title)); commit 0b5b8c534cc95ba806368e443715da21ce73b442 Author: Karthik Godha <[email protected]> AuthorDate: Thu Nov 27 13:54:32 2025 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Wed Dec 3 18:19:30 2025 +0100 tdf#169705: PPT -> PPTX invalid values in a:off PowerPoint is not accepting values greater than Int32 for 'x' and 'y' attributes inside 'a:off' Change-Id: I7929d385b916363d314b3d058184a11dc674247b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194679 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 2ec2ccc51c737d1fcf3b3136d7e8e22e86a827b1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194914 Tested-by: Jenkins diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index e6608a4fb4dc..2915e108a654 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2309,10 +2309,10 @@ void DrawingML::WriteTransformation(const Reference< XShape >& xShape, const too const sal_Int64 MAX_SIZE = std::numeric_limits<sal_Int32>::max(); sal_Int32 nCx = std::min(oox::drawingml::convertHmmToEmu(rRect.GetWidth()), MAX_SIZE); sal_Int32 nCy = std::min(oox::drawingml::convertHmmToEmu(rRect.GetHeight()), MAX_SIZE); + sal_Int32 nX = std::min(oox::drawingml::convertHmmToEmu(nLeft), MAX_SIZE); + sal_Int32 nY = std::min(oox::drawingml::convertHmmToEmu(nTop), MAX_SIZE); - mpFS->singleElementNS(XML_a, XML_off, - XML_x, OString::number(oox::drawingml::convertHmmToEmu(nLeft)), - XML_y, OString::number(oox::drawingml::convertHmmToEmu(nTop))); + mpFS->singleElementNS(XML_a, XML_off, XML_x, OString::number(nX), XML_y, OString::number(nY)); mpFS->singleElementNS(XML_a, XML_ext, XML_cx, OString::number(nCx), XML_cy, OString::number(nCy));
