summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-12-07 10:29:02 +0200
committerMichael Meeks <michael.meeks@collabora.com>2018-12-10 11:09:00 +0100
commit89161e4d5835b93f0942e960a116a0d3863cc55c (patch)
tree5c614702f3f553bd41f8082e48b841cf9db4c2e9 /basctl
parent3f4874dcff0423e045151eb8f435b2b1d057733b (diff)
use Image(OUString) instead of Image(Bitmap(OUString))
which benefits LOOL since we can delay creating the image until we know the dpi setting of the display we are going to write to. Achieved by perl -pi -w -e "s/\bImage\s*\(\s*BitmapEx\s*\((\w+)\s*\)\s*\)/Image\(\1\)/g" $( git grep -lw "BitmapEx" ) followed by git grep -nP '\bImage\s*\(\s*BitmapEx\s*\(' followed by commenting out the BitmapEx(OUString) constructor and seeing what needed adjusting. Change-Id: I3224e11937d720fa484b0d659d25673a9e809267 Reviewed-on: https://gerrit.libreoffice.org/64760 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/64860 Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2b.cxx4
-rw-r--r--basctl/source/basicide/bastype2.cxx16
-rw-r--r--basctl/source/basicide/bastype3.cxx2
-rw-r--r--basctl/source/basicide/moduldl2.cxx6
-rw-r--r--basctl/source/basicide/moduldlg.cxx4
5 files changed, 16 insertions, 16 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 1163c94d9aca..3f6bb8a2e5f6 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -78,7 +78,7 @@ SbxVariable* IsSbxVariable (SbxBase* pBase)
Image GetImage(const OUString& rId)
{
- return Image(BitmapEx(rId));
+ return Image(StockImage::Yes, rId);
}
int const nScrollLine = 12;
@@ -1568,7 +1568,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(RID_BMP_REMOVEWATCH)));
+ aRemoveWatchButton->SetModeImage(Image(StockImage::Yes, RID_BMP_REMOVEWATCH));
aRemoveWatchButton->SetQuickHelpText(IDEResId(RID_STR_REMOVEWATCHTIP));
Size aSz( aRemoveWatchButton->GetModeImage().GetSizePixel() );
aSz.Width() += 6;
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index beb4be4b54cc..2eb21c29a0be 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -263,7 +263,7 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons
SvTreeListEntry* pLibRootEntry = FindEntry( pDocumentRootEntry, aLibName, OBJ_TYPE_LIBRARY );
if ( pLibRootEntry )
{
- SetEntryBitmaps(pLibRootEntry, Image(BitmapEx(sId)));
+ SetEntryBitmaps(pLibRootEntry, Image(StockImage::Yes, sId));
if ( IsExpanded(pLibRootEntry))
ImpCreateLibSubEntries( pLibRootEntry, rDocument, aLibName );
}
@@ -271,7 +271,7 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons
{
AddEntry(
aLibName,
- Image(BitmapEx(sId)),
+ Image(StockImage::Yes, sId),
pDocumentRootEntry, true,
o3tl::make_unique<Entry>(OBJ_TYPE_LIBRARY));
}
@@ -307,7 +307,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
{
pModuleEntry = AddEntry(
aModName,
- Image(BitmapEx(RID_BMP_MODULE)),
+ Image(StockImage::Yes, RID_BMP_MODULE),
pLibRootEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_MODULE));
}
@@ -394,7 +394,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr
SvTreeListEntry* pLibSubRootEntry = FindEntry( pLibRootEntry, aEntryName, eType );
if( pLibSubRootEntry )
{
- SetEntryBitmaps(pLibSubRootEntry, Image(BitmapEx(RID_BMP_MODLIB)));
+ SetEntryBitmaps(pLibSubRootEntry, Image(StockImage::Yes, RID_BMP_MODLIB));
if ( IsExpanded( pLibSubRootEntry ) )
ImpCreateLibSubSubEntriesInVBAMode( pLibSubRootEntry, rDocument, rLibName );
}
@@ -402,7 +402,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr
{
AddEntry(
aEntryName,
- Image(BitmapEx(RID_BMP_MODLIB)),
+ Image(StockImage::Yes, RID_BMP_MODLIB),
pLibRootEntry, true, o3tl::make_unique<Entry>(eType));
}
}
@@ -463,7 +463,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
{
pModuleEntry = AddEntry(
aEntryName,
- Image(BitmapEx(RID_BMP_MODULE)),
+ Image(StockImage::Yes, RID_BMP_MODULE),
pLibSubRootEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_MODULE));
}
@@ -771,12 +771,12 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r
else
{
// default icon
- rImage = Image(BitmapEx(RID_BMP_DOCUMENT));
+ rImage = Image(StockImage::Yes, RID_BMP_DOCUMENT);
}
}
else
{
- rImage = Image(BitmapEx(RID_BMP_INSTALLATION));
+ rImage = Image(StockImage::Yes, RID_BMP_INSTALLATION);
}
}
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index 7a4b14fd1ed3..dfaeddfa2870 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -107,7 +107,7 @@ void TreeListBox::RequestingChildren( SvTreeListEntry* pEntry )
// exchange image
const bool bDlgMode = (nMode & BrowseMode::Dialogs) && !(nMode & BrowseMode::Modules);
- Image aImage(BitmapEx(bDlgMode ? OUStringLiteral(RID_BMP_DLGLIB) : OUStringLiteral(RID_BMP_MODLIB)));
+ Image aImage(StockImage::Yes, 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 827474abfbce..9a2796958bf8 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1443,7 +1443,7 @@ SvTreeListEntry* LibPage::ImpInsertLibEntry( const OUString& rLibName, sal_uLong
if (bProtected)
{
- Image aImage(BitmapEx(RID_BMP_LOCKED));
+ Image aImage(StockImage::Yes, RID_BMP_LOCKED);
m_pLibBox->SetExpandedEntryBmp(pNewEntry, aImage);
m_pLibBox->SetCollapsedEntryBmp(pNewEntry, aImage);
}
@@ -1539,7 +1539,7 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
const OUString sId = bDlgMode ? OUStringLiteral(RID_BMP_DLGLIB) : OUStringLiteral(RID_BMP_MODLIB);
SvTreeListEntry* pNewLibEntry = pBasicBox->AddEntry(
aLibName,
- Image(BitmapEx(sId)),
+ Image(StockImage::Yes, sId),
pRootEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_LIBRARY));
DBG_ASSERT( pNewLibEntry, "Insert entry failed!" );
@@ -1548,7 +1548,7 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
{
SvTreeListEntry* pEntry_ = pBasicBox->AddEntry(
aModName,
- Image(BitmapEx(RID_BMP_MODULE)),
+ Image(StockImage::Yes, 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 91a90c608d5f..5a1f518f1ab7 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -855,7 +855,7 @@ void ObjectPage::NewDialog()
{
pEntry = m_pBasicBox->AddEntry(
aDlgName,
- Image(BitmapEx(RID_BMP_DIALOG)),
+ Image(StockImage::Yes, RID_BMP_DIALOG),
pLibEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_DIALOG));
DBG_ASSERT( pEntry, "Insert entry failed!" );
@@ -1026,7 +1026,7 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
{
pEntry = rBasicBox.AddEntry(
aModName,
- Image(BitmapEx(RID_BMP_MODULE)),
+ Image(StockImage::Yes, RID_BMP_MODULE),
pSubRootEntry, false,
o3tl::make_unique<Entry>(OBJ_TYPE_MODULE));
DBG_ASSERT( pEntry, "Insert entry failed!" );