framework/source/uielement/toolbarmanager.cxx | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-)
New commits: commit a486fd929d4b3e915f928ef495b6cb2b96d74a3a Author: Maxim Monastirsky <[email protected]> AuthorDate: Fri Aug 28 00:52:43 2020 +0300 Commit: Maxim Monastirsky <[email protected]> CommitDate: Fri Aug 28 01:19:49 2020 +0200 Use ToolBarMerger::IsCorrectContext Change-Id: I1256dcacd364b332232872f48a4eb3ec979fb0a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101512 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <[email protected]> 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" ) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
