summaryrefslogtreecommitdiff
path: root/framework/source/uielement/popuptoolbarcontroller.cxx
diff options
context:
space:
mode:
authorRohan Kumar <rohankanojia420@gmail.com>2017-01-24 21:18:00 +0530
committerMaxim Monastirsky <momonasmon@gmail.com>2017-02-21 01:39:01 +0200
commit33c51e8002f58847ba43bc111dabc49278e36daf (patch)
treea1e276b24a26d4fe594b08dd47dfdaeda31cd020 /framework/source/uielement/popuptoolbarcontroller.cxx
parente25bf8505cfaa3599c2e78a7c56729280f27373e (diff)
tdf#95844 Refactor CommandInfoProvider
Instead of a singleton, CommandInfoProvider should just be a set of static methods. Change-Id: I16d4406e361a72f013d78f18d6bd0ae20c0cc5e9
Diffstat (limited to 'framework/source/uielement/popuptoolbarcontroller.cxx')
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 34b3a39cf528..4a13605270ae 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -370,7 +370,7 @@ void GenericPopupToolbarController::functionExecuted( const OUString& rCommand )
{
removeStatusListener( m_aCommandURL );
- OUString aRealCommand( vcl::CommandInfoProvider::Instance().GetRealCommandForCommand( rCommand, m_xFrame ) );
+ OUString aRealCommand( vcl::CommandInfoProvider::GetRealCommandForCommand( rCommand, m_xFrame ) );
m_aCommandURL = aRealCommand.isEmpty() ? rCommand : aRealCommand;
addStatusListener( m_aCommandURL );
@@ -380,12 +380,12 @@ void GenericPopupToolbarController::functionExecuted( const OUString& rCommand )
{
pToolBox->SetItemCommand( nId, rCommand );
pToolBox->SetHelpText( nId, OUString() ); // Will retrieve the new one from help.
- pToolBox->SetItemText( nId, vcl::CommandInfoProvider::Instance().GetLabelForCommand( rCommand, m_xFrame ) );
- pToolBox->SetQuickHelpText( nId, vcl::CommandInfoProvider::Instance().GetTooltipForCommand( rCommand, m_xFrame ) );
+ pToolBox->SetItemText( nId, vcl::CommandInfoProvider::GetLabelForCommand( rCommand, m_xFrame ) );
+ pToolBox->SetQuickHelpText( nId, vcl::CommandInfoProvider::GetTooltipForCommand( rCommand, m_xFrame ) );
vcl::ImageType eImageType = getImageType(pToolBox->GetToolboxButtonSize());
- Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(rCommand, m_xFrame, eImageType);
+ Image aImage = vcl::CommandInfoProvider::GetImageForCommand(rCommand, m_xFrame, eImageType);
if ( !!aImage )
pToolBox->SetItemImage( nId, aImage );
}
@@ -503,7 +503,7 @@ void SaveToolbarController::updateImage()
if ( m_bReadOnly )
{
- aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(".uno:SaveAs", m_xFrame, eImageType);
+ aImage = vcl::CommandInfoProvider::GetImageForCommand(".uno:SaveAs", m_xFrame, eImageType);
}
else if ( m_bModified )
{
@@ -512,7 +512,7 @@ void SaveToolbarController::updateImage()
}
if ( !aImage )
- aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(m_aCommandURL, m_xFrame, eImageType);
+ aImage = vcl::CommandInfoProvider::GetImageForCommand(m_aCommandURL, m_xFrame, eImageType);
if ( !!aImage )
pToolBox->SetItemImage( nId, aImage );
@@ -530,7 +530,7 @@ void SaveToolbarController::statusChanged( const css::frame::FeatureStateEvent&
if ( bLastReadOnly != m_bReadOnly )
{
pToolBox->SetQuickHelpText( nId,
- vcl::CommandInfoProvider::Instance().GetTooltipForCommand( m_bReadOnly ? OUString( ".uno:SaveAs" ) : m_aCommandURL, m_xFrame ) );
+ vcl::CommandInfoProvider::GetTooltipForCommand( m_bReadOnly ? OUString( ".uno:SaveAs" ) : m_aCommandURL, m_xFrame ) );
pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) & ~( m_bReadOnly ? ToolBoxItemBits::DROPDOWN : ToolBoxItemBits::DROPDOWNONLY ) );
pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ( m_bReadOnly ? ToolBoxItemBits::DROPDOWNONLY : ToolBoxItemBits::DROPDOWN ) );
updateImage();