summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-08-30 13:46:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-08-31 08:34:42 +0200
commiteecf74196b852cddaaffbf7e0442fd2abbc36a5d (patch)
tree0473790cd1b6eb78c18485d053a22d2daef2d53a /sfx2
parentd082621130b01ebc6c7794dc54ff7ace76468599 (diff)
use concrete type for ThumbnailView::mxAccessible
avoid some unnecessary casting Change-Id: Id3c4d8b91ec04beb1fed61050066e2b79d01d2df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/thumbnailview.cxx27
1 files changed, 10 insertions, 17 deletions
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 12bfcb327143..b0cc1efefb27 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -160,10 +160,8 @@ ThumbnailView::ThumbnailView(std::unique_ptr<weld::ScrolledWindow> xWindow, std:
ThumbnailView::~ThumbnailView()
{
- css::uno::Reference< css::lang::XComponent> xComponent(mxAccessible, css::uno::UNO_QUERY);
-
- if (xComponent.is())
- xComponent->dispose();
+ if (mxAccessible.is())
+ mxAccessible->dispose();
mpItemAttrs.reset();
@@ -328,7 +326,7 @@ css::uno::Reference< css::accessibility::XAccessible > ThumbnailView::CreateAcce
return mxAccessible;
}
-const css::uno::Reference< css::accessibility::XAccessible > & ThumbnailView::getAccessible() const
+const rtl::Reference< ThumbnailViewAcc > & ThumbnailView::getAccessible() const
{
return mxAccessible;
}
@@ -550,16 +548,13 @@ ThumbnailViewItem* ThumbnailView::ImplGetVisibleItem( sal_uInt16 nVisiblePos )
void ThumbnailView::ImplFireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue )
{
- ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation(mxAccessible);
-
- if( pAcc )
- pAcc->FireAccessibleEvent( nEventId, rOldValue, rNewValue );
+ if( mxAccessible )
+ mxAccessible->FireAccessibleEvent( nEventId, rOldValue, rNewValue );
}
bool ThumbnailView::ImplHasAccessibleListeners() const
{
- ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation(mxAccessible);
- return( pAcc && pAcc->HasAccessibleListeners() );
+ return mxAccessible && mxAccessible->HasAccessibleListeners();
}
IMPL_LINK_NOARG(ThumbnailView, ImplScrollHdl, weld::ScrolledWindow&, void)
@@ -950,9 +945,8 @@ void ThumbnailView::GetFocus()
}
// Tell the accessible object that we got the focus.
- ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation(mxAccessible);
- if( pAcc )
- pAcc->GetFocus();
+ if( mxAccessible )
+ mxAccessible->GetFocus();
CustomWidgetController::GetFocus();
}
@@ -962,9 +956,8 @@ void ThumbnailView::LoseFocus()
CustomWidgetController::LoseFocus();
// Tell the accessible object that we lost the focus.
- ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation(mxAccessible);
- if( pAcc )
- pAcc->LoseFocus();
+ if( mxAccessible )
+ mxAccessible->LoseFocus();
}
void ThumbnailView::Resize()