[Libreoffice-commits] core.git: vcl/source
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 9 09:44:13 UTC 2020
vcl/source/window/toolbox2.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit abde84d77124e98c55cac4e7399a420f3d65fea5
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Mon Jan 6 21:56:20 2020 +0000
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Thu Jan 9 10:43:39 2020 +0100
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 at collabora.com>
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!
More information about the Libreoffice-commits
mailing list