cui/source/options/optdict.cxx |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit f08c1ca86c3b5d5b474188afbb88ecd1f3d52d1a
Author:     Simon Chenery <[email protected]>
AuthorDate: Sat Feb 14 10:44:35 2026 +0100
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Thu Feb 19 18:57:55 2026 +0100

    tdf#168771 Convert enum to enum class in optdict.cxx
    
    Change-Id: Ie4ce94dc612a3061af76378d3e8b05854af39496
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199368
    Reviewed-by: Ilmari Lauhakangas <[email protected]>
    Tested-by: Jenkins

diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index b5511fc36f04..cb708cc9c510 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -91,21 +91,21 @@ static OUString fixSpace(OUString sText)
 namespace {
 
 // Compare Dictionary Entry  result
-enum CDE_RESULT { CDE_EQUAL, CDE_SIMILAR, CDE_DIFFERENT };
+enum class CdeResult { Equal, Similar, Different };
 
 }
 
-static CDE_RESULT cmpDicEntry_Impl( std::u16string_view rText1, 
std::u16string_view rText2 )
+static CdeResult cmpDicEntry_Impl( std::u16string_view rText1, 
std::u16string_view rText2 )
 {
-    CDE_RESULT eRes = CDE_DIFFERENT;
+    CdeResult eRes = CdeResult::Different;
 
     if (rText1 == rText2)
-        eRes = CDE_EQUAL;
+        eRes = CdeResult::Equal;
     else
     {   // similar = equal up to trailing '.' and hyphenation positions
         // marked with '=' and '[' + alternative spelling pattern + ']'
         if (getNormDicEntry_Impl( rText1 ) == getNormDicEntry_Impl( rText2 ))
-            eRes = CDE_SIMILAR;
+            eRes = CdeResult::Similar;
     }
 
     return eRes;
@@ -686,7 +686,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, weld::Entry&, 
rEdt, void)
         {
             bool bFound = false;
             bool bTmpSelEntry=false;
-            CDE_RESULT eCmpRes = CDE_DIFFERENT;
+            CdeResult eCmpRes = CdeResult::Different;
 
             bool bDoubleColumn = m_pWordsLB == m_xDoubleColumnLB.get();
 
@@ -694,7 +694,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, weld::Entry&, 
rEdt, void)
             {
                 OUString aTestStr(m_pWordsLB->get_text(i, 0));
                 eCmpRes = cmpDicEntry_Impl( rEntry, aTestStr );
-                if(CDE_DIFFERENT != eCmpRes)
+                if(CdeResult::Different != eCmpRes)
                 {
                     if(!aRepString.isEmpty())
                         bFirstSelect = true;
@@ -704,7 +704,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, weld::Entry&, 
rEdt, void)
                     if (bDoubleColumn)
                         m_xReplaceED->set_text(m_pWordsLB->get_text(i, 1));
 
-                    if (CDE_SIMILAR == eCmpRes)
+                    if (CdeResult::Similar == eCmpRes)
                     {
                         aNewReplaceText = sModify;
                         bEnableNewReplace = true;
@@ -732,7 +732,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, weld::Entry&, 
rEdt, void)
                 aNewReplaceText = sNew;
                 bEnableNewReplace = true;
             }
-            bEnableDelete = CDE_DIFFERENT != eCmpRes;
+            bEnableDelete = CdeResult::Different != eCmpRes;
         }
         else if (m_pWordsLB->n_children() > 0)
         {
@@ -755,8 +755,8 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, weld::Entry&, 
rEdt, void)
             bEnableDelete = true;
         }
         bool bIsChange =
-                CDE_EQUAL != cmpDicEntry_Impl(fixSpace(m_xWordED->get_text()), 
aWordText)
-             || CDE_EQUAL != 
cmpDicEntry_Impl(fixSpace(m_xReplaceED->get_text()), aReplaceText);
+                CdeResult::Equal != 
cmpDicEntry_Impl(fixSpace(m_xWordED->get_text()), aWordText)
+             || CdeResult::Equal != 
cmpDicEntry_Impl(fixSpace(m_xReplaceED->get_text()), aReplaceText);
         if (!fixSpace(m_xWordED->get_text()).isEmpty() && bIsChange)
             bEnableNewReplace = true;
     }

Reply via email to