diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-24 12:25:02 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-24 12:27:32 +0100 |
commit | 33740b7d5abb8aca34692fbdaa787b26a60652a9 (patch) | |
tree | ad2574a7850e2aa8ac18eaff89f4a85567896692 /accessibility | |
parent | 43d7f4e3640c5e370fd1204739c2b0c7eb5f40e4 (diff) |
Replace exisiting TriState, AutoState with more generic TriState
Change-Id: Ida05478aae5a379775c671e0c2f2851d820d78be
Diffstat (limited to 'accessibility')
5 files changed, 14 insertions, 14 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx index f23f472e1e53..966def8fa9d2 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx @@ -58,7 +58,7 @@ namespace accessibility { mpBrowseBox->FillAccessibleStateSetForCell( *pStateSetHelper, getRowPos(), static_cast< sal_uInt16 >( getColumnPos() ) ); - if ( m_eState == STATE_CHECK ) + if ( m_eState == TRISTATE_TRUE ) pStateSetHelper->AddState( AccessibleStateType::CHECKED ); } return pStateSetHelper; @@ -73,13 +73,13 @@ namespace accessibility sal_Int32 nValue = 0; switch( m_eState ) { - case STATE_NOCHECK: + case TRISTATE_FALSE: nValue = 0; break; - case STATE_CHECK: + case TRISTATE_TRUE: nValue = 1; break; - case STATE_DONTKNOW: + case TRISTATE_INDET: nValue = 2; break; } @@ -139,7 +139,7 @@ namespace accessibility void AccessibleCheckBoxCell::SetChecked( sal_Bool _bChecked ) { - m_eState = _bChecked ? STATE_CHECK : STATE_NOCHECK; + m_eState = _bChecked ? TRISTATE_TRUE : TRISTATE_FALSE; Any aOldValue, aNewValue; if ( _bChecked ) aNewValue <<= AccessibleStateType::CHECKED; diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx index b316a4a39d17..c6511356b4e5 100644 --- a/accessibility/source/extended/accessibletablistboxtable.cxx +++ b/accessibility/source/extended/accessibletablistboxtable.cxx @@ -108,7 +108,7 @@ namespace accessibility if ( m_pTabListBox->IsTransientChildrenDisabled() ) { aNewValue <<= AccessibleStateType::FOCUSED; - TriState eState = STATE_DONTKNOW; + TriState eState = TRISTATE_INDET; if ( m_pTabListBox->IsCellCheckBox( nRow, nCol, eState ) ) { AccessibleCheckBoxCell* pCell = @@ -153,7 +153,7 @@ namespace accessibility { sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry ); Reference< XAccessible > xChild = m_pTabListBox->CreateAccessibleCell( nRow, m_pTabListBox->GetCurrColumn() ); - TriState eState = STATE_DONTKNOW; + TriState eState = TRISTATE_INDET; if ( m_pTabListBox->IsCellCheckBox( nRow, m_pTabListBox->GetCurrColumn(), eState ) ) { AccessibleCheckBoxCell* pCell = static_cast< AccessibleCheckBoxCell* >( xChild.get() ); @@ -198,7 +198,7 @@ namespace accessibility { sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry ); sal_uInt16 nCol = m_pTabListBox->GetCurrColumn(); - TriState eState = STATE_DONTKNOW; + TriState eState = TRISTATE_INDET; if ( m_pTabListBox->IsCellCheckBox( nRow, nCol, eState ) ) { Reference< XAccessible > xChild = @@ -229,7 +229,7 @@ namespace accessibility aOldValue <<= OUString( pData->m_sOldText ); OUString sNewText( m_pTabListBox->GetCellText( nRow, nCol ) ); aNewValue <<= sNewText; - TriState eState = STATE_DONTKNOW; + TriState eState = TRISTATE_INDET; if ( m_pTabListBox->IsCellCheckBox( nRow, nCol, eState ) ) { diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx index 9bf3b8169647..a4d0e2fde6c3 100644 --- a/accessibility/source/standard/vclxaccessiblebutton.cxx +++ b/accessibility/source/standard/vclxaccessiblebutton.cxx @@ -66,7 +66,7 @@ void VCLXAccessibleButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowE Any aNewValue; PushButton* pButton = (PushButton*) GetWindow(); - if ( pButton && pButton->GetState() == STATE_CHECK ) + if ( pButton && pButton->GetState() == TRISTATE_TRUE ) aNewValue <<= AccessibleStateType::CHECKED; else aOldValue <<= AccessibleStateType::CHECKED; @@ -90,7 +90,7 @@ void VCLXAccessibleButton::FillAccessibleStateSet( utl::AccessibleStateSetHelper { rStateSet.AddState( AccessibleStateType::FOCUSABLE ); - if ( pButton->GetState() == STATE_CHECK ) + if ( pButton->GetState() == TRISTATE_TRUE ) rStateSet.AddState( AccessibleStateType::CHECKED ); if ( pButton->IsPressed() ) diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index a748f7319093..3fa03182091c 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -302,7 +302,7 @@ void VCLXAccessibleToolBox::UpdateIndeterminate_Impl( sal_Int32 _nPos ) VCLXAccessibleToolBoxItem* pItem = static_cast< VCLXAccessibleToolBoxItem* >( aIter->second.get() ); if ( pItem ) - pItem->SetIndeterminate( pToolBox->GetItemState( nItemId ) == STATE_DONTKNOW ); + pItem->SetIndeterminate( pToolBox->GetItemState( nItemId ) == TRISTATE_INDET ); } } } @@ -738,7 +738,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal pChild->SetFocus( sal_True ); if ( pToolBox->IsItemChecked( nItemId ) ) pChild->SetChecked( sal_True ); - if ( pToolBox->GetItemState( nItemId ) == STATE_DONTKNOW ) + if ( pToolBox->GetItemState( nItemId ) == TRISTATE_INDET ) pChild->SetIndeterminate( true ); m_aAccessibleChildren.insert( ToolBoxItemsMap::value_type( i, xChild ) ); } diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index 2ec93928f258..6ff821c457b3 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -76,7 +76,7 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In m_nItemId = m_pToolBox->GetItemId( (sal_uInt16)m_nIndexInParent ); m_sOldName = GetText( true ); m_bIsChecked = m_pToolBox->IsItemChecked( m_nItemId ); - m_bIndeterminate = ( m_pToolBox->GetItemState( m_nItemId ) == STATE_DONTKNOW ); + m_bIndeterminate = ( m_pToolBox->GetItemState( m_nItemId ) == TRISTATE_INDET ); ToolBoxItemType eType = m_pToolBox->GetItemType( (sal_uInt16)m_nIndexInParent ); switch ( eType ) { |