diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-01-19 14:59:29 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-01-19 14:59:29 -0600 |
commit | 014a0e5d6f1acf54c97ac4c21d7a1d72f3f196cf (patch) | |
tree | 96a32b9a587b5c3733ad33b24362162c6ebe1b9f /accessibility | |
parent | 989c7ce9a88aa6e9a3bb2773117c6ad5ee204ef6 (diff) |
coverity#1132660 Dereference after null check
Change-Id: Ib184d73f2ced3beca8540a37bab74c4a712170ba
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/extended/accessiblelistboxentry.cxx | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index 1016139d5a96..98666fdc9590 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -427,32 +427,29 @@ namespace accessibility return AccessibleRole::TREE_ITEM; else if( nType == TREEBOX_ALLITEM_ACCROLE_TYPE_LIST) return AccessibleRole::LIST_ITEM; - } - sal_uInt16 treeFlag = pBox->GetTreeFlags(); - if(treeFlag & TREEFLAG_CHKBTN ) - { - SvTreeListEntry* pEntry = pBox->GetEntryFromPath( m_aEntryPath ); - SvButtonState eState = pBox->GetCheckButtonState( pEntry ); - switch( eState ) + sal_uInt16 treeFlag = pBox->GetTreeFlags(); + if(treeFlag & TREEFLAG_CHKBTN ) { + SvTreeListEntry* pEntry = pBox->GetEntryFromPath( m_aEntryPath ); + SvButtonState eState = pBox->GetCheckButtonState( pEntry ); + switch( eState ) + { case SV_BUTTON_CHECKED: case SV_BUTTON_UNCHECKED: return AccessibleRole::CHECK_BOX; case SV_BUTTON_TRISTATE: default: return AccessibleRole::LABEL; + } } + if(getRoleType() == 0) + return AccessibleRole::LIST_ITEM; + else + //o is: return AccessibleRole::LABEL; + return AccessibleRole::TREE_ITEM; } - else - { - - if(getRoleType() == 0) - return AccessibleRole::LIST_ITEM; - else - //o is: return AccessibleRole::LABEL; - return AccessibleRole::TREE_ITEM; - } + return AccessibleRole::UNKNOWN; } // ----------------------------------------------------------------------------- OUString SAL_CALL AccessibleListBoxEntry::getAccessibleDescription( ) throw (RuntimeException) |