diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2022-07-21 23:56:42 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2022-08-10 08:28:18 +0200 |
commit | c76857fe4e725834e6be9bd5b3273df95bf7fafd (patch) | |
tree | 42ea625d90263c62e0a00cc1935ca8466853cf08 /forms/source/solar/control | |
parent | 085abe2b7187f2cfd69a5a1c6e84ef0c9c214f78 (diff) |
Make ToolBox::InsertItem take the command name
For the next patch for tdf#149956 I need the command to be
already set when the VclEventId::ToolboxItemAdded event is emitted.
Change-Id: I3d8ce44b426a3ed5704d4520d6e62bc4efbf8e44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138038
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'forms/source/solar/control')
-rw-r--r-- | forms/source/solar/control/navtoolbar.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 217a9d55d0d3..7193ac4532c1 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -91,7 +91,6 @@ namespace frm if ( pAsciiCommandName != nullptr ) return ".uno:" + OUString::createFromAscii( pAsciiCommandName ); - OSL_FAIL( "lcl_getCommandURL: unknown FormFeature!" ); return OUString(); } } @@ -279,13 +278,12 @@ namespace frm { // it's _not_ a separator // insert the entry - m_pToolbar->InsertItem( ToolBoxItemId(pSupportedFeatures->nId), OUString(), pSupportedFeatures->bRepeat ? ToolBoxItemBits::REPEAT : ToolBoxItemBits::NONE ); + OUString sCommandURL( lcl_getCommandURL( pSupportedFeatures->nId ) ); + m_pToolbar->InsertItem( ToolBoxItemId(pSupportedFeatures->nId), OUString(), sCommandURL, pSupportedFeatures->bRepeat ? ToolBoxItemBits::REPEAT : ToolBoxItemBits::NONE ); m_pToolbar->SetQuickHelpText( ToolBoxItemId(pSupportedFeatures->nId), OUString() ); // TODO if ( !isArtificialItem( pSupportedFeatures->nId ) ) { - OUString sCommandURL( lcl_getCommandURL( pSupportedFeatures->nId ) ); - m_pToolbar->SetItemCommand( ToolBoxItemId(pSupportedFeatures->nId), sCommandURL ); auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sCommandURL, m_sModuleId); m_pToolbar->SetQuickHelpText(ToolBoxItemId(pSupportedFeatures->nId), vcl::CommandInfoProvider::GetLabelForCommand(aProperties)); |