summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-12-15 23:00:25 +0100
committerMichael Stahl <mstahl@redhat.com>2016-12-19 19:47:05 +0000
commitb8210011695eef5cb63e479d806baa13c4373516 (patch)
treede9df944843bce0d439e39491e593c07fa634f5e /svx
parent0dd9e51abc5705b7ae253d3f9b284136cf1597d6 (diff)
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 <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx32
1 files changed, 2 insertions, 30 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 3821216cc34b..043ba8e02dbf 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
{