diff options
Diffstat (limited to 'vcl/unx/gtk/a11y/atkhypertext.cxx')
-rw-r--r-- | vcl/unx/gtk/a11y/atkhypertext.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/vcl/unx/gtk/a11y/atkhypertext.cxx b/vcl/unx/gtk/a11y/atkhypertext.cxx index 47872486a55a..aebb11a19f68 100644 --- a/vcl/unx/gtk/a11y/atkhypertext.cxx +++ b/vcl/unx/gtk/a11y/atkhypertext.cxx @@ -189,23 +189,21 @@ hyper_link_get_type() // ---------------------- AtkHyperText ---------------------- -static accessibility::XAccessibleHypertext* +static css::uno::Reference<css::accessibility::XAccessibleHypertext> getHypertext( AtkHypertext *pHypertext ) throw (uno::RuntimeException) { AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( pHypertext ); if( pWrap ) { - if( !pWrap->mpHypertext && pWrap->mpContext ) + if( !pWrap->mpHypertext.is() ) { - uno::Any any = pWrap->mpContext->queryInterface( cppu::UnoType<accessibility::XAccessibleHypertext>::get() ); - pWrap->mpHypertext = static_cast< accessibility::XAccessibleHypertext * > (any.pReserved); - pWrap->mpHypertext->acquire(); + pWrap->mpHypertext.set(pWrap->mpContext, css::uno::UNO_QUERY); } return pWrap->mpHypertext; } - return NULL; + return css::uno::Reference<css::accessibility::XAccessibleHypertext>(); } static AtkHyperlink * @@ -213,8 +211,9 @@ hypertext_get_link( AtkHypertext *hypertext, gint link_index) { try { - accessibility::XAccessibleHypertext* pHypertext = getHypertext( hypertext ); - if( pHypertext ) + css::uno::Reference<css::accessibility::XAccessibleHypertext> pHypertext + = getHypertext( hypertext ); + if( pHypertext.is() ) { HyperLink *pLink = static_cast<HyperLink *>(g_object_new( hyper_link_get_type(), NULL )); pLink->xLink = pHypertext->getHyperLink( link_index ); @@ -236,8 +235,9 @@ static gint hypertext_get_n_links( AtkHypertext *hypertext ) { try { - accessibility::XAccessibleHypertext* pHypertext = getHypertext( hypertext ); - if( pHypertext ) + css::uno::Reference<css::accessibility::XAccessibleHypertext> pHypertext + = getHypertext( hypertext ); + if( pHypertext.is() ) return pHypertext->getHyperLinkCount(); } catch(const uno::Exception&) { @@ -252,8 +252,9 @@ hypertext_get_link_index( AtkHypertext *hypertext, gint index) { try { - accessibility::XAccessibleHypertext* pHypertext = getHypertext( hypertext ); - if( pHypertext ) + css::uno::Reference<css::accessibility::XAccessibleHypertext> pHypertext + = getHypertext( hypertext ); + if( pHypertext.is() ) return pHypertext->getHyperLinkIndex( index ); } catch(const uno::Exception&) { |