diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-02-21 21:55:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-26 05:06:44 -0600 |
commit | 09a1c9d31fb8756d6c7157ea1056acfbfea64784 (patch) | |
tree | 277b83b2588ccb6f7d212e12961066a35e647dc8 | |
parent | d9f0af83b7f0abe7119eefca62cbbca7eff818ef (diff) |
cppcheck: duplicateIf
- replace duplicate TIB_DROPDOWN test with TIB_DROPDOWN + TIB_DROPDOWNONLY
- consider also TIB_RADIOCHECK as AccessibleRole::TOGGLE_BUTTON
Change-Id: Id159349ae1515681f47c373ba3d839ed406284ab
Reviewed-on: https://gerrit.libreoffice.org/8164
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | accessibility/source/standard/vclxaccessibletoolboxitem.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index 6ff821c457b3..7329e0a2883c 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -83,15 +83,17 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In case TOOLBOXITEM_BUTTON : { ToolBoxItemBits nBits = m_pToolBox->GetItemBits( m_nItemId ); - if (( nBits & TIB_DROPDOWN ) == TIB_DROPDOWN) + if ( + (( nBits & TIB_DROPDOWN ) == TIB_DROPDOWN) || + (( nBits & TIB_DROPDOWNONLY ) == TIB_DROPDOWNONLY) + ) m_nRole = AccessibleRole::BUTTON_DROPDOWN; - else if (( ( nBits & TIB_CHECKABLE ) == TIB_CHECKABLE ) || - ( ( nBits & TIB_AUTOCHECK ) == TIB_AUTOCHECK ) ) + else if ( + ( ( nBits & TIB_CHECKABLE ) == TIB_CHECKABLE ) || + ( ( nBits & TIB_RADIOCHECK ) == TIB_RADIOCHECK ) || + ( ( nBits & TIB_AUTOCHECK ) == TIB_AUTOCHECK ) + ) m_nRole = AccessibleRole::TOGGLE_BUTTON; - else if ( (nBits & TIB_DROPDOWN) == TIB_DROPDOWN ) - { - m_nRole = AccessibleRole::BUTTON_DROPDOWN; - } else if ( m_pToolBox->GetItemWindow( m_nItemId ) ) m_nRole = AccessibleRole::PANEL; break; |