Kaydet (Commit) ffb5bf42 authored tarafından Michael Stahl's avatar Michael Stahl

svx: remove nonsense exception throwing code

Commit 60f11adb 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
üst 5a3b2111
...@@ -410,38 +410,10 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ...@@ -410,38 +410,10 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
::osl::MutexGuard aGuard (maMutex); ::osl::MutexGuard aGuard (maMutex);
Reference<XAccessibleStateSet> xStateSet; Reference<XAccessibleStateSet> xStateSet;
if (rBHelper.bDisposed || mpText == nullptr) if (IsDisposed())
// Return a minimal state set that only contains the DEFUNC state.
{ {
// Return a minimal state set that only contains the DEFUNC state.
xStateSet = AccessibleContextBase::getAccessibleStateSet (); 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 else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment