[Libreoffice-commits] core.git: framework/source
susobhang70
susobhang70 at gmail.com
Tue Jan 5 01:53:14 PST 2016
framework/source/classes/menumanager.cxx | 17 +++++++++--------
framework/source/fwe/classes/bmkmenu.cxx | 5 +++--
framework/source/uielement/addonstoolbarmanager.cxx | 5 +++--
framework/source/uielement/menubarmanager.cxx | 6 +++---
framework/source/uielement/newmenucontroller.cxx | 5 +++--
framework/source/uielement/subtoolbarcontroller.cxx | 3 ++-
framework/source/uielement/toolbarsmenucontroller.cxx | 3 ++-
7 files changed, 25 insertions(+), 19 deletions(-)
New commits:
commit 5c39b28a87060f80404079ab77604f664addb063
Author: susobhang70 <susobhang70 at gmail.com>
Date: Sun Jan 3 22:38:50 2016 +0530
tdf#96059 Replaced imageproducer with CommandInfoProvider
Replaced all instances of framework::GetImageFromURL with vcl::CommandInfoProvider::Instance().GetImageForCommand
Change-Id: I895a4a80d0219a6523b62d90ca88ec67a433b01c
Reviewed-on: https://gerrit.libreoffice.org/21101
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: jan iversen <jani at documentfoundation.org>
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 56ae8e4..8f354c6 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -51,6 +51,7 @@
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/settings.hxx>
+#include <vcl/commandinfoprovider.hxx>
#include <osl/mutex.hxx>
#include <osl/file.hxx>
@@ -165,7 +166,7 @@ MenuManager::MenuManager(
// Set image for the addon popup menu item
if ( bShowMenuImages && !pPopupMenu->GetItemImage( ITEMID_ADDONLIST ))
{
- Image aImage = GetImageFromURL( rFrame, aItemCommand, false );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aItemCommand, false, rFrame );
if ( !!aImage )
pPopupMenu->SetItemImage( ITEMID_ADDONLIST, aImage );
}
@@ -186,7 +187,7 @@ MenuManager::MenuManager(
AddMenu(pSubMenu,OUString(),nItemId,true,false);
if ( bShowMenuImages && !pMenu->GetItemImage( nItemId ))
{
- Image aImage = GetImageFromURL( rFrame, aItemCommand, false );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aItemCommand, false, rFrame );
if ( !!aImage )
pMenu->SetItemImage( nItemId, aImage );
}
@@ -201,7 +202,7 @@ MenuManager::MenuManager(
if ( bShowMenuImages && !pMenu->GetItemImage( nItemId ))
{
- Image aImage = GetImageFromURL( rFrame, aItemCommand, false );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aItemCommand, false, rFrame );
if ( !!aImage )
pMenu->SetItemImage( nItemId, aImage );
}
@@ -222,12 +223,12 @@ MenuManager::MenuManager(
if ( pMenuAttributes && !pMenuAttributes->aImageId.isEmpty() )
{
// Retrieve image id from menu attributes
- aImage = GetImageFromURL( rFrame, aImageId, false );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, false, rFrame );
}
if ( !aImage )
{
- aImage = GetImageFromURL( rFrame, aItemCommand, false );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aItemCommand, false, rFrame );
if ( !aImage )
aImage = AddonsOptions().GetImageFromURL( aItemCommand, false );
}
@@ -237,7 +238,7 @@ MenuManager::MenuManager(
}
else if ( !pMenu->GetItemImage( nItemId ))
{
- Image aImage = GetImageFromURL( rFrame, aItemCommand, false );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aItemCommand, false, rFrame );
if ( !!aImage )
pMenu->SetItemImage( nItemId, aImage );
}
@@ -948,7 +949,7 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame, Menu* _pMenu,bool
if ( !aImageId.isEmpty() )
{
- Image aImage = GetImageFromURL( _xFrame, aImageId, false );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, false, _xFrame );
if ( !!aImage )
{
bImageSet = true;
@@ -959,7 +960,7 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame, Menu* _pMenu,bool
if ( !bImageSet )
{
OUString aMenuItemCommand = _pMenu->GetItemCommand( nId );
- Image aImage = GetImageFromURL( _xFrame, aMenuItemCommand, false );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aMenuItemCommand, false, _xFrame );
if ( !aImage )
aImage = aAddonOptions.GetImageFromURL( aMenuItemCommand, false );
diff --git a/framework/source/fwe/classes/bmkmenu.cxx b/framework/source/fwe/classes/bmkmenu.cxx
index cc9c31f..07f91f7 100644
--- a/framework/source/fwe/classes/bmkmenu.cxx
+++ b/framework/source/fwe/classes/bmkmenu.cxx
@@ -34,6 +34,7 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
+#include <vcl/commandinfoprovider.hxx>
#include <unotools/dynamicmenuoptions.hxx>
#include <svtools/menuoptions.hxx>
@@ -144,7 +145,7 @@ void BmkMenu::Initialize()
if ( !aImageId.isEmpty() )
{
- Image aImage = GetImageFromURL( m_xFrame, aImageId, false );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aImageId, false, m_xFrame );
if ( !!aImage )
{
bImageSet = true;
@@ -154,7 +155,7 @@ void BmkMenu::Initialize()
if ( !bImageSet )
{
- Image aImage = GetImageFromURL( m_xFrame, aURL, false );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aURL, false, m_xFrame );
if ( !aImage )
InsertItem( nId, aTitle );
else
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 8ca598a..d6e2327 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -56,6 +56,7 @@
#include <vcl/taskpanelist.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/settings.hxx>
+#include <vcl/commandinfoprovider.hxx>
// namespaces
@@ -121,14 +122,14 @@ static Image RetrieveImage( Reference< css::frame::XFrame >& rFrame,
if ( !!aImage )
return aImage;
else
- aImage = GetImageFromURL( rFrame, aImageId, bBigImage );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, bBigImage, rFrame );
if ( !!aImage )
return aImage;
}
aImage = framework::AddonsOptions().GetImageFromURL( aURL, bBigImage );
if ( !aImage )
- aImage = GetImageFromURL( rFrame, aImageId, bBigImage );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, bBigImage, rFrame );
return aImage;
}
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 1377370..5af9371 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1297,7 +1297,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
if ( bItemShowMenuImages && !pPopup->GetItemImage( ITEMID_ADDONLIST ))
{
Reference< XFrame > xTemp( rFrame );
- Image aImage = GetImageFromURL( xTemp, aItemCommand, false );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aItemCommand, false, xTemp );
if ( !!aImage )
pPopup->SetItemImage( ITEMID_ADDONLIST, aImage );
}
@@ -1326,12 +1326,12 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
if ( pMenuAttributes && !pMenuAttributes->aImageId.isEmpty() )
{
// Retrieve image id from menu attributes
- aImage = GetImageFromURL( m_xFrame, aImageId, false );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aImageId, false, m_xFrame );
}
if ( !aImage )
{
- aImage = GetImageFromURL( m_xFrame, aItemCommand, false );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aItemCommand, false, m_xFrame );
if ( !aImage )
aImage = AddonsOptions().GetImageFromURL( aItemCommand, false );
}
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 9029ccc..3bf7343 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -37,6 +37,7 @@
#include <vcl/svapp.hxx>
#include <vcl/i18nhelp.hxx>
#include <vcl/settings.hxx>
+#include <vcl/commandinfoprovider.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/file.hxx>
#include <svtools/menuoptions.hxx>
@@ -89,7 +90,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, bool bSetImages )
if ( !aImageId.isEmpty() )
{
- aImage = GetImageFromURL( xFrame, aImageId, false );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aImageId, false, xFrame );
if ( !!aImage )
{
bImageSet = true;
@@ -101,7 +102,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, bool bSetImages )
{
OUString aCmd( pPopupMenu->GetItemCommand( nItemId ) );
if ( !aCmd.isEmpty() )
- aImage = GetImageFromURL( xFrame, aCmd, false );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aCmd, false, xFrame );
if ( !!aImage )
pPopupMenu->SetItemImage( nItemId, aImage );
diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx
index c548afa..13c1fcd 100644
--- a/framework/source/uielement/subtoolbarcontroller.cxx
+++ b/framework/source/uielement/subtoolbarcontroller.cxx
@@ -27,6 +27,7 @@
#include <tools/gen.hxx>
#include <vcl/svapp.hxx>
#include <vcl/toolbox.hxx>
+#include <vcl/commandinfoprovider.hxx>
#include <com/sun/star/awt/XDockableWindow.hpp>
#include <com/sun/star/frame/XSubToolbarController.hpp>
@@ -291,7 +292,7 @@ void SubToolBarController::updateImage()
sal_uInt16 nId = 0;
if ( getToolboxId( nId, &pToolBox ) )
{
- Image aImage = framework::GetImageFromURL( getFrameInterface(), m_aLastCommand, pToolBox->GetToolboxButtonSize() == TOOLBOX_BUTTONSIZE_LARGE );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( m_aLastCommand, pToolBox->GetToolboxButtonSize() == TOOLBOX_BUTTONSIZE_LARGE, getFrameInterface() );
if ( !!aImage )
pToolBox->SetItemImage( nId, aImage );
}
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index ba9476a..0353c89 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -48,6 +48,7 @@
#include <vcl/i18nhelp.hxx>
#include <vcl/image.hxx>
#include <vcl/settings.hxx>
+#include <vcl/commandinfoprovider.hxx>
#include <rtl/ustrbuf.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/window.hxx>
@@ -175,7 +176,7 @@ void ToolbarsMenuController::addCommand(
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
if ( rSettings.GetUseImagesInMenus() )
- aImage = GetImageFromURL( m_xFrame, rCommandURL, false );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( rCommandURL, false, m_xFrame );
VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::GetImplementation( rPopupMenu ));
if ( pPopupMenu )
More information about the Libreoffice-commits
mailing list