summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-18 12:46:20 +0200
committerNoel Grandin <noel@peralex.com>2016-03-18 12:46:35 +0200
commitc91b103930f4f441ab333d6f3026d6c19d4b4d0f (patch)
treeb3bb0edd19ebf20bdca3c9b3605cec986d2e650f
parent1c73135493e844c04446f58e7001920381787317 (diff)
convert SvButtonState to scoped enum
Change-Id: I601f9e2fe33e85cf3f7dc52ee20d68202bd2b09d
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx2
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx18
-rw-r--r--basctl/source/basicide/moduldl2.cxx6
-rw-r--r--cui/source/customize/cfg.cxx18
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx4
-rw-r--r--cui/source/dialogs/multipat.cxx8
-rw-r--r--cui/source/dialogs/srchxtra.cxx2
-rw-r--r--cui/source/options/certpath.cxx12
-rw-r--r--cui/source/options/fontsubs.cxx18
-rw-r--r--cui/source/options/optfltr.cxx19
-rw-r--r--cui/source/options/optjava.cxx10
-rw-r--r--cui/source/options/radiobtnbox.cxx10
-rw-r--r--cui/source/tabpages/autocdlg.cxx15
-rw-r--r--dbaccess/source/ui/control/marktree.cxx18
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx6
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx6
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx6
-rw-r--r--include/svtools/treelistbox.hxx2
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx23
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx2
-rw-r--r--sd/source/ui/dlg/dlgassim.cxx8
-rw-r--r--svtools/source/contnr/svlbitm.cxx10
-rw-r--r--svtools/source/contnr/svtabbx.cxx4
-rw-r--r--svtools/source/contnr/treelistbox.cxx12
-rw-r--r--svx/source/dialog/checklbx.cxx14
-rw-r--r--sw/source/ui/config/optcomp.cxx2
26 files changed, 123 insertions, 132 deletions
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index 019c6b5fe23c..63c2b5d45efa 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 97d09a289901..7efc72ed9ec8 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 58fda39bc18c..54b0a307d64d 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 c8e5ba3476d2..27f9b2498874 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 8bd4398f5cb2..a073dfadc3ab 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 ce065a3cc25e..39624134b669 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 b8ae3ffbde23..5a12ed5e89e7 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 dc6bfc4dd413..d87807c46eff 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 80b11f4dc149..64235681c64f 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 5280ae3930df..937eed49972c 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 fadea8823022..6ab367aad345 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 bf14d7732bff..02a5c043d92b 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 543341a8d281..3122aaeec818 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 9484b29a5bb9..9bcd358b30a9 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 18887ded2c26..10dde93ce558 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 eae9b041da15..7c1686c62450 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 a8c5fea0f2f3..5d8fe30baf78 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 a161d6125582..8375dbd757b6 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 e8a1ad3acd6c..88d466932696 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 571e146aa2da..b222be3ff0b8 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 a446f8553cb3..7dc8d97238a5 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 787bfd0d1676..ccc86ca0b763 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 cb35cfa3a212..f3a9d92b0553 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 f0bec8a23d77..821e2e5ddc30 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 653d8f207fbb..11e4bda87eb8 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 04252c9b5182..e475c619745b 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);