[Libreoffice-commits] core.git: accessibility/source
Julien Nabet
serval2412 at yahoo.fr
Wed Feb 26 03:07:14 PST 2014
accessibility/source/standard/vclxaccessibletoolboxitem.cxx | 16 ++++++------
1 file changed, 9 insertions(+), 7 deletions(-)
New commits:
commit 09a1c9d31fb8756d6c7157ea1056acfbfea64784
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Feb 21 21:55:59 2014 +0100
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index 6ff821c..7329e0a 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;
More information about the Libreoffice-commits
mailing list