[Libreoffice-commits] core.git: 2 commits - accessibility/source basctl/source cui/source dbaccess/source desktop/source include/svtools include/svx sc/source sd/source svtools/source svx/source sw/source

Noel Grandin noel at peralex.com
Fri Mar 18 10:47:27 UTC 2016


 accessibility/source/extended/accessiblelistbox.cxx      |    2 -
 accessibility/source/extended/accessiblelistboxentry.cxx |   18 +++++-----
 basctl/source/basicide/moduldl2.cxx                      |    6 +--
 cui/source/customize/cfg.cxx                             |   18 +++++-----
 cui/source/dialogs/hangulhanjadlg.cxx                    |    4 +-
 cui/source/dialogs/multipat.cxx                          |    8 ++--
 cui/source/dialogs/srchxtra.cxx                          |    2 -
 cui/source/options/certpath.cxx                          |   12 +++---
 cui/source/options/fontsubs.cxx                          |   22 +++++-------
 cui/source/options/optfltr.cxx                           |   27 +++++++--------
 cui/source/options/optjava.cxx                           |   10 ++---
 cui/source/options/optlingu.cxx                          |    4 +-
 cui/source/options/radiobtnbox.cxx                       |   10 ++---
 cui/source/tabpages/autocdlg.cxx                         |   23 ++++++------
 dbaccess/source/ui/control/marktree.cxx                  |   18 +++++-----
 dbaccess/source/ui/control/tabletree.cxx                 |    6 +--
 dbaccess/source/ui/dlg/tablespage.cxx                    |    6 +--
 dbaccess/source/ui/misc/WNameMatch.cxx                   |    6 +--
 desktop/source/deployment/gui/dp_gui_updatedialog.cxx    |   14 +++----
 include/svtools/svtabbx.hxx                              |    4 +-
 include/svtools/treelistbox.hxx                          |   14 +++----
 include/svx/checklbx.hxx                                 |    3 -
 sc/source/ui/cctrl/checklistmenu.cxx                     |   23 +++++-------
 sc/source/ui/miscdlgs/solveroptions.cxx                  |    4 +-
 sd/source/ui/dlg/dlgassim.cxx                            |   10 ++---
 svtools/source/contnr/svlbitm.cxx                        |   20 +++++------
 svtools/source/contnr/svtabbx.cxx                        |    4 +-
 svtools/source/contnr/treelistbox.cxx                    |   14 +++----
 svx/source/dialog/checklbx.cxx                           |   14 +++----
 sw/source/ui/config/optcomp.cxx                          |    2 -
 30 files changed, 159 insertions(+), 169 deletions(-)

New commits:
commit c91b103930f4f441ab333d6f3026d6c19d4b4d0f
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Mar 18 12:46:20 2016 +0200

    convert SvButtonState to scoped enum
    
    Change-Id: I601f9e2fe33e85cf3f7dc52ee20d68202bd2b09d

diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index 019c6b5..63c2b5d 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -87,7 +87,7 @@ namespace accessibility
                     uno::Any aValue;
                     aValue <<= AccessibleStateType::CHECKED;
 
-                    if ( getListBox()->GetCheckButtonState( pCurOpEntry->GetSvLBoxEntry() ) == SV_BUTTON_CHECKED )
+                    if ( getListBox()->GetCheckButtonState( pCurOpEntry->GetSvLBoxEntry() ) == SvButtonState::Checked )
                     {
                         pCurOpEntry->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, uno::Any(), aValue );
                     }
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 97d09a2..7efc72e 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -428,10 +428,10 @@ namespace accessibility
                 SvButtonState eState = pBox->GetCheckButtonState( pEntry );
                 switch( eState )
                 {
-                case SV_BUTTON_CHECKED:
-                case SV_BUTTON_UNCHECKED:
+                case SvButtonState::Checked:
+                case SvButtonState::Unchecked:
                     return AccessibleRole::CHECK_BOX;
-                case SV_BUTTON_TRISTATE:
+                case SvButtonState::Tristate:
                 default:
                     return AccessibleRole::LABEL;
                 }
@@ -786,10 +786,10 @@ namespace accessibility
             {
                 SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
                 SvButtonState state = getListBox()->GetCheckButtonState( pEntry );
-                if ( state == SV_BUTTON_CHECKED )
-                    getListBox()->SetCheckButtonState(pEntry, SV_BUTTON_UNCHECKED);
-                else if (state == SV_BUTTON_UNCHECKED)
-                    getListBox()->SetCheckButtonState(pEntry, SV_BUTTON_CHECKED);
+                if ( state == SvButtonState::Checked )
+                    getListBox()->SetCheckButtonState(pEntry, SvButtonState::Unchecked);
+                else if (state == SvButtonState::Unchecked)
+                    getListBox()->SetCheckButtonState(pEntry, SvButtonState::Checked);
             }
         }
         else if( (nIndex == 1 && (treeFlag & SvTreeFlags::CHKBTN) ) || (nIndex == 0) )
@@ -826,9 +826,9 @@ namespace accessibility
         {
             if(getAccessibleRole() == AccessibleRole::CHECK_BOX)
             {
-                if ( state == SV_BUTTON_CHECKED )
+                if ( state == SvButtonState::Checked )
                     return OUString(sActionDesc2);
-                else if (state == SV_BUTTON_UNCHECKED)
+                else if (state == SvButtonState::Unchecked)
                     return OUString(sActionDesc1);
             }
             else
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 58fda39..54b0a30 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -229,15 +229,15 @@ void CheckBox::CheckEntryPos( sal_uLong nPos )
     {
         SvTreeListEntry* pEntry = GetEntry( nPos );
 
-        if ( GetCheckButtonState( pEntry ) != SV_BUTTON_CHECKED )
-            SetCheckButtonState( pEntry, SvButtonState(SV_BUTTON_CHECKED) );
+        if ( GetCheckButtonState( pEntry ) != SvButtonState::Checked )
+            SetCheckButtonState( pEntry, SvButtonState::Checked );
     }
 }
 
 bool CheckBox::IsChecked( sal_uLong nPos ) const
 {
     if ( nPos < GetEntryCount() )
-        return GetCheckButtonState(GetEntry(nPos)) == SV_BUTTON_CHECKED;
+        return GetCheckButtonState(GetEntry(nPos)) == SvButtonState::Checked;
     return false;
 }
 
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index c8e5ba3..27f9b24 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3455,7 +3455,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo
 
                 m_pContentsListBox->SetCheckButtonState( pNewLBEntry,
                     pEntry->IsVisible() ?
-                        SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED );
+                        SvButtonState::Checked : SvButtonState::Unchecked );
 
                 m_pContentsListBox->Select( pNewLBEntry );
                 m_pContentsListBox->MakeVisible( pNewLBEntry );
@@ -3477,7 +3477,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo
 
             m_pContentsListBox->SetCheckButtonInvisible( pNewLBEntry );
             m_pContentsListBox->SetCheckButtonState(
-                pNewLBEntry, SV_BUTTON_TRISTATE );
+                pNewLBEntry, SvButtonState::Tristate );
 
             bNeedsApply = true;
             break;
@@ -3560,7 +3560,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo
 
                         m_pContentsListBox->SetCheckButtonState( pNewLBEntry,
                             pEntry->IsVisible() ?
-                                SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED );
+                                SvButtonState::Checked : SvButtonState::Unchecked );
 
                         m_pContentsListBox->Select( pNewLBEntry );
                         m_pContentsListBox->MakeVisible( pNewLBEntry );
@@ -3616,7 +3616,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo
 
                 m_pContentsListBox->SetCheckButtonState( pNewLBEntry,
                     pEntry->IsVisible() ?
-                        SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED );
+                        SvButtonState::Checked : SvButtonState::Unchecked );
 
                 m_pContentsListBox->Select( pNewLBEntry );
                 m_pContentsListBox->MakeVisible( pNewLBEntry );
@@ -4602,12 +4602,12 @@ IMPL_LINK_NOARG_TYPED( SvxToolbarConfigPage, SelectToolbar, ListBox&, void )
         if (pEntry->IsBinding())
         {
             m_pContentsListBox->SetCheckButtonState( pNewLBEntry,
-                pEntry->IsVisible() ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED );
+                pEntry->IsVisible() ? SvButtonState::Checked : SvButtonState::Unchecked );
         }
         else
         {
             m_pContentsListBox->SetCheckButtonState(
-                pNewLBEntry, SV_BUTTON_TRISTATE );
+                pNewLBEntry, SvButtonState::Tristate );
         }
     }
 
@@ -4709,12 +4709,12 @@ void SvxToolbarConfigPage::AddFunction(
     {
         pEntry->SetVisible( true );
         m_pContentsListBox->SetCheckButtonState(
-            pNewLBEntry, SV_BUTTON_CHECKED );
+            pNewLBEntry, SvButtonState::Checked );
     }
     else
     {
         m_pContentsListBox->SetCheckButtonState(
-            pNewLBEntry, SV_BUTTON_TRISTATE );
+            pNewLBEntry, SvButtonState::Tristate );
     }
 
     // get currently selected toolbar and apply change
@@ -4837,7 +4837,7 @@ void SvxToolbarEntriesListBox::ChangeVisibility( SvTreeListEntry* pEntry )
                pToolbarSaveInData->ApplyToolbar( pToolbar );
 
             SetCheckButtonState( pEntry, pEntryData->IsVisible() ?
-                SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED );
+                SvButtonState::Checked : SvButtonState::Unchecked );
         }
     }
 }
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 8bd4398..a073dfa 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -984,7 +984,7 @@ namespace svx
             DBG_ASSERT( xDict.is(), "-HangulHanjaOptionsDialog::OkHdl(): someone is evaporated..." );
             DBG_ASSERT( pEntry, "-HangulHanjaOptionsDialog::OkHdl(): no one there in list?" );
 
-            bool    bActive = m_pDictsLB->GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED;
+            bool    bActive = m_pDictsLB->GetCheckButtonState( pEntry ) == SvButtonState::Checked;
             xDict->setActive( bActive );
             Reference< util::XFlushable > xFlush( xDict, uno::UNO_QUERY );
             if( xFlush.is() )
@@ -1180,7 +1180,7 @@ namespace svx
     void HangulHanjaOptionsDialog::AddDict( const OUString& _rName, bool _bChecked )
     {
         SvTreeListEntry*    pEntry = m_pDictsLB->SvTreeListBox::InsertEntry( _rName );
-        m_pDictsLB->SetCheckButtonState( pEntry, _bChecked? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED );
+        m_pDictsLB->SetCheckButtonState( pEntry, _bChecked? SvButtonState::Checked : SvButtonState::Unchecked );
         pEntry->SetUserData( new OUString( _rName ) );
     }
 
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index ce065a3..3962413 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -132,7 +132,7 @@ IMPL_LINK_NOARG_TYPED(SvxMultiPathDialog, DelHdl_Impl, Button*, void)
 {
     SvTreeListEntry* pEntry = m_pRadioLB->FirstSelected();
     delete static_cast<OUString*>(pEntry->GetUserData());
-    bool bChecked = m_pRadioLB->GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED;
+    bool bChecked = m_pRadioLB->GetCheckButtonState( pEntry ) == SvButtonState::Checked;
     sal_uLong nPos = m_pRadioLB->GetEntryPos( pEntry );
     m_pRadioLB->RemoveEntry( pEntry );
     sal_uLong nCnt = m_pRadioLB->GetEntryCount();
@@ -144,7 +144,7 @@ IMPL_LINK_NOARG_TYPED(SvxMultiPathDialog, DelHdl_Impl, Button*, void)
         pEntry = m_pRadioLB->GetEntry( nPos );
         if ( bChecked )
         {
-            m_pRadioLB->SetCheckButtonState( pEntry, SV_BUTTON_CHECKED );
+            m_pRadioLB->SetCheckButtonState( pEntry, SvButtonState::Checked );
             m_pRadioLB->HandleEntryChecked( pEntry );
         }
         else
@@ -269,7 +269,7 @@ OUString SvxMultiPathDialog::GetPath() const
     for ( sal_uLong i = 0; i < m_pRadioLB->GetEntryCount(); ++i )
     {
         SvTreeListEntry* pEntry = m_pRadioLB->GetEntry(i);
-        if ( m_pRadioLB->GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED )
+        if ( m_pRadioLB->GetCheckButtonState( pEntry ) == SvButtonState::Checked )
             sWritable = *static_cast<OUString*>(pEntry->GetUserData());
         else
         {
@@ -325,7 +325,7 @@ void SvxMultiPathDialog::SetPath( const OUString& rPath )
         SvTreeListEntry* pEntry = m_pRadioLB->GetEntry( nCount - 1 );
         if ( pEntry )
         {
-            m_pRadioLB->SetCheckButtonState( pEntry, SV_BUTTON_CHECKED );
+            m_pRadioLB->SetCheckButtonState( pEntry, SvButtonState::Checked );
             m_pRadioLB->HandleEntryChecked( pEntry );
         }
     }
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index b8ae3ff..5a12ed5 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -169,7 +169,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog(vcl::Window* pParent,
 
             if ( pEntry )
             {
-                m_pAttrLB->SetCheckButtonState( pEntry, bChecked ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED );
+                m_pAttrLB->SetCheckButtonState( pEntry, bChecked ? SvButtonState::Checked : SvButtonState::Unchecked );
                 pEntry->SetUserData( reinterpret_cast<void*>(nSlot) );
             }
         }
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index dc6bfc4..d87807c 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -93,7 +93,7 @@ CertPathDialog::CertPathDialog(vcl::Window* pParent)
     SvTreeListEntry *pEntry = m_pCertPathList->GetEntry(0);
     if (pEntry)
     {
-        m_pCertPathList->SetCheckButtonState(pEntry, SV_BUTTON_CHECKED);
+        m_pCertPathList->SetCheckButtonState(pEntry, SvButtonState::Checked);
         HandleCheckEntry(pEntry);
     }
 
@@ -174,19 +174,19 @@ void CertPathDialog::HandleCheckEntry( SvTreeListEntry* _pEntry )
     m_pCertPathList->Select( _pEntry );
     SvButtonState eState = m_pCertPathList->GetCheckButtonState( _pEntry );
 
-    if (SV_BUTTON_CHECKED == eState)
+    if (SvButtonState::Checked == eState)
     {
         // uncheck the other entries
         SvTreeListEntry* pEntry = m_pCertPathList->First();
         while (pEntry)
         {
             if (pEntry != _pEntry)
-                m_pCertPathList->SetCheckButtonState(pEntry, SV_BUTTON_UNCHECKED);
+                m_pCertPathList->SetCheckButtonState(pEntry, SvButtonState::Unchecked);
             pEntry = m_pCertPathList->Next(pEntry);
         }
     }
     else
-        m_pCertPathList->SetCheckButtonState(_pEntry, SV_BUTTON_CHECKED);
+        m_pCertPathList->SetCheckButtonState(_pEntry, SvButtonState::Checked);
 }
 
 void CertPathDialog::AddCertPath(const OUString &rProfile, const OUString &rPath)
@@ -198,7 +198,7 @@ void CertPathDialog::AddCertPath(const OUString &rProfile, const OUString &rPath
         //already exists, just select the original one
         if (pCertPath->equals(rPath))
         {
-            m_pCertPathList->SetCheckButtonState(pEntry, SV_BUTTON_CHECKED);
+            m_pCertPathList->SetCheckButtonState(pEntry, SvButtonState::Checked);
             HandleCheckEntry(pEntry);
             return;
         }
@@ -210,7 +210,7 @@ void CertPathDialog::AddCertPath(const OUString &rProfile, const OUString &rPath
     pEntry = m_pCertPathList->InsertEntry(sEntry.makeStringAndClear());
     OUString* pCertPath = new OUString(rPath);
     pEntry->SetUserData(pCertPath);
-    m_pCertPathList->SetCheckButtonState(pEntry, SV_BUTTON_CHECKED);
+    m_pCertPathList->SetCheckButtonState(pEntry, SvButtonState::Checked);
     HandleCheckEntry(pEntry);
 }
 
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 80b11f4d..6423568 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -488,8 +488,7 @@ void SvxFontSubstCheckListBox::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, bo
         SetCheckButtonState(
             GetEntry(nPos),
             nCol,
-            bChecked ? SvButtonState( SV_BUTTON_CHECKED ) :
-                                       SvButtonState( SV_BUTTON_UNCHECKED ) );
+            bChecked ? SvButtonState::Checked : SvButtonState::Unchecked );
 }
 
 void SvxFontSubstCheckListBox::CheckEntry(SvTreeListEntry* pEntry, sal_uInt16 nCol, bool bChecked)
@@ -498,18 +497,17 @@ void SvxFontSubstCheckListBox::CheckEntry(SvTreeListEntry* pEntry, sal_uInt16 nC
         SetCheckButtonState(
             pEntry,
             nCol,
-            bChecked ? SvButtonState( SV_BUTTON_CHECKED ) :
-                                       SvButtonState( SV_BUTTON_UNCHECKED ) );
+            bChecked ? SvButtonState::Checked : SvButtonState::Unchecked );
 }
 
 bool SvxFontSubstCheckListBox::IsChecked(sal_uLong nPos, sal_uInt16 nCol)
 {
-    return GetCheckButtonState( GetEntry(nPos), nCol ) == SV_BUTTON_CHECKED;
+    return GetCheckButtonState( GetEntry(nPos), nCol ) == SvButtonState::Checked;
 }
 
 bool SvxFontSubstCheckListBox::IsChecked(SvTreeListEntry* pEntry, sal_uInt16 nCol)
 {
-    return GetCheckButtonState( pEntry, nCol ) == SV_BUTTON_CHECKED;
+    return GetCheckButtonState( pEntry, nCol ) == SvButtonState::Checked;
 }
 
 void SvxFontSubstCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal_uInt16 nCol, SvButtonState eState)
@@ -520,15 +518,15 @@ void SvxFontSubstCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal
     {
         switch( eState )
         {
-            case SV_BUTTON_CHECKED:
+            case SvButtonState::Checked:
                 rItem.SetStateChecked();
                 break;
 
-            case SV_BUTTON_UNCHECKED:
+            case SvButtonState::Unchecked:
                 rItem.SetStateUnchecked();
                 break;
 
-            case SV_BUTTON_TRISTATE:
+            case SvButtonState::Tristate:
                 rItem.SetStateTristate();
                 break;
         }
@@ -538,7 +536,7 @@ void SvxFontSubstCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal
 
 SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvTreeListEntry* pEntry, sal_uInt16 nCol )
 {
-    SvButtonState eState = SV_BUTTON_UNCHECKED;
+    SvButtonState eState = SvButtonState::Unchecked;
     SvLBoxButton& rItem = static_cast<SvLBoxButton&>(pEntry->GetItem(nCol + 1));
 
     if (rItem.GetType() == SV_ITEM_ID_LBOXBUTTON)
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 5280ae3..937eed4 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -238,7 +238,7 @@ bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet* )
             if (rItem.GetType() == SV_ITEM_ID_LBOXBUTTON)
             {
                 SvItemStateFlags nButtonFlags = rItem.GetButtonFlags();
-                bCheck = SV_BUTTON_CHECKED ==
+                bCheck = SvButtonState::Checked ==
                         SvLBoxButtonData::ConvertToButtonState( nButtonFlags );
 
                 if( bCheck != (rOpt.*pArr->FnIs)() )
@@ -397,15 +397,15 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::SetCheckButtonState(
     {
         switch( eState )
         {
-            case SV_BUTTON_CHECKED:
+            case SvButtonState::Checked:
                 rItem.SetStateChecked();
                 break;
 
-            case SV_BUTTON_UNCHECKED:
+            case SvButtonState::Unchecked:
                 rItem.SetStateUnchecked();
                 break;
 
-            case SV_BUTTON_TRISTATE:
+            case SvButtonState::Tristate:
                 rItem.SetStateTristate();
                 break;
         }
@@ -416,7 +416,7 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::SetCheckButtonState(
 SvButtonState OfaMSFilterTabPage2::MSFltrSimpleTable::GetCheckButtonState(
                                     SvTreeListEntry* pEntry, sal_uInt16 nCol )
 {
-    SvButtonState eState = SV_BUTTON_UNCHECKED;
+    SvButtonState eState = SvButtonState::Unchecked;
     SvLBoxButton& rItem = static_cast<SvLBoxButton&>(pEntry->GetItem(nCol + 1));
 
     if (rItem.GetType() == SV_ITEM_ID_LBOXBUTTON)
@@ -434,8 +434,7 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::CheckEntryPos(sal_uLong nPos, sal_u
         SetCheckButtonState(
             GetEntry(nPos),
             nCol,
-            bChecked ? SvButtonState( SV_BUTTON_CHECKED ) :
-                                       SvButtonState( SV_BUTTON_UNCHECKED ) );
+            bChecked ? SvButtonState::Checked : SvButtonState::Unchecked );
 }
 
 void OfaMSFilterTabPage2::MSFltrSimpleTable::KeyInput( const KeyEvent& rKEvt )
@@ -448,14 +447,14 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::KeyInput( const KeyEvent& rKEvt )
         if ( nCol < 2 )
         {
             SvTreeListEntry* pEntry = GetEntry( nSelPos );
-            bool bIsChecked = ( GetCheckButtonState( pEntry, nCol ) == SV_BUTTON_CHECKED );
+            bool bIsChecked = ( GetCheckButtonState( pEntry, nCol ) == SvButtonState::Checked );
             CheckEntryPos( nSelPos, nCol, !bIsChecked );
             CallImplEventListeners( VCLEVENT_CHECKBOX_TOGGLE, static_cast<void*>(pEntry) );
         }
         else
         {
-            sal_uInt16 nCheck = GetCheckButtonState( GetEntry(nSelPos), 1 ) == SV_BUTTON_CHECKED ? 1 : 0;
-            if(GetCheckButtonState( GetEntry(nSelPos), 0 ))
+            sal_uInt16 nCheck = GetCheckButtonState( GetEntry(nSelPos), 1 ) == SvButtonState::Checked ? 1 : 0;
+            if(GetCheckButtonState( GetEntry(nSelPos), 0 ) != SvButtonState::Unchecked)
                 nCheck += 2;
             nCheck--;
             nCheck &= 3;
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index fadea88..6ab367a 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -542,19 +542,19 @@ void SvxJavaOptionsPage::HandleCheckEntry( SvTreeListEntry* _pEntry )
     m_pJavaList->Select( _pEntry );
     SvButtonState eState = m_pJavaList->GetCheckButtonState( _pEntry );
 
-    if ( SV_BUTTON_CHECKED == eState )
+    if ( SvButtonState::Checked == eState )
     {
         // we have radio button behavior -> so uncheck the other entries
         SvTreeListEntry* pEntry = m_pJavaList->First();
         while ( pEntry )
         {
             if ( pEntry != _pEntry )
-                m_pJavaList->SetCheckButtonState( pEntry, SV_BUTTON_UNCHECKED );
+                m_pJavaList->SetCheckButtonState( pEntry, SvButtonState::Unchecked );
             pEntry = m_pJavaList->Next( pEntry );
         }
     }
     else
-        m_pJavaList->SetCheckButtonState( _pEntry, SV_BUTTON_CHECKED );
+        m_pJavaList->SetCheckButtonState( _pEntry, SvButtonState::Checked );
 }
 
 
@@ -606,7 +606,7 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder )
 
         SvTreeListEntry* pEntry = m_pJavaList->GetEntry( nPos );
         m_pJavaList->Select( pEntry );
-        m_pJavaList->SetCheckButtonState( pEntry, SV_BUTTON_CHECKED );
+        m_pJavaList->SetCheckButtonState( pEntry, SvButtonState::Checked );
         HandleCheckEntry( pEntry );
         bStartAgain = false;
     }
@@ -691,7 +691,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ )
     sal_uLong nCount = m_pJavaList->GetEntryCount();
     for ( sal_uLong i = 0; i < nCount; ++i )
     {
-        if ( m_pJavaList->GetCheckButtonState( m_pJavaList->GetEntry(i) ) == SV_BUTTON_CHECKED )
+        if ( m_pJavaList->GetCheckButtonState( m_pJavaList->GetEntry(i) ) == SvButtonState::Checked )
         {
             JavaInfo* pInfo = nullptr;
             if ( i < static_cast< sal_uLong >( m_nInfoSize ) )
diff --git a/cui/source/options/radiobtnbox.cxx b/cui/source/options/radiobtnbox.cxx
index bf14d77..02a5c04 100644
--- a/cui/source/options/radiobtnbox.cxx
+++ b/cui/source/options/radiobtnbox.cxx
@@ -49,9 +49,9 @@ void SvxRadioButtonListBox::KeyInput( const KeyEvent& rKEvt )
     if ( !rKEvt.GetKeyCode().GetModifier() && KEY_SPACE == rKEvt.GetKeyCode().GetCode() )
     {
         SvTreeListEntry* pEntry = FirstSelected();
-        if ( GetCheckButtonState( pEntry ) == SV_BUTTON_UNCHECKED )
+        if ( GetCheckButtonState( pEntry ) == SvButtonState::Unchecked )
         {
-            SetCheckButtonState( pEntry, SV_BUTTON_CHECKED );
+            SetCheckButtonState( pEntry, SvButtonState::Checked );
             GetCheckButtonHdl().Call( nullptr );
             return ;
         }
@@ -65,19 +65,19 @@ void SvxRadioButtonListBox::HandleEntryChecked( SvTreeListEntry* _pEntry )
     Select( _pEntry );
     SvButtonState eState = GetCheckButtonState( _pEntry );
 
-    if ( SV_BUTTON_CHECKED == eState )
+    if ( SvButtonState::Checked == eState )
     {
         // we have radio button behavior -> so uncheck the other entries
         SvTreeListEntry* pEntry = First();
         while ( pEntry )
         {
             if ( pEntry != _pEntry )
-                SetCheckButtonState( pEntry, SV_BUTTON_UNCHECKED );
+                SetCheckButtonState( pEntry, SvButtonState::Unchecked );
             pEntry = Next( pEntry );
         }
     }
     else
-        SetCheckButtonState( _pEntry, SV_BUTTON_CHECKED );
+        SetCheckButtonState( _pEntry, SvButtonState::Checked );
 }
 
 
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 543341a..3122aae 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -785,13 +785,12 @@ void OfaACorrCheckListBox::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, bool b
         SetCheckButtonState(
             GetEntry(nPos),
             nCol,
-            bChecked ? SvButtonState( SV_BUTTON_CHECKED ) :
-                                       SvButtonState( SV_BUTTON_UNCHECKED ) );
+            bChecked ? SvButtonState::Checked : SvButtonState::Unchecked );
 }
 
 bool OfaACorrCheckListBox::IsChecked(sal_uLong nPos, sal_uInt16 nCol)
 {
-    return GetCheckButtonState( GetEntry(nPos), nCol ) == SV_BUTTON_CHECKED;
+    return GetCheckButtonState( GetEntry(nPos), nCol ) == SvButtonState::Checked;
 }
 
 void OfaACorrCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal_uInt16 nCol, SvButtonState eState)
@@ -802,15 +801,15 @@ void OfaACorrCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal_uIn
     {
         switch( eState )
         {
-            case SV_BUTTON_CHECKED:
+            case SvButtonState::Checked:
                 rItem.SetStateChecked();
                 break;
 
-            case SV_BUTTON_UNCHECKED:
+            case SvButtonState::Unchecked:
                 rItem.SetStateUnchecked();
                 break;
 
-            case SV_BUTTON_TRISTATE:
+            case SvButtonState::Tristate:
                 rItem.SetStateTristate();
                 break;
         }
@@ -820,7 +819,7 @@ void OfaACorrCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal_uIn
 
 SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvTreeListEntry* pEntry, sal_uInt16 nCol )
 {
-    SvButtonState eState = SV_BUTTON_UNCHECKED;
+    SvButtonState eState = SvButtonState::Unchecked;
     SvLBoxButton& rItem = static_cast<SvLBoxButton&>(pEntry->GetItem(nCol + 1));
 
     if (rItem.GetType() == SV_ITEM_ID_LBOXBUTTON)
@@ -2580,7 +2579,7 @@ void OfaSmartTagOptionsTabPage::FillListBox( const SmartTagMgr& rSmartTagMgr )
             if ( pEntry )
             {
                 const bool bCheck = rSmartTagMgr.IsSmartTagTypeEnabled( aSmartTagType );
-                m_pSmartTagTypesLB->SetCheckButtonState( pEntry, bCheck ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED );
+                m_pSmartTagTypesLB->SetCheckButtonState( pEntry, bCheck ? SvButtonState::Checked : SvButtonState::Unchecked );
                 pEntry->SetUserData(static_cast<void*>(new ImplSmartTagLBUserData( aSmartTagType, xRec, j ) ) );
             }
         }
diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx
index 9484b29..9bcd358 100644
--- a/dbaccess/source/ui/control/marktree.cxx
+++ b/dbaccess/source/ui/control/marktree.cxx
@@ -79,10 +79,10 @@ void OMarkableTreeListBox::KeyInput( const KeyEvent& rKEvt )
         if(pCurrentHandlerEntry)
         {
             SvButtonState eState = GetCheckButtonState( pCurrentHandlerEntry);
-            if(eState == SV_BUTTON_CHECKED)
-                SetCheckButtonState( pCurrentHandlerEntry, SV_BUTTON_UNCHECKED);
+            if(eState == SvButtonState::Checked)
+                SetCheckButtonState( pCurrentHandlerEntry, SvButtonState::Unchecked);
             else
-                SetCheckButtonState( pCurrentHandlerEntry, SV_BUTTON_CHECKED);
+                SetCheckButtonState( pCurrentHandlerEntry, SvButtonState::Checked);
 
             CheckButtonHdl();
         }
@@ -108,10 +108,10 @@ SvButtonState OMarkableTreeListBox::implDetermineState(SvTreeListEntry* _pEntry)
     while (pChildLoop)
     {
         SvButtonState eChildState = implDetermineState(pChildLoop);
-        if (SV_BUTTON_TRISTATE == eChildState)
+        if (SvButtonState::Tristate == eChildState)
             break;
 
-        if (SV_BUTTON_CHECKED == eChildState)
+        if (SvButtonState::Checked == eChildState)
             ++nCheckedChildren;
         ++nChildrenOverall;
 
@@ -121,7 +121,7 @@ SvButtonState OMarkableTreeListBox::implDetermineState(SvTreeListEntry* _pEntry)
     if (pChildLoop)
     {
         // we did not finish the loop because at least one of the children is in tristate
-        eState = SV_BUTTON_TRISTATE;
+        eState = SvButtonState::Tristate;
 
         // but this means that we did not finish all the siblings of pChildLoop,
         // so their checking may be incorrect at the moment
@@ -138,13 +138,13 @@ SvButtonState OMarkableTreeListBox::implDetermineState(SvTreeListEntry* _pEntry)
             // we have at least one child checked
             if (nCheckedChildren != nChildrenOverall)
                 // not all children are checked
-                eState = SV_BUTTON_TRISTATE;
+                eState = SvButtonState::Tristate;
             else
                 // all children are checked
-                eState = SV_BUTTON_CHECKED;
+                eState = SvButtonState::Checked;
         else
             // no children are checked
-            eState = SV_BUTTON_UNCHECKED;
+            eState = SvButtonState::Unchecked;
 
     // finally set the entry to the state we just determined
     SetCheckButtonState(_pEntry, eState);
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 18887de..10dde93 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -339,7 +339,7 @@ bool OTableTreeListBox::isWildcardChecked(SvTreeListEntry* _pEntry)
 
 void OTableTreeListBox::checkWildcard(SvTreeListEntry* _pEntry)
 {
-    SetCheckButtonState(_pEntry, SV_BUTTON_CHECKED);
+    SetCheckButtonState(_pEntry, SvButtonState::Checked);
     checkedButton_noBroadcast(_pEntry);
 }
 
@@ -357,8 +357,8 @@ void OTableTreeListBox::checkedButton_noBroadcast(SvTreeListEntry* _pEntry)
     // So we track explicit (un)checking
 
     SvButtonState eState = GetCheckButtonState(_pEntry);
-    OSL_ENSURE(SV_BUTTON_TRISTATE != eState, "OTableTreeListBox::CheckButtonHdl: user action which lead to TRISTATE?");
-    implEmphasize(_pEntry, SV_BUTTON_CHECKED == eState);
+    OSL_ENSURE(SvButtonState::Tristate != eState, "OTableTreeListBox::CheckButtonHdl: user action which lead to TRISTATE?");
+    implEmphasize(_pEntry, SvButtonState::Checked == eState);
 }
 
 void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, bool _bChecked, bool _bUpdateDescendants, bool _bUpdateAncestors)
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index eae9b04..7c1686c 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -197,7 +197,7 @@ namespace dbaui
 
             SvTreeListEntry* pEntry = m_pTablesList->GetEntryPosByName(sName, pSchema ? pSchema : (pCatalog ? pCatalog : pRootEntry) );
             if (pEntry)
-                m_pTablesList->SetCheckButtonState(pEntry, SV_BUTTON_CHECKED);
+                m_pTablesList->SetCheckButtonState(pEntry, SvButtonState::Checked);
         }
         m_pTablesList->CheckButtons();
     }
@@ -372,7 +372,7 @@ namespace dbaui
 
     void OTableSubscriptionPage::CheckAll( bool _bCheck )
     {
-        SvButtonState eState = _bCheck ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED;
+        SvButtonState eState = _bCheck ? SvButtonState::Checked : SvButtonState::Unchecked;
         SvTreeListEntry* pEntry = m_pTablesList->First();
         while (pEntry)
         {
@@ -455,7 +455,7 @@ namespace dbaui
             SvTreeListEntry* pSchema = nullptr;
             SvTreeListEntry* pCatalog = nullptr;
 
-            if (m_pTablesList->GetCheckButtonState(pEntry) == SV_BUTTON_CHECKED && !m_pTablesList->GetModel()->HasChildren(pEntry))
+            if (m_pTablesList->GetCheckButtonState(pEntry) == SvButtonState::Checked && !m_pTablesList->GetModel()->HasChildren(pEntry))
             {   // checked and a leaf, which means it's no catalog, no schema, but a real table
                 OUString sCatalog;
                 if(m_pTablesList->GetModel()->HasParent(pEntry))
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index a8c5fea..5d8fe30 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -160,7 +160,7 @@ bool OWizNameMatching::LeavePage()
             ;
         const sal_Int32 nPos = ::std::distance(rSrcColumns.begin(),aSrcIter);
 
-        if(m_pCTRL_LEFT->GetCheckButtonState(pLeftEntry) == SV_BUTTON_CHECKED)
+        if(m_pCTRL_LEFT->GetCheckButtonState(pLeftEntry) == SvButtonState::Checked)
         {
             OFieldDescription* pDestField = static_cast<OFieldDescription*>(pRightEntry->GetUserData());
             OSL_ENSURE(pDestField,"OWizNameMatching: OColumn can not be null!");
@@ -324,7 +324,7 @@ IMPL_LINK_TYPED( OWizNameMatching, AllNoneClickHdl, Button *, pButton, void )
     SvTreeListEntry* pEntry = m_pCTRL_LEFT->First();
     while(pEntry)
     {
-        m_pCTRL_LEFT->SetCheckButtonState( pEntry, bAll ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED);
+        m_pCTRL_LEFT->SetCheckButtonState( pEntry, bAll ? SvButtonState::Checked : SvButtonState::Unchecked);
         pEntry = m_pCTRL_LEFT->Next(pEntry);
     }
 }
@@ -397,7 +397,7 @@ void OColumnTreeBox::FillListBox( const ODatabaseExport::TColumnVector& _rList)
     for(;aIter != aEnd;++aIter)
     {
         SvTreeListEntry* pEntry = InsertEntry((*aIter)->first, nullptr, false, TREELIST_APPEND, (*aIter)->second);
-        SvButtonState eState = !(m_bReadOnly && (*aIter)->second->IsAutoIncrement()) ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED;
+        SvButtonState eState = !(m_bReadOnly && (*aIter)->second->IsAutoIncrement()) ? SvButtonState::Checked : SvButtonState::Unchecked;
         SetCheckButtonState( pEntry, eState );
     }
 }
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index a161d61..8375dbd 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -66,7 +66,7 @@ enum class SvLBoxButtonKind
     StaticImage
 };
 
-enum SvButtonState { SV_BUTTON_UNCHECKED, SV_BUTTON_CHECKED, SV_BUTTON_TRISTATE };
+enum class SvButtonState { Unchecked, Checked, Tristate };
 
 // *********************************************************************
 // *************************** Tabulators ******************************
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index e8a1ad3..88d4669 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1261,7 +1261,7 @@ IMPL_LINK_TYPED( ScCheckListMenuWindow, CheckHdl, SvTreeListBox*, pChecks, void
         return;
     SvTreeListEntry* pEntry = pChecks->GetHdlEntry();
     if ( pEntry )
-        maChecks->CheckEntry( pEntry,  ( pChecks->GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) );
+        maChecks->CheckEntry( pEntry,  ( pChecks->GetCheckButtonState( pEntry ) == SvButtonState::Checked ) );
     size_t nNumChecked = maChecks->GetCheckedEntryCount();
     if (nNumChecked == maMembers.size())
         // all members visible
@@ -1573,7 +1573,7 @@ void ScCheckListBox::Init()
 bool ScCheckListBox::IsChecked( const OUString& sName, SvTreeListEntry* pParent )
 {
     SvTreeListEntry* pEntry = FindEntry( pParent, sName );
-    if ( pEntry && GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED)
+    if ( pEntry && GetCheckButtonState( pEntry ) == SvButtonState::Checked)
         return true;
     return false;
 }
@@ -1591,8 +1591,7 @@ void ScCheckListBox::CheckAllChildren( SvTreeListEntry* pParent, bool bCheck )
     if ( pParent )
     {
         SetCheckButtonState(
-            pParent, bCheck ? SvButtonState( SV_BUTTON_CHECKED ) :
-                                           SvButtonState( SV_BUTTON_UNCHECKED ) );
+            pParent, bCheck ? SvButtonState::Checked : SvButtonState::Unchecked );
     }
     SvTreeListEntry* pEntry = pParent ? FirstChild( pParent ) : First();
     while ( pEntry )
@@ -1621,16 +1620,14 @@ void ScCheckListBox::CheckEntry( SvTreeListEntry* pParent, bool bCheck )
 
             while ( pChild )
             {
-                if ( GetCheckButtonState( pChild ) == SV_BUTTON_CHECKED )
+                if ( GetCheckButtonState( pChild ) == SvButtonState::Checked )
                 {
                     bChildChecked = true;
                     break;
                 }
                 pChild = NextSibling( pChild );
             }
-            SetCheckButtonState(
-                pAncestor, bChildChecked ? SvButtonState( SV_BUTTON_CHECKED ) :
-                                           SvButtonState( SV_BUTTON_UNCHECKED ) );
+            SetCheckButtonState( pAncestor, bChildChecked ? SvButtonState::Checked : SvButtonState::Unchecked );
             pAncestor = GetParent(pAncestor);
         }
     }
@@ -1647,7 +1644,7 @@ void ScCheckListBox::ShowCheckEntry( const OUString& sName, SvTreeListEntry* pPa
                 sName);
 
             SetCheckButtonState(
-                pEntry, bCheck ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED);
+                pEntry, bCheck ? SvButtonState::Checked : SvButtonState::Unchecked);
         }
         else
             CheckEntry( pEntry, bCheck );
@@ -1658,7 +1655,7 @@ void ScCheckListBox::ShowCheckEntry( const OUString& sName, SvTreeListEntry* pPa
 
 void ScCheckListBox::CountCheckedEntries( SvTreeListEntry* pParent, sal_uLong& nCount ) const
 {
-    if ( pParent && GetCheckButtonState( pParent ) == SV_BUTTON_CHECKED  )
+    if ( pParent && GetCheckButtonState( pParent ) == SvButtonState::Checked  )
         nCount++;
     // Iterate over the children
     SvTreeListEntry* pEntry = pParent ? FirstChild( pParent ) : First();
@@ -1698,9 +1695,9 @@ void ScCheckListBox::KeyInput( const KeyEvent& rKEvt )
         SvTreeListEntry* pEntry = GetCurEntry();
         if ( pEntry )
         {
-            bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
+            bool bCheck = ( GetCheckButtonState( pEntry ) == SvButtonState::Checked );
             CheckEntry( pEntry, !bCheck );
-            if ( bCheck != ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) )
+            if ( bCheck != ( GetCheckButtonState( pEntry ) == SvButtonState::Checked ) )
                 CheckButtonHdl();
         }
     }
@@ -1762,7 +1759,7 @@ void ScCheckListMenuWindow::initMembers()
                 aLabel);
 
             maChecks->SetCheckButtonState(
-                pEntry, maMembers[i].mbVisible ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED);
+                pEntry, maMembers[i].mbVisible ? SvButtonState::Checked : SvButtonState::Unchecked);
         }
 
         if (maMembers[i].mbVisible)
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 571e146..b222be3 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -204,7 +204,7 @@ const uno::Sequence<beans::PropertyValue>& ScSolverOptionsDialog::GetProperties(
             }
             if ( !bHasData )
                 ScUnoHelpFunctions::SetBoolInAny( rValue,
-                                    m_pLbSettings->GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
+                                    m_pLbSettings->GetCheckButtonState( pEntry ) == SvButtonState::Checked );
         }
     }
     else
diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx
index a446f85..7dc8d97 100644
--- a/sd/source/ui/dlg/dlgassim.cxx
+++ b/sd/source/ui/dlg/dlgassim.cxx
@@ -66,13 +66,13 @@ IMPL_LINK_NOARG_TYPED(SdPageListControl, CheckButtonClickHdl, SvTreeListBox*, vo
 
     while( pEntry )
     {
-        if(pTreeModel->IsAtRootDepth(pEntry) && GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED )
+        if(pTreeModel->IsAtRootDepth(pEntry) && GetCheckButtonState( pEntry ) == SvButtonState::Checked )
             return;
         pEntry = pTreeModel->Next( pEntry );
     }
 
     pEntry = pTreeModel->First();
-    SetCheckButtonState( pEntry, SV_BUTTON_CHECKED );
+    SetCheckButtonState( pEntry, SvButtonState::Checked );
 }
 
 SdPageListControl::~SdPageListControl()
@@ -125,7 +125,7 @@ void SdPageListControl::Fill( SdDrawDocument* pDoc )
         if( pPage->GetPageKind() == PK_STANDARD )
         {
             SvTreeListEntry* pEntry = InsertPage( pPage->GetName() );
-            SetCheckButtonState(pEntry, SvButtonState( SV_BUTTON_CHECKED ) );
+            SetCheckButtonState(pEntry, SvButtonState( SvButtonState::Checked ) );
 
             SdrTextObj* pTO = static_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TEXT));
             if(!pTO)
@@ -199,7 +199,7 @@ sal_uInt16 SdPageListControl::GetSelectedPage()
 bool SdPageListControl::IsPageChecked( sal_uInt16 nPage )
 {
     SvTreeListEntry* pEntry = GetModel()->GetEntry(nPage);
-    return pEntry && (GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED);
+    return pEntry && (GetCheckButtonState( pEntry ) == SvButtonState::Checked);
 }
 
 void SdPageListControl::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx
index 787bfd0..ccc86ca 100644
--- a/svtools/source/contnr/svlbitm.cxx
+++ b/svtools/source/contnr/svlbitm.cxx
@@ -42,7 +42,7 @@ void SvLBoxButtonData::InitData( bool _bRadioBtn, const Control* pCtrl )
     aBmps.resize((int)SvBmp::STATICIMAGE+1);
 
     bDataOk = false;
-    eState = SV_BUTTON_UNCHECKED;
+    eState = SvButtonState::Unchecked;
     pImpl->bDefaultImages = true;
     pImpl->bShowRadioButton = _bRadioBtn;
 
@@ -113,13 +113,13 @@ SvButtonState SvLBoxButtonData::ConvertToButtonState( SvItemStateFlags nItemFlag
     switch( nItemFlags )
     {
         case SvItemStateFlags::UNCHECKED:
-            return SV_BUTTON_UNCHECKED;
+            return SvButtonState::Unchecked;
         case SvItemStateFlags::CHECKED:
-            return SV_BUTTON_CHECKED;
+            return SvButtonState::Checked;
         case SvItemStateFlags::TRISTATE:
-            return SV_BUTTON_TRISTATE;
+            return SvButtonState::Tristate;
         default:
-            return SV_BUTTON_UNCHECKED;
+            return SvButtonState::Unchecked;
     }
 }
 
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index cb35cfa..f3a9d92 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -543,7 +543,7 @@ void SvHeaderTabListBox::InitHeaderBar( HeaderBar* pHeaderBar )
 
 bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol )
 {
-    SvButtonState eState = SV_BUTTON_UNCHECKED;
+    SvButtonState eState = SvButtonState::Unchecked;
     SvLBoxButton& rItem = static_cast<SvLBoxButton&>( pEntry->GetItem( nCol + 1 ) );
 
     if (rItem.GetType() == SV_ITEM_ID_LBOXBUTTON)
@@ -552,7 +552,7 @@ bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol
         eState = SvLBoxButtonData::ConvertToButtonState( nButtonFlags );
     }
 
-    return ( eState == SV_BUTTON_CHECKED );
+    return ( eState == SvButtonState::Checked );
 }
 
 SvTreeListEntry* SvHeaderTabListBox::InsertEntryToColumn(
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index f0bec8a..821e2e5 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1921,15 +1921,15 @@ void SvTreeListBox::SetCheckButtonState( SvTreeListEntry* pEntry, SvButtonState
             return ;
         switch( eState )
         {
-            case SV_BUTTON_CHECKED:
+            case SvButtonState::Checked:
                 pItem->SetStateChecked();
                 break;
 
-            case SV_BUTTON_UNCHECKED:
+            case SvButtonState::Unchecked:
                 pItem->SetStateUnchecked();
                 break;
 
-            case SV_BUTTON_TRISTATE:
+            case SvButtonState::Tristate:
                 pItem->SetStateTristate();
                 break;
         }
@@ -1949,12 +1949,12 @@ void SvTreeListBox::SetCheckButtonInvisible( SvTreeListEntry* pEntry)
 
 SvButtonState SvTreeListBox::GetCheckButtonState( SvTreeListEntry* pEntry ) const
 {
-    SvButtonState eState = SV_BUTTON_UNCHECKED;
+    SvButtonState eState = SvButtonState::Unchecked;
     if( pEntry && ( nTreeFlags & SvTreeFlags::CHKBTN ) )
     {
         SvLBoxButton* pItem = static_cast<SvLBoxButton*>(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
         if(!pItem)
-            return SV_BUTTON_TRISTATE;
+            return SvButtonState::Tristate;
         SvItemStateFlags nButtonFlags = pItem->GetButtonFlags();
         eState = SvLBoxButtonData::ConvertToButtonState( nButtonFlags );
     }
@@ -3821,7 +3821,7 @@ void SvTreeListBox::FillAccessibleEntryStateSet( SvTreeListEntry* pEntry, ::utl:
             rStateSet.AddState( (sal_Int16)AccessibleStateType::EXPANDED );
     }
 
-    if ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED )
+    if ( GetCheckButtonState( pEntry ) == SvButtonState::Checked )
         rStateSet.AddState( AccessibleStateType::CHECKED );
     if ( IsEntryVisible( pEntry ) )
         rStateSet.AddState( AccessibleStateType::VISIBLE );
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index 653d8f2..11e4bda 100644
--- a/svx/source/dialog/checklbx.cxx
+++ b/svx/source/dialog/checklbx.cxx
@@ -122,16 +122,14 @@ sal_uLong SvxCheckListBox::GetCheckedEntryCount() const
 void SvxCheckListBox::CheckEntryPos( sal_uLong nPos, bool bCheck )
 {
     if ( nPos < GetEntryCount() )
-        SetCheckButtonState(
-            GetEntry( nPos ), bCheck ? SvButtonState( SV_BUTTON_CHECKED ) :
-                                       SvButtonState( SV_BUTTON_UNCHECKED ) );
+        SetCheckButtonState( GetEntry( nPos ), bCheck ? SvButtonState::Checked : SvButtonState::Unchecked );
 }
 
 
 bool SvxCheckListBox::IsChecked( sal_uLong nPos ) const
 {
     if ( nPos < GetEntryCount() )
-        return (GetCheckButtonState( GetEntry( nPos ) ) == SV_BUTTON_CHECKED);
+        return GetCheckButtonState( GetEntry( nPos ) ) == SvButtonState::Checked;
     else
         return false;
 }
@@ -180,7 +178,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
 
         if ( pEntry )
         {
-            bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
+            bool bCheck = GetCheckButtonState( pEntry ) == SvButtonState::Checked;
             SvLBoxItem* pItem = GetItem( pEntry, aPnt.X() );
 
             if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON)
@@ -200,7 +198,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
                 if ( pNewEntry != pEntry )
                     return;
 
-                if ( bCheck != ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) )
+                if ( bCheck != ( GetCheckButtonState( pEntry ) == SvButtonState::Checked ) )
                     CheckButtonHdl();
                 return;
             }
@@ -220,9 +218,9 @@ void SvxCheckListBox::KeyInput( const KeyEvent& rKEvt )
 
         if ( pEntry )
         {
-            bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
+            bool bCheck = GetCheckButtonState( pEntry ) == SvButtonState::Checked;
             ToggleCheckButton( pEntry );
-            if ( bCheck != ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) )
+            if ( bCheck != ( GetCheckButtonState( pEntry ) == SvButtonState::Checked ) )
                 CheckButtonHdl();
         }
     }
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 04252c9..e475c61 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -107,7 +107,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(vcl::Window* pParent, const SfxIt
         SvTreeListEntry* pEntry = m_pOptionsLB->SvTreeListBox::InsertEntry( sEntry );
         if ( pEntry )
         {
-            m_pOptionsLB->SetCheckButtonState( pEntry, SV_BUTTON_UNCHECKED );
+            m_pOptionsLB->SetCheckButtonState( pEntry, SvButtonState::Unchecked );
         }
     }
     m_sUserEntry = m_pFormattingLB->GetEntry(m_pFormattingLB->GetEntryCount()-1);
commit 1c73135493e844c04446f58e7001920381787317
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Mar 18 11:22:17 2016 +0200

    convert SvLBoxButtonKind to scoped enum
    
    Change-Id: Ia8e19473132cf95837acc499c5831b5ca8786a68

diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index c6f9069..80b11f4d 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -126,8 +126,8 @@ SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(OUString& rFont1, OUString& rF
 
     pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); // otherwise boom!
 
-    pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData));
-    pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData));
+    pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, pCheckButtonData));
+    pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, pCheckButtonData));
 
     pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rFont1));
     pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rFont2));
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 03262fb..5280ae3 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -339,12 +339,12 @@ void OfaMSFilterTabPage2::InsertEntry( const OUString& _rTxt, sal_IntPtr _nType,
     pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(
         new SvLBoxContextBmp(Image(), Image(), false)));
     pEntry->AddItem(std::unique_ptr<SvLBoxButton>(
-        new SvLBoxButton(loadEnabled ? SvLBoxButtonKind_enabledCheckbox
-                                     : SvLBoxButtonKind_disabledCheckbox,
+        new SvLBoxButton(loadEnabled ? SvLBoxButtonKind::EnabledCheckbox
+                                     : SvLBoxButtonKind::DisabledCheckbox,
                pCheckButtonData)));
     pEntry->AddItem(std::unique_ptr<SvLBoxButton>(
-        new SvLBoxButton(saveEnabled ? SvLBoxButtonKind_enabledCheckbox
-                                     : SvLBoxButtonKind_disabledCheckbox,
+        new SvLBoxButton(saveEnabled ? SvLBoxButtonKind::EnabledCheckbox
+                                     : SvLBoxButtonKind::DisabledCheckbox,
                pCheckButtonData)));
     pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(_rTxt)));
 
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index e253127..450f0ec 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1783,7 +1783,7 @@ SvTreeListEntry* SvxLinguTabPage::CreateEntry( OUString& rTxt, sal_uInt16 nCol )
         pCheckButtonData = new SvLBoxButtonData(m_pLinguOptionsCLB);
 
     if (CBCOL_FIRST == nCol)
-        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData));
+        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, pCheckButtonData));
     if (CBCOL_SECOND == nCol)
         pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));    // empty column
     pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false));
@@ -1912,7 +1912,7 @@ SvTreeListEntry* SvxEditModulesDlg::CreateEntry( OUString& rTxt, sal_uInt16 nCol
     }
 
     if (CBCOL_FIRST == nCol)
-        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData));
+        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, pCheckButtonData));
     if (CBCOL_SECOND == nCol)
         pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));    // empty column
     pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false));
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index e5b29cf..543341a 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -477,12 +477,12 @@ SvTreeListEntry* OfaSwAutoFmtOptionsPage::CreateEntry(OUString& rTxt, sal_uInt16
     if (nCol == CBCOL_SECOND)
         pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
     else
-        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData));
+        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, pCheckButtonData));
 
     if (nCol == CBCOL_FIRST)
         pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
     else
-        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData));
+        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, pCheckButtonData));
     pEntry->AddItem(o3tl::make_unique<OfaImpBrwString>(rTxt));
 
     return pEntry;
@@ -1806,12 +1806,12 @@ SvTreeListEntry* OfaQuoteTabPage::CreateEntry(OUString& rTxt, sal_uInt16 nCol)
     if (nCol == CBCOL_SECOND)
         pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
     else
-        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData));
+        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, pCheckButtonData));
 
     if (nCol == CBCOL_FIRST)
         pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
     else
-        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData));
+        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, pCheckButtonData));
 
     pEntry->AddItem(o3tl::make_unique<OfaImpBrwString>(rTxt));
 
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 329459e..624a64d 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -671,7 +671,7 @@ void UpdateDialog::CheckListBox::handlePopupMenu( const Point &rPos )
                 if ( p->m_eKind == ENABLED_UPDATE )
                 {
                     RemoveEntry( nEntryPos );
-                    m_dialog.addAdditional( p, SvLBoxButtonKind_disabledCheckbox );
+                    m_dialog.addAdditional( p, SvLBoxButtonKind::DisabledCheckbox );
                 }
                 if ( aCmd == CMD_IGNORE_UPDATE )
                     m_dialog.setIgnoredUpdate( p, true, false );
@@ -685,7 +685,7 @@ void UpdateDialog::CheckListBox::handlePopupMenu( const Point &rPos )
                 if ( p->m_eKind == ENABLED_UPDATE )
                 {
                     RemoveEntry( nEntryPos );
-                    m_dialog.insertItem( p, SvLBoxButtonKind_enabledCheckbox );
+                    m_dialog.insertItem( p, SvLBoxButtonKind::EnabledCheckbox );
                 }
                 m_dialog.setIgnoredUpdate( p, false, false );
             }
@@ -738,11 +738,11 @@ void UpdateDialog::addEnabledUpdate( OUString const & name,
 
     if ( ! isIgnoredUpdate( pEntry ) )
     {
-        sal_uInt16 nPos = insertItem( pEntry, SvLBoxButtonKind_enabledCheckbox );
+        sal_uInt16 nPos = insertItem( pEntry, SvLBoxButtonKind::EnabledCheckbox );
         m_pUpdates->CheckEntryPos( nPos );
     }
     else
-        addAdditional( pEntry, SvLBoxButtonKind_disabledCheckbox );
+        addAdditional( pEntry, SvLBoxButtonKind::DisabledCheckbox );
 
     m_pUpdate->Enable();
     m_pUpdates->Enable();
@@ -763,7 +763,7 @@ void UpdateDialog::addDisabledUpdate( UpdateDialog::DisabledUpdate & data )
     m_ListboxEntries.push_back( pEntry );
 
     isIgnoredUpdate( pEntry );
-    addAdditional( pEntry, SvLBoxButtonKind_disabledCheckbox );
+    addAdditional( pEntry, SvLBoxButtonKind::DisabledCheckbox );
 }
 
 
@@ -778,7 +778,7 @@ void UpdateDialog::addSpecificError( UpdateDialog::SpecificError & data )
     m_specificErrors.push_back( data );
     m_ListboxEntries.push_back( pEntry );
 
-    addAdditional( pEntry, SvLBoxButtonKind_staticImage);
+    addAdditional( pEntry, SvLBoxButtonKind::StaticImage);
 }
 
 void UpdateDialog::checkingDone() {
@@ -1248,7 +1248,7 @@ IMPL_LINK_NOARG_TYPED(UpdateDialog, allHandler, CheckBox&, void)
              i != m_ListboxEntries.end(); ++i )
         {
             if ( (*i)->m_bIgnored || ( (*i)->m_eKind != ENABLED_UPDATE ) )
-                insertItem( (*i), SvLBoxButtonKind_disabledCheckbox );
+                insertItem( (*i), SvLBoxButtonKind::DisabledCheckbox );
         }
     }
     else
diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx
index 6d4f6e5..bf86082 100644
--- a/include/svtools/svtabbx.hxx
+++ b/include/svtools/svtabbx.hxx
@@ -76,7 +76,7 @@ public:
     virtual SvTreeListEntry*    InsertEntry( const OUString& rText, SvTreeListEntry* pParent = nullptr,
                                          bool bChildrenOnDemand = false,
                                          sal_uLong nPos=TREELIST_APPEND, void* pUserData = nullptr,
-                                         SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox ) override;
+                                         SvLBoxButtonKind eButtonKind = SvLBoxButtonKind::EnabledCheckbox ) override;
 
     virtual SvTreeListEntry*    InsertEntry( const OUString& rText,
                                          const Image& rExpandedEntryBmp,
@@ -84,7 +84,7 @@ public:
                                          SvTreeListEntry* pParent = nullptr,
                                          bool bChildrenOnDemand = false,
                                          sal_uLong nPos = TREELIST_APPEND, void* pUserData = nullptr,
-                                         SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox ) override;
+                                         SvLBoxButtonKind eButtonKind = SvLBoxButtonKind::EnabledCheckbox ) override;
 
     virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = TREELIST_APPEND,
                                  sal_uInt16 nCol = 0xffff, void* pUserData = nullptr );
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index c365f04..a161d61 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -59,11 +59,11 @@ namespace utl {
     class AccessibleStateSetHelper;
 }
 
-enum SvLBoxButtonKind
+enum class SvLBoxButtonKind
 {
-    SvLBoxButtonKind_enabledCheckbox,
-    SvLBoxButtonKind_disabledCheckbox,
-    SvLBoxButtonKind_staticImage
+    EnabledCheckbox,
+    DisabledCheckbox,
+    StaticImage
 };
 
 enum SvButtonState { SV_BUTTON_UNCHECKED, SV_BUTTON_CHECKED, SV_BUTTON_TRISTATE };
@@ -649,7 +649,7 @@ public:
     virtual SvTreeListEntry*    InsertEntry( const OUString& rText, SvTreeListEntry* pParent = nullptr,
                                          bool bChildrenOnDemand = false,
                                          sal_uLong nPos=TREELIST_APPEND, void* pUserData = nullptr,
-                                         SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
+                                         SvLBoxButtonKind eButtonKind = SvLBoxButtonKind::EnabledCheckbox );
 
     virtual SvTreeListEntry*    InsertEntry( const OUString& rText,
                                          const Image& rExpandedEntryBmp,
@@ -657,7 +657,7 @@ public:
                                          SvTreeListEntry* pParent = nullptr,
                                          bool bChildrenOnDemand = false,
                                          sal_uLong nPos = TREELIST_APPEND, void* pUserData = nullptr,
-                                         SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
+                                         SvLBoxButtonKind eButtonKind = SvLBoxButtonKind::EnabledCheckbox );
 
     const Image&    GetDefaultExpandedEntryBmp( ) const;
     const Image&    GetDefaultCollapsedEntryBmp( ) const;
diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx
index 0e0e872..cad5b4a 100644
--- a/include/svx/checklbx.hxx
+++ b/include/svx/checklbx.hxx
@@ -51,8 +51,7 @@ public:
     void            InsertEntry         ( const OUString& rStr,
                                           sal_uLong  nPos = TREELIST_APPEND,
                                           void* pUserData = nullptr,
-                                          SvLBoxButtonKind eButtonKind =
-                                              SvLBoxButtonKind_enabledCheckbox );
+                                          SvLBoxButtonKind eButtonKind = SvLBoxButtonKind::EnabledCheckbox );
     void            RemoveEntry         ( sal_uLong  nPos );
 
     void            SelectEntryPos      ( sal_uLong  nPos );
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 18d0663..571e146 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -265,7 +265,7 @@ void ScSolverOptionsDialog::FillListBox()
             // check box entry
             pEntry = new SvTreeListEntry;
             std::unique_ptr<SvLBoxButton> pButton(new SvLBoxButton(
-                SvLBoxButtonKind_enabledCheckbox, mpCheckButtonData));
+                SvLBoxButtonKind::EnabledCheckbox, mpCheckButtonData));
             if ( ScUnoHelpFunctions::GetBoolFromAny( aValue ) )
                 pButton->SetStateChecked();
             else
diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx
index fe439cd..a446f85 100644
--- a/sd/source/ui/dlg/dlgassim.cxx
+++ b/sd/source/ui/dlg/dlgassim.cxx
@@ -95,7 +95,7 @@ SvTreeListEntry* SdPageListControl::InsertPage( const OUString& rPageName )
 {
     SvTreeListEntry* pEntry = new SvTreeListEntry;
 
-    pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, m_pCheckButton));
+    pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_pCheckButton));
     pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false));    // otherwise boom!
     pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rPageName));
 
diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx
index 9690e66..787bfd0 100644
--- a/svtools/source/contnr/svlbitm.cxx
+++ b/svtools/source/contnr/svlbitm.cxx
@@ -299,7 +299,7 @@ SvLBoxButton::SvLBoxButton()
     : SvLBoxItem()
     , isVis(false)
     , pData(nullptr)
-    , eKind(SvLBoxButtonKind_enabledCheckbox)
+    , eKind(SvLBoxButtonKind::EnabledCheckbox)
     , nItemFlags(SvItemStateFlags::NONE)
 {
     SetStateUnchecked();
@@ -332,8 +332,8 @@ void SvLBoxButton::Paint(
     const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
     const SvViewDataEntry* /*pView*/, const SvTreeListEntry& /*rEntry*/)
 {
-    SvBmp nIndex = eKind == SvLBoxButtonKind_staticImage ? SvBmp::STATICIMAGE : SvLBoxButtonData::GetIndex(nItemFlags);
-    DrawImageFlags nStyle = eKind != SvLBoxButtonKind_disabledCheckbox && rDev.IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable;
+    SvBmp nIndex = eKind == SvLBoxButtonKind::StaticImage ? SvBmp::STATICIMAGE : SvLBoxButtonData::GetIndex(nItemFlags);
+    DrawImageFlags nStyle = eKind != SvLBoxButtonKind::DisabledCheckbox && rDev.IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable;
 
     //Native drawing
     bool bNativeOK = false;
@@ -416,14 +416,14 @@ void SvLBoxButton::InitViewData(SvTreeListBox* pView,SvTreeListEntry* pEntry, Sv
     Size aSize( pData->Width(), pData->Height() );
 
     ControlType eCtrlType = (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX;
-    if ( eKind != SvLBoxButtonKind_staticImage && pView )
+    if ( eKind != SvLBoxButtonKind::StaticImage && pView )
         ImplAdjustBoxSize(aSize, eCtrlType, *pView);
     pViewData->maSize = aSize;
 }
 
 bool SvLBoxButton::CheckModification() const
 {
-    return eKind == SvLBoxButtonKind_enabledCheckbox;
+    return eKind == SvLBoxButtonKind::EnabledCheckbox;
 }
 
 void SvLBoxButton::SetStateInvisible()
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 4012714..f0bec8a 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1980,7 +1980,7 @@ SvTreeListEntry* SvTreeListBox::CloneEntry( SvTreeListEntry* pSource )
     OUString aStr;
     Image aCollEntryBmp;
     Image aExpEntryBmp;
-    SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox;
+    SvLBoxButtonKind eButtonKind = SvLBoxButtonKind::EnabledCheckbox;
 
     SvLBoxString* pStringItem = static_cast<SvLBoxString*>(pSource->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
     if( pStringItem )


More information about the Libreoffice-commits mailing list