summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-16 09:33:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-16 11:45:35 +0000
commit74b92741b876002cb15993b57467d0a5d05d1ef4 (patch)
tree9dfe4416eb93db81355b6f28d44ec1b288260591 /basctl
parent6d2693853e6c542bc9aec65be283619817929150 (diff)
b*, c*: load BitmapEx resources instead of Image ones
Change-Id: Idbf99de17e5349712ef7c3da3ce8bb8b5f879ef7
Diffstat (limited to 'basctl')
-rw-r--r--basctl/inc/basidesh.hrc22
-rw-r--r--basctl/source/basicide/baside2b.cxx2
-rw-r--r--basctl/source/basicide/basidesh.src53
-rw-r--r--basctl/source/basicide/bastype2.cxx26
-rw-r--r--basctl/source/basicide/bastype3.cxx4
-rw-r--r--basctl/source/basicide/moduldl2.cxx8
-rw-r--r--basctl/source/basicide/moduldlg.cxx4
7 files changed, 64 insertions, 55 deletions
diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index 738540b6df96..97d8ce12ae35 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -27,17 +27,17 @@
#define RID_POPUP_BRKPROPS ( RID_BASICIDE_START + 11 )
#define RID_POPUP_TABBAR ( RID_BASICIDE_START + 12 )
-#define RID_IMG_REMOVEWATCH ( RID_BASICIDE_START + 8 )
-#define RID_IMG_INSTALLATION ( RID_BASICIDE_START + 20 )
-#define RID_IMG_DOCUMENT ( RID_BASICIDE_START + 22 )
-#define RID_IMG_MODLIB ( RID_BASICIDE_START + 24 )
-#define RID_IMG_MODLIBNOTLOADED ( RID_BASICIDE_START + 26 )
-#define RID_IMG_MODULE ( RID_BASICIDE_START + 28 )
-#define RID_IMG_MACRO ( RID_BASICIDE_START + 30 )
-#define RID_IMG_DLGLIB ( RID_BASICIDE_START + 32 )
-#define RID_IMG_DLGLIBNOTLOADED ( RID_BASICIDE_START + 34 )
-#define RID_IMG_DIALOG ( RID_BASICIDE_START + 36 )
-#define RID_IMG_LOCKED ( RID_BASICIDE_START + 41 )
+#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 )
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 035d9b06df8b..d7a90743f331 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1566,7 +1566,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(IDEResId(RID_IMG_REMOVEWATCH)));
+ aRemoveWatchButton->SetModeImage(Image(BitmapEx(IDEResId(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 4377efbb7840..d1c8e565ea08 100644
--- a/basctl/source/basicide/basidesh.src
+++ b/basctl/source/basicide/basidesh.src
@@ -442,50 +442,59 @@ Bitmap RID_BMP_ERRORMARKER
File = "im30841.png";
};
-Image RID_IMG_LOCKED
+Bitmap RID_BMP_LOCKED
{
- ImageBitmap = Bitmap { File = "lock.png" ; };
+ File = "lock.png";
};
-Image RID_IMG_INSTALLATION
+Bitmap RID_BMP_INSTALLATION
{
- ImageBitmap = Bitmap { File = "harddisk_16.png"; };
+ File = "harddisk_16.png";
};
-Image RID_IMG_DOCUMENT
+
+Bitmap RID_BMP_DOCUMENT
{
- ImageBitmap = Bitmap { File = "im30826.png"; };
+ File = "im30826.png";
};
-Image RID_IMG_MODLIB
+
+Bitmap RID_BMP_MODLIB
{
- ImageBitmap = Bitmap { File = "im30820.png"; };
+ File = "im30820.png";
};
-Image RID_IMG_MODLIBNOTLOADED
+
+Bitmap RID_BMP_MODLIBNOTLOADED
{
- ImageBitmap = Bitmap { File = "im30827.png"; };
+ File = "im30827.png";
};
-Image RID_IMG_MODULE
+
+Bitmap RID_BMP_MODULE
{
- ImageBitmap = Bitmap { File = "im30821.png"; };
+ File = "im30821.png";
};
-Image RID_IMG_MACRO
+
+Bitmap RID_BMP_MACRO
{
- ImageBitmap = Bitmap { File = "im30822.png"; };
+ File = "im30822.png";
};
-Image RID_IMG_DLGLIB
+
+Bitmap RID_BMP_DLGLIB
{
- ImageBitmap = Bitmap { File = "dialogfolder_16.png"; };
+ File = "dialogfolder_16.png";
};
-Image RID_IMG_DLGLIBNOTLOADED
+
+Bitmap RID_BMP_DLGLIBNOTLOADED
{
- ImageBitmap = Bitmap { File = "dialogfoldernot_16.png"; };
+ File = "dialogfoldernot_16.png";
};
-Image RID_IMG_DIALOG
+
+Bitmap RID_BMP_DIALOG
{
- ImageBitmap = Bitmap { File = "im30823.png"; };
+ File = "im30823.png";
};
-Image RID_IMG_REMOVEWATCH
+
+Bitmap RID_BMP_REMOVEWATCH
{
- ImageBitmap = Bitmap { File = "baswatr.png" ; };
+ File = "baswatr.png";
};
String RID_STR_REMOVEWATCHTIP
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 7b7c64f9bc2b..65be3ce45dfc 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -257,14 +257,14 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons
// create tree list box entry
sal_uInt16 nId;
if ( ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES ) )
- nId = bLoaded ? RID_IMG_DLGLIB : RID_IMG_DLGLIBNOTLOADED;
+ nId = bLoaded ? RID_BMP_DLGLIB : RID_BMP_DLGLIBNOTLOADED;
else
- nId = bLoaded ? RID_IMG_MODLIB : RID_IMG_MODLIBNOTLOADED;
+ nId = bLoaded ? RID_BMP_MODLIB : RID_BMP_MODLIBNOTLOADED;
SvTreeListEntry* pLibRootEntry = FindEntry( pDocumentRootEntry, aLibName, OBJ_TYPE_LIBRARY );
if ( pLibRootEntry )
{
- SetEntryBitmaps( pLibRootEntry, Image( IDEResId( nId ) ) );
- if ( IsExpanded( pLibRootEntry ) )
+ SetEntryBitmaps(pLibRootEntry, Image(BitmapEx(IDEResId(nId))));
+ if ( IsExpanded(pLibRootEntry))
ImpCreateLibSubEntries( pLibRootEntry, rDocument, aLibName );
}
else
@@ -307,7 +307,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
{
pModuleEntry = AddEntry(
aModName,
- Image( IDEResId( RID_IMG_MODULE ) ),
+ Image(BitmapEx(IDEResId(RID_BMP_MODULE))),
pLibRootEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_MODULE));
}
@@ -327,7 +327,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
{
AddEntry(
aName,
- Image( IDEResId( RID_IMG_MACRO ) ),
+ Image(BitmapEx(IDEResId(RID_BMP_MACRO))),
pModuleEntry, false,
o3tl::make_unique<Entry>(
OBJ_TYPE_METHOD));
@@ -366,7 +366,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
{
AddEntry(
aDlgName,
- Image( IDEResId( RID_IMG_DIALOG ) ),
+ Image(BitmapEx(IDEResId(RID_BMP_DIALOG))),
pLibRootEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_DIALOG));
}
@@ -394,7 +394,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr
SvTreeListEntry* pLibSubRootEntry = FindEntry( pLibRootEntry, aEntryName, eType );
if( pLibSubRootEntry )
{
- SetEntryBitmaps( pLibSubRootEntry, Image( IDEResId( RID_IMG_MODLIB ) ) );
+ SetEntryBitmaps(pLibSubRootEntry, Image(BitmapEx(IDEResId(RID_BMP_MODLIB))));
if ( IsExpanded( pLibSubRootEntry ) )
ImpCreateLibSubSubEntriesInVBAMode( pLibSubRootEntry, rDocument, rLibName );
}
@@ -402,7 +402,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr
{
AddEntry(
aEntryName,
- Image( IDEResId( RID_IMG_MODLIB ) ),
+ Image(BitmapEx(IDEResId(RID_BMP_MODLIB))),
pLibRootEntry, true, o3tl::make_unique<Entry>(eType));
}
}
@@ -463,7 +463,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
{
pModuleEntry = AddEntry(
aEntryName,
- Image( IDEResId( RID_IMG_MODULE ) ),
+ Image(BitmapEx(IDEResId(RID_BMP_MODULE))),
pLibSubRootEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_MODULE));
}
@@ -483,7 +483,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
{
AddEntry(
aName,
- Image( IDEResId( RID_IMG_MACRO ) ),
+ Image(BitmapEx(IDEResId(RID_BMP_MACRO))),
pModuleEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_METHOD));
}
@@ -771,12 +771,12 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r
else
{
// default icon
- rImage = Image( IDEResId( RID_IMG_DOCUMENT ) );
+ rImage = Image(BitmapEx(IDEResId(RID_BMP_DOCUMENT)));
}
}
else
{
- rImage = Image( IDEResId( RID_IMG_INSTALLATION ) );
+ rImage = Image(BitmapEx(IDEResId(RID_BMP_INSTALLATION)));
}
}
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index 1472fa13b736..1aabfe999066 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -105,8 +105,8 @@ void TreeListBox::RequestingChildren( SvTreeListEntry* pEntry )
ImpCreateLibSubEntries( pEntry, aDocument, aOULibName );
// exchange image
- bool bDlgMode = ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES );
- Image aImage( IDEResId( bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB ) );
+ const bool bDlgMode = (nMode & BROWSEMODE_DIALOGS) && !(nMode & BROWSEMODE_MODULES);
+ Image aImage(BitmapEx(IDEResId(bDlgMode ? RID_BMP_DLGLIB : RID_BMP_MODLIB)));
SetEntryBitmaps( pEntry, aImage );
}
else
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 605897b920c1..e54ac691789e 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1442,7 +1442,7 @@ SvTreeListEntry* LibPage::ImpInsertLibEntry( const OUString& rLibName, sal_uLong
if (bProtected)
{
- Image aImage(IDEResId(RID_IMG_LOCKED));
+ Image aImage(BitmapEx(IDEResId(RID_BMP_LOCKED)));
m_pLibBox->SetExpandedEntryBmp(pNewEntry, aImage);
m_pLibBox->SetCollapsedEntryBmp(pNewEntry, aImage);
}
@@ -1535,10 +1535,10 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
sal_uInt16 nMode = pBasicBox->GetMode();
bool bDlgMode = ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES );
- sal_uInt16 nId = bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB;
+ const sal_uInt16 nId = bDlgMode ? RID_BMP_DLGLIB : RID_BMP_MODLIB;
SvTreeListEntry* pNewLibEntry = pBasicBox->AddEntry(
aLibName,
- Image( IDEResId( nId ) ),
+ Image(BitmapEx(IDEResId(nId))),
pRootEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_LIBRARY));
DBG_ASSERT( pNewLibEntry, "InsertEntry fehlgeschlagen!" );
@@ -1547,7 +1547,7 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
{
SvTreeListEntry* pEntry_ = pBasicBox->AddEntry(
aModName,
- Image( IDEResId( RID_IMG_MODULE ) ),
+ Image(BitmapEx(IDEResId(RID_BMP_MODULE))),
pNewLibEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_MODULE));
DBG_ASSERT( pEntry_, "InsertEntry fehlgeschlagen!" );
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 4d4df19704d9..fa53485954a8 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -847,7 +847,7 @@ void ObjectPage::NewDialog()
{
pEntry = m_pBasicBox->AddEntry(
aDlgName,
- Image( IDEResId( RID_IMG_DIALOG ) ),
+ Image(BitmapEx(IDEResId(RID_BMP_DIALOG))),
pLibEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_DIALOG));
DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" );
@@ -1018,7 +1018,7 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
{
pEntry = rBasicBox.AddEntry(
aModName,
- Image( IDEResId( RID_IMG_MODULE ) ),
+ Image(BitmapEx(IDEResId(RID_BMP_MODULE))),
pSubRootEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_MODULE));
DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" );