diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-09-02 14:57:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-09-02 18:27:46 +0200 |
commit | 151eb21f7a5e14df0d3367466b150afd2571bddd (patch) | |
tree | b1a65b1b9bb7919102288c78e8d78cf0496622a2 /svx | |
parent | 19b8bac2aa59d02968c33ac6f83c66907d5ab94c (diff) |
use more concrete type in AccessibleTableShapeImpl
Change-Id: I6acc54c1c178815805fc1a724ad4c00b17a5ed6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156472
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/accessibletableshape.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index cc3a8e90b7f3..f1cedcd3a0ca 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -62,7 +62,7 @@ class AccessibleTableShapeImpl : public cppu::WeakImplHelper< XModifyListener > public: explicit AccessibleTableShapeImpl( AccessibleShapeTreeInfo& rShapeTreeInfo ); - void init( const Reference< XAccessible>& xAccessible, const Reference< XTable >& xTable ); + void init( const rtl::Reference< AccessibleTableShape>& xAccessible, const Reference< XTable >& xTable ); void dispose(); /// @throws IndexOutOfBoundsException @@ -80,7 +80,7 @@ public: AccessibleShapeTreeInfo& mrShapeTreeInfo; Reference< XTable > mxTable; AccessibleCellMap maChildMap; - Reference< XAccessible> mxAccessible; + rtl::Reference< AccessibleTableShape> mxAccessible; sal_Int32 mRowCount, mColCount; //get the cached AccessibleCell from XCell rtl::Reference< AccessibleCell > getAccessibleCell (const Reference< XCell >& xCell); @@ -98,7 +98,7 @@ AccessibleTableShapeImpl::AccessibleTableShapeImpl( AccessibleShapeTreeInfo& rSh } -void AccessibleTableShapeImpl::init( const Reference< XAccessible>& xAccessible, const Reference< XTable >& xTable ) +void AccessibleTableShapeImpl::init( const rtl::Reference<AccessibleTableShape>& xAccessible, const Reference< XTable >& xTable ) { mxAccessible = xAccessible; mxTable = xTable; @@ -109,7 +109,7 @@ void AccessibleTableShapeImpl::init( const Reference< XAccessible>& xAccessible, mxTable->addModifyListener( xListener ); //register the listener with table model Reference< css::view::XSelectionSupplier > xSelSupplier(xTable, UNO_QUERY); - Reference< css::view::XSelectionChangeListener > xSelListener( xAccessible, UNO_QUERY ); + Reference< css::view::XSelectionChangeListener > xSelListener( xAccessible ); if (xSelSupplier.is()) xSelSupplier->addSelectionChangeListener(xSelListener); mRowCount = mxTable->getRowCount(); @@ -303,9 +303,8 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/ rEntry.second->dispose(); } //notify bridge to update the acc cache. - AccessibleTableShape *pAccTable = dynamic_cast <AccessibleTableShape *> (mxAccessible.get()); - if (pAccTable) - pAccTable->CommitChange(AccessibleEventId::INVALIDATE_ALL_CHILDREN, Any(), Any(), -1); + if (mxAccessible) + mxAccessible->CommitChange(AccessibleEventId::INVALIDATE_ALL_CHILDREN, Any(), Any(), -1); } catch( const Exception& ) { |