diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2020-01-06 21:56:20 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2020-01-09 10:43:39 +0100 |
commit | abde84d77124e98c55cac4e7399a420f3d65fea5 (patch) | |
tree | 86fb68bdd4e9db2ffd666cd9f79d8d20c3389c57 /vcl/source/window/toolbox2.cxx | |
parent | 5c45b29f84c3421e1ad85c692ab8176cf15836a7 (diff) |
android: avoid expensive load of un-used sidebar icons on mobile.
Change-Id: I34c24c40009eeb4e8edbac785f9367f1dc3d56c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86468
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/source/window/toolbox2.cxx')
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 2e24c83e7be9..8e21fdd58a92 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <sal/log.hxx> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <boost/property_tree/ptree.hpp> @@ -425,7 +426,12 @@ void ToolBox::InsertItem(const OUString& rCommand, const css::uno::Reference<css auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(rCommand, aModuleName); OUString aLabel(vcl::CommandInfoProvider::GetLabelForCommand(aProperties)); OUString aTooltip(vcl::CommandInfoProvider::GetTooltipForCommand(rCommand, aProperties, rFrame)); + +#ifdef ANDROID + Image aImage; // Loading redundant icons for sidebars shows in profiles. +#else Image aImage(CommandInfoProvider::GetImageForCommand(rCommand, rFrame, GetImageSize())); +#endif sal_uInt16 nItemId = GetItemCount() + 1; //TODO: ImplToolItems::size_type -> sal_uInt16! |