cui/source/options/optgdlg.cxx | 1 dbaccess/source/ui/browser/dataview.cxx | 1 dev/null |binary forms/source/solar/control/navtoolbar.cxx | 1 icon-themes/breeze/links.txt | 16 - icon-themes/breeze/sc/res/lc26049.png |binary icon-themes/breeze/sc/res/sc26049.png |binary icon-themes/breeze_dark/links.txt | 16 - icon-themes/breeze_dark/sc/res/lc26049.png |binary icon-themes/breeze_dark/sc/res/sc26049.png |binary icon-themes/breeze_svg/links.txt | 16 - icon-themes/breeze_svg/sc/imglst/lc26049.svg | 125 ---------- icon-themes/breeze_svg/sc/imglst/sc26049.svg | 111 --------- icon-themes/breeze_svg/sc/res/lc26049.svg | 125 ++++++++++ icon-themes/breeze_svg/sc/res/sc26049.svg | 111 +++++++++ icon-themes/crystal/sc/res/lc26047.png |binary icon-themes/crystal/sc/res/lc26048.png |binary icon-themes/crystal/sc/res/lc26049.png |binary icon-themes/crystal/sc/res/lc26050.png |binary icon-themes/crystal/sc/res/lc26051.png |binary icon-themes/crystal/sc/res/sc26047.png |binary icon-themes/crystal/sc/res/sc26048.png |binary icon-themes/crystal/sc/res/sc26049.png |binary icon-themes/crystal/sc/res/sc26050.png |binary icon-themes/crystal/sc/res/sc26051.png |binary icon-themes/elementary/links.txt | 16 - icon-themes/elementary/sc/res/lc26049.png |binary icon-themes/elementary/sc/res/sc26049.png |binary icon-themes/galaxy/sc/res/lc26047.png |binary icon-themes/galaxy/sc/res/lc26048.png |binary icon-themes/galaxy/sc/res/lc26049.png |binary icon-themes/galaxy/sc/res/lc26050.png |binary icon-themes/galaxy/sc/res/lc26051.png |binary icon-themes/galaxy/sc/res/sc26047.png |binary icon-themes/galaxy/sc/res/sc26048.png |binary icon-themes/galaxy/sc/res/sc26049.png |binary icon-themes/galaxy/sc/res/sc26050.png |binary icon-themes/galaxy/sc/res/sc26051.png |binary icon-themes/hicontrast/sc/res/lc26047.png |binary icon-themes/hicontrast/sc/res/lc26048.png |binary icon-themes/hicontrast/sc/res/lc26049.png |binary icon-themes/hicontrast/sc/res/lc26050.png |binary icon-themes/hicontrast/sc/res/lc26051.png |binary icon-themes/hicontrast/sc/res/sc26047.png |binary icon-themes/hicontrast/sc/res/sc26048.png |binary icon-themes/hicontrast/sc/res/sc26049.png |binary icon-themes/hicontrast/sc/res/sc26050.png |binary icon-themes/hicontrast/sc/res/sc26051.png |binary icon-themes/oxygen/sc/res/lc26047.png |binary icon-themes/oxygen/sc/res/lc26048.png |binary icon-themes/oxygen/sc/res/lc26049.png |binary icon-themes/oxygen/sc/res/lc26050.png |binary icon-themes/oxygen/sc/res/lc26051.png |binary icon-themes/oxygen/sc/res/sc26047.png |binary icon-themes/oxygen/sc/res/sc26048.png |binary icon-themes/oxygen/sc/res/sc26049.png |binary icon-themes/oxygen/sc/res/sc26050.png |binary icon-themes/oxygen/sc/res/sc26051.png |binary icon-themes/sifr/sc/res/lc26047.png |binary icon-themes/sifr/sc/res/lc26048.png |binary icon-themes/sifr/sc/res/lc26049.png |binary icon-themes/sifr/sc/res/lc26050.png |binary icon-themes/sifr/sc/res/lc26051.png |binary icon-themes/sifr/sc/res/sc26047.png |binary icon-themes/sifr/sc/res/sc26048.png |binary icon-themes/sifr/sc/res/sc26049.png |binary icon-themes/sifr/sc/res/sc26050.pngD |binary icon-themes/sifr/sc/res/sc26051.png |binary icon-themes/tango/links.txt | 16 - icon-themes/tango/sc/res/lc26049.png |binary icon-themes/tango/sc/res/sc26049.png |binary icon-themes/tango_testing/sc/res/lc26048.png |binary include/sfx2/imgmgr.hxx | 67 ----- include/sfx2/module.hxx | 1 include/sfx2/sfx.hrc | 3 include/svtools/editbrowsebox.hxx | 3 include/svtools/svtools.hrc | 10 include/svx/dialogs.hrc | 8 sc/inc/sc.hrc | 5 sc/source/ui/app/inputwin.cxx | 41 +-- sc/source/ui/navipi/navipi.cxx | 1 sc/source/ui/src/toolbox.src | 42 +-- sd/source/ui/dlg/navigatr.cxx | 1 sfx2/Library_sfx.mk | 1 sfx2/inc/pch/precompiled_sfx.hxx | 1 sfx2/source/appl/imagemgr.cxx | 1 sfx2/source/appl/module.cxx | 27 -- sfx2/source/appl/newhelp.cxx | 1 sfx2/source/dialog/templdlg.cxx | 1 sfx2/source/toolbox/imgmgr.cxx | 316 --------------------------- sfx2/source/toolbox/tbxitem.cxx | 1 svtools/source/brwbox/editbrowsebox.cxx | 34 -- svtools/source/brwbox/editbrowsebox.hrc | 35 -- svtools/source/brwbox/editbrowsebox.src | 59 +++-- svx/source/form/datanavi.cxx | 40 +-- svx/source/form/datanavi.src | 39 ++- svx/source/inc/datanavi.hrc | 8 svx/source/inc/datanavi.hxx | 17 - sw/source/ui/config/mailconfigpage.cxx | 1 sw/source/ui/misc/num.cxx | 1 sw/source/uibase/ribbar/inputwin.cxx | 1 sw/source/uibase/utlui/navipi.cxx | 1 102 files changed, 430 insertions(+), 892 deletions(-)
New commits: commit 331c66989fca9e1c792f4a8dab807aca98b70740 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Dec 21 10:47:18 2016 +0000 unwind RID_SVXIL_DATANAVI ImageList Change-Id: I0aae6774ee0b42d32838b9010ddddaa33324c6c6 diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 4e2fab2..cebaa5d 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -142,7 +142,6 @@ #define RID_SVXSW_FRAMEPOSITIONS (RID_SVX_START + 289) #define RID_SVXIL_FRAME (RID_SVX_START + 65) -#define RID_SVXIL_DATANAVI (RID_SVX_START + 66) #define RID_SVXIMAGE_LIGHT_ON (RID_SVX_START + 210) #define RID_SVXIMAGE_LIGHT_OFF (RID_SVX_START + 211) @@ -172,6 +171,13 @@ #define RID_SVXBMP_SLIDERDECREASE (RID_SVX_START + 68) #define RID_SVXBMP_SLIDERINCREASE (RID_SVX_START + 69) +#define RID_SVXBMP_GROUP_CLOSED (RID_SVX_START + 69) +#define RID_SVXBMP_GROUP_OPEN (RID_SVX_START + 70) +#define RID_SVXBMP_ELEMENT (RID_SVX_START + 71) +#define RID_SVXBMP_ATTRIBUTE (RID_SVX_START + 72) +#define RID_SVXBMP_TEXT (RID_SVX_START + 73) +#define RID_SVXBMP_OTHER (RID_SVX_START + 74) + // Menu for the ruler #define RID_SVXMN_RULER (RID_SVX_START + 92) diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 7a582b7..e50adbc 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -399,9 +399,8 @@ namespace svxform EnableMenuItems( nullptr ); } - void XFormsPage::AddChildren( - SvTreeListEntry* _pParent, const ImageList& _rImgLst, - const Reference< css::xml::dom::XNode >& _xNode ) + void XFormsPage::AddChildren(SvTreeListEntry* _pParent, + const Reference< css::xml::dom::XNode >& _xNode) { DBG_ASSERT( m_xUIHelper.is(), "XFormsPage::AddChildren(): invalid UIHelper" ); @@ -420,16 +419,16 @@ namespace svxform switch ( eChildType ) { case css::xml::dom::NodeType_ATTRIBUTE_NODE: - aExpImg = aCollImg = _rImgLst.GetImage( IID_ATTRIBUTE ); + aExpImg = aCollImg = Image(BitmapEx(SVX_RES(RID_SVXBMP_ATTRIBUTE))); break; case css::xml::dom::NodeType_ELEMENT_NODE: - aExpImg = aCollImg = _rImgLst.GetImage( IID_ELEMENT ); + aExpImg = aCollImg = Image(BitmapEx(SVX_RES(RID_SVXBMP_ELEMENT))); break; case css::xml::dom::NodeType_TEXT_NODE: - aExpImg = aCollImg = _rImgLst.GetImage( IID_TEXT ); + aExpImg = aCollImg = Image(BitmapEx(SVX_RES(RID_SVXBMP_TEXT))); break; default: - aExpImg = aCollImg = _rImgLst.GetImage( IID_OTHER ); + aExpImg = aCollImg = Image(BitmapEx(SVX_RES(RID_SVXBMP_OTHER))); } OUString sName = m_xUIHelper->getNodeDisplayName( xChild, bShowDetails ); @@ -443,7 +442,7 @@ namespace svxform Reference< css::xml::dom::XNamedNodeMap > xMap = xChild->getAttributes(); if ( xMap.is() ) { - aExpImg = aCollImg = _rImgLst.GetImage( IID_ATTRIBUTE ); + aExpImg = aCollImg = Image(BitmapEx(SVX_RES(RID_SVXBMP_ATTRIBUTE))); sal_Int32 j, nMapLen = xMap->getLength(); for ( j = 0; j < nMapLen; ++j ) { @@ -458,7 +457,7 @@ namespace svxform } } if ( xChild->hasChildNodes() ) - AddChildren( pEntry, _rImgLst, xChild ); + AddChildren(pEntry, xChild); } } } @@ -785,13 +784,10 @@ namespace svxform return bHandled; } - SvTreeListEntry* XFormsPage::AddEntry( ItemNode* _pNewNode, bool _bIsElement ) { SvTreeListEntry* pParent = m_pItemList->FirstSelected(); - const ImageList& rImageList = m_pNaviWin->GetItemImageList(); - sal_uInt16 nImageID = ( _bIsElement ) ? IID_ELEMENT : IID_ATTRIBUTE; - Image aImage = rImageList.GetImage( nImageID ); + Image aImage(BitmapEx(SVX_RES(_bIsElement ? RID_SVXBMP_ELEMENT : RID_SVXBMP_ATTRIBUTE))); OUString sName; try { @@ -806,12 +802,10 @@ namespace svxform sName, aImage, aImage, pParent, false, TREELIST_APPEND, _pNewNode ); } - SvTreeListEntry* XFormsPage::AddEntry( const Reference< XPropertySet >& _rEntry ) { SvTreeListEntry* pEntry = nullptr; - const ImageList& rImageList = m_pNaviWin->GetItemImageList(); - Image aImage = rImageList.GetImage( IID_ELEMENT ); + Image aImage(BitmapEx(SVX_RES(RID_SVXBMP_ELEMENT))); ItemNode* pNode = new ItemNode( _rEntry ); OUString sTemp; @@ -1064,7 +1058,6 @@ namespace svxform m_xUIHelper.set( _xModel, UNO_QUERY ); OUString sRet; m_bHasModel = true; - const ImageList& rImageList = m_pNaviWin->GetItemImageList(); switch ( m_eGroup ) { @@ -1091,7 +1084,7 @@ namespace svxform Sequence< PropertyValue > xPropSeq; Any aAny = xNum->nextElement(); if ( aAny >>= xPropSeq ) - sRet = LoadInstance( xPropSeq, rImageList ); + sRet = LoadInstance(xPropSeq); else { SAL_WARN( "svx.form", "XFormsPage::SetModel(): invalid instance" ); @@ -1161,8 +1154,7 @@ namespace svxform Reference < XEnumeration > xNum = xNumAccess->createEnumeration(); if ( xNum.is() && xNum->hasMoreElements() ) { - Image aImage1 = rImageList.GetImage( IID_ELEMENT ); - Image aImage2 = rImageList.GetImage( IID_ELEMENT ); + Image aImage(BitmapEx(SVX_RES(RID_SVXBMP_ELEMENT))); OUString sDelim( ": " ); while ( xNum->hasMoreElements() ) { @@ -1180,7 +1172,7 @@ namespace svxform ItemNode* pNode = new ItemNode( xPropSet ); m_pItemList->InsertEntry( - sEntry, aImage1, aImage2, nullptr, false, TREELIST_APPEND, pNode ); + sEntry, aImage, aImage, nullptr, false, TREELIST_APPEND, pNode ); } } } @@ -1208,8 +1200,7 @@ namespace svxform m_pItemList->DeleteAndClear(); } - OUString XFormsPage::LoadInstance( - const Sequence< PropertyValue >& _xPropSeq, const ImageList& _rImgLst ) + OUString XFormsPage::LoadInstance(const Sequence< PropertyValue >& _xPropSeq) { OUString sRet; OUString sTemp; @@ -1239,7 +1230,7 @@ namespace svxform if ( sNodeName.isEmpty() ) sNodeName = xRoot->getNodeName(); if ( xRoot->hasChildNodes() ) - AddChildren( nullptr, _rImgLst, xRoot ); + AddChildren(nullptr, xRoot); } catch ( Exception& ) { @@ -1363,7 +1354,6 @@ namespace svxform , m_nLastSelectedPos(LISTBOX_ENTRY_NOTFOUND) , m_bShowDetails(false) , m_bIsNotifyDisabled(false) - , m_aItemImageList(SVX_RES(RID_SVXIL_DATANAVI)) , m_xDataListener(new DataListener(this)) { m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "svx/ui/datanavigator.ui", "DataNavigator"); diff --git a/svx/source/form/datanavi.src b/svx/source/form/datanavi.src index e516ab8..56575ff 100644 --- a/svx/source/form/datanavi.src +++ b/svx/source/form/datanavi.src @@ -40,19 +40,34 @@ ImageList RID_SVXIMGLIST_XFORMS_TBX }; #undef IMG_LST -ImageList RID_SVXIL_DATANAVI +Bitmap RID_SVXBMP_GROUP_CLOSED { - Prefix = "da"; - IdList = - { - IID_GROUP_CLOSED ; - IID_GROUP_OPEN ; - IID_ELEMENT ; - IID_ATTRIBUTE ; - IID_TEXT ; - IID_OTHER ; - }; - IdCount = { 6 ; } ; + File = "da01.png"; +}; + +Bitmap RID_SVXBMP_GROUP_OPEN +{ + File = "da02.png"; +}; + +Bitmap RID_SVXBMP_ELEMENT +{ + File = "da03.png"; +}; + +Bitmap RID_SVXBMP_ATTRIBUTE +{ + File = "da04.png"; +}; + +Bitmap RID_SVXBMP_TEXT +{ + File = "da05.png"; +}; + +Bitmap RID_SVXBMP_OTHER +{ + File = "da06.png"; }; String RID_STR_QRY_REMOVE_MODEL diff --git a/svx/source/inc/datanavi.hrc b/svx/source/inc/datanavi.hrc index 7f24e14..6fe3513 100644 --- a/svx/source/inc/datanavi.hrc +++ b/svx/source/inc/datanavi.hrc @@ -39,14 +39,6 @@ #define IID_ITEM_EDIT 4 #define IID_ITEM_REMOVE 5 -// ImageIndexes -#define IID_GROUP_CLOSED 1 -#define IID_GROUP_OPEN 2 -#define IID_ELEMENT 3 -#define IID_ATTRIBUTE 4 -#define IID_TEXT 5 -#define IID_OTHER 6 - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx index 2141695..4ff5938 100644 --- a/svx/source/inc/datanavi.hxx +++ b/svx/source/inc/datanavi.hxx @@ -231,7 +231,6 @@ namespace svxform } }; - class XFormsPage : public TabPage { private: @@ -263,9 +262,8 @@ namespace svxform DECL_LINK(TbxSelectHdl, ToolBox *, void); DECL_LINK(ItemSelectHdl, SvTreeListBox*, void); - void AddChildren( SvTreeListEntry* _pParent, - const ImageList& _rImgLst, - const XNode_ref& _xNode ); + void AddChildren(SvTreeListEntry* _pParent, + const XNode_ref& _xNode); bool DoToolBoxAction( sal_uInt16 _nToolBoxID ); SvTreeListEntry* AddEntry( ItemNode* _pNewNode, bool _bIsElement ); SvTreeListEntry* AddEntry( const XPropertySet_ref& _rPropSet ); @@ -285,8 +283,7 @@ namespace svxform inline bool HasModel() const { return m_bHasModel; } OUString SetModel( const XModel_ref& _xModel, sal_uInt16 _nPagePos ); void ClearModel(); - OUString LoadInstance( const PropertyValue_seq& _xPropSeq, - const ImageList& _rImgLst ); + OUString LoadInstance(const PropertyValue_seq& _xPropSeq); bool DoMenuAction( sal_uInt16 _nMenuID ); void EnableMenuItems( Menu* _pMenu ); @@ -304,7 +301,6 @@ namespace svxform const XFormsUIHelper1_ref& GetXFormsHelper() const { return m_xUIHelper; } }; - typedef std::vector< VclPtr<XFormsPage> > PageList; typedef ::rtl::Reference < DataListener > DataListener_ref; @@ -323,7 +319,6 @@ namespace svxform sal_Int32 m_nLastSelectedPos; bool m_bShowDetails; bool m_bIsNotifyDisabled; - ImageList m_aItemImageList; PageList m_aPageList; ContainerList m_aContainerList; EventTargetList m_aEventTargetList; @@ -366,12 +361,10 @@ namespace svxform void AddEventBroadcaster( const XEventTarget_ref& xTarget ); void RemoveBroadcaster(); - inline const ImageList& GetItemImageList() const { return m_aItemImageList; } - inline bool IsShowDetails() const { return m_bShowDetails; } - inline void DisableNotify( bool _bDisable ) { m_bIsNotifyDisabled = _bDisable; } + bool IsShowDetails() const { return m_bShowDetails; } + void DisableNotify( bool _bDisable ) { m_bIsNotifyDisabled = _bDisable; } }; - class DataNavigator : public SfxDockingWindow, public SfxControllerItem { private: commit 2ebe42ff29c5d2bdf27535b8b739e29ebe652282 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Dec 21 10:22:07 2016 +0000 unwind RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX ImageList Change-Id: I4cf82ca8530f8b244be593e10976965be2ef2b60 diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index e31bcf0..c3d54e6 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -490,8 +490,7 @@ namespace svt VclPtr<CheckBoxControl> pCheckBoxPaint; EditBrowseBoxFlags m_nBrowserFlags; - ImageList m_aStatusImages; - ::std::unique_ptr< EditBrowseBoxImpl> m_aImpl; + std::unique_ptr< EditBrowseBoxImpl> m_aImpl; protected: VclPtr<BrowserHeader> pHeader; diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc index c149f86..44b14c4 100644 --- a/include/svtools/svtools.hrc +++ b/include/svtools/svtools.hrc @@ -246,12 +246,20 @@ #define BMP_PLUGIN (RID_SVTOOLS_BITMAP_START + 3) #define BMP_LIST_ADD (RID_SVTOOLS_BITMAP_START + 4) +#define BMP_CURRENT (RID_SVTOOLS_BITMAP_START + 5) +#define BMP_MODIFIED (RID_SVTOOLS_BITMAP_START + 6) +#define BMP_NEW (RID_SVTOOLS_BITMAP_START + 7) +#define BMP_DELETED (RID_SVTOOLS_BITMAP_START + 8) +#define BMP_CURRENTNEW (RID_SVTOOLS_BITMAP_START + 9) +#define BMP_PRIMARYKEY (RID_SVTOOLS_BITMAP_START + 10) +#define BMP_CURRENT_PRIMARYKEY (RID_SVTOOLS_BITMAP_START + 11) +#define BMP_FILTER (RID_SVTOOLS_BITMAP_START + 12) +#define BMP_HEADERFOOTER (RID_SVTOOLS_BITMAP_START + 13) // image lists #define RID_SVTOOLS_IMAGELIST_BIG (RID_SVTOOLS_IMAGELIST_START + 1) #define RID_SVTOOLS_IMAGELIST_SMALL (RID_SVTOOLS_IMAGELIST_START + 2) -#define RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX (RID_SVTOOLS_IMAGELIST_START + 3) // images #define RID_IMG_TREENODE_COLLAPSED (RID_SVTOOLS_START + 0) diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index bf46a5a..2b167d8 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -19,8 +19,6 @@ #include <svtools/editbrowsebox.hxx> -#include "editbrowsebox.hrc" - #include <vcl/svapp.hxx> #include <tools/debug.hxx> #include <vcl/window.hxx> @@ -230,7 +228,6 @@ namespace svt } } - void EditBrowseBox::PaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const { @@ -253,59 +250,50 @@ namespace svt } } - Image EditBrowseBox::GetImage(RowStatus eStatus) const { - if ( !m_aStatusImages.GetImageCount() ) - { - const_cast<EditBrowseBox*>(this)->m_aStatusImages = ImageList( SvtResId( RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX ) ); - } - - Image aImage; + BitmapEx aBitmap; bool bNeedMirror = IsRTLEnabled(); switch (eStatus) { case CURRENT: - aImage = m_aStatusImages.GetImage(IMG_EBB_CURRENT); + aBitmap = BitmapEx(SvtResId((BMP_CURRENT))); break; case CURRENTNEW: - aImage = m_aStatusImages.GetImage(IMG_EBB_CURRENTNEW); + aBitmap = BitmapEx(SvtResId((BMP_CURRENTNEW))); break; case MODIFIED: - aImage = m_aStatusImages.GetImage(IMG_EBB_MODIFIED); + aBitmap = BitmapEx(SvtResId((BMP_MODIFIED))); bNeedMirror = false; // the pen is not mirrored break; case NEW: - aImage = m_aStatusImages.GetImage(IMG_EBB_NEW); + aBitmap = BitmapEx(SvtResId((BMP_NEW))); break; case DELETED: - aImage = m_aStatusImages.GetImage(IMG_EBB_DELETED); + aBitmap = BitmapEx(SvtResId((BMP_DELETED))); break; case PRIMARYKEY: - aImage = m_aStatusImages.GetImage(IMG_EBB_PRIMARYKEY); + aBitmap = BitmapEx(SvtResId((BMP_PRIMARYKEY))); break; case CURRENT_PRIMARYKEY: - aImage = m_aStatusImages.GetImage(IMG_EBB_CURRENT_PRIMARYKEY); + aBitmap = BitmapEx(SvtResId((BMP_CURRENT_PRIMARYKEY))); break; case FILTER: - aImage = m_aStatusImages.GetImage(IMG_EBB_FILTER); + aBitmap = BitmapEx(SvtResId((BMP_FILTER))); break; case HEADERFOOTER: - aImage = m_aStatusImages.GetImage(IMG_EBB_HEADERFOOTER); + aBitmap = BitmapEx(SvtResId((BMP_HEADERFOOTER))); break; case CLEAN: break; } if ( bNeedMirror ) { - BitmapEx aBitmap( aImage.GetBitmapEx() ); aBitmap.Mirror( BmpMirrorFlags::Horizontal ); - aImage = Image( aBitmap ); } - return aImage; + return Image(aBitmap); } - void EditBrowseBox::PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const { if (nPaintRow < 0) diff --git a/svtools/source/brwbox/editbrowsebox.hrc b/svtools/source/brwbox/editbrowsebox.hrc deleted file mode 100644 index f66949a..0000000 --- a/svtools/source/brwbox/editbrowsebox.hrc +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVTOOLS_SOURCE_BRWBOX_EDITBROWSEBOX_HRC -#define INCLUDED_SVTOOLS_SOURCE_BRWBOX_EDITBROWSEBOX_HRC - -#define IMG_EBB_CURRENT 1 -#define IMG_EBB_MODIFIED 2 -#define IMG_EBB_NEW 3 -#define IMG_EBB_DELETED 4 -#define IMG_EBB_CURRENTNEW 5 -#define IMG_EBB_PRIMARYKEY 6 -#define IMG_EBB_CURRENT_PRIMARYKEY 7 -#define IMG_EBB_FILTER 8 -#define IMG_EBB_HEADERFOOTER 9 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/brwbox/editbrowsebox.src b/svtools/source/brwbox/editbrowsebox.src index 2ffc3e1..32e0ac7 100644 --- a/svtools/source/brwbox/editbrowsebox.src +++ b/svtools/source/brwbox/editbrowsebox.src @@ -17,24 +17,51 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "editbrowsebox.hrc" #include <svtools/svtools.hrc> -ImageList RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX -{ - Prefix = "ed"; - IdList = { - IMG_EBB_CURRENT; - IMG_EBB_MODIFIED; - IMG_EBB_NEW; - IMG_EBB_DELETED; - IMG_EBB_CURRENTNEW; - IMG_EBB_PRIMARYKEY; - IMG_EBB_CURRENT_PRIMARYKEY; - IMG_EBB_FILTER; - IMG_EBB_HEADERFOOTER; - }; - IdCount = { 9; }; +Bitmap BMP_CURRENT +{ + File = "ed01.png"; +}; + +Bitmap BMP_MODIFIED +{ + File = "ed02.png"; +}; + +Bitmap BMP_NEW +{ + File = "ed03.png"; +}; + +Bitmap BMP_DELETED +{ + File = "ed04.png"; +}; + +Bitmap BMP_CURRENTNEW +{ + File = "ed05.png"; +}; + +Bitmap BMP_PRIMARYKEY +{ + File = "ed06.png"; +}; + +Bitmap BMP_CURRENT_PRIMARYKEY +{ + File = "ed07.png"; +}; + +Bitmap BMP_FILTER +{ + File = "ed08.png"; +}; + +Bitmap BMP_HEADERFOOTER +{ + File = "ed09.png"; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit e3203ad42dd57d546ab8cd002b8fcbe54c9bcd11 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Dec 21 10:07:41 2016 +0000 remove newly unused SfxModule::GetImageList_Impl, etc Change-Id: Ibb1430d2b6c7994b2425d686cf206d168530faef diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx index 9a01f82..c40f181 100644 --- a/include/sfx2/module.hxx +++ b/include/sfx2/module.hxx @@ -102,7 +102,6 @@ public: SAL_DLLPRIVATE SfxTbxCtrlFactArr_Impl* GetTbxCtrlFactories_Impl() const; SAL_DLLPRIVATE SfxStbCtrlFactArr_Impl* GetStbCtrlFactories_Impl() const; SAL_DLLPRIVATE SfxChildWinFactArr_Impl* GetChildWinFactories_Impl() const; - SAL_DLLPRIVATE ImageList* GetImageList_Impl( bool bBig ); }; #endif diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc index 44bf075..5e2c759 100644 --- a/include/sfx2/sfx.hrc +++ b/include/sfx2/sfx.hrc @@ -74,9 +74,6 @@ // temporary due to compatibility -#define RID_DEFAULTIMAGELIST_SC (RID_SFX_START+15) -#define RID_DEFAULTIMAGELIST_LC (RID_SFX_START+17) - #define RID_DEFAULTABOUT (RID_SFX_START+0) #define STR_STYLE_FILTER_AUTO (RID_SFX_START+9) diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index 72d447b..810c78d 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -56,7 +56,6 @@ public: SfxModule_Impl(); ~SfxModule_Impl(); - ImageList* GetImageList( ResMgr* pResMgr, bool bBig ); }; SfxModule_Impl::SfxModule_Impl() @@ -74,27 +73,6 @@ SfxModule_Impl::~SfxModule_Impl() delete pImgListBig; } -ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, bool bBig ) -{ - ImageList*& rpList = bBig ? pImgListBig : pImgListSmall; - if ( !rpList ) - { - ResId aResId( bBig ? ( RID_DEFAULTIMAGELIST_LC ) : ( RID_DEFAULTIMAGELIST_SC ), *pResMgr ); - - aResId.SetRT( RSC_IMAGELIST ); - - DBG_ASSERT( pResMgr->IsAvailable(aResId), "No default ImageList!" ); - - if ( pResMgr->IsAvailable(aResId) ) - rpList = new ImageList( aResId ); - else - rpList = new ImageList(); - } - - return rpList; -} - - SFX_IMPL_SUPERCLASS_INTERFACE(SfxModule, SfxShell) ResMgr* SfxModule::GetResMgr() @@ -221,11 +199,6 @@ SfxChildWinFactArr_Impl* SfxModule::GetChildWinFactories_Impl() const return pImpl->pFactArr; } -ImageList* SfxModule::GetImageList_Impl( bool bBig ) -{ - return pImpl->GetImageList( pResMgr, bBig ); -} - VclPtr<SfxTabPage> SfxModule::CreateTabPage( sal_uInt16, vcl::Window*, const SfxItemSet& ) { return VclPtr<SfxTabPage>(); commit e0b71d8e5ac24b3a51ec7d9e4738de7c6367cbe9 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Dec 21 09:59:25 2016 +0000 remove newly unused SfxImageManager Change-Id: If68637fe49b5d252ad4ec5d63d56261113be6a7c diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 07ed580..8f4412a 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -27,7 +27,6 @@ #include <svl/szitem.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/viewfrm.hxx> -#include <sfx2/imgmgr.hxx> #include <vcl/configsettings.hxx> #include <vcl/layout.hxx> #include <vcl/mnemonic.hxx> diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index d091404..206d529 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -24,7 +24,6 @@ #include <comphelper/types.hxx> #include <comphelper/namedvaluecollection.hxx> #include <sfx2/app.hxx> -#include <sfx2/imgmgr.hxx> #include <dbaccess/IController.hxx> #include "UITools.hxx" #include <sfx2/sfx.hrc> diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index ae15046a..66b9109 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -27,7 +27,6 @@ #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/form/runtime/FormFeature.hpp> -#include <sfx2/imgmgr.hxx> #include <vcl/fixed.hxx> #include <vcl/commandinfoprovider.hxx> diff --git a/include/sfx2/imgmgr.hxx b/include/sfx2/imgmgr.hxx deleted file mode 100644 index c65f19d..0000000 --- a/include/sfx2/imgmgr.hxx +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SFX2_IMGMGR_HXX -#define INCLUDED_SFX2_IMGMGR_HXX - -#include <sal/config.h> -#include <sal/types.h> -#include <o3tl/typed_flags_set.hxx> -#include <sfx2/dllapi.h> -#include <vcl/image.hxx> - - -class ToolBox; -class SfxModule; -class SfxImageManager_Impl; - -enum class SfxToolboxFlags -{ - CHANGESYMBOLSET = 0x01, - CHANGEOUTSTYLE = 0x02, - ALL = CHANGESYMBOLSET | CHANGEOUTSTYLE, -}; -namespace o3tl -{ - template<> struct typed_flags<SfxToolboxFlags> : is_typed_flags<SfxToolboxFlags, 0x03> {}; -} - - -class SFX2_DLLPUBLIC SfxImageManager -{ - SfxImageManager_Impl* pImp; - -public: - static SfxImageManager* GetImageManager(SfxModule&); - - SfxImageManager(SfxModule& rModule); - ~SfxImageManager(); - - void RegisterToolBox( ToolBox *pBox, SfxToolboxFlags nFlags=SfxToolboxFlags::ALL); - void ReleaseToolBox( ToolBox *pBox ); - - Image GetImage( sal_uInt16 nId, bool bLarge ) const; - Image GetImage( sal_uInt16 nId) const; - Image SeekImage( sal_uInt16 nId, bool bLarge ) const; - Image SeekImage( sal_uInt16 nId ) const; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 3801cef..9239398 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -32,7 +32,6 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/event.hxx> -#include <sfx2/imgmgr.hxx> #include <stdlib.h> #include <editeng/scriptspaceitem.hxx> #include <editeng/scripttypeitem.hxx> diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index e484192..42187f8 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -22,7 +22,6 @@ #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/event.hxx> -#include <sfx2/imgmgr.hxx> #include <sfx2/navigat.hxx> #include <svl/stritem.hxx> #include <svl/urlbmk.hxx> diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index c1e19ad..042f06a 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -21,7 +21,6 @@ #include <osl/file.hxx> #include <tools/urlobj.hxx> -#include <sfx2/imgmgr.hxx> #include <sfx2/fcontnr.hxx> #include <svl/eitem.hxx> #include <svl/stritem.hxx> diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index 647078f..642e960 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -293,7 +293,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/sidebar/UnoSidebar \ sfx2/source/statbar/stbitem \ sfx2/source/styles/StyleManager \ - sfx2/source/toolbox/imgmgr \ sfx2/source/toolbox/tbxitem \ sfx2/source/uitest/sfx_uiobject \ sfx2/source/view/classificationcontroller \ diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx index d80b88a..9dd2e27 100644 --- a/sfx2/inc/pch/precompiled_sfx.hxx +++ b/sfx2/inc/pch/precompiled_sfx.hxx @@ -462,7 +462,6 @@ #include <sfx2/frmdescr.hxx> #include <sfx2/hintpost.hxx> #include <sfx2/imagemgr.hxx> -#include <sfx2/imgmgr.hxx> #include <sfx2/infobar.hxx> #include <sfx2/ipclient.hxx> #include <sfx2/linkmgr.hxx> diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx index 56862e9..ad59dcc 100644 --- a/sfx2/source/appl/imagemgr.cxx +++ b/sfx2/source/appl/imagemgr.cxx @@ -31,7 +31,6 @@ #include <comphelper/processfactory.hxx> #include <rtl/ustring.hxx> -#include <sfx2/imgmgr.hxx> #include <sfx2/app.hxx> #include <sfx2/unoctitm.hxx> #include <sfx2/dispatch.hxx> diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 6979b5d..ce07b60 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -27,7 +27,6 @@ #include <sfx2/app.hxx> #include "sfxtypes.hxx" #include "panelist.hxx" -#include <sfx2/imgmgr.hxx> #include "srchdlg.hxx" #include <sfx2/sfxhelp.hxx> #include <svtools/treelistentry.hxx> diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 2d8d527..fb56275 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -56,7 +56,6 @@ #include <sfx2/docfac.hxx> #include <sfx2/doctempl.hxx> #include <sfx2/module.hxx> -#include <sfx2/imgmgr.hxx> #include "helpid.hrc" #include "appdata.hxx" #include <sfx2/viewfrm.hxx> diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx deleted file mode 100644 index 8b3d401..0000000 --- a/sfx2/source/toolbox/imgmgr.cxx +++ /dev/null @@ -1,316 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include <memory> - -#include <sfx2/imgmgr.hxx> -#include <sfx2/sfx.hrc> -#include <sfx2/app.hxx> -#include <sfx2/sfxresid.hxx> -#include <sfx2/bindings.hxx> -#include "statcach.hxx" -#include <sfx2/module.hxx> -#include <vcl/bitmap.hxx> -#include <vcl/toolbox.hxx> - -#include <tools/rcid.h> -#include <tools/link.hxx> -#include <svtools/miscopt.hxx> -#include <osl/mutex.hxx> -#include <rtl/instance.hxx> - -#include <comphelper/processfactory.hxx> - -#include <unordered_map> - -const sal_uInt32 IMAGELIST_COUNT = 4; // small, small-hi, large, large-hi - -struct ToolBoxInf_Impl -{ - VclPtr<ToolBox> pToolBox; - SfxToolboxFlags nFlags; -}; - -class SfxImageManager_Impl -{ -public: - SvtMiscOptions m_aOpt; - std::vector< ToolBoxInf_Impl* > m_aToolBoxes; - sal_Int16 m_nSymbolsSize; - ImageList* m_pImageList[IMAGELIST_COUNT]; - SfxModule& m_rModule; - bool m_bAppEventListener; - - ImageList* GetImageList( bool bBig ); - Image GetImage( sal_uInt16 nId, bool bBig ); - void SetSymbolsSize_Impl( sal_Int16 ); - - DECL_LINK( OptionsChanged_Impl, LinkParamNone*, void ); - DECL_LINK( SettingsChanged_Impl, VclSimpleEvent&, void ); - - explicit SfxImageManager_Impl(SfxModule& rModule); - ~SfxImageManager_Impl(); -}; - -namespace -{ - typedef std::unordered_map< SfxModule*, std::shared_ptr<SfxImageManager_Impl> > SfxImageManagerImplMap; - - class theImageManagerImplMap : - public rtl::Static<SfxImageManagerImplMap, theImageManagerImplMap> {}; -} - -static SfxImageManager_Impl* GetImageManager(SfxModule& rModule) -{ - SolarMutexGuard aGuard; - - SfxImageManagerImplMap &rImageManager_ImplMap = - theImageManagerImplMap::get(); - SfxImageManager_Impl* pImpl( nullptr ); - SfxModule* pModule(&rModule); - SfxImageManagerImplMap::const_iterator pIter = rImageManager_ImplMap.find(pModule); - if ( pIter != rImageManager_ImplMap.end() ) - pImpl = pIter->second.get(); - else - { - rImageManager_ImplMap[pModule].reset(new SfxImageManager_Impl(rModule)); - pImpl = rImageManager_ImplMap[pModule].get(); - } - return pImpl; -} - -static sal_Int16 impl_convertBools( bool bLarge ) -{ - sal_Int16 nIndex( 0 ); - if ( bLarge ) - nIndex += 1; - return nIndex; -} - -SfxImageManager_Impl::SfxImageManager_Impl(SfxModule& rModule) - : m_rModule(rModule) - , m_bAppEventListener(false) -{ - m_nSymbolsSize = m_aOpt.GetCurrentSymbolsSize(); - - for (ImageList* & rp : m_pImageList) - rp = nullptr; - - m_aOpt.AddListenerLink( LINK( this, SfxImageManager_Impl, OptionsChanged_Impl ) ); - Application::AddEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) ); - m_bAppEventListener = true; -} - - -SfxImageManager_Impl::~SfxImageManager_Impl() -{ - m_aOpt.RemoveListenerLink( LINK( this, SfxImageManager_Impl, OptionsChanged_Impl ) ); - if (m_bAppEventListener) - Application::RemoveEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) ); - for (ToolBoxInf_Impl* p : m_aToolBoxes) - delete p; -} - - -ImageList* SfxImageManager_Impl::GetImageList( bool bBig ) -{ - sal_Int32 nIndex = impl_convertBools( bBig ); - if ( !m_pImageList[nIndex] ) - { - m_pImageList[nIndex] = m_rModule.GetImageList_Impl( bBig ); - } - - return m_pImageList[nIndex]; -} - - -Image SfxImageManager_Impl::GetImage( sal_uInt16 nId, bool bBig ) -{ - ImageList* pImageList = GetImageList( bBig ); - if ( pImageList ) - return pImageList->GetImage( nId ); - return Image(); -} - - -void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize ) -{ - SolarMutexGuard aGuard; - - if ( nNewSymbolsSize != m_nSymbolsSize ) - { - m_nSymbolsSize = nNewSymbolsSize; - bool bLarge( m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE ); - - for (ToolBoxInf_Impl* pInf : m_aToolBoxes) - { - if ( pInf->nFlags & SfxToolboxFlags::CHANGESYMBOLSET ) - { - ToolBox *pBox = pInf->pToolBox; - sal_uInt16 nCount = pBox->GetItemCount(); - for ( sal_uInt16 nPos=0; nPos<nCount; nPos++ ) - { - sal_uInt16 nId = pBox->GetItemId( nPos ); - if ( pBox->GetItemType(nPos) == ToolBoxItemType::BUTTON ) - { - pBox->SetItemImage( nId, GetImage( nId, bLarge ) ); - SfxStateCache *pCache = SfxViewFrame::Current()->GetBindings().GetStateCache( nId ); - if ( pCache ) - pCache->SetCachedState(false); - } - } - - if ( !pBox->IsFloatingMode() ) - { - Size aActSize( pBox->GetSizePixel() ); - Size aSize( pBox->CalcWindowSizePixel() ); - if ( pBox->IsHorizontal() ) - aSize.Width() = aActSize.Width(); - else - aSize.Height() = aActSize.Height(); - - pBox->SetSizePixel( aSize ); - } - } - } - } -} - - -IMPL_LINK_NOARG(SfxImageManager_Impl, OptionsChanged_Impl, LinkParamNone*, void) -{ - SetSymbolsSize_Impl( m_aOpt.GetCurrentSymbolsSize() ); -} - - -IMPL_LINK( SfxImageManager_Impl, SettingsChanged_Impl, VclSimpleEvent&, rEvent, void) -{ - switch (rEvent.GetId()) - { - case VclEventId::ObjectDying: - if (m_bAppEventListener) - { - Application::RemoveEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) ); - m_bAppEventListener = false; - } - break; - case VclEventId::ApplicationDataChanged: - // Check if toolbar button size have changed and we have to use system settings - { - sal_Int16 nSymbolsSize = m_aOpt.GetCurrentSymbolsSize(); - if (m_nSymbolsSize != nSymbolsSize) - SetSymbolsSize_Impl(nSymbolsSize); - } - break; - default: - break; - } -} - -SfxImageManager::SfxImageManager(SfxModule& rModule) -{ - pImp = ::GetImageManager(rModule); -} - -SfxImageManager::~SfxImageManager() -{ -} - -namespace -{ - typedef std::unordered_map< SfxModule*, std::shared_ptr<SfxImageManager> > SfxImageManagerMap; - - class theImageManagerMap : - public rtl::Static<SfxImageManagerMap, theImageManagerMap> {}; -} - -SfxImageManager* SfxImageManager::GetImageManager(SfxModule& rModule) -{ - SolarMutexGuard aGuard; - SfxImageManager* pSfxImageManager(nullptr); - - SfxImageManagerMap &rImageManagerMap = theImageManagerMap::get(); - SfxModule* pModule = &rModule; - SfxImageManagerMap::const_iterator pIter = rImageManagerMap.find(pModule); - if ( pIter != rImageManagerMap.end() ) - pSfxImageManager = pIter->second.get(); - else - { - rImageManagerMap[pModule].reset(new SfxImageManager(rModule)); - pSfxImageManager = rImageManagerMap[pModule].get(); - } - return pSfxImageManager; -} - -Image SfxImageManager::GetImage( sal_uInt16 nId, bool bBig ) const -{ - ImageList* pImageList = pImp->GetImageList( bBig ); - if ( pImageList && pImageList->HasImageAtPos( nId ) ) - return pImageList->GetImage( nId ); - return Image(); -} - -Image SfxImageManager::GetImage( sal_uInt16 nId ) const -{ - bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge(); - return GetImage( nId, bLarge ); -} - -Image SfxImageManager::SeekImage( sal_uInt16 nId, bool bBig ) const -{ - ImageList* pImageList = pImp->GetImageList( bBig ); - if (pImageList && pImageList->HasImageAtPos(nId)) - return pImageList->GetImage( nId ); - return Image(); -} - -Image SfxImageManager::SeekImage( sal_uInt16 nId ) const -{ - bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge(); - return SeekImage( nId, bLarge ); -} - -void SfxImageManager::RegisterToolBox( ToolBox *pBox, SfxToolboxFlags nFlags ) -{ - SolarMutexGuard aGuard; - - ToolBoxInf_Impl* pInf = new ToolBoxInf_Impl; - pInf->pToolBox = pBox; - pInf->nFlags = nFlags; - pImp->m_aToolBoxes.push_back( pInf ); -} - - -void SfxImageManager::ReleaseToolBox( ToolBox *pBox ) -{ - SolarMutexGuard aGuard; - - for ( size_t n=0; n < pImp->m_aToolBoxes.size(); n++ ) - { - if ((pImp->m_aToolBoxes[n])->pToolBox == pBox ) - { - delete pImp->m_aToolBoxes[n]; - pImp->m_aToolBoxes.erase( pImp->m_aToolBoxes.begin() + n ); - return; - } - } -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index be206c8..ab32b92 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -87,7 +87,6 @@ #include <sfx2/unoctitm.hxx> #include "helpid.hrc" #include "workwin.hxx" -#include <sfx2/imgmgr.hxx> #include <sfx2/imagemgr.hxx> #include <ctrlfactoryimpl.hxx> diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 8c2a72b..c1e6e8a 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -20,7 +20,6 @@ #include <swmodule.hxx> #include <swtypes.hxx> #include <mailconfigpage.hxx> -#include <sfx2/imgmgr.hxx> #include <svtools/svmedit.hxx> #include <svtools/svtabbx.hxx> #include <svtools/headbar.hxx> diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index ac2b5ad..254d590 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -20,7 +20,6 @@ #include <hintids.hxx> #include <vcl/msgbox.hxx> #include <sfx2/app.hxx> -#include <sfx2/imgmgr.hxx> #include <svx/gallery.hxx> #include <editeng/brushitem.hxx> #include <editeng/lrspitem.hxx> diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 64f7a6a..63ea4fa 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -22,7 +22,6 @@ #include <comphelper/string.hxx> #include <officecfg/Office/Common.hxx> #include <tools/gen.hxx> -#include <sfx2/imgmgr.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> #include <svx/ruler.hxx> diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 30075f1..e1e9adc 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -28,7 +28,6 @@ #include <sot/formats.hxx> #include <sot/filelist.hxx> #include <sfx2/event.hxx> -#include <sfx2/imgmgr.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/dockwin.hxx> #include <sfx2/navigat.hxx> commit c6797f77635e543ad82ba30115bdd80535d52620 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Dec 21 09:51:13 2016 +0000 drop GetImageManager use in sc and unwind ImageList Change-Id: Ida10f14fa74785964efdc4b6645668562297895a diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt index 5ccccfb..1369642 100644 --- a/icon-themes/breeze/links.txt +++ b/icon-themes/breeze/links.txt @@ -1043,10 +1043,10 @@ res/sx18003.png res/minus.png # sc # ============================================== -sc/imglst/lc26047.png cmd/lc_dbviewfunctions.png -sc/imglst/lc26048.png cmd/lc_autosum.png -sc/imglst/lc26050.png cmd/lc_cancel.png -sc/imglst/lc26051.png cmd/lc_ok.png +sc/res/lc26047.png cmd/lc_dbviewfunctions.png +sc/res/lc26048.png cmd/lc_autosum.png +sc/res/lc26050.png cmd/lc_cancel.png +sc/res/lc26051.png cmd/lc_ok.png sc/imglst/na010.png cmd/sc_selectobject.png sc/imglst/na011.png cmd/lc_ok.png sc/imglst/nc03.png cmd/sc_viewdatasourcebrowser.png @@ -1055,10 +1055,10 @@ sc/imglst/nc05.png cmd/sc_insertobject.png sc/imglst/nc06.png cmd/sc_showannotations.png sc/imglst/nc07.png sc/res/droplink.png sc/imglst/nc08.png cmd/sc_gallery.png -sc/imglst/sc26047.png cmd/sc_dbviewfunctions.png -sc/imglst/sc26048.png cmd/sc_autosum.png -sc/imglst/sc26050.png cmd/sc_cancel.png -sc/imglst/sc26051.png cmd/sc_ok.png +sc/res/sc26047.png cmd/sc_dbviewfunctions.png +sc/res/sc26048.png cmd/sc_autosum.png +sc/res/sc26050.png cmd/sc_cancel.png +sc/res/sc26051.png cmd/sc_ok.png sc/res/date.png cmd/sc_datefield.png sc/res/dropcopy.png cmd/sc_copy.png diff --git a/icon-themes/breeze/sc/imglst/lc26049.png b/icon-themes/breeze/sc/res/lc26049.png similarity index 100% rename from icon-themes/breeze/sc/imglst/lc26049.png rename to icon-themes/breeze/sc/res/lc26049.png diff --git a/icon-themes/breeze/sc/imglst/sc26049.png b/icon-themes/breeze/sc/res/sc26049.png similarity index 100% rename from icon-themes/breeze/sc/imglst/sc26049.png rename to icon-themes/breeze/sc/res/sc26049.png diff --git a/icon-themes/breeze_dark/links.txt b/icon-themes/breeze_dark/links.txt index 4b77945..5cfdd0a 100644 --- a/icon-themes/breeze_dark/links.txt +++ b/icon-themes/breeze_dark/links.txt @@ -1039,10 +1039,10 @@ res/sx18003.png res/minus.png # sc # ============================================== -sc/imglst/lc26047.png cmd/lc_dbviewfunctions.png -sc/imglst/lc26048.png cmd/lc_autosum.png -sc/imglst/lc26050.png cmd/lc_cancel.png -sc/imglst/lc26051.png cmd/lc_ok.png +sc/res/lc26047.png cmd/lc_dbviewfunctions.png +sc/res/lc26048.png cmd/lc_autosum.png +sc/res/lc26050.png cmd/lc_cancel.png +sc/res/lc26051.png cmd/lc_ok.png sc/imglst/na010.png cmd/sc_selectobject.png sc/imglst/na011.png cmd/lc_ok.png sc/imglst/nc03.png cmd/sc_viewdatasourcebrowser.png @@ -1051,10 +1051,10 @@ sc/imglst/nc05.png cmd/sc_insertobject.png sc/imglst/nc06.png cmd/sc_showannotations.png sc/imglst/nc07.png sc/res/droplink.png sc/imglst/nc08.png cmd/sc_gallery.png -sc/imglst/sc26047.png cmd/sc_dbviewfunctions.png -sc/imglst/sc26048.png cmd/sc_autosum.png -sc/imglst/sc26050.png cmd/sc_cancel.png -sc/imglst/sc26051.png cmd/sc_ok.png +sc/res/sc26047.png cmd/sc_dbviewfunctions.png +sc/res/sc26048.png cmd/sc_autosum.png +sc/res/sc26050.png cmd/sc_cancel.png +sc/res/sc26051.png cmd/sc_ok.png sc/res/date.png cmd/sc_datefield.png sc/res/dropcopy.png cmd/sc_copy.png diff --git a/icon-themes/breeze_dark/sc/imglst/lc26049.png b/icon-themes/breeze_dark/sc/res/lc26049.png similarity index 100% rename from icon-themes/breeze_dark/sc/imglst/lc26049.png rename to icon-themes/breeze_dark/sc/res/lc26049.png diff --git a/icon-themes/breeze_dark/sc/imglst/sc26049.png b/icon-themes/breeze_dark/sc/res/sc26049.png similarity index 100% rename from icon-themes/breeze_dark/sc/imglst/sc26049.png rename to icon-themes/breeze_dark/sc/res/sc26049.png diff --git a/icon-themes/breeze_svg/links.txt b/icon-themes/breeze_svg/links.txt index 36ca6fe..44d7588 100644 --- a/icon-themes/breeze_svg/links.txt +++ b/icon-themes/breeze_svg/links.txt @@ -1005,10 +1005,10 @@ res/sx18003.png res/minus.png # sc # ============================================== -sc/imglst/lc26047.png cmd/lc_dbviewfunctions.png -sc/imglst/lc26048.png cmd/lc_autosum.png -sc/imglst/lc26050.png cmd/lc_cancel.png -sc/imglst/lc26051.png cmd/lc_ok.png +sc/res/lc26047.png cmd/lc_dbviewfunctions.png +sc/res/lc26048.png cmd/lc_autosum.png +sc/res/lc26050.png cmd/lc_cancel.png +sc/res/lc26051.png cmd/lc_ok.png sc/imglst/na010.png cmd/sc_selectobject.png sc/imglst/na011.png cmd/lc_ok.png sc/imglst/nc03.png cmd/sc_viewdatasourcebrowser.png @@ -1017,10 +1017,10 @@ sc/imglst/nc05.png cmd/sc_insertobject.png sc/imglst/nc06.png cmd/sc_showannotations.png sc/imglst/nc07.png sc/res/droplink.png sc/imglst/nc08.png cmd/sc_gallery.png -sc/imglst/sc26047.png cmd/sc_dbviewfunctions.png -sc/imglst/sc26048.png cmd/sc_autosum.png -sc/imglst/sc26050.png cmd/sc_cancel.png -sc/imglst/sc26051.png cmd/sc_ok.png +sc/res/sc26047.png cmd/sc_dbviewfunctions.png +sc/res/sc26048.png cmd/sc_autosum.png +sc/res/sc26050.png cmd/sc_cancel.png +sc/res/sc26051.png cmd/sc_ok.png sc/res/date.png cmd/sc_datefield.png sc/res/dropcopy.png cmd/sc_copy.png diff --git a/icon-themes/breeze_svg/sc/imglst/lc26049.svg b/icon-themes/breeze_svg/sc/res/lc26049.svg similarity index 100% rename from icon-themes/breeze_svg/sc/imglst/lc26049.svg rename to icon-themes/breeze_svg/sc/res/lc26049.svg diff --git a/icon-themes/breeze_svg/sc/imglst/sc26049.svg b/icon-themes/breeze_svg/sc/res/sc26049.svg similarity index 100% rename from icon-themes/breeze_svg/sc/imglst/sc26049.svg rename to icon-themes/breeze_svg/sc/res/sc26049.svg diff --git a/icon-themes/oxygen/sc/imglst/lc26047.png b/icon-themes/crystal/sc/res/lc26047.png similarity index 100% rename from icon-themes/oxygen/sc/imglst/lc26047.png rename to icon-themes/crystal/sc/res/lc26047.png diff --git a/icon-themes/crystal/sc/imglst/lc26048.png b/icon-themes/crystal/sc/res/lc26048.png similarity index 100% rename from icon-themes/crystal/sc/imglst/lc26048.png rename to icon-themes/crystal/sc/res/lc26048.png diff --git a/icon-themes/crystal/sc/imglst/lc26049.png b/icon-themes/crystal/sc/res/lc26049.png similarity index 100% rename from icon-themes/crystal/sc/imglst/lc26049.png rename to icon-themes/crystal/sc/res/lc26049.png diff --git a/icon-themes/oxygen/sc/imglst/lc26050.png b/icon-themes/crystal/sc/res/lc26050.png similarity index 100% rename from icon-themes/oxygen/sc/imglst/lc26050.png rename to icon-themes/crystal/sc/res/lc26050.png diff --git a/icon-themes/oxygen/sc/imglst/lc26051.png b/icon-themes/crystal/sc/res/lc26051.png similarity index 100% rename from icon-themes/oxygen/sc/imglst/lc26051.png rename to icon-themes/crystal/sc/res/lc26051.png diff --git a/icon-themes/oxygen/sc/imglst/sc26047.png b/icon-themes/crystal/sc/res/sc26047.png similarity index 100% rename from icon-themes/oxygen/sc/imglst/sc26047.png rename to icon-themes/crystal/sc/res/sc26047.png diff --git a/icon-themes/crystal/sc/imglst/sc26048.png b/icon-themes/crystal/sc/res/sc26048.png similarity index 100% rename from icon-themes/crystal/sc/imglst/sc26048.png rename to icon-themes/crystal/sc/res/sc26048.png diff --git a/icon-themes/crystal/sc/imglst/sc26049.png b/icon-themes/crystal/sc/res/sc26049.png similarity index 100% rename from icon-themes/crystal/sc/imglst/sc26049.png rename to icon-themes/crystal/sc/res/sc26049.png diff --git a/icon-themes/oxygen/sc/imglst/sc26050.png b/icon-themes/crystal/sc/res/sc26050.png similarity index 100% rename from icon-themes/oxygen/sc/imglst/sc26050.png rename to icon-themes/crystal/sc/res/sc26050.png diff --git a/icon-themes/oxygen/sc/imglst/sc26051.png b/icon-themes/crystal/sc/res/sc26051.png similarity index 100% rename from icon-themes/oxygen/sc/imglst/sc26051.png rename to icon-themes/crystal/sc/res/sc26051.png diff --git a/icon-themes/elementary/links.txt b/icon-themes/elementary/links.txt index 0489360..30db7cd 100644 --- a/icon-themes/elementary/links.txt +++ b/icon-themes/elementary/links.txt @@ -457,10 +457,10 @@ res/sx03248.png res/odm_16_8.png res/sx03249.png res/odp_16_8.png res/sx03250.png res/ods_16_8.png res/sx03256.png cmd/sc_addons.png -sc/imglst/lc26047.png cmd/lc_insertformula.png -sc/imglst/lc26048.png cmd/lc_autosum.png -sc/imglst/lc26050.png cmd/lc_cancel.png -sc/imglst/lc26051.png cmd/lc_ok.png +sc/res/lc26047.png cmd/lc_insertformula.png +sc/res/lc26048.png cmd/lc_autosum.png +sc/res/lc26050.png cmd/lc_cancel.png +sc/res/lc26051.png cmd/lc_ok.png sc/imglst/na05.png cmd/sc_upsearch.png sc/imglst/na06.png cmd/sc_downsearch.png sc/imglst/nc01.png cmd/sc_inserttable.png @@ -468,10 +468,10 @@ sc/imglst/nc04.png cmd/sc_insertgraphic.png sc/imglst/nc05.png cmd/sc_drawchart.png sc/imglst/nc06.png cmd/sc_insertannotation.png sc/imglst/nc08.png cmd/sc_insertdraw.png -sc/imglst/sc26047.png cmd/sc_insertformula.png -sc/imglst/sc26048.png cmd/sc_autosum.png -sc/imglst/sc26050.png cmd/sc_cancel.png -sc/imglst/sc26051.png cmd/sc_ok.png +sc/res/sc26047.png cmd/sc_insertformula.png +sc/res/sc26048.png cmd/sc_autosum.png +sc/res/sc26050.png cmd/sc_cancel.png +sc/res/sc26051.png cmd/sc_ok.png sc/res/date.png cmd/sc_datefield.png sc/res/dropcopy.png cmd/sc_copy.png sc/res/dropurl.png cmd/sc_inserthyperlink.png diff --git a/icon-themes/elementary/sc/imglst/lc26049.png b/icon-themes/elementary/sc/res/lc26049.png similarity index 100% rename from icon-themes/elementary/sc/imglst/lc26049.png rename to icon-themes/elementary/sc/res/lc26049.png diff --git a/icon-themes/elementary/sc/imglst/sc26049.png b/icon-themes/elementary/sc/res/sc26049.png similarity index 100% rename from icon-themes/elementary/sc/imglst/sc26049.png rename to icon-themes/elementary/sc/res/sc26049.png diff --git a/icon-themes/galaxy/sc/imglst/lc26047.png b/icon-themes/galaxy/sc/res/lc26047.png similarity index 100% rename from icon-themes/galaxy/sc/imglst/lc26047.png rename to icon-themes/galaxy/sc/res/lc26047.png diff --git a/icon-themes/galaxy/sc/imglst/lc26048.png b/icon-themes/galaxy/sc/res/lc26048.png similarity index 100% rename from icon-themes/galaxy/sc/imglst/lc26048.png rename to icon-themes/galaxy/sc/res/lc26048.png diff --git a/icon-themes/galaxy/sc/imglst/lc26049.png b/icon-themes/galaxy/sc/res/lc26049.png similarity index 100% rename from icon-themes/galaxy/sc/imglst/lc26049.png rename to icon-themes/galaxy/sc/res/lc26049.png diff --git a/icon-themes/galaxy/sc/imglst/lc26050.png b/icon-themes/galaxy/sc/res/lc26050.png similarity index 100% rename from icon-themes/galaxy/sc/imglst/lc26050.png rename to icon-themes/galaxy/sc/res/lc26050.png diff --git a/icon-themes/galaxy/sc/imglst/lc26051.png b/icon-themes/galaxy/sc/res/lc26051.png similarity index 100% rename from icon-themes/galaxy/sc/imglst/lc26051.png rename to icon-themes/galaxy/sc/res/lc26051.png diff --git a/icon-themes/galaxy/sc/imglst/sc26047.png b/icon-themes/galaxy/sc/res/sc26047.png similarity index 100% rename from icon-themes/galaxy/sc/imglst/sc26047.png rename to icon-themes/galaxy/sc/res/sc26047.png diff --git a/icon-themes/galaxy/sc/imglst/sc26048.png b/icon-themes/galaxy/sc/res/sc26048.png similarity index 100% rename from icon-themes/galaxy/sc/imglst/sc26048.png rename to icon-themes/galaxy/sc/res/sc26048.png diff --git a/icon-themes/galaxy/sc/imglst/sc26049.png b/icon-themes/galaxy/sc/res/sc26049.png similarity index 100% rename from icon-themes/galaxy/sc/imglst/sc26049.png rename to icon-themes/galaxy/sc/res/sc26049.png diff --git a/icon-themes/galaxy/sc/imglst/sc26050.png b/icon-themes/galaxy/sc/res/sc26050.png similarity index 100% rename from icon-themes/galaxy/sc/imglst/sc26050.png rename to icon-themes/galaxy/sc/res/sc26050.png diff --git a/icon-themes/galaxy/sc/imglst/sc26051.png b/icon-themes/galaxy/sc/res/sc26051.png similarity index 100% rename from icon-themes/galaxy/sc/imglst/sc26051.png rename to icon-themes/galaxy/sc/res/sc26051.png diff --git a/icon-themes/hicontrast/sc/imglst/lc26047.png b/icon-themes/hicontrast/sc/res/lc26047.png similarity index 100% rename from icon-themes/hicontrast/sc/imglst/lc26047.png rename to icon-themes/hicontrast/sc/res/lc26047.png diff --git a/icon-themes/hicontrast/sc/imglst/lc26048.png b/icon-themes/hicontrast/sc/res/lc26048.png similarity index 100% rename from icon-themes/hicontrast/sc/imglst/lc26048.png rename to icon-themes/hicontrast/sc/res/lc26048.png diff --git a/icon-themes/hicontrast/sc/imglst/lc26049.png b/icon-themes/hicontrast/sc/res/lc26049.png similarity index 100% rename from icon-themes/hicontrast/sc/imglst/lc26049.png rename to icon-themes/hicontrast/sc/res/lc26049.png diff --git a/icon-themes/hicontrast/sc/imglst/lc26050.png b/icon-themes/hicontrast/sc/res/lc26050.png similarity index 100% rename from icon-themes/hicontrast/sc/imglst/lc26050.png rename to icon-themes/hicontrast/sc/res/lc26050.png diff --git a/icon-themes/hicontrast/sc/imglst/lc26051.png b/icon-themes/hicontrast/sc/res/lc26051.png similarity index 100% rename from icon-themes/hicontrast/sc/imglst/lc26051.png rename to icon-themes/hicontrast/sc/res/lc26051.png diff --git a/icon-themes/hicontrast/sc/imglst/sc26047.png b/icon-themes/hicontrast/sc/res/sc26047.png similarity index 100% rename from icon-themes/hicontrast/sc/imglst/sc26047.png rename to icon-themes/hicontrast/sc/res/sc26047.png diff --git a/icon-themes/hicontrast/sc/imglst/sc26048.png b/icon-themes/hicontrast/sc/res/sc26048.png similarity index 100% rename from icon-themes/hicontrast/sc/imglst/sc26048.png rename to icon-themes/hicontrast/sc/res/sc26048.png diff --git a/icon-themes/hicontrast/sc/imglst/sc26049.png b/icon-themes/hicontrast/sc/res/sc26049.png similarity index 100% rename from icon-themes/hicontrast/sc/imglst/sc26049.png rename to icon-themes/hicontrast/sc/res/sc26049.png diff --git a/icon-themes/hicontrast/sc/imglst/sc26050.png b/icon-themes/hicontrast/sc/res/sc26050.png similarity index 100% rename from icon-themes/hicontrast/sc/imglst/sc26050.png rename to icon-themes/hicontrast/sc/res/sc26050.png diff --git a/icon-themes/hicontrast/sc/imglst/sc26051.png b/icon-themes/hicontrast/sc/res/sc26051.png similarity index 100% rename from icon-themes/hicontrast/sc/imglst/sc26051.png rename to icon-themes/hicontrast/sc/res/sc26051.png diff --git a/icon-themes/crystal/sc/imglst/lc26047.png b/icon-themes/oxygen/sc/res/lc26047.png similarity index 100% rename from icon-themes/crystal/sc/imglst/lc26047.png rename to icon-themes/oxygen/sc/res/lc26047.png diff --git a/icon-themes/oxygen/sc/imglst/lc26048.png b/icon-themes/oxygen/sc/res/lc26048.png similarity index 100% rename from icon-themes/oxygen/sc/imglst/lc26048.png rename to icon-themes/oxygen/sc/res/lc26048.png diff --git a/icon-themes/oxygen/sc/imglst/lc26049.png b/icon-themes/oxygen/sc/res/lc26049.png similarity index 100% rename from icon-themes/oxygen/sc/imglst/lc26049.png rename to icon-themes/oxygen/sc/res/lc26049.png diff --git a/icon-themes/crystal/sc/imglst/lc26050.png b/icon-themes/oxygen/sc/res/lc26050.png similarity index 100% rename from icon-themes/crystal/sc/imglst/lc26050.png rename to icon-themes/oxygen/sc/res/lc26050.png diff --git a/icon-themes/crystal/sc/imglst/lc26051.png b/icon-themes/oxygen/sc/res/lc26051.png similarity index 100% rename from icon-themes/crystal/sc/imglst/lc26051.png rename to icon-themes/oxygen/sc/res/lc26051.png diff --git a/icon-themes/crystal/sc/imglst/sc26047.png b/icon-themes/oxygen/sc/res/sc26047.png similarity index 100% rename from icon-themes/crystal/sc/imglst/sc26047.png rename to icon-themes/oxygen/sc/res/sc26047.png diff --git a/icon-themes/oxygen/sc/imglst/sc26048.png b/icon-themes/oxygen/sc/res/sc26048.png similarity index 100% rename from icon-themes/oxygen/sc/imglst/sc26048.png rename to icon-themes/oxygen/sc/res/sc26048.png diff --git a/icon-themes/oxygen/sc/imglst/sc26049.png b/icon-themes/oxygen/sc/res/sc26049.png similarity index 100% rename from icon-themes/oxygen/sc/imglst/sc26049.png rename to icon-themes/oxygen/sc/res/sc26049.png diff --git a/icon-themes/crystal/sc/imglst/sc26050.png b/icon-themes/oxygen/sc/res/sc26050.png similarity index 100% rename from icon-themes/crystal/sc/imglst/sc26050.png rename to icon-themes/oxygen/sc/res/sc26050.png diff --git a/icon-themes/crystal/sc/imglst/sc26051.png b/icon-themes/oxygen/sc/res/sc26051.png similarity index 100% rename from icon-themes/crystal/sc/imglst/sc26051.png rename to icon-themes/oxygen/sc/res/sc26051.png diff --git a/icon-themes/sifr/sc/imglst/lc26047.png b/icon-themes/sifr/sc/res/lc26047.png similarity index 100% rename from icon-themes/sifr/sc/imglst/lc26047.png rename to icon-themes/sifr/sc/res/lc26047.png diff --git a/icon-themes/sifr/sc/imglst/lc26048.png b/icon-themes/sifr/sc/res/lc26048.png similarity index 100% rename from icon-themes/sifr/sc/imglst/lc26048.png rename to icon-themes/sifr/sc/res/lc26048.png diff --git a/icon-themes/sifr/sc/imglst/lc26049.png b/icon-themes/sifr/sc/res/lc26049.png similarity index 100% rename from icon-themes/sifr/sc/imglst/lc26049.png rename to icon-themes/sifr/sc/res/lc26049.png diff --git a/icon-themes/sifr/sc/imglst/lc26050.png b/icon-themes/sifr/sc/res/lc26050.png similarity index 100% rename from icon-themes/sifr/sc/imglst/lc26050.png rename to icon-themes/sifr/sc/res/lc26050.png diff --git a/icon-themes/sifr/sc/imglst/lc26051.png b/icon-themes/sifr/sc/res/lc26051.png similarity index 100% rename from icon-themes/sifr/sc/imglst/lc26051.png rename to icon-themes/sifr/sc/res/lc26051.png diff --git a/icon-themes/sifr/sc/imglst/sc26047.png b/icon-themes/sifr/sc/res/sc26047.png similarity index 100% rename from icon-themes/sifr/sc/imglst/sc26047.png rename to icon-themes/sifr/sc/res/sc26047.png diff --git a/icon-themes/sifr/sc/imglst/sc26048.png b/icon-themes/sifr/sc/res/sc26048.png similarity index 100% rename from icon-themes/sifr/sc/imglst/sc26048.png rename to icon-themes/sifr/sc/res/sc26048.png diff --git a/icon-themes/sifr/sc/imglst/sc26049.png b/icon-themes/sifr/sc/res/sc26049.png similarity index 100% rename from icon-themes/sifr/sc/imglst/sc26049.png rename to icon-themes/sifr/sc/res/sc26049.png diff --git a/icon-themes/sifr/sc/imglst/sc26050.png b/icon-themes/sifr/sc/res/sc26050.pngD similarity index 100% rename from icon-themes/sifr/sc/imglst/sc26050.png rename to icon-themes/sifr/sc/res/sc26050.pngD diff --git a/icon-themes/sifr/sc/imglst/sc26051.png b/icon-themes/sifr/sc/res/sc26051.png similarity index 100% rename from icon-themes/sifr/sc/imglst/sc26051.png rename to icon-themes/sifr/sc/res/sc26051.png diff --git a/icon-themes/tango/links.txt b/icon-themes/tango/links.txt index 0e34098..e77da0e 100644 --- a/icon-themes/tango/links.txt +++ b/icon-themes/tango/links.txt @@ -18,9 +18,9 @@ cmd/lc_advancedmode.png cmd/lc_toggleobjectrotatemode.png res/lc05539.png cmd/lc_designerdialog.png cmd/sc_savebasicas.png cmd/sc_saveas.png res/lc05711.png cmd/lc_copy.png -sc/imglst/lc26050.png cmd/lc_cancel.png +sc/res/lc26050.png cmd/lc_cancel.png sw/imglst/lc20557.png cmd/lc_cancel.png -sc/imglst/sc26050.png cmd/sc_cancel.png +sc/res/sc26050.png cmd/sc_cancel.png sw/imglst/sc20557.png cmd/sc_cancel.png res/sc10853.png cmd/sc_recsearch.png res/sc05961.png cmd/sc_recsearch.png @@ -92,10 +92,10 @@ fpicker/res/fp014.png res/newdoc.png sd/res/playblue_16.png avmedia/res/av02049.png sd/res/breakplayingblue_16.png avmedia/res/av02050.png avmedia/res/avl02053.png cmd/lc_ok.png -sc/imglst/lc26051.png cmd/lc_ok.png +sc/res/lc26051.png cmd/lc_ok.png sw/imglst/lc20558.png cmd/lc_ok.png avmedia/res/av02053.png cmd/sc_ok.png -sc/imglst/sc26051.png cmd/sc_ok.png +sc/res/sc26051.png cmd/sc_ok.png sw/imglst/sc20558.png cmd/sc_ok.png avmedia/res/avl02048.png cmd/lc_open.png avmedia/res/av02048.png cmd/sc_open.png @@ -207,8 +207,8 @@ sfx2/res/symphony/sidebar-transition-small.png cmd/sc_dia.png sfx2/res/symphony/sidebar-animation-small.png cmd/sc_customanimation.png sw/imglst/lc20556.png cmd/lc_insertformula.png sw/imglst/sc20556.png cmd/sc_insertformula.png -sc/imglst/lc26047.png cmd/lc_insertformula.png -sc/imglst/sc26047.png cmd/sc_insertformula.png +sc/res/lc26047.png cmd/lc_insertformula.png +sc/res/sc26047.png cmd/sc_insertformula.png cmd/lc_exitsearch.png cmd/lc_closedoc.png cmd/sc_exitsearch.png cmd/sc_closedoc.png cmd/lc_leftpara.png cmd/lc_alignleft.png @@ -252,8 +252,8 @@ cmd/lc_openfromwriter.png cmd/lc_open.png cmd/lc_openfromcalc.png cmd/lc_open.png cmd/sc_openfromwriter.png cmd/sc_open.png cmd/sc_openfromcalc.png cmd/sc_open.png -sc/imglst/lc26048.png cmd/lc_autosum.png -sc/imglst/sc26048.png cmd/sc_autosum.png +sc/res/lc26048.png cmd/lc_autosum.png +sc/res/sc26048.png cmd/sc_autosum.png cmd/lc_fontcolor.png cmd/lc_color.png cmd/sc_fontcolor.png cmd/sc_color.png cmd/lc_circle.png cmd/lc_basicshapes.circle.png diff --git a/icon-themes/tango/sc/imglst/lc26049.png b/icon-themes/tango/sc/res/lc26049.png similarity index 100% rename from icon-themes/tango/sc/imglst/lc26049.png rename to icon-themes/tango/sc/res/lc26049.png diff --git a/icon-themes/tango/sc/imglst/sc26049.png b/icon-themes/tango/sc/res/sc26049.png similarity index 100% rename from icon-themes/tango/sc/imglst/sc26049.png rename to icon-themes/tango/sc/res/sc26049.png diff --git a/icon-themes/tango_testing/sc/imglst/lc26048.png b/icon-themes/tango_testing/sc/res/lc26048.png similarity index 100% rename from icon-themes/tango_testing/sc/imglst/lc26048.png rename to icon-themes/tango_testing/sc/res/lc26048.png diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index edc90dc..3f3300e 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -1026,6 +1026,11 @@ #define RID_BMP_MINUS (BMP_START + 32) #define RID_BMP_NOTPRESSED (BMP_START + 33) #define RID_BMP_PRESSED (BMP_START + 34) +#define RID_BMP_INPUT_FUNCTION (BMP_START + 35) +#define RID_BMP_INPUT_SUM (BMP_START + 36) +#define RID_BMP_INPUT_EQUAL (BMP_START + 37) +#define RID_BMP_INPUT_CANCEL (BMP_START + 38) +#define RID_BMP_INPUT_OK (BMP_START + 39) #define BMP_END (BMP_START + 100) diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 0b88697..3801cef 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -140,8 +140,6 @@ SfxChildWinInfo ScInputWindowWrapper::GetInfo() const return aInfo; } -#define IMAGE(id) pImgMgr->SeekImage(id) - // class ScInputWindow static VclPtr<ScTextWndBase> lcl_chooseRuntimeImpl( vcl::Window* pParent, SfxBindings* pBind ) @@ -173,9 +171,6 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ) : bIsOkCancelMode ( false ), bInResize ( false ) { - ScModule* pScMod = SC_MOD(); - SfxImageManager* pImgMgr = SfxImageManager::GetImageManager(*pScMod); - // #i73615# don't rely on SfxViewShell::Current while constructing the input line // (also for GetInputHdl below) ScTabViewShell* pViewSh = nullptr; @@ -191,9 +186,9 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ) : // Position window, 3 buttons, input window InsertWindow (1, aWndPos.get(), ToolBoxItemBits::NONE, 0); InsertSeparator (1); - InsertItem (SID_INPUT_FUNCTION, IMAGE(SID_INPUT_FUNCTION), ToolBoxItemBits::NONE, 2); - InsertItem (SID_INPUT_SUM, IMAGE(SID_INPUT_SUM), ToolBoxItemBits::NONE, 3); - InsertItem (SID_INPUT_EQUAL, IMAGE(SID_INPUT_EQUAL), ToolBoxItemBits::NONE, 4); + InsertItem (SID_INPUT_FUNCTION, Image(BitmapEx(ScResId(RID_BMP_INPUT_FUNCTION))), ToolBoxItemBits::NONE, 2); + InsertItem (SID_INPUT_SUM, Image(BitmapEx(ScResId(RID_BMP_INPUT_SUM))), ToolBoxItemBits::NONE, 3); + InsertItem (SID_INPUT_EQUAL, Image(BitmapEx(ScResId(RID_BMP_INPUT_EQUAL))), ToolBoxItemBits::NONE, 4); InsertSeparator (5); InsertWindow (7, &aTextWindow, ToolBoxItemBits::NONE, 6); @@ -240,7 +235,6 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ) : else if (pViewSh) pViewSh->UpdateInputHandler(true); // Absolutely necessary update - pImgMgr->RegisterToolBox(this); SetAccessibleName(ScResId(STR_ACC_TOOLBAR_FORMULA)); } @@ -272,8 +266,6 @@ void ScInputWindow::dispose() } } - SfxImageManager::GetImageManager( *SC_MOD() )->ReleaseToolBox( this ); - pRuntimeWindow.disposeAndClear(); aWndPos.disposeAndClear(); @@ -509,14 +501,12 @@ void ScInputWindow::SetOkCancelMode() SfxViewFrame* pViewFrm = SfxViewFrame::Current(); EnableButtons( pViewFrm && !pViewFrm->GetChildWindow( SID_OPENDLG_FUNCTION ) ); - ScModule* pScMod = SC_MOD(); - SfxImageManager* pImgMgr = SfxImageManager::GetImageManager(*pScMod); if (!bIsOkCancelMode) { RemoveItem( 3 ); // Remove SID_INPUT_SUM and SID_INPUT_EQUAL RemoveItem( 3 ); - InsertItem( SID_INPUT_CANCEL, IMAGE( SID_INPUT_CANCEL ), ToolBoxItemBits::NONE, 3 ); - InsertItem( SID_INPUT_OK, IMAGE( SID_INPUT_OK ), ToolBoxItemBits::NONE, 4 ); + InsertItem( SID_INPUT_CANCEL, Image(BitmapEx(ScResId(RID_BMP_INPUT_CANCEL))), ToolBoxItemBits::NONE, 3 ); + InsertItem( SID_INPUT_OK, Image(BitmapEx(ScResId(RID_BMP_INPUT_OK))), ToolBoxItemBits::NONE, 4 ); SetItemText ( SID_INPUT_CANCEL, aTextCancel ); SetHelpId ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL ); SetItemText ( SID_INPUT_OK, aTextOk ); @@ -531,15 +521,13 @@ void ScInputWindow::SetSumAssignMode() SfxViewFrame* pViewFrm = SfxViewFrame::Current(); EnableButtons( pViewFrm && !pViewFrm->GetChildWindow( SID_OPENDLG_FUNCTION ) ); - ScModule* pScMod = SC_MOD(); - SfxImageManager* pImgMgr = SfxImageManager::GetImageManager(*pScMod); if (bIsOkCancelMode) { // Remove SID_INPUT_CANCEL, and SID_INPUT_OK RemoveItem( 3 ); RemoveItem( 3 ); - InsertItem( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ), ToolBoxItemBits::NONE, 3 ); - InsertItem( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ), ToolBoxItemBits::NONE, 4 ); + InsertItem( SID_INPUT_SUM, Image(BitmapEx(ScResId(RID_BMP_INPUT_SUM))), ToolBoxItemBits::NONE, 3 ); + InsertItem( SID_INPUT_EQUAL, Image(BitmapEx(ScResId(RID_BMP_INPUT_EQUAL))), ToolBoxItemBits::NONE, 4 ); SetItemText ( SID_INPUT_SUM, aTextSum ); SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME ); SetItemText ( SID_INPUT_EQUAL, aTextEqual ); @@ -634,20 +622,16 @@ void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) if ( rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { // update item images - ScModule* pScMod = SC_MOD(); - SfxImageManager* pImgMgr = SfxImageManager::GetImageManager(*pScMod); - - // IMAGE macro uses pScMod, pImgMg - SetItemImage( SID_INPUT_FUNCTION, IMAGE( SID_INPUT_FUNCTION ) ); + SetItemImage(SID_INPUT_FUNCTION, Image(BitmapEx(ScResId(RID_BMP_INPUT_FUNCTION)))); if ( bIsOkCancelMode ) { - SetItemImage( SID_INPUT_CANCEL, IMAGE( SID_INPUT_CANCEL ) ); - SetItemImage( SID_INPUT_OK, IMAGE( SID_INPUT_OK ) ); + SetItemImage(SID_INPUT_CANCEL, Image(BitmapEx(ScResId(RID_BMP_INPUT_CANCEL)))); + SetItemImage(SID_INPUT_OK, Image(BitmapEx(ScResId(RID_BMP_INPUT_OK)))); } else { - SetItemImage( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ) ); - SetItemImage( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ) ); + SetItemImage(SID_INPUT_SUM, Image(BitmapEx(ScResId(RID_BMP_INPUT_SUM)))); + SetItemImage(SID_INPUT_EQUAL, Image(BitmapEx(ScResId(RID_BMP_INPUT_EQUAL)))); } } diff --git a/sc/source/ui/src/toolbox.src b/sc/source/ui/src/toolbox.src index b0955c0..6d3d232 100644 --- a/sc/source/ui/src/toolbox.src +++ b/sc/source/ui/src/toolbox.src @@ -64,33 +64,29 @@ String SCSTR_QHELP_COLLAPSE_FORMULA Text [ en-US ] = "Collapse Formula Bar" ; }; -// Don't use this image list for normal toolbar images. We have now our commandimagelist -// folder in icon-themes/(name of theme)/cmd. This list is now only used for special -//toolboxes that are used in floating windows. - -#define DEFAULT_IDLIST \ - IdList = { \ - /* Eingabezeile */ \ - SID_INPUT_FUNCTION; /* 26047 */ \ - SID_INPUT_SUM; /* 26048 */ \ - SID_INPUT_EQUAL; /* 26049 */ \ - SID_INPUT_CANCEL; /* 26050 */ \ - SID_INPUT_OK; /* 26051 */ \ - }; \ - IdCount = { \ - 5; \ - }; - -ImageList RID_DEFAULTIMAGELIST_SC +Bitmap RID_BMP_INPUT_FUNCTION { - Prefix = "sc"; - DEFAULT_IDLIST + File = "sc26047.png"; }; -ImageList RID_DEFAULTIMAGELIST_LC +Bitmap RID_BMP_INPUT_SUM { - Prefix = "lc"; - DEFAULT_IDLIST + File = "sc26048.png"; +}; + +Bitmap RID_BMP_INPUT_EQUAL +{ + File = "sc26049.png"; +}; + +Bitmap RID_BMP_INPUT_CANCEL +{ + File = "sc26050.png"; +}; + +Bitmap RID_BMP_INPUT_OK +{ + File = "sc26051.png"; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits