sd/source/ui/table/tablefunction.cxx | 3 ++- sd/source/ui/unoidl/unomodel.cxx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit 589e03fb4c3b05bf3742c0cb8b366322ffdf1fa9 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Nov 25 16:34:07 2022 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Nov 28 21:14:02 2022 +0100 [PATCH] Replace some dynamic_cast with UNO_QUERY Change-Id: I59ad7246cee84bd63784477e1fefda708ac35dd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143413 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 21b9df9ad4aa..352ffb37abfe 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -66,7 +66,8 @@ static void apply_table_style( SdrTableObj* pObj, SdrModel const * pModel, const if( !(pModel && pObj) ) return; - Reference< XNameAccess > xPool( dynamic_cast< XNameAccess* >( pModel->GetStyleSheetPool() ) ); + Reference< XNameAccess > xPool( + static_cast< cppu::OWeakObject* >( pModel->GetStyleSheetPool() ), css::uno::UNO_QUERY ); if( !xPool.is() ) return; diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index a6a4afa98d25..edcaa3a4fdfc 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1454,7 +1454,7 @@ uno::Reference< container::XNameAccess > SAL_CALL SdXImpressDocument::getStyleFa if( nullptr == mpDoc ) throw lang::DisposedException(); - uno::Reference< container::XNameAccess > xStyles( dynamic_cast< container::XNameAccess* >( mpDoc->GetStyleSheetPool()) ); + uno::Reference< container::XNameAccess > xStyles( static_cast< OWeakObject* >( mpDoc->GetStyleSheetPool() ), css::uno::UNO_QUERY ); return xStyles; }