diff options
Diffstat (limited to 'vcl/unx/gtk/a11y/atktextattributes.cxx')
-rw-r--r-- | vcl/unx/gtk/a11y/atktextattributes.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx index 51c961892f6c..a9e26caef3d5 100644 --- a/vcl/unx/gtk/a11y/atktextattributes.cxx +++ b/vcl/unx/gtk/a11y/atktextattributes.cxx @@ -211,11 +211,14 @@ static css::uno::Reference<css::accessibility::XAccessibleComponent> getComponent( AtkText *pText ) throw (uno::RuntimeException) { AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( pText ); - if (pWrap) + if( pWrap ) { - uno::Reference<accessibility::XAccessibleComponent> xAC( - pWrap->mpContext.get(), uno::UNO_QUERY); - return xAC; + if( !pWrap->mpComponent.is() ) + { + pWrap->mpComponent.set(pWrap->mpContext, css::uno::UNO_QUERY); + } + + return pWrap->mpComponent; } return css::uno::Reference<css::accessibility::XAccessibleComponent>(); |