diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-12-13 11:18:35 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-12-14 09:16:36 +0000 |
commit | 5b8cd77c112bc8c0e92b8fec215c3c8e802bbc0a (patch) | |
tree | a5528a6d49ed226d30c8523ec0434dedb39353f4 /basic/source/basmgr | |
parent | 9e73ff9fce12e102bb3c3cea8d8bb96c88f2c9ad (diff) |
loplugin:unocast (basic::SfxScriptLibraryContainer)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)
Change-Id: I962b2a11a6407a543fb8b4ad972128d59f62a8a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144142
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic/source/basmgr')
-rw-r--r-- | basic/source/basmgr/basicmanagerrepository.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 7a2ed5efd20a..803d8ed4caa0 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -35,6 +35,7 @@ #include <vcl/svapp.hxx> #include <tools/debug.hxx> #include <comphelper/diagnose_ex.hxx> +#include <comphelper/servicehelper.hxx> #include <tools/urlobj.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/documentinfo.hxx> @@ -462,7 +463,7 @@ namespace basic } // knit the containers with the BasicManager - LibraryContainerInfo aInfo( xBasicLibs, xDialogLibs, dynamic_cast< SfxScriptLibraryContainer* >( xBasicLibs.get() ) ); + LibraryContainerInfo aInfo( xBasicLibs, xDialogLibs, comphelper::getFromUnoTunnel< SfxScriptLibraryContainer >( xBasicLibs ) ); OSL_ENSURE( aInfo.mpOldBasicPassword, "ImplRepository::impl_createManagerForModel: wrong BasicLibraries implementation!" ); _out_rpBasicManager->SetLibraryContainerInfo( aInfo ); |