summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-11-25 12:17:44 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-11-25 12:55:10 +0000
commit02044b5d2711e837cfc8680a265614e138e79d86 (patch)
tree2d544a88f6980c2d1caaaa844e8c7457cf326991
parent56907b06f1cb9e938dfeb91165077dd99334fb8f (diff)
tdf#96059 Replace imageproducer with CommandInfoProvider
Change-Id: I9508a947e5ae6720516d9f926a59d4287cb15317 Reviewed-on: https://gerrit.libreoffice.org/20166 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx4
-rw-r--r--framework/source/uielement/toolbarmanager.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx4
-rw-r--r--sfx2/source/sidebar/SidebarToolBox.cxx1
-rw-r--r--svx/source/sidebar/insert/InsertPropertyPanel.cxx1
5 files changed, 6 insertions, 8 deletions
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 4de1b8129b3e..b39efbd6cbd2 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -31,10 +31,10 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <vcl/help.hxx>
+#include <vcl/commandinfoprovider.hxx>
#include <dbaccess/IController.hxx>
#include <framework/actiontriggerhelper.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#include <framework/imageproducer.hxx>
#include <vcl/svapp.hxx>
#include "svtools/treelistentry.hxx"
@@ -500,7 +500,7 @@ namespace
}
if ( xFrame.is() )
- _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,false));
+ _rMenu.SetItemImage(nId, vcl::CommandInfoProvider::Instance().GetImageForCommand(aCommand, false, xFrame));
}
}
// SelectionSupplier
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index c218e89beca1..f9954f2a3638 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -330,7 +330,7 @@ void ToolBarManager::RefreshImages()
else
{
OUString aCommandURL = m_pToolBar->GetItemCommand( it.first );
- Image aImage = GetImageFromURL( m_xFrame, aCommandURL, bBigImages );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aCommandURL, bBigImages, m_xFrame);
// Try also to query for add-on images before giving up and use an
// empty image.
if ( !aImage )
@@ -1590,7 +1590,7 @@ bool ToolBarManager::MenuItemAllowed( sal_uInt16 ) const
pVisibleItemsPopupMenu->InsertItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->GetItemText( nId ), MenuItemBits::CHECKABLE );
pVisibleItemsPopupMenu->CheckItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->IsItemVisible( nId ) );
pVisibleItemsPopupMenu->SetItemCommand( STARTID_CUSTOMIZE_POPUPMENU+nPos, aCommandURL );
- Image aImage( GetImageFromURL( m_xFrame, aCommandURL, false ) );
+ Image aImage( vcl::CommandInfoProvider::Instance().GetImageForCommand(aCommandURL, false, m_xFrame) );
commandToImage[aCommandURL] = aImage;
pVisibleItemsPopupMenu->SetItemImage( STARTID_CUSTOMIZE_POPUPMENU+nPos, aImage );
}
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index b08e4e62a2af..a4e96364610f 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -38,6 +38,7 @@
#include <svx/svditer.hxx>
#include <svx/dbaexchange.hxx>
+#include <vcl/commandinfoprovider.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
@@ -59,7 +60,6 @@
#include <svl/itempool.hxx>
#include <svtools/extcolorcfg.hxx>
#include <unotools/confignode.hxx>
-#include <framework/imageproducer.hxx>
namespace rptui
@@ -453,7 +453,7 @@ void lcl_insertMenuItemImages(
else
{
const OUString sCommand = rContextMenu.GetItemCommand(nId);
- rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,false));
+ rContextMenu.SetItemImage(nId, vcl::CommandInfoProvider::Instance().GetImageForCommand(sCommand, false, _rFrame));
if ( nId == SID_PAGEHEADERFOOTER )
{
OUString sText = ModuleRes((_xReportDefinition.is() && _xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT);
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx
index f2c7f0b4a20c..95acd31ab303 100644
--- a/sfx2/source/sidebar/SidebarToolBox.cxx
+++ b/sfx2/source/sidebar/SidebarToolBox.cxx
@@ -27,7 +27,6 @@
#include <vcl/settings.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <svtools/miscopt.hxx>
-#include <framework/imageproducer.hxx>
#include <com/sun/star/frame/XSubToolbarController.hpp>
using namespace css;
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.cxx b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
index 131e98959c9c..cdd4f6a7c177 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.cxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
@@ -29,7 +29,6 @@
#include <vcl/toolbox.hxx>
#include <sfx2/tbxctrl.hxx>
#include <framework/sfxhelperfunctions.hxx>
-#include <framework/imageproducer.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/basemutex.hxx>