diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-12-13 11:08:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-12-14 11:59:44 +0000 |
commit | 840154daf934d8df52ead1cb7acd798c4d30f007 (patch) | |
tree | d141875cfd840ac5dd11443379f79c6c1030cc1c /framework/source/layoutmanager/toolbarlayoutmanager.cxx | |
parent | ff598ae2d2d356c1c7b1e3e9190eb1f02a74c1da (diff) |
loplugin:unocast (framework::AddonsToolBarWrapper)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)
Change-Id: I8014f683b939da9d638545c77dbddb3e478a385e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144143
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'framework/source/layoutmanager/toolbarlayoutmanager.cxx')
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index cf444b5ab31d..9ec6bdbfe52b 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -34,6 +34,7 @@ #include <com/sun/star/ui/XUIFunctionListener.hpp> #include <comphelper/propertyvalue.hxx> +#include <comphelper/servicehelper.hxx> #include <cppuhelper/queryinterface.hxx> #include <o3tl/string_view.hxx> #include <unotools/cmdoptions.hxx> @@ -668,7 +669,7 @@ bool ToolbarLayoutManager::showToolbar( std::u16string_view rResourceURL ) // Addons appear to need to be populated at start, but we don't // want to populate them with (scaled) images until later. AddonsToolBarWrapper *pAddOns; - pAddOns = dynamic_cast<AddonsToolBarWrapper *>( aUIElement.m_xUIElement.get()); + pAddOns = comphelper::getFromUnoTunnel<AddonsToolBarWrapper>( aUIElement.m_xUIElement); if (pAddOns) pAddOns->populateImages(); |