diff options
-rw-r--r-- | svx/source/accessibility/AccessibleControlShape.cxx | 5 | ||||
-rw-r--r-- | toolkit/source/awt/vclxaccessiblecomponent.cxx | 14 |
2 files changed, 11 insertions, 8 deletions
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index b97f164292cb..7c12cf570014 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -599,8 +599,9 @@ OUString AccessibleControlShape::CreateAccessibleName() ensureControlModelAccess(); OUString sName; - if ( getAccessibleRole() != AccessibleRole::SHAPE - && getAccessibleRole() != AccessibleRole::RADIO_BUTTON ) + sal_Int16 aAccessibleRole = getAccessibleRole(); + if ( aAccessibleRole != AccessibleRole::SHAPE + && aAccessibleRole != AccessibleRole::RADIO_BUTTON ) { AccessibleControlShape* pCtlAccShape = GetLabeledByControlShape(); if(pCtlAccShape) diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 015fafabd425..aa86bb0c9606 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -201,12 +201,13 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind break; case VclEventId::WindowActivate: { + sal_Int16 aAccessibleRole = getAccessibleRole(); // avoid notification if a child frame is already active // only one frame may be active at a given time if ( !pAccWindow->HasActiveChildFrame() && - ( getAccessibleRole() == accessibility::AccessibleRole::FRAME || - getAccessibleRole() == accessibility::AccessibleRole::ALERT || - getAccessibleRole() == accessibility::AccessibleRole::DIALOG ) ) // #i18891# + ( aAccessibleRole == accessibility::AccessibleRole::FRAME || + aAccessibleRole == accessibility::AccessibleRole::ALERT || + aAccessibleRole == accessibility::AccessibleRole::DIALOG ) ) // #i18891# { aNewValue <<= accessibility::AccessibleStateType::ACTIVE; NotifyAccessibleEvent( accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); @@ -215,9 +216,10 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind break; case VclEventId::WindowDeactivate: { - if ( getAccessibleRole() == accessibility::AccessibleRole::FRAME || - getAccessibleRole() == accessibility::AccessibleRole::ALERT || - getAccessibleRole() == accessibility::AccessibleRole::DIALOG ) // #i18891# + sal_Int16 aAccessibleRole = getAccessibleRole(); + if ( aAccessibleRole == accessibility::AccessibleRole::FRAME || + aAccessibleRole == accessibility::AccessibleRole::ALERT || + aAccessibleRole == accessibility::AccessibleRole::DIALOG ) // #i18891# { aOldValue <<= accessibility::AccessibleStateType::ACTIVE; NotifyAccessibleEvent( accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); |