[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - accessibility/source

Julien Nabet serval2412 at yahoo.fr
Mon Mar 3 02:50:56 PST 2014


 accessibility/source/standard/vclxaccessibletoolboxitem.cxx |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 4040c461fc244940c6817770104ccbcc013ac1f3
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>
    Reviewed-on: https://gerrit.libreoffice.org/8371
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index 04889bf..4f1d68f 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -82,10 +82,16 @@ 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 ( m_pToolBox->GetItemWindow( m_nItemId ) )
                 m_nRole = AccessibleRole::PANEL;


More information about the Libreoffice-commits mailing list