[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - xmloff/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Sep 14 11:22:25 UTC 2018


 xmloff/source/draw/animationexport.cxx |   59 +++++++++++++++++----------------
 1 file changed, 31 insertions(+), 28 deletions(-)

New commits:
commit 2e861df82eab3da34b3ba9c2c7a1d558f3d80059
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Sep 12 14:47:49 2018 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Sep 14 13:21:59 2018 +0200

    tdf#118500 Impress losing slide transition sound on saving
    
    This reverts commit b223028d65d24ffcd8e27974c29c2744a5df6227.
    
    Change-Id: Iac12092a4f6b0edb3b6a5228ed17e7d0c1794357
    Reviewed-on: https://gerrit.libreoffice.org/60391
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 61bc0d058dd95961761056a104ecd729ddfa4a82)
    Reviewed-on: https://gerrit.libreoffice.org/60399
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 84591565635d..f75d9b0f0918 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -586,42 +586,45 @@ void AnimationsExporterImpl::exportTransitionNode()
 
             SvXMLElementExport aElement( mrExport, XML_NAMESPACE_ANIMATION, XML_PAR, true, true );
 
-            sal_Int16 nSubtype = 0;
-            bool bDirection = false;
-            sal_Int32 nFadeColor = 0;
-            double fDuration = 0.0;
-            mxPageProps->getPropertyValue("TransitionSubtype") >>= nSubtype;
-            mxPageProps->getPropertyValue("TransitionDirection") >>= bDirection;
-            mxPageProps->getPropertyValue("TransitionFadeColor") >>= nFadeColor;
-            mxPageProps->getPropertyValue("TransitionDuration") >>= fDuration;
-
-            ::sax::Converter::convertDouble( sTmp, fDuration );
-            sTmp.append( 's');
-            mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_DUR, sTmp.makeStringAndClear() );
+            if( nTransition != 0 )
+            {
+                sal_Int16 nSubtype = 0;
+                bool bDirection = false;
+                sal_Int32 nFadeColor = 0;
+                double fDuration = 0.0;
+                mxPageProps->getPropertyValue("TransitionSubtype") >>= nSubtype;
+                mxPageProps->getPropertyValue("TransitionDirection") >>= bDirection;
+                mxPageProps->getPropertyValue("TransitionFadeColor") >>= nFadeColor;
+                mxPageProps->getPropertyValue("TransitionDuration") >>= fDuration;
+
+                ::sax::Converter::convertDouble( sTmp, fDuration );
+                sTmp.append( 's');
+                mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_DUR, sTmp.makeStringAndClear() );
 
-            SvXMLUnitConverter::convertEnum( sTmp, nTransition, aAnimations_EnumMap_TransitionType );
-            mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_TYPE, sTmp.makeStringAndClear() );
+                SvXMLUnitConverter::convertEnum( sTmp, nTransition, aAnimations_EnumMap_TransitionType );
+                mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_TYPE, sTmp.makeStringAndClear() );
 
-            if( nSubtype != TransitionSubType::DEFAULT )
-            {
-                SvXMLUnitConverter::convertEnum( sTmp, nSubtype, aAnimations_EnumMap_TransitionSubType );
-                mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_SUBTYPE, sTmp.makeStringAndClear() );
-            }
+                if( nSubtype != TransitionSubType::DEFAULT )
+                {
+                    SvXMLUnitConverter::convertEnum( sTmp, nSubtype, aAnimations_EnumMap_TransitionSubType );
+                    mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_SUBTYPE, sTmp.makeStringAndClear() );
+                }
 
-            if( !bDirection )
-                mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_DIRECTION, XML_REVERSE );
+                if( !bDirection )
+                    mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_DIRECTION, XML_REVERSE );
 
-            if( (nTransition == TransitionType::FADE) && ((nSubtype == TransitionSubType::FADETOCOLOR) || (nSubtype == TransitionSubType::FADEFROMCOLOR) ))
-            {
-                ::sax::Converter::convertColor( sTmp, nFadeColor );
-                mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_FADECOLOR, sTmp.makeStringAndClear() );
+                if( (nTransition == TransitionType::FADE) && ((nSubtype == TransitionSubType::FADETOCOLOR) || (nSubtype == TransitionSubType::FADEFROMCOLOR) ))
+                {
+                    ::sax::Converter::convertColor( sTmp, nFadeColor );
+                    mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_FADECOLOR, sTmp.makeStringAndClear() );
+                }
+                SvXMLElementExport aElement2( mrExport, XML_NAMESPACE_ANIMATION, XML_TRANSITIONFILTER, true, true );
             }
-            SvXMLElementExport aElement2( mrExport, XML_NAMESPACE_ANIMATION, XML_TRANSITIONFILTER, true, true );
 
             if( bStopSound )
             {
                 mrExport.AddAttribute( XML_NAMESPACE_ANIMATION, XML_COMMAND, XML_STOP_AUDIO );
-                SvXMLElementExport aElement3( mrExport, XML_NAMESPACE_ANIMATION, XML_COMMAND, true, true );
+                SvXMLElementExport aElement2( mrExport, XML_NAMESPACE_ANIMATION, XML_COMMAND, true, true );
             }
             else if( !sSoundURL.isEmpty())
             {
@@ -633,7 +636,7 @@ void AnimationsExporterImpl::exportTransitionNode()
 
                 if( bLoopSound )
                     mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_REPEATCOUNT, XML_INDEFINITE );
-                SvXMLElementExport aElement4( mrExport, XML_NAMESPACE_ANIMATION, XML_AUDIO, true, true );
+                SvXMLElementExport aElement2( mrExport, XML_NAMESPACE_ANIMATION, XML_AUDIO, true, true );
             }
         }
     }


More information about the Libreoffice-commits mailing list