[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - framework/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Fri Mar 4 13:59:00 UTC 2016
framework/source/uielement/addonstoolbarmanager.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 4a8a051e1a29c86d29d5064455226c4f11f69f52
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Mon Feb 29 17:46:30 2016 +0100
tdf#98277 Extensions: Display shortcut in toolbar tooltip
(cherry picked from commits 3ff17bda5ba3e627e9b996506dc72b68cf67483b and 398fadca9a82917ed865e328ba454d8015803b66)
This patch differs from the one in master since CommandInfoProvider is not available before 5.1.
Change-Id: Icc16860d8b47a3724838fdb3dcb72dfb4398167d
Reviewed-on: https://gerrit.libreoffice.org/22806
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index f895630..77e68c8 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -260,6 +260,11 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
m_pToolBar->InsertItem( nId, aTitle );
+ OUString aShortcut;
+ GetPropsForCommand(aURL); // Need to call this method to identify the Module so that we can use RetrieveShortcut()
+ if (RetrieveShortcut(aURL, aShortcut))
+ m_pToolBar->SetQuickHelpText( nId, aTitle + " (" + aShortcut + ")" );
+
// don't setup images yet, AddonsToolbarWrapper::populateImages does that.
// Create TbRuntimeItemData to hold additional information we will need in the future
More information about the Libreoffice-commits
mailing list