From 0d8eae93766dec97b15cde55dea33df50b6d9505 Mon Sep 17 00:00:00 2001 From: Arnaud Versini Date: Sat, 15 Jul 2017 13:26:27 +0200 Subject: Don't call ensureIsAlive after comphelper::OExternalLockGuard. comphelper::OExternalLockGuard calls ensureIsAlive, no need to call it twice. Change-Id: I08d2b77dcb4d1e72a69c521bf969cbe1e65d5721 Reviewed-on: https://gerrit.libreoffice.org/39997 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../source/extended/accessibleiconchoicectrl.cxx | 19 ------------------- accessibility/source/extended/accessiblelistbox.cxx | 19 ------------------- 2 files changed, 38 deletions(-) (limited to 'accessibility') diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx index 3ec6e6e29c04..6a2c77955b00 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -159,7 +159,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); return getCtrl()->GetEntryCount(); } @@ -167,7 +166,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); VclPtr pCtrl = getCtrl(); SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry(i); if ( !pEntry ) @@ -194,7 +192,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); return getCtrl()->GetAccessibleDescription(); } @@ -202,8 +199,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - OUString sName = getCtrl()->GetAccessibleName(); if ( sName.isEmpty() ) sName = "IconChoiceControl"; @@ -216,8 +211,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - VclPtr pCtrl = getCtrl(); SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry( nChildIndex ); if ( !pEntry ) @@ -230,8 +223,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - VclPtr pCtrl = getCtrl(); SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry( nChildIndex ); if ( !pEntry ) @@ -243,8 +234,6 @@ namespace accessibility void SAL_CALL AccessibleIconChoiceCtrl::clearAccessibleSelection( ) { ::comphelper::OExternalLockGuard aGuard( this ); - - ensureAlive(); getCtrl()->SetNoSelection(); } @@ -252,8 +241,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - VclPtr pCtrl = getCtrl(); sal_Int32 nCount = pCtrl->GetEntryCount(); for ( sal_Int32 i = 0; i < nCount; ++i ) @@ -268,8 +255,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - sal_Int32 nSelCount = 0; VclPtr pCtrl = getCtrl(); sal_Int32 nCount = pCtrl->GetEntryCount(); @@ -287,8 +272,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - if ( nSelectedChildIndex < 0 || nSelectedChildIndex >= getSelectedAccessibleChildCount() ) throw IndexOutOfBoundsException(); @@ -316,8 +299,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - if ( nSelectedChildIndex < 0 || nSelectedChildIndex >= getAccessibleChildCount() ) throw IndexOutOfBoundsException(); diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx index a79c7a67d4d6..c19499de7dc2 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -333,8 +333,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - sal_Int32 nCount = 0; VclPtr pSvTreeListBox = getListBox(); if ( pSvTreeListBox ) @@ -347,7 +345,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); SvTreeListEntry* pEntry = getListBox()->GetEntry(i); if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -420,7 +417,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); return getListBox()->GetAccessibleDescription(); } @@ -428,7 +424,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); return getListBox()->GetAccessibleName(); } @@ -438,8 +433,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - SvTreeListEntry* pEntry = getListBox()->GetEntry( nChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -451,8 +444,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - SvTreeListEntry* pEntry = getListBox()->GetEntry( nChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -464,8 +455,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - sal_Int32 nCount = getListBox()->GetLevelChildCount( nullptr ); for ( sal_Int32 i = 0; i < nCount; ++i ) { @@ -479,8 +468,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - sal_Int32 nCount = getListBox()->GetLevelChildCount( nullptr ); for ( sal_Int32 i = 0; i < nCount; ++i ) { @@ -494,8 +481,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - return getListBox()->GetSelectionCount(); } @@ -503,8 +488,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - if ( nSelectedChildIndex < 0 || nSelectedChildIndex >= getSelectedAccessibleChildCount() ) throw IndexOutOfBoundsException(); @@ -533,8 +516,6 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); - ensureAlive(); - SvTreeListEntry* pEntry = getListBox()->GetEntry( nSelectedChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); -- cgit v1.2.3