diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-30 13:42:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-30 21:33:35 +0200 |
commit | dbe8597ce4f8c503ac10836570a76a607b2ebb9c (patch) | |
tree | fe1a276f6bcaa851830eca59a48ae95f056bc988 /sfx2 | |
parent | 7379decd74f9f66011f0023d8903430293dc0532 (diff) |
use concrete type for ThumbnailViewItem::mxAcc
avoid some unnecessary casting
Change-Id: I86d48cb463f4e9a1661025fa6e1f4f8c03d61eaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156287
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailviewitem.cxx | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index ca839162f0a2..12bfcb327143 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -294,7 +294,7 @@ void ThumbnailView::ImplDeleteItems() { css::uno::Any aOldAny, aNewAny; - aOldAny <<= pItem->GetAccessible( false ); + aOldAny <<= css::uno::Reference<css::accessibility::XAccessible>(pItem->GetAccessible( false )); ImplFireAccessibleEvent( css::accessibility::AccessibleEventId::CHILD, aOldAny, aNewAny ); } @@ -438,7 +438,7 @@ void ThumbnailView::CalculateItemPositions(bool bScrollBarUsed) { css::uno::Any aOldAny, aNewAny; - aNewAny <<= pItem->GetAccessible( false ); + aNewAny <<= css::uno::Reference<css::accessibility::XAccessible>(pItem->GetAccessible( false )); ImplFireAccessibleEvent( css::accessibility::AccessibleEventId::CHILD, aOldAny, aNewAny ); } @@ -466,7 +466,7 @@ void ThumbnailView::CalculateItemPositions(bool bScrollBarUsed) { css::uno::Any aOldAny, aNewAny; - aOldAny <<= pItem->GetAccessible( false ); + aOldAny <<= css::uno::Reference<css::accessibility::XAccessible>(pItem->GetAccessible( false )); ImplFireAccessibleEvent( css::accessibility::AccessibleEventId::CHILD, aOldAny, aNewAny ); } @@ -1124,12 +1124,12 @@ void ThumbnailView::SelectItem( sal_uInt16 nItemId ) return; // focus event (select) - ThumbnailViewItemAcc* pItemAcc = ThumbnailViewItemAcc::getImplementation( pItem->GetAccessible( false ) ); + const rtl::Reference<ThumbnailViewItemAcc> & pItemAcc = pItem->GetAccessible( false ); if( pItemAcc ) { css::uno::Any aOldAny, aNewAny; - aNewAny <<= css::uno::Reference(getXWeak( pItemAcc )); + aNewAny <<= css::uno::Reference<css::accessibility::XAccessible>( pItemAcc ); ImplFireAccessibleEvent( css::accessibility::AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldAny, aNewAny ); } @@ -1207,7 +1207,7 @@ void ThumbnailView::filterItems(const std::function<bool (const ThumbnailViewIte { css::uno::Any aOldAny, aNewAny; - aOldAny <<= pItem->GetAccessible( false ); + aOldAny <<= css::uno::Reference<css::accessibility::XAccessible>(pItem->GetAccessible( false )); ImplFireAccessibleEvent( css::accessibility::AccessibleEventId::CHILD, aOldAny, aNewAny ); } diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index ca8920acafd2..9579889e7e9a 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -67,7 +67,7 @@ ThumbnailViewItem::~ThumbnailViewItem() { if( mxAcc.is() ) { - static_cast< ThumbnailViewItemAcc* >( mxAcc.get() )->ParentDestroyed(); + mxAcc->ParentDestroyed(); } } @@ -129,7 +129,7 @@ void ThumbnailViewItem::setTitle (const OUString& rTitle) maTitle = rTitle; } -uno::Reference< accessibility::XAccessible > const & ThumbnailViewItem::GetAccessible( bool bIsTransientChildrenDisabled ) +const rtl::Reference< ThumbnailViewItemAcc > & ThumbnailViewItem::GetAccessible( bool bIsTransientChildrenDisabled ) { if( !mxAcc.is() ) mxAcc = new ThumbnailViewItemAcc( this, bIsTransientChildrenDisabled ); |