summaryrefslogtreecommitdiff
path: root/svx/source/accessibility/AccessibleShape.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-12-15 23:00:25 +0100
committerMichael Stahl <mstahl@redhat.com>2016-12-16 10:20:50 +0100
commitffb5bf421f5c0c565128116df40318f5b707b821 (patch)
tree75836e406400b4ff57a92e05fdd2df26f4a83cb6 /svx/source/accessibility/AccessibleShape.cxx
parent5a3b2111172f106378cbf78aba0fde1db3642275 (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
Diffstat (limited to 'svx/source/accessibility/AccessibleShape.cxx')
-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 b7a23a85aaad..8df4e044dff2 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
{