summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-11-15 11:13:41 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-11-15 16:06:07 +0000
commitf4f5c0478a1a13281ce5f184d33895e791e87067 (patch)
tree4a42b048e57eaae1b6a178284353227663d7b22c /vcl/unx/gtk
parent10511acd0839635ce6595d9e5b8aa9136b6bde38 (diff)
gtk-a11y: unwind re-enterancy / lifecycle hazard at least a little.
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index a34c4e34b3c6..7a1b9b4d0f1a 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -323,10 +323,11 @@ wrapper_get_name( AtkObject *atk_obj )
if( obj->mpContext )
{
+ uno::Reference< accessibility::XAccessibleContext > xContext(obj->mpContext);
try {
rtl::OString aName =
rtl::OUStringToOString(
- obj->mpContext->getAccessibleName(),
+ xContext->getAccessibleName(),
RTL_TEXTENCODING_UTF8);
int nCmp = atk_obj->name ? rtl_str_compare( atk_obj->name, aName.getStr() ) : -1;
@@ -354,10 +355,11 @@ wrapper_get_description( AtkObject *atk_obj )
if( obj->mpContext )
{
+ uno::Reference< accessibility::XAccessibleContext > xContext(obj->mpContext);
try {
rtl::OString aDescription =
rtl::OUStringToOString(
- obj->mpContext->getAccessibleDescription(),
+ xContext->getAccessibleDescription(),
RTL_TEXTENCODING_UTF8);
g_free(atk_obj->description);
@@ -382,8 +384,9 @@ wrapper_get_n_children( AtkObject *atk_obj )
if( obj->mpContext )
{
+ uno::Reference< accessibility::XAccessibleContext > xContext(obj->mpContext);
try {
- n = obj->mpContext->getAccessibleChildCount();
+ n = xContext->getAccessibleChildCount();
}
catch(const uno::Exception& e) {
OSL_FAIL("Exception in getAccessibleChildCount()" );
@@ -411,9 +414,10 @@ wrapper_ref_child( AtkObject *atk_obj,
if( obj->mpContext )
{
+ uno::Reference< accessibility::XAccessibleContext > xContext(obj->mpContext);
try {
uno::Reference< accessibility::XAccessible > xAccessible =
- obj->mpContext->getAccessibleChild( i );
+ xContext->getAccessibleChild( i );
child = atk_object_wrapper_ref( xAccessible );
}
@@ -435,8 +439,9 @@ wrapper_get_index_in_parent( AtkObject *atk_obj )
if( obj->mpContext )
{
+ uno::Reference< accessibility::XAccessibleContext > xContext(obj->mpContext);
try {
- i = obj->mpContext->getAccessibleIndexInParent();
+ i = xContext->getAccessibleIndexInParent();
#ifdef ENABLE_TRACING
fprintf(stderr, "%p->getAccessibleIndexInParent() returned: %u\n",
@@ -460,9 +465,10 @@ wrapper_ref_relation_set( AtkObject *atk_obj )
if( obj->mpContext )
{
+ uno::Reference< accessibility::XAccessibleContext > xContext(obj->mpContext);
try {
uno::Reference< accessibility::XAccessibleRelationSet > xRelationSet(
- obj->mpContext->getAccessibleRelationSet()
+ xContext->getAccessibleRelationSet()
);
sal_Int32 nRelations = xRelationSet.is() ? xRelationSet->getRelationCount() : 0;
@@ -505,9 +511,10 @@ wrapper_ref_state_set( AtkObject *atk_obj )
if( obj->mpContext )
{
+ uno::Reference< accessibility::XAccessibleContext > xContext(obj->mpContext);
try {
uno::Reference< accessibility::XAccessibleStateSet > xStateSet(
- obj->mpContext->getAccessibleStateSet());
+ xContext->getAccessibleStateSet());
if( xStateSet.is() )
{