diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-12-08 15:57:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-12-14 09:54:30 +0000 |
commit | b0e9c4c5f063cefa9557810e3349bdb9c7493091 (patch) | |
tree | d328a074e9a4c959b5d68d342b393a9523a73d98 /linguistic/source/lngsvcmgr.cxx | |
parent | 8ee6cfc9655ce9de4617cea1a0d9cb9d7a4fbfac (diff) |
loplugin:unocast (GrammarCheckingIterator)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)
Change-Id: I4ecaa3cfafbb2e01ede956e4f3f6d58f40bdbb57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144146
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'linguistic/source/lngsvcmgr.cxx')
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index f38ee262099c..7ef56cb10fb8 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -38,6 +38,7 @@ #include <comphelper/interfacecontainer2.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> +#include <comphelper/servicehelper.hxx> #include <i18nlangtag/lang.h> #include <i18nlangtag/languagetag.hxx> #include <cppuhelper/factory.hxx> @@ -890,7 +891,7 @@ void LngSvcMgr::GetGrammarCheckerDsp_Impl( bool bSetSvcList ) if (xGCI.is()) { - mxGrammarDsp = dynamic_cast< GrammarCheckingIterator * >(xGCI.get()); + mxGrammarDsp = comphelper::getFromUnoTunnel< GrammarCheckingIterator >(xGCI); SAL_WARN_IF( mxGrammarDsp == nullptr, "linguistic", "failed to get implementation" ); if (bSetSvcList && mxGrammarDsp.is()) SetCfgServiceLists( *mxGrammarDsp ); |