diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-19 12:02:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-04-25 17:02:15 +0200 |
commit | d7559de4f70afdf64dea3bfbf462f5f188da7d05 (patch) | |
tree | f27987aec5a5518928a8271af04bd875bb92ef58 /basctl/source/basicide | |
parent | e68b6e349c31ac1376e90218013e1e7612f2b522 (diff) |
remove bitmaps from .src files
and into includeable .hlst files, add them to
postprocess/CustomTarget_images.mk
to continue only including used bitmaps in icon-theme zips
Change-Id: I5c24c3eca93a9c4101bcdcacb0e4b2712133968e
Reviewed-on: https://gerrit.libreoffice.org/36941
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl/source/basicide')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 9 | ||||
-rw-r--r-- | basctl/source/basicide/basidesh.src | 75 | ||||
-rw-r--r-- | basctl/source/basicide/bastype2.cxx | 29 | ||||
-rw-r--r-- | basctl/source/basicide/bastype3.cxx | 3 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 9 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.cxx | 5 |
6 files changed, 30 insertions, 100 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 7876a0a1ad49..bc137c171825 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -23,6 +23,7 @@ #include "helpid.hrc" #include <basidesh.hrc> +#include "bitmaps.hlst" #include "baside2.hxx" #include "brkdlg.hxx" @@ -74,9 +75,9 @@ SbxVariable* IsSbxVariable (SbxBase* pBase) return nullptr; } -Image GetImage (unsigned nId) +Image GetImage(const OUString& rId) { - return Image(BitmapEx(IDEResId(nId))); + return Image(BitmapEx(rId)); } int const nScrollLine = 12; @@ -1378,7 +1379,7 @@ void BreakPointWindow::ShowMarker(vcl::RenderContext& rRenderContext) Size const aOutSz = GetOutputSize(); long const nLineHeight = GetTextHeight(); - Image aMarker = GetImage(bErrorMarker ? RID_BMP_ERRORMARKER : RID_BMP_STEPMARKER); + Image aMarker = GetImage(bErrorMarker ? OUStringLiteral(RID_BMP_ERRORMARKER) : OUStringLiteral(RID_BMP_STEPMARKER)); Size aMarkerSz(aMarker.GetSizePixel()); aMarkerSz = rRenderContext.PixelToLogic(aMarkerSz); @@ -1568,7 +1569,7 @@ WatchWindow::WatchWindow (Layout* pParent) aRemoveWatchButton->SetClickHdl( LINK( this, WatchWindow, ButtonHdl ) ); aRemoveWatchButton->SetPosPixel( Point( nTextLen + aXEdit->GetSizePixel().Width() + 4, 2 ) ); aRemoveWatchButton->SetHelpId(HID_BASICIDE_REMOVEWATCH); - aRemoveWatchButton->SetModeImage(Image(BitmapEx(IDEResId(RID_BMP_REMOVEWATCH)))); + aRemoveWatchButton->SetModeImage(Image(BitmapEx(RID_BMP_REMOVEWATCH))); aRemoveWatchButton->SetQuickHelpText(IDEResId(RID_STR_REMOVEWATCHTIP)); Size aSz( aRemoveWatchButton->GetModeImage().GetSizePixel() ); aSz.Width() += 6; diff --git a/basctl/source/basicide/basidesh.src b/basctl/source/basicide/basidesh.src index 7d05eb495d32..0fd062d44fd5 100644 --- a/basctl/source/basicide/basidesh.src +++ b/basctl/source/basicide/basidesh.src @@ -264,81 +264,6 @@ String RID_STR_SHAREMACROSDIALOGS Text [ en-US ] = "%PRODUCTNAME Macros & Dialogs" ; }; -Bitmap RID_BMP_BRKENABLED -{ - File = "im30838.png"; -}; - -Bitmap RID_BMP_BRKDISABLED -{ - File = "im30839.png"; -}; - -Bitmap RID_BMP_STEPMARKER -{ - File = "im30840.png"; -}; - -Bitmap RID_BMP_ERRORMARKER -{ - File = "im30841.png"; -}; - -Bitmap RID_BMP_LOCKED -{ - File = "lock.png"; -}; - -Bitmap RID_BMP_INSTALLATION -{ - File = "harddisk_16.png"; -}; - -Bitmap RID_BMP_DOCUMENT -{ - File = "im30826.png"; -}; - -Bitmap RID_BMP_MODLIB -{ - File = "im30820.png"; -}; - -Bitmap RID_BMP_MODLIBNOTLOADED -{ - File = "im30827.png"; -}; - -Bitmap RID_BMP_MODULE -{ - File = "im30821.png"; -}; - -Bitmap RID_BMP_MACRO -{ - File = "im30822.png"; -}; - -Bitmap RID_BMP_DLGLIB -{ - File = "dialogfolder_16.png"; -}; - -Bitmap RID_BMP_DLGLIBNOTLOADED -{ - File = "dialogfoldernot_16.png"; -}; - -Bitmap RID_BMP_DIALOG -{ - File = "im30823.png"; -}; - -Bitmap RID_BMP_REMOVEWATCH -{ - File = "baswatr.png"; -}; - String RID_STR_REMOVEWATCHTIP { Text [ en-US ] = "Remove Watch" ; diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 5280399b1a0e..39f026b651ac 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -21,6 +21,7 @@ #include <bastypes.hxx> #include <bastype2.hxx> #include <basidesh.hrc> +#include <bitmaps.hlst> #include <iderid.hxx> #include <o3tl/make_unique.hxx> #include <tools/urlobj.hxx> @@ -254,15 +255,15 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons } // create tree list box entry - sal_uInt16 nId; + OUString sId; if ( ( nMode & BrowseMode::Dialogs ) && !( nMode & BrowseMode::Modules ) ) - nId = bLoaded ? RID_BMP_DLGLIB : RID_BMP_DLGLIBNOTLOADED; + sId = bLoaded ? OUStringLiteral(RID_BMP_DLGLIB) : OUStringLiteral(RID_BMP_DLGLIBNOTLOADED); else - nId = bLoaded ? RID_BMP_MODLIB : RID_BMP_MODLIBNOTLOADED; + sId = bLoaded ? OUStringLiteral(RID_BMP_MODLIB) : OUStringLiteral(RID_BMP_MODLIBNOTLOADED); SvTreeListEntry* pLibRootEntry = FindEntry( pDocumentRootEntry, aLibName, OBJ_TYPE_LIBRARY ); if ( pLibRootEntry ) { - SetEntryBitmaps(pLibRootEntry, Image(BitmapEx(IDEResId(nId)))); + SetEntryBitmaps(pLibRootEntry, Image(BitmapEx(sId))); if ( IsExpanded(pLibRootEntry)) ImpCreateLibSubEntries( pLibRootEntry, rDocument, aLibName ); } @@ -270,7 +271,7 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons { AddEntry( aLibName, - Image(BitmapEx(IDEResId(nId))), + Image(BitmapEx(sId)), pDocumentRootEntry, true, o3tl::make_unique<Entry>(OBJ_TYPE_LIBRARY)); } @@ -306,7 +307,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const { pModuleEntry = AddEntry( aModName, - Image(BitmapEx(IDEResId(RID_BMP_MODULE))), + Image(BitmapEx(RID_BMP_MODULE)), pLibRootEntry, false, o3tl::make_unique<Entry>(OBJ_TYPE_MODULE)); } @@ -326,7 +327,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const { AddEntry( aName, - Image(BitmapEx(IDEResId(RID_BMP_MACRO))), + Image(BitmapEx(RID_BMP_MACRO)), pModuleEntry, false, o3tl::make_unique<Entry>( OBJ_TYPE_METHOD)); @@ -365,7 +366,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const { AddEntry( aDlgName, - Image(BitmapEx(IDEResId(RID_BMP_DIALOG))), + Image(BitmapEx(RID_BMP_DIALOG)), pLibRootEntry, false, o3tl::make_unique<Entry>(OBJ_TYPE_DIALOG)); } @@ -393,7 +394,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr SvTreeListEntry* pLibSubRootEntry = FindEntry( pLibRootEntry, aEntryName, eType ); if( pLibSubRootEntry ) { - SetEntryBitmaps(pLibSubRootEntry, Image(BitmapEx(IDEResId(RID_BMP_MODLIB)))); + SetEntryBitmaps(pLibSubRootEntry, Image(BitmapEx(RID_BMP_MODLIB))); if ( IsExpanded( pLibSubRootEntry ) ) ImpCreateLibSubSubEntriesInVBAMode( pLibSubRootEntry, rDocument, rLibName ); } @@ -401,7 +402,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr { AddEntry( aEntryName, - Image(BitmapEx(IDEResId(RID_BMP_MODLIB))), + Image(BitmapEx(RID_BMP_MODLIB)), pLibRootEntry, true, o3tl::make_unique<Entry>(eType)); } } @@ -462,7 +463,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo { pModuleEntry = AddEntry( aEntryName, - Image(BitmapEx(IDEResId(RID_BMP_MODULE))), + Image(BitmapEx(RID_BMP_MODULE)), pLibSubRootEntry, false, o3tl::make_unique<Entry>(OBJ_TYPE_MODULE)); } @@ -482,7 +483,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo { AddEntry( aName, - Image(BitmapEx(IDEResId(RID_BMP_MACRO))), + Image(BitmapEx(RID_BMP_MACRO)), pModuleEntry, false, o3tl::make_unique<Entry>(OBJ_TYPE_METHOD)); } @@ -770,12 +771,12 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r else { // default icon - rImage = Image(BitmapEx(IDEResId(RID_BMP_DOCUMENT))); + rImage = Image(BitmapEx(RID_BMP_DOCUMENT)); } } else { - rImage = Image(BitmapEx(IDEResId(RID_BMP_INSTALLATION))); + rImage = Image(BitmapEx(RID_BMP_INSTALLATION)); } } diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 5447dbf585de..489cb1d1ee83 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -21,6 +21,7 @@ #include <basic/sbmod.hxx> #include <bastype2.hxx> #include <basidesh.hrc> +#include "bitmaps.hlst" #include <bastypes.hxx> #include <com/sun/star/script/XLibraryContainer.hpp> #include <com/sun/star/script/XLibraryContainerPassword.hpp> @@ -106,7 +107,7 @@ void TreeListBox::RequestingChildren( SvTreeListEntry* pEntry ) // exchange image const bool bDlgMode = (nMode & BrowseMode::Dialogs) && !(nMode & BrowseMode::Modules); - Image aImage(BitmapEx(IDEResId(bDlgMode ? RID_BMP_DLGLIB : RID_BMP_MODLIB))); + Image aImage(BitmapEx(bDlgMode ? OUStringLiteral(RID_BMP_DLGLIB) : OUStringLiteral(RID_BMP_MODLIB))); SetEntryBitmaps( pEntry, aImage ); } else diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 4bd2b1078ca3..5a2f06d497fa 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -21,6 +21,7 @@ #include <moduldlg.hxx> #include <basidesh.hxx> #include <basidesh.hrc> +#include <bitmaps.hlst> #include <iderdll.hxx> #include <iderdll2.hxx> #include <o3tl/make_unique.hxx> @@ -1434,7 +1435,7 @@ SvTreeListEntry* LibPage::ImpInsertLibEntry( const OUString& rLibName, sal_uLong if (bProtected) { - Image aImage(BitmapEx(IDEResId(RID_BMP_LOCKED))); + Image aImage(BitmapEx(RID_BMP_LOCKED)); m_pLibBox->SetExpandedEntryBmp(pNewEntry, aImage); m_pLibBox->SetCollapsedEntryBmp(pNewEntry, aImage); } @@ -1527,10 +1528,10 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument, BrowseMode nMode = pBasicBox->GetMode(); bool bDlgMode = ( nMode & BrowseMode::Dialogs ) && !( nMode & BrowseMode::Modules ); - const sal_uInt16 nId = bDlgMode ? RID_BMP_DLGLIB : RID_BMP_MODLIB; + const OUString sId = bDlgMode ? OUStringLiteral(RID_BMP_DLGLIB) : OUStringLiteral(RID_BMP_MODLIB); SvTreeListEntry* pNewLibEntry = pBasicBox->AddEntry( aLibName, - Image(BitmapEx(IDEResId(nId))), + Image(BitmapEx(sId)), pRootEntry, false, o3tl::make_unique<Entry>(OBJ_TYPE_LIBRARY)); DBG_ASSERT( pNewLibEntry, "Insert entry failed!" ); @@ -1539,7 +1540,7 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument, { SvTreeListEntry* pEntry_ = pBasicBox->AddEntry( aModName, - Image(BitmapEx(IDEResId(RID_BMP_MODULE))), + Image(BitmapEx(RID_BMP_MODULE)), pNewLibEntry, false, o3tl::make_unique<Entry>(OBJ_TYPE_MODULE)); DBG_ASSERT( pEntry_, "Insert entry failed!" ); diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 165fd0b61701..3029bfe92467 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include "basidesh.hrc" +#include "bitmaps.hlst" #include "moduldlg.hxx" #include "localizationmgr.hxx" @@ -849,7 +850,7 @@ void ObjectPage::NewDialog() { pEntry = m_pBasicBox->AddEntry( aDlgName, - Image(BitmapEx(IDEResId(RID_BMP_DIALOG))), + Image(BitmapEx(RID_BMP_DIALOG)), pLibEntry, false, o3tl::make_unique<Entry>(OBJ_TYPE_DIALOG)); DBG_ASSERT( pEntry, "Insert entry failed!" ); @@ -1020,7 +1021,7 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument, { pEntry = rBasicBox.AddEntry( aModName, - Image(BitmapEx(IDEResId(RID_BMP_MODULE))), + Image(BitmapEx(RID_BMP_MODULE)), pSubRootEntry, false, o3tl::make_unique<Entry>(OBJ_TYPE_MODULE)); DBG_ASSERT( pEntry, "Insert entry failed!" ); |