diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-18 12:46:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-18 12:46:35 +0200 |
commit | c91b103930f4f441ab333d6f3026d6c19d4b4d0f (patch) | |
tree | b3bb0edd19ebf20bdca3c9b3605cec986d2e650f /cui | |
parent | 1c73135493e844c04446f58e7001920381787317 (diff) |
convert SvButtonState to scoped enum
Change-Id: I601f9e2fe33e85cf3f7dc52ee20d68202bd2b09d
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 18 | ||||
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/multipat.cxx | 8 | ||||
-rw-r--r-- | cui/source/dialogs/srchxtra.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/certpath.cxx | 12 | ||||
-rw-r--r-- | cui/source/options/fontsubs.cxx | 18 | ||||
-rw-r--r-- | cui/source/options/optfltr.cxx | 19 | ||||
-rw-r--r-- | cui/source/options/optjava.cxx | 10 | ||||
-rw-r--r-- | cui/source/options/radiobtnbox.cxx | 10 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 15 |
10 files changed, 56 insertions, 60 deletions
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 ) ) ); } } |