summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-06-24 16:02:02 +0300
committerXisco Fauli <xiscofauli@libreoffice.org>2021-06-28 10:17:50 +0200
commitcaa0bccff18c2a6b67b97a3617109bdd7455dd2a (patch)
tree362286fa5d47ce4005b4b4b79f24e54afe3c59ba
parenttdf#58250 - Show custom unicode separator in the csv import dialog (diff)
downloadcore-caa0bccff18c2a6b67b97a3617109bdd7455dd2a.tar.gz
core-caa0bccff18c2a6b67b97a3617109bdd7455dd2a.zip
tdf#143047: When no properties for command, use those from item container
This allows to use the "Label" property defined by user for macro items, that indeed have no built-in command properties. Thus the resulting tooltip will be a concatenation of the label and mnemonic instead of only mnemonic as happened before. Change-Id: I79d933fecd09ca7d64b7a3e7db0ef194e42c1c55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117787 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 8383175bd3c714c163eac40a00b1e8277d4d5307) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117856 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--framework/source/uielement/toolbarmanager.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index ad52608c5b0c..0bd0d627ff9d 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1416,6 +1416,8 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
if (( nType == css::ui::ItemType::DEFAULT ) && !aCommandURL.isEmpty() )
{
auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aCommandURL, m_aModuleIdentifier);
+ if (!aProperties.hasElements()) // E.g., user-provided macro command?
+ aProperties = aProps; // Use existing info, including user-provided Label
OUString aString(vcl::CommandInfoProvider::GetLabelForCommand(aProperties));
ToolBoxItemBits nItemBits = ConvertStyleToToolboxItemBits( nStyle );