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-07 18:56:14 +0100 |
commit | 0063b202a1973bb967ba47bd350a7cfe90875a15 (patch) | |
tree | b6e9a922c3f200112a77d0d4dc57e2c9474a7ed4 /vcl | |
parent | 608e2a953176443f1fc086c9070b9d1e2d50a765 (diff) |
android: avoid expensive load of un-used sidebar icons on mobile.
Change-Id: I34c24c40009eeb4e8edbac785f9367f1dc3d56c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86367
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl')
-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 1e8efa249a57..92b54e661b96 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 <vcl/svapp.hxx> @@ -424,7 +425,12 @@ void ToolBox::InsertItem(const OUString& rCommand, const css::uno::Reference<css OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(rFrame)); OUString aLabel(vcl::CommandInfoProvider::GetLabelForCommand(rCommand, aModuleName)); OUString aTooltip(vcl::CommandInfoProvider::GetTooltipForCommand(rCommand, 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! |