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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Sep 10 13:02:55 UTC 2018


 sd/source/filter/eppt/pptx-epptooxml.cxx |   24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

New commits:
commit 98cbbb4f6e2446c63be214bd302a57a23fe6f1c8
Author:     Mark Hung <marklh9 at gmail.com>
AuthorDate: Sat Sep 8 07:06:40 2018 +0800
Commit:     Mark Hung <marklh9 at gmail.com>
CommitDate: Mon Sep 10 15:02:33 2018 +0200

    sd / pptx export: get rid of GET and GETA macros.
    
    Change-Id: Ib090bb3e9168e62767404823dd2beadd70eeb440
    Reviewed-on: https://gerrit.libreoffice.org/60179
    Tested-by: Jenkins
    Reviewed-by: Mark Hung <marklh9 at gmail.com>

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index e99759b61ab8..74c852b103a3 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -471,13 +471,6 @@ void PowerPointExport::ImplWriteBackground(const FSHelperPtr& pFS, const Referen
         </a:xfrm>\
       </p:grpSpPr>"
 
-#define GETA(propName) \
-    ImplGetPropertyValue( mXPagePropSet, #propName )
-
-#define GET(variable, propName) \
-    if ( GETA(propName) ) \
-        mAny >>= variable;
-
 const char* PowerPointExport::GetSideDirection(sal_uInt8 nDirection)
 {
     const char* pDirection = nullptr;
@@ -537,14 +530,15 @@ const char* PowerPointExport::Get8Direction(sal_uInt8 nDirection)
 void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
 {
     FadeEffect eFadeEffect = FadeEffect_NONE;
-    GET(eFadeEffect, Effect);
+    if (ImplGetPropertyValue(mXPagePropSet, "Effect"))
+        mAny >>= eFadeEffect;
 
     sal_Int16 nTransitionType = 0, nTransitionSubtype = 0;
     sal_Int8 nPPTTransitionType = 0;
     sal_uInt8 nDirection = 0;
 
-    if (GETA(TransitionType) && (mAny >>= nTransitionType) &&
-            GETA(TransitionSubtype) && (mAny >>= nTransitionSubtype))
+    if (ImplGetPropertyValue(mXPagePropSet, "TransitionType") && (mAny >>= nTransitionType) &&
+            ImplGetPropertyValue(mXPagePropSet, "TransitionSubtype") && (mAny >>= nTransitionSubtype))
         nPPTTransitionType = GetTransition(nTransitionType, nTransitionSubtype, eFadeEffect, nDirection);
 
     if (!nPPTTransitionType && eFadeEffect != FadeEffect_NONE)
@@ -649,7 +643,7 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
     bool isTransitionDurationSet = false;
 
     // try to use TransitionDuration instead of old Speed property
-    if (GETA(TransitionDuration))
+    if (ImplGetPropertyValue(mXPagePropSet, "TransitionDuration"))
     {
         double fTransitionDuration = -1.0;
         mAny >>= fTransitionDuration;
@@ -680,7 +674,7 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
                 isTransitionDurationSet = true;
         }
     }
-    else if (GETA(Speed))
+    else if (ImplGetPropertyValue(mXPagePropSet, "Speed"))
     {
         mAny >>= animationSpeed;
 
@@ -702,11 +696,11 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
     if (!nPPTTransitionType && !bOOXmlSpecificTransition && !isTransitionDurationSet)
         return;
 
-    if (GETA(Change))
+    if (ImplGetPropertyValue(mXPagePropSet, "Change"))
         mAny >>= changeType;
 
     // 1 means automatic, 2 half automatic - not sure what it means - at least I don't see it in UI
-    if (changeType == 1 && GETA(Duration))
+    if (changeType == 1 && ImplGetPropertyValue(mXPagePropSet, "Duration"))
         mAny >>= advanceTiming;
 
     if (!bOOXmlSpecificTransition)
@@ -1086,7 +1080,7 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum
 
     const char* pShow = nullptr;
 
-    if (GETA(Visible))
+    if (ImplGetPropertyValue(mXPagePropSet, "Visible"))
     {
         bool bShow(false);
         if ((mAny >>= bShow) && !bShow)


More information about the Libreoffice-commits mailing list