xmloff/source/draw/animimp.cxx |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 53e65356c5385be6c917795e116049f10d63354b
Author:     Simon Chenery <[email protected]>
AuthorDate: Sun Dec 14 17:07:54 2025 +0100
Commit:     David Gilbert <[email protected]>
CommitDate: Sun Dec 28 17:18:39 2025 +0100

    tdf#168771 Convert enum to enum class in animimp.cxx
    
    Change-Id: I8793020c24e4ce304dd7006c9c645653c95b7e8d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195622
    Tested-by: Jenkins
    Reviewed-by: David Gilbert <[email protected]>

diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index afd1fffd2f13..c80254ddd97d 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -316,12 +316,12 @@ AnimationEffect ImplSdXMLgetEffect( XMLEffect eKind, 
XMLEffectDirection eDirecti
 
 namespace {
 
-enum XMLActionKind
+enum class XMLActionKind
 {
-    XMLE_SHOW,
-    XMLE_HIDE,
-    XMLE_DIM,
-    XMLE_PLAY
+    SHOW,
+    HIDE,
+    DIM,
+    PLAY
 };
 
 class XMLAnimationsEffectContext : public SvXMLImportContext
@@ -393,31 +393,31 @@ XMLAnimationsEffectContext::XMLAnimationsEffectContext( 
SvXMLImport& rImport,
     XMLAnimationsContext& rAnimationsContext )
 :   SvXMLImportContext(rImport),
     mxAnimationsContext( &rAnimationsContext ),
-    meKind( XMLE_SHOW ), mbTextEffect( false ),
+    meKind( XMLActionKind::SHOW ), mbTextEffect( false ),
     meEffect( EK_none ), meDirection( ED_none ), mnStartScale( 100 ),
     meSpeed( AnimationSpeed_MEDIUM ), maDimColor(0), mbPlayFull( false )
 {
     switch(nElement & TOKEN_MASK)
     {
         case XML_SHOW_SHAPE:
-            meKind = XMLE_SHOW;
+            meKind = XMLActionKind::SHOW;
             break;
         case XML_SHOW_TEXT:
-            meKind = XMLE_SHOW;
+            meKind = XMLActionKind::SHOW;
             mbTextEffect = true;
             break;
         case XML_HIDE_SHAPE:
-            meKind = XMLE_HIDE;
+            meKind = XMLActionKind::HIDE;
             break;
         case XML_HIDE_TEXT:
-            meKind = XMLE_HIDE;
+            meKind = XMLActionKind::HIDE;
             mbTextEffect = true;
             break;
         case XML_DIM:
-            meKind = XMLE_DIM;
+            meKind = XMLActionKind::DIM;
             break;
         case XML_PLAY:
-            meKind = XMLE_PLAY;
+            meKind = XMLActionKind::PLAY;
             break;
         default:
             XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
@@ -500,13 +500,13 @@ void XMLAnimationsEffectContext::endFastElement(sal_Int32 
)
 
             if( xSet.is() )
             {
-                if( meKind == XMLE_DIM )
+                if( meKind == XMLActionKind::DIM )
                 {
                     xSet->setPropertyValue( u"DimPrevious"_ustr, Any(true) );
 
                     xSet->setPropertyValue( u"DimColor"_ustr, Any(maDimColor) 
);
                 }
-                else if( meKind == XMLE_PLAY )
+                else if( meKind == XMLActionKind::PLAY )
                 {
                     xSet->setPropertyValue( u"IsAnimation"_ustr, Any(true) );
 
@@ -516,13 +516,13 @@ void XMLAnimationsEffectContext::endFastElement(sal_Int32 
)
                 }
                 else
                 {
-                    if( meKind == XMLE_HIDE && !mbTextEffect && meEffect == 
EK_none )
+                    if( meKind == XMLActionKind::HIDE && !mbTextEffect && 
meEffect == EK_none )
                     {
                         xSet->setPropertyValue( u"DimHide"_ustr, Any(true) );
                     }
                     else
                     {
-                        const AnimationEffect eEffect = ImplSdXMLgetEffect( 
meEffect, meDirection, mnStartScale, meKind == XMLE_SHOW );
+                        const AnimationEffect eEffect = ImplSdXMLgetEffect( 
meEffect, meDirection, mnStartScale, meKind == XMLActionKind::SHOW );
 
                         if (mbTextEffect)
                             xSet->setPropertyValue( u"TextEffect"_ustr, Any( 
eEffect ) );

Reply via email to