summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-02-29 17:46:30 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-03-04 13:58:38 +0000
commit4a8a051e1a29c86d29d5064455226c4f11f69f52 (patch)
tree216bf57ff46535ff32fb33c61e48a5fbc15af51e
parent79288ac239ebf1916ffbf3c386482d00e6060f8d (diff)
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@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index f89563055c2d..77e68c80c992 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