[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - framework/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 28 08:18:48 UTC 2021


 framework/source/uielement/toolbarmanager.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e51ad28ba22105c60be246f02e7951b986f35150
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Jun 24 16:02:02 2021 +0300
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Jun 28 10:18:14 2021 +0200

    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 at collabora.com>
    (cherry picked from commit 8383175bd3c714c163eac40a00b1e8277d4d5307)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117857
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 53d456f235c5..69dcd3d7a158 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1014,6 +1014,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 );


More information about the Libreoffice-commits mailing list