svx/source/accessibility/AccessibleShape.cxx | 32 +-------------------------- 1 file changed, 2 insertions(+), 30 deletions(-)
New commits: commit b8210011695eef5cb63e479d806baa13c4373516 Author: Michael Stahl <[email protected]> Date: Thu Dec 15 23:00:25 2016 +0100 svx: remove nonsense exception throwing code Commit 60f11adb950e4f9645cc9ecb0f5af8235cc97366 added code to AccessibleShape::getAccessibleStateSet() that tries to retrieve some state from the parent, but the implementation of the base class AccessibleContextBase::getAccessibleParent() throws if it is already disposed, which is the condition checked just before, so surely this doesn't have any other effect than throw DisposedException, except possibly in the mpText == null case which is already handled in the other branch with identical code. Change-Id: Iaf109f69036437989abbbf914ef32cca1528a97e (cherry picked from commit ffb5bf421f5c0c565128116df40318f5b707b821) Reviewed-on: https://gerrit.libreoffice.org/32188 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Michael Stahl <[email protected]> diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 3821216..043ba8e 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -410,38 +410,10 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ::osl::MutexGuard aGuard (maMutex); Reference<XAccessibleStateSet> xStateSet; - if (rBHelper.bDisposed || mpText == nullptr) - // Return a minimal state set that only contains the DEFUNC state. + if (IsDisposed()) { + // Return a minimal state set that only contains the DEFUNC state. xStateSet = AccessibleContextBase::getAccessibleStateSet (); - ::utl::AccessibleStateSetHelper* pStateSet = - static_cast< ::utl::AccessibleStateSetHelper*>(mxStateSet.get()); - css::uno::Reference<XAccessible> xTempAcc = getAccessibleParent(); - if( xTempAcc.is() ) - { - css::uno::Reference<XAccessibleContext> - xTempAccContext = xTempAcc->getAccessibleContext(); - if( xTempAccContext.is() ) - { - css::uno::Reference<XAccessibleStateSet> rState = - xTempAccContext->getAccessibleStateSet(); - if( rState.is() ) { - css::uno::Sequence<short> aStates = rState->getStates(); - int count = aStates.getLength(); - for( int iIndex = 0;iIndex < count;iIndex++ ) - { - if( aStates[iIndex] == AccessibleStateType::EDITABLE ) - { - pStateSet->AddState (AccessibleStateType::EDITABLE); - pStateSet->AddState (AccessibleStateType::RESIZABLE); - pStateSet->AddState (AccessibleStateType::MOVEABLE); - break; - } - } - } - } - } - xStateSet.set( new ::utl::AccessibleStateSetHelper (*pStateSet)); } else { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
