summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-10-30 16:24:37 +0100
committerTomaž Vajngerl <quikee@gmail.com>2016-10-30 18:00:05 +0000
commitb1426b5b502fd591402d666994e3f1fb3a8ad959 (patch)
tree3614d896993b004e805f9714a126070ec5d5c29f /framework
parent17b1ebbf86ceabe2e9cabf9626ca94fae3fb9216 (diff)
tdf#95014 initial support for 32 px icons in toolbar
This adds support for 32 pixel icons - mainly to get them into the toolbar. Most changes made are to change the behavior of having only small and large icons as a boolean choice, but not every code path was converted to non-boolean choice yet. Breeze icon theme has the 32px variants so it can be used already. Change-Id: Iadf832a87826c16b3a83522104dd6c35d61a0f87 Reviewed-on: https://gerrit.libreoffice.org/30398 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx3
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx37
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx8
-rw-r--r--framework/source/uielement/menubarmanager.cxx10
-rw-r--r--framework/source/uielement/newmenucontroller.cxx2
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx29
-rw-r--r--framework/source/uielement/subtoolbarcontroller.cxx8
-rw-r--r--framework/source/uielement/toolbarmanager.cxx82
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx2
9 files changed, 119 insertions, 62 deletions
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 4a60aff7559b..48722dec5acb 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -156,11 +156,12 @@ class ToolBarManager : public ToolbarManager_Base
typedef std::unordered_map< sal_uInt16, css::uno::Reference< css::container::XIndexAccess > > MenuDescriptionMap;
bool m_bDisposed : 1,
- m_bSmallSymbols : 1,
m_bAddedToTaskPaneList : 1,
m_bFrameActionRegistered : 1,
m_bUpdateControllers : 1;
+ sal_Int16 m_eSymbolSize;
+
VclPtr<ToolBox> m_pToolBar;
OUString m_aModuleIdentifier;
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index d229de961a33..bde487dfea39 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -64,10 +64,7 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::ui;
using namespace ::cppu;
-// Image sizes for our toolbars/menus
-const sal_Int32 IMAGE_SIZE_NORMAL = 16;
-const sal_Int32 IMAGE_SIZE_LARGE = 26;
-const sal_Int16 MAX_IMAGETYPE_VALUE = css::ui::ImageType::SIZE_LARGE;
+const sal_Int16 MAX_IMAGETYPE_VALUE = css::ui::ImageType::SIZE_32;
static const char IMAGE_FOLDER[] = "images";
static const char BITMAPS_FOLDER[] = "Bitmaps";
@@ -77,13 +74,15 @@ static const char ModuleImageList[] = "private:resource/images/moduleimage
static const o3tl::enumarray<vcl::ImageType, const char*> IMAGELIST_XML_FILE =
{
"sc_imagelist.xml",
- "lc_imagelist.xml"
+ "lc_imagelist.xml",
+ "xc_imagelist.xml"
};
static const o3tl::enumarray<vcl::ImageType, const char*> BITMAP_FILE_NAMES =
{
"sc_userimages.png",
- "lc_userimages.png"
+ "lc_userimages.png",
+ "xc_userimages.png"
};
namespace framework
@@ -221,8 +220,9 @@ bool GlobalImageList::hasImage( vcl::ImageType nImageType, const OUString& rComm
static bool implts_checkAndScaleGraphic( uno::Reference< XGraphic >& rOutGraphic, const uno::Reference< XGraphic >& rInGraphic, vcl::ImageType nImageType )
{
- static Size aNormSize( IMAGE_SIZE_NORMAL, IMAGE_SIZE_NORMAL );
- static Size aLargeSize( IMAGE_SIZE_LARGE, IMAGE_SIZE_LARGE );
+ static Size aNormSize(16, 16);
+ static Size aLargeSize(26, 26);
+ static Size aSize32(32, 32);
if ( !rInGraphic.is() )
{
@@ -235,12 +235,14 @@ static bool implts_checkAndScaleGraphic( uno::Reference< XGraphic >& rOutGraphic
Size aSize = aImage.GetSizePixel();
bool bMustScale( false );
- if ( nImageType == vcl::ImageType::Color_Large )
- bMustScale = ( aSize != aLargeSize );
+ if (nImageType == vcl::ImageType::Size26)
+ bMustScale = (aSize != aLargeSize);
+ else if (nImageType == vcl::ImageType::Size32)
+ bMustScale = (aSize != aSize32);
else
- bMustScale = ( aSize != aNormSize );
+ bMustScale = (aSize != aNormSize);
- if ( bMustScale )
+ if (bMustScale)
{
BitmapEx aBitmap = aImage.GetBitmapEx();
aBitmap.Scale( aNormSize );
@@ -249,15 +251,18 @@ static bool implts_checkAndScaleGraphic( uno::Reference< XGraphic >& rOutGraphic
}
else
rOutGraphic = rInGraphic;
+
return true;
}
static vcl::ImageType implts_convertImageTypeToIndex( sal_Int16 nImageType )
{
- vcl::ImageType nIndex( vcl::ImageType::Color );
- if ( nImageType & css::ui::ImageType::SIZE_LARGE )
- nIndex = vcl::ImageType::Color_Large;
- return nIndex;
+ if (nImageType & css::ui::ImageType::SIZE_LARGE)
+ return vcl::ImageType::Size26;
+ else if (nImageType & css::ui::ImageType::SIZE_32)
+ return vcl::ImageType::Size32;
+ else
+ return vcl::ImageType::Size16;
}
ImageList* ImageManagerImpl::implts_getUserImageList( vcl::ImageType nImageType )
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 930c62c62c6f..cdca410d7406 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -113,6 +113,10 @@ static Image RetrieveImage( Reference< css::frame::XFrame >& rFrame,
bool bBigImage
)
{
+ vcl::ImageType eImageType = vcl::ImageType::Size16;
+ if (bBigImage)
+ eImageType = vcl::ImageType::Size26;
+
Image aImage;
if ( !aImageId.isEmpty() )
@@ -121,14 +125,14 @@ static Image RetrieveImage( Reference< css::frame::XFrame >& rFrame,
if ( !!aImage )
return aImage;
else
- aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, bBigImage, rFrame );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, rFrame, eImageType);
if ( !!aImage )
return aImage;
}
aImage = framework::AddonsOptions().GetImageFromURL( aURL, bBigImage );
if ( !aImage )
- aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, bBigImage, rFrame );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, rFrame, eImageType);
return aImage;
}
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index d78b7ce8a29b..c4df1f21c6c1 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1293,7 +1293,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
// Set image for the addon popup menu item
if ( bItemShowMenuImages && !pPopup->GetItemImage( ITEMID_ADDONLIST ))
{
- Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aItemCommand, false, rFrame );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aItemCommand, rFrame);
if ( !!aImage )
pPopup->SetItemImage( ITEMID_ADDONLIST, aImage );
}
@@ -1324,12 +1324,12 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
if ( pMenuAttributes && !pMenuAttributes->aImageId.isEmpty() )
{
// Retrieve image id from menu attributes
- aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aImageId, false, m_xFrame );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, m_xFrame);
}
if ( !aImage )
{
- aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aItemCommand, false, m_xFrame );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aItemCommand, m_xFrame);
if ( !aImage )
aImage = AddonsOptions().GetImageFromURL( aItemCommand, false );
}
@@ -2090,7 +2090,7 @@ void MenuBarManager::FillMenuImages(Reference< XFrame >& _xFrame, Menu* _pMenu,b
if ( !aImageId.isEmpty() )
{
- Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, false, _xFrame );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, _xFrame);
if ( !!aImage )
{
bImageSet = true;
@@ -2101,7 +2101,7 @@ void MenuBarManager::FillMenuImages(Reference< XFrame >& _xFrame, Menu* _pMenu,b
if ( !bImageSet )
{
OUString aMenuItemCommand = _pMenu->GetItemCommand( nId );
- Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aMenuItemCommand, false, _xFrame );
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aMenuItemCommand, _xFrame);
if ( !aImage )
aImage = aAddonOptions.GetImageFromURL( aMenuItemCommand, false );
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 94b15fca3afb..971e5f535a45 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -92,7 +92,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, bool bSetImages )
if ( !aImageId.isEmpty() )
{
- aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aImageId, false, xFrame );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aImageId, xFrame);
if ( !!aImage )
{
bImageSet = true;
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index e3a840d5dd69..55d180ee815f 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -53,7 +53,18 @@
using namespace framework;
-namespace {
+namespace
+{
+
+vcl::ImageType getImageType(ToolBoxButtonSize eSize)
+{
+ vcl::ImageType eImageType = vcl::ImageType::Size16;
+ if (eSize == ToolBoxButtonSize::Large)
+ eImageType = vcl::ImageType::Size26;
+ else if (eSize == ToolBoxButtonSize::Size32)
+ eImageType = vcl::ImageType::Size32;
+ return eImageType;
+}
typedef cppu::ImplInheritanceHelper< svt::ToolboxController,
css::lang::XServiceInfo >
@@ -380,9 +391,10 @@ void GenericPopupToolbarController::functionExecuted( const OUString& 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 ) );
- Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( rCommand,
- pToolBox->GetToolboxButtonSize() == ToolBoxButtonSize::Large,
- m_xFrame );
+
+ vcl::ImageType eImageType = getImageType(pToolBox->GetToolboxButtonSize());
+
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(rCommand, m_xFrame, eImageType);
if ( !!aImage )
pToolBox->SetItemImage( nId, aImage );
}
@@ -499,21 +511,22 @@ void SaveToolbarController::updateImage()
if ( !getToolboxId( nId, &pToolBox ) )
return;
- bool bLargeIcons = pToolBox->GetToolboxButtonSize() == ToolBoxButtonSize::Large;
+ vcl::ImageType eImageType = getImageType(pToolBox->GetToolboxButtonSize());
+
Image aImage;
if ( m_bReadOnly )
{
- aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( ".uno:SaveAs", bLargeIcons, m_xFrame );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(".uno:SaveAs", m_xFrame, eImageType);
}
else if ( m_bModified )
{
- Image aResImage( bLargeIcons ? FwkResId( IMG_SAVEMODIFIED_LARGE ) : FwkResId( IMG_SAVEMODIFIED_SMALL ) );
+ Image aResImage(eImageType == vcl::ImageType::Size16 ? FwkResId(IMG_SAVEMODIFIED_SMALL) : FwkResId(IMG_SAVEMODIFIED_LARGE));
aImage = aResImage;
}
if ( !aImage )
- aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( m_aCommandURL, bLargeIcons, m_xFrame );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(m_aCommandURL, m_xFrame, eImageType);
if ( !!aImage )
pToolBox->SetItemImage( nId, aImage );
diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx
index b50d248bb771..af44f8a1199e 100644
--- a/framework/source/uielement/subtoolbarcontroller.cxx
+++ b/framework/source/uielement/subtoolbarcontroller.cxx
@@ -291,7 +291,13 @@ void SubToolBarController::updateImage()
sal_uInt16 nId = 0;
if ( getToolboxId( nId, &pToolBox ) )
{
- Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( m_aLastCommand, pToolBox->GetToolboxButtonSize() == ToolBoxButtonSize::Large, getFrameInterface() );
+ vcl::ImageType eImageType = vcl::ImageType::Size16;
+ if (pToolBox->GetToolboxButtonSize() == ToolBoxButtonSize::Large)
+ eImageType = vcl::ImageType::Size26;
+ else if (pToolBox->GetToolboxButtonSize() == ToolBoxButtonSize::Size32)
+ eImageType = vcl::ImageType::Size32;
+
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(m_aLastCommand, getFrameInterface(), eImageType);
if ( !!aImage )
pToolBox->SetItemImage( nId, aImage );
}
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index a76e552932a3..ec0e374ad07a 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -54,6 +54,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <svtools/miscopt.hxx>
+#include <svtools/imgdef.hxx>
#include <vcl/svapp.hxx>
#include <vcl/menu.hxx>
#include <vcl/syswin.hxx>
@@ -94,15 +95,6 @@ static const char HELPID_PREFIX_TESTTOOL[] = ".HelpId:";
static const sal_uInt16 STARTID_CUSTOMIZE_POPUPMENU = 1000;
-
-static sal_Int16 getImageTypeFromBools( bool bBig )
-{
- sal_Int16 n( 0 );
- if ( bBig )
- n |= css::ui::ImageType::SIZE_LARGE;
- return n;
-}
-
static css::uno::Reference< css::frame::XLayoutManager > getLayoutManagerFromFrame(
css::uno::Reference< css::frame::XFrame >& rFrame )
{
@@ -126,6 +118,21 @@ static css::uno::Reference< css::frame::XLayoutManager > getLayoutManagerFromFra
return xLayoutManager;
}
+namespace
+{
+
+sal_Int16 getCurrentImageType()
+{
+ SvtMiscOptions aMiscOptions;
+ sal_Int16 nImageType = css::ui::ImageType::SIZE_DEFAULT;
+ if (aMiscOptions.GetCurrentSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE)
+ nImageType |= css::ui::ImageType::SIZE_LARGE;
+ else if (aMiscOptions.GetCurrentSymbolsSize() == SFX_SYMBOLS_SIZE_32)
+ nImageType |= css::ui::ImageType::SIZE_32;
+ return nImageType;
+}
+
+} // end anonymous namespace
// XInterface, XTypeProvider, XServiceInfo
@@ -134,10 +141,10 @@ ToolBarManager::ToolBarManager( const Reference< XComponentContext >& rxContext,
const OUString& rResourceName,
ToolBox* pToolBar ) :
m_bDisposed( false ),
- m_bSmallSymbols( !SvtMiscOptions().AreCurrentSymbolsLarge() ),
m_bAddedToTaskPaneList( true ),
m_bFrameActionRegistered( false ),
m_bUpdateControllers( false ),
+ m_eSymbolSize(SvtMiscOptions().GetCurrentSymbolsSize()),
m_pToolBar( pToolBar ),
m_aResourceName( rResourceName ),
m_xFrame( rFrame ),
@@ -163,7 +170,13 @@ ToolBarManager::ToolBarManager( const Reference< XComponentContext >& rxContext,
m_pToolBar->SetDoubleClickHdl( LINK( this, ToolBarManager, DoubleClick ) );
m_pToolBar->SetStateChangedHdl( LINK( this, ToolBarManager, StateChanged ) );
m_pToolBar->SetDataChangedHdl( LINK( this, ToolBarManager, DataChanged ) );
- m_pToolBar->SetToolboxButtonSize( m_bSmallSymbols ? ToolBoxButtonSize::Small : ToolBoxButtonSize::Large );
+
+ if (m_eSymbolSize == SFX_SYMBOLS_SIZE_LARGE)
+ m_pToolBar->SetToolboxButtonSize(ToolBoxButtonSize::Large);
+ else if (m_eSymbolSize == SFX_SYMBOLS_SIZE_32)
+ m_pToolBar->SetToolboxButtonSize(ToolBoxButtonSize::Size32);
+ else
+ m_pToolBar->SetToolboxButtonSize(ToolBoxButtonSize::Small);
// enables a menu for clipped items and customization
SvtCommandOptions aCmdOptions;
@@ -252,11 +265,12 @@ void ToolBarManager::CheckAndUpdateImages()
bool bRefreshImages = false;
SvtMiscOptions aMiscOptions;
- bool bCurrentSymbolsSmall = !aMiscOptions.AreCurrentSymbolsLarge();
- if ( m_bSmallSymbols != bCurrentSymbolsSmall )
+ sal_Int16 eNewSymbolSize = aMiscOptions.GetCurrentSymbolsSize();
+
+ if (m_eSymbolSize != eNewSymbolSize )
{
bRefreshImages = true;
- m_bSmallSymbols = bCurrentSymbolsSmall;
+ m_eSymbolSize = eNewSymbolSize;
}
const OUString& sCurrentIconTheme = aMiscOptions.GetIconTheme();
@@ -275,8 +289,22 @@ void ToolBarManager::RefreshImages()
{
SolarMutexGuard g;
- bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() );
- m_pToolBar->SetToolboxButtonSize( bBigImages ? ToolBoxButtonSize::Large : ToolBoxButtonSize::Small );
+ vcl::ImageType eImageType = vcl::ImageType::Size16;
+
+ if (m_eSymbolSize == SFX_SYMBOLS_SIZE_LARGE)
+ {
+ m_pToolBar->SetToolboxButtonSize(ToolBoxButtonSize::Large);
+ eImageType = vcl::ImageType::Size26;
+ }
+ else if (m_eSymbolSize == SFX_SYMBOLS_SIZE_32)
+ {
+ eImageType = vcl::ImageType::Size32;
+ m_pToolBar->SetToolboxButtonSize(ToolBoxButtonSize::Size32);
+ }
+ else
+ {
+ m_pToolBar->SetToolboxButtonSize(ToolBoxButtonSize::Small);
+ }
for ( auto const& it : m_aControllerMap )
{
@@ -290,11 +318,12 @@ void ToolBarManager::RefreshImages()
else
{
OUString aCommandURL = m_pToolBar->GetItemCommand( it.first );
- Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aCommandURL, bBigImages, m_xFrame);
+ Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(aCommandURL, m_xFrame, eImageType);
// Try also to query for add-on images before giving up and use an
// empty image.
+ bool bBigImages = eImageType != vcl::ImageType::Size16;
if ( !aImage )
- aImage = framework::AddonsOptions().GetImageFromURL( aCommandURL, bBigImages );
+ aImage = framework::AddonsOptions().GetImageFromURL(aCommandURL, bBigImages);
m_pToolBar->SetItemImage( it.first, aImage );
}
}
@@ -533,9 +562,7 @@ void ToolBarManager::impl_elementChanged(bool const isRemove,
Reference< XNameAccess > xNameAccess;
sal_Int16 nImageType = sal_Int16();
- sal_Int16 nCurrentImageType = getImageTypeFromBools(
- SvtMiscOptions().AreCurrentSymbolsLarge()
- );
+ sal_Int16 nCurrentImageType = getCurrentImageType();
if (( Event.aInfo >>= nImageType ) &&
( nImageType == nCurrentImageType ) &&
@@ -1197,12 +1224,13 @@ void ToolBarManager::RequestImages()
Sequence< Reference< XGraphic > > aDocGraphicSeq;
Sequence< Reference< XGraphic > > aModGraphicSeq;
- bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() );
- sal_Int16 p = getImageTypeFromBools( SvtMiscOptions().AreCurrentSymbolsLarge() );
+ SvtMiscOptions aMiscOptions;
+
+ sal_Int16 nImageType = getCurrentImageType();
if ( m_xDocImageManager.is() )
- aDocGraphicSeq = m_xDocImageManager->getImages( p, aCmdURLSeq );
- aModGraphicSeq = m_xModuleImageManager->getImages( p, aCmdURLSeq );
+ aDocGraphicSeq = m_xDocImageManager->getImages(nImageType, aCmdURLSeq);
+ aModGraphicSeq = m_xModuleImageManager->getImages(nImageType, aCmdURLSeq);
sal_uInt32 i = 0;
CommandToInfoMap::iterator pIter = m_aCommandMap.begin();
@@ -1218,7 +1246,7 @@ void ToolBarManager::RequestImages()
// Try also to query for add-on images before giving up and use an
// empty image.
if ( !aImage )
- aImage = framework::AddonsOptions().GetImageFromURL( aCmdURLSeq[i], bBigImages );
+ aImage = framework::AddonsOptions().GetImageFromURL( aCmdURLSeq[i], aMiscOptions.AreCurrentSymbolsLarge());
pIter->second.nImageInfo = 1; // mark image as module based
}
@@ -1461,7 +1489,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( vcl::CommandInfoProvider::Instance().GetImageForCommand(aCommandURL, false, m_xFrame) );
+ Image aImage(vcl::CommandInfoProvider::Instance().GetImageForCommand(aCommandURL, m_xFrame));
commandToImage[aCommandURL] = aImage;
pVisibleItemsPopupMenu->SetItemImage( STARTID_CUSTOMIZE_POPUPMENU+nPos, aImage );
}
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 44ae069fa0a9..2980d3ebb647 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -175,7 +175,7 @@ void ToolbarsMenuController::addCommand(
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
if ( rSettings.GetUseImagesInMenus() )
- aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( rCommandURL, false, m_xFrame );
+ aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand(rCommandURL, m_xFrame);
VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(VCLXPopupMenu::GetImplementation( rPopupMenu ));
if ( pPopupMenu )