summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-02-21 21:55:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-02-26 05:06:44 -0600
commit09a1c9d31fb8756d6c7157ea1056acfbfea64784 (patch)
tree277b83b2588ccb6f7d212e12961066a35e647dc8 /accessibility
parentd9f0af83b7f0abe7119eefca62cbbca7eff818ef (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>
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/standard/vclxaccessibletoolboxitem.cxx16
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;