diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2020-08-28 00:52:43 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2020-08-28 01:19:49 +0200 |
commit | a486fd929d4b3e915f928ef495b6cb2b96d74a3a (patch) | |
tree | 40bbcc3b7b7c71f90f4d688b7eb0bf23c461fab6 /framework/source | |
parent | 751a79444184a1aed1c39062f0a4ab043736c5f6 (diff) |
Use ToolBarMerger::IsCorrectContext
Change-Id: I1256dcacd364b332232872f48a4eb3ec979fb0a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101512
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 738792c6e653..5dc5c17dca48 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -131,20 +131,6 @@ sal_Int16 getCurrentImageType() return nImageType; } -bool IsCorrectContext( const OUString& rModuleIdentifier, const OUString& aContextList ) -{ - if ( aContextList.isEmpty() ) - return true; - - if ( !rModuleIdentifier.isEmpty() ) - { - sal_Int32 nIndex = aContextList.indexOf( rModuleIdentifier ); - return ( nIndex >= 0 ); - } - - return false; -} - } // end anonymous namespace // XInterface, XTypeProvider, XServiceInfo @@ -1207,7 +1193,7 @@ void ToolBarManager::FillAddonToolbar( const Sequence< Sequence< PropertyValue > ToolBarMerger::ConvertSequenceToValues( rSeq, aURL, aTitle, aImageId, aTarget, aContext, aControlType, nWidth ); - if ( IsCorrectContext( m_aModuleIdentifier, aContext ) ) + if ( ToolBarMerger::IsCorrectContext( aContext, m_aModuleIdentifier ) ) { if ( aURL == "private:separator" ) { |