Kaydet (Commit) 02044b5d authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

tdf#96059 Replace imageproducer with CommandInfoProvider

Change-Id: I9508a947e5ae6720516d9f926a59d4287cb15317
Reviewed-on: https://gerrit.libreoffice.org/20166Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
üst 56907b06
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
#include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/interfacecontainer.hxx>
#include <vcl/help.hxx> #include <vcl/help.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <dbaccess/IController.hxx> #include <dbaccess/IController.hxx>
#include <framework/actiontriggerhelper.hxx> #include <framework/actiontriggerhelper.hxx>
#include <toolkit/helper/vclunohelper.hxx> #include <toolkit/helper/vclunohelper.hxx>
#include <framework/imageproducer.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include "svtools/treelistentry.hxx" #include "svtools/treelistentry.hxx"
...@@ -500,7 +500,7 @@ namespace ...@@ -500,7 +500,7 @@ namespace
} }
if ( xFrame.is() ) if ( xFrame.is() )
_rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,false)); _rMenu.SetItemImage(nId, vcl::CommandInfoProvider::Instance().GetImageForCommand(aCommand, false, xFrame));
} }
} }
// SelectionSupplier // SelectionSupplier
......
...@@ -330,7 +330,7 @@ void ToolBarManager::RefreshImages() ...@@ -330,7 +330,7 @@ void ToolBarManager::RefreshImages()
else else
{ {
OUString aCommandURL = m_pToolBar->GetItemCommand( it.first ); 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 // Try also to query for add-on images before giving up and use an
// empty image. // empty image.
if ( !aImage ) if ( !aImage )
...@@ -1590,7 +1590,7 @@ bool ToolBarManager::MenuItemAllowed( sal_uInt16 ) const ...@@ -1590,7 +1590,7 @@ bool ToolBarManager::MenuItemAllowed( sal_uInt16 ) const
pVisibleItemsPopupMenu->InsertItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->GetItemText( nId ), MenuItemBits::CHECKABLE ); pVisibleItemsPopupMenu->InsertItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->GetItemText( nId ), MenuItemBits::CHECKABLE );
pVisibleItemsPopupMenu->CheckItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->IsItemVisible( nId ) ); pVisibleItemsPopupMenu->CheckItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->IsItemVisible( nId ) );
pVisibleItemsPopupMenu->SetItemCommand( STARTID_CUSTOMIZE_POPUPMENU+nPos, aCommandURL ); 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; commandToImage[aCommandURL] = aImage;
pVisibleItemsPopupMenu->SetItemImage( STARTID_CUSTOMIZE_POPUPMENU+nPos, aImage ); pVisibleItemsPopupMenu->SetItemImage( STARTID_CUSTOMIZE_POPUPMENU+nPos, aImage );
} }
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <svx/svditer.hxx> #include <svx/svditer.hxx>
#include <svx/dbaexchange.hxx> #include <svx/dbaexchange.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
...@@ -59,7 +60,6 @@ ...@@ -59,7 +60,6 @@
#include <svl/itempool.hxx> #include <svl/itempool.hxx>
#include <svtools/extcolorcfg.hxx> #include <svtools/extcolorcfg.hxx>
#include <unotools/confignode.hxx> #include <unotools/confignode.hxx>
#include <framework/imageproducer.hxx>
namespace rptui namespace rptui
...@@ -453,7 +453,7 @@ void lcl_insertMenuItemImages( ...@@ -453,7 +453,7 @@ void lcl_insertMenuItemImages(
else else
{ {
const OUString sCommand = rContextMenu.GetItemCommand(nId); 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 ) if ( nId == SID_PAGEHEADERFOOTER )
{ {
OUString sText = ModuleRes((_xReportDefinition.is() && _xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT); OUString sText = ModuleRes((_xReportDefinition.is() && _xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT);
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
#include <toolkit/helper/vclunohelper.hxx> #include <toolkit/helper/vclunohelper.hxx>
#include <svtools/miscopt.hxx> #include <svtools/miscopt.hxx>
#include <framework/imageproducer.hxx>
#include <com/sun/star/frame/XSubToolbarController.hpp> #include <com/sun/star/frame/XSubToolbarController.hpp>
using namespace css; using namespace css;
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <vcl/toolbox.hxx> #include <vcl/toolbox.hxx>
#include <sfx2/tbxctrl.hxx> #include <sfx2/tbxctrl.hxx>
#include <framework/sfxhelperfunctions.hxx> #include <framework/sfxhelperfunctions.hxx>
#include <framework/imageproducer.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <cppuhelper/basemutex.hxx> #include <cppuhelper/basemutex.hxx>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment