sd/source/filter/eppt/pptx-animations-nodectx.cxx |    5 +++++
 sd/source/filter/eppt/pptx-animations.cxx         |   14 ++------------
 2 files changed, 7 insertions(+), 12 deletions(-)

New commits:
commit f3943837d75695bc351a55340addd362de33097b
Author:     Aron Budea <[email protected]>
AuthorDate: Fri Jan 2 21:50:24 2026 +1100
Commit:     Aron Budea <[email protected]>
CommitDate: Sat Jan 3 03:05:19 2026 +0100

    tdf#170202 avoid exporting ANIMATIONPHYSICS node types
    
    Implement cbf102d4c1ba73519b49df0d43a87ebdf9267538 differently.
    
    After previous commit, tdf136301-1.odp still contained
    animation elements in slide1.xml when converted to PPTX, and
    couldn't be opened in PP.
    
    Set such nodes invalid instead to avoid processing them at all.
    
    Change-Id: I799026c389681b89792bb9765b8f81562743deb4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196424
    Reviewed-by: Aron Budea <[email protected]>
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sd/source/filter/eppt/pptx-animations-nodectx.cxx 
b/sd/source/filter/eppt/pptx-animations-nodectx.cxx
index af843d661b69..0e3c2ee3d4d5 100644
--- a/sd/source/filter/eppt/pptx-animations-nodectx.cxx
+++ b/sd/source/filter/eppt/pptx-animations-nodectx.cxx
@@ -188,6 +188,11 @@ void NodeContext::initValid(bool bHasValidChild, bool 
bIsIterateChild)
             }
         }
     }
+    else if (nType == AnimationNodeType::ANIMATEPHYSICS)
+    {
+        // Ignore: we don't support exporting this node type
+        mbValid = false;
+    }
     else
     {
         Reference<XAnimate> xAnimate(mxNode, UNO_QUERY);
diff --git a/sd/source/filter/eppt/pptx-animations.cxx 
b/sd/source/filter/eppt/pptx-animations.cxx
index bbae2b29682c..3890e392d2aa 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -951,28 +951,18 @@ void 
PPTXAnimationExport::WriteAnimationNodeCommonPropsStart()
     if (!aChildNodes.empty())
     {
         bool bSubTnLst = false;
-        bool bWroteChildTnList = false;
+        mpFS->startElementNS(XML_p, XML_childTnLst);
         for (const NodeContextPtr& pChildContext : aChildNodes)
         {
             if (pChildContext->isValid())
             {
                 if (pChildContext->isOnSubTnLst())
                     bSubTnLst = true;
-                else if (pChildContext->getNode()->getType() == 
AnimationNodeType::ANIMATEPHYSICS)
-                    ; // ignore we don't support exporting this node type
                 else
-                {
-                    if (!bWroteChildTnList)
-                    {
-                        bWroteChildTnList = true;
-                        mpFS->startElementNS(XML_p, XML_childTnLst);
-                    }
                     WriteAnimationNode(pChildContext);
-                }
             }
         }
-        if (bWroteChildTnList)
-            mpFS->endElementNS(XML_p, XML_childTnLst);
+        mpFS->endElementNS(XML_p, XML_childTnLst);
 
         if (bSubTnLst)
         {

Reply via email to