summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-19 12:02:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-25 17:02:15 +0200
commitd7559de4f70afdf64dea3bfbf462f5f188da7d05 (patch)
treef27987aec5a5518928a8271af04bd875bb92ef58 /basctl
parente68b6e349c31ac1376e90218013e1e7612f2b522 (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')
-rw-r--r--basctl/inc/basidesh.hrc16
-rw-r--r--basctl/inc/bitmaps.hlst31
-rw-r--r--basctl/source/basicide/baside2b.cxx9
-rw-r--r--basctl/source/basicide/basidesh.src75
-rw-r--r--basctl/source/basicide/bastype2.cxx29
-rw-r--r--basctl/source/basicide/bastype3.cxx3
-rw-r--r--basctl/source/basicide/moduldl2.cxx9
-rw-r--r--basctl/source/basicide/moduldlg.cxx5
8 files changed, 61 insertions, 116 deletions
diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index 0f9150613182..60a2f0fa903e 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -24,18 +24,6 @@
#define RID_BASICIDE_OBJECTBAR ( RID_BASICIDE_START + 0 )
-#define RID_BMP_REMOVEWATCH ( RID_BASICIDE_START + 8 )
-#define RID_BMP_INSTALLATION ( RID_BASICIDE_START + 20 )
-#define RID_BMP_DOCUMENT ( RID_BASICIDE_START + 22 )
-#define RID_BMP_MODLIB ( RID_BASICIDE_START + 24 )
-#define RID_BMP_MODLIBNOTLOADED ( RID_BASICIDE_START + 26 )
-#define RID_BMP_MODULE ( RID_BASICIDE_START + 28 )
-#define RID_BMP_MACRO ( RID_BASICIDE_START + 30 )
-#define RID_BMP_DLGLIB ( RID_BASICIDE_START + 32 )
-#define RID_BMP_DLGLIBNOTLOADED ( RID_BASICIDE_START + 34 )
-#define RID_BMP_DIALOG ( RID_BASICIDE_START + 36 )
-#define RID_BMP_LOCKED ( RID_BASICIDE_START + 41 )
-
#define RID_STR_SEARCHALLMODULES ( RID_BASICIDE_START + 1 )
#define RID_STR_SEARCHFROMSTART ( RID_BASICIDE_START + 2 )
#define RID_STR_NOMODULE ( RID_BASICIDE_START + 3 )
@@ -122,10 +110,6 @@
#define RID_STR_USERFORMS ( RID_BASICIDE_START + 119 )
#define RID_STR_NORMAL_MODULES ( RID_BASICIDE_START + 120 )
#define RID_STR_CLASS_MODULES ( RID_BASICIDE_START + 121 )
-#define RID_BMP_BRKENABLED ( SID_BASICIDE_START + 122 )
-#define RID_BMP_BRKDISABLED ( SID_BASICIDE_START + 123 )
-#define RID_BMP_STEPMARKER ( SID_BASICIDE_START + 124 )
-#define RID_BMP_ERRORMARKER ( SID_BASICIDE_START + 125 )
//free slots
#define RID_STR_PRINTDLG_RANGE ( RID_BASICIDE_START + 130 )
#define RID_STR_PRINTDLG_ALLPAGES ( RID_BASICIDE_START + 131 )
diff --git a/basctl/inc/bitmaps.hlst b/basctl/inc/bitmaps.hlst
new file mode 100644
index 000000000000..3dd019785a67
--- /dev/null
+++ b/basctl/inc/bitmaps.hlst
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#ifndef INCLUDED_BASCTL_INC_BITMAPS_HRC
+#define INCLUDED_BASCTL_INC_BITMAPS_HRC
+
+#define RID_BMP_BRKENABLED "res/im30838.png"
+#define RID_BMP_BRKDISABLED "res/im30839.png"
+#define RID_BMP_STEPMARKER "res/im30840.png"
+#define RID_BMP_ERRORMARKER "res/im30841.png"
+#define RID_BMP_LOCKED "res/lock.png"
+#define RID_BMP_INSTALLATION "res/harddisk_16.png"
+#define RID_BMP_DOCUMENT "res/im30826.png"
+#define RID_BMP_MODLIB "res/im30820.png"
+#define RID_BMP_MODLIBNOTLOADED "res/im30827.png"
+#define RID_BMP_MODULE "res/im30821.png"
+#define RID_BMP_MACRO "res/im30822.png"
+#define RID_BMP_DLGLIB "res/dialogfolder_16.png"
+#define RID_BMP_DLGLIBNOTLOADED "res/dialogfoldernot_16.png"
+#define RID_BMP_DIALOG "res/im30823.png"
+#define RID_BMP_REMOVEWATCH "res/baswatr.png"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
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!" );