[Libreoffice-commits] core.git: sd/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Sep 8 04:05:13 UTC 2018


 sd/source/filter/eppt/pptx-animations.cxx |   27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

New commits:
commit 22f49d10c001f9d62e3783872bc7e53a902265a3
Author:     Mark Hung <marklh9 at gmail.com>
AuthorDate: Fri Sep 7 06:26:53 2018 +0800
Commit:     Mark Hung <marklh9 at gmail.com>
CommitDate: Sat Sep 8 06:04:51 2018 +0200

    sd / pptx export: use extracted ooxml node type.
    
    Prefer extracted node type over XAnimationNode->getType(),
    as the later has been converted to former and unknown
    condition filtered.
    
    As the switch-case statements use ooxml node type now,
    all kown node types are handled. Hence returning early
    for unkown case isn't necessary and is removed.
    That also fix unrestored mpConetxt in 9a9b81c7212f because
    of returning early.
    
    Change-Id: I614dcaa5b0ce32b19c396d0eab4499c1d67fa059
    Reviewed-on: https://gerrit.libreoffice.org/60139
    Tested-by: Jenkins
    Reviewed-by: Mark Hung <marklh9 at gmail.com>

diff --git a/sd/source/filter/eppt/pptx-animations.cxx b/sd/source/filter/eppt/pptx-animations.cxx
index 42cec71e09e1..86fd90362af7 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -1147,35 +1147,32 @@ void PPTXAnimationExport::WriteAnimationNode(const NodeContextPtr& pContext)
     SAL_INFO("sd.eppt", "export node type: " << rXNode->getType());
     sal_Int32 xmlNodeType = extractNodeType(rXNode);
 
-    if (xmlNodeType == -1)
-        return;
-
-    switch (rXNode->getType())
+    switch (xmlNodeType)
     {
-        case AnimationNodeType::ITERATE:
-        case AnimationNodeType::PAR:
+        case XML_par:
             mpFS->startElementNS(XML_p, xmlNodeType, FSEND);
             WriteAnimationNodeCommonPropsStart();
             mpFS->endElementNS(XML_p, xmlNodeType);
             break;
-        case AnimationNodeType::SEQ:
+        case XML_seq:
             WriteAnimationNodeSeq();
             break;
-        case AnimationNodeType::ANIMATETRANSFORM:
-        case AnimationNodeType::ANIMATE:
-        case AnimationNodeType::ANIMATEMOTION:
-        case AnimationNodeType::ANIMATECOLOR:
-        case AnimationNodeType::SET:
+        case XML_animScale:
+        case XML_animRot:
+        case XML_anim:
+        case XML_animMotion:
+        case XML_animClr:
+        case XML_set:
             WriteAnimationNodeAnimate(xmlNodeType);
             break;
-        case AnimationNodeType::TRANSITIONFILTER:
+        case XML_animEffect:
             WriteAnimationNodeEffect();
             break;
-        case AnimationNodeType::COMMAND:
+        case XML_cmd:
             WriteAnimationNodeCommand();
             break;
         default:
-            SAL_WARN("sd.eppt", "unhandled animation node: " << rXNode->getType());
+            SAL_WARN("sd.eppt", "export ooxml node type: " << xmlNodeType);
             break;
     }
 


More information about the Libreoffice-commits mailing list