summaryrefslogtreecommitdiffstats
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-12-07 10:29:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-30 20:27:04 +0200
commiteda88cd2eb4cba8f1a3482a3d1bfda66d29f3aab (patch)
treee78b76eb2c992ab899cdfabe8b68a9157411c832 /dbaccess
parentutility constructor for Image "private:graphicrepository" urls (diff)
downloadcore-eda88cd2eb4cba8f1a3482a3d1bfda66d29f3aab.tar.gz
core-eda88cd2eb4cba8f1a3482a3d1bfda66d29f3aab.zip
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. 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> (cherry picked from commit 89161e4d5835b93f0942e960a116a0d3863cc55c) Change-Id: I3224e11937d720fa484b0d659d25673a9e809267 Reviewed-on: https://gerrit.libreoffice.org/79844 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx4
-rw-r--r--dbaccess/source/ui/app/AppIconControl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.cxx4
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx2
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx4
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx2
-rw-r--r--dbaccess/source/ui/misc/imageprovider.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx2
8 files changed, 14 insertions, 14 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 9bb9ba0aa53a..eaa4aa406821 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -705,7 +705,7 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine
{
pEntry = pList->InsertEntry( *pIter, _pParent );
- Image aImage{BitmapEx(rImageId)};
+ Image aImage(StockImage::Yes, rImageId);
pList->SetExpandedEntryBmp(pEntry, aImage);
pList->SetCollapsedEntryBmp(pEntry, aImage);
}
@@ -833,7 +833,7 @@ SvTreeListEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const OUS
{
pRet = pTreeView->InsertEntry( _rName, pEntry );
- Image aImage{BitmapEx(sImageId)};
+ Image aImage(StockImage::Yes, sImageId);
pTreeView->SetExpandedEntryBmp( pRet, aImage );
pTreeView->SetCollapsedEntryBmp( pRet, aImage );
}
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index 489b9fe19388..1097094d822e 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -50,7 +50,7 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent)
{
SvxIconChoiceCtrlEntry* pEntry = InsertEntry(
DBA_RES(aCategorie.pLabelResId) ,
- Image(BitmapEx(OUString::createFromAscii(aCategorie.aImageResId))));
+ Image(StockImage::Yes, OUString::createFromAscii(aCategorie.aImageResId)));
if ( pEntry )
pEntry->SetUserData( new ElementType( aCategorie.eType ) );
}
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index 81fda93c625e..fc978b310450 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -82,8 +82,8 @@ OCollectionView::OCollectionView( vcl::Window * pParent
m_pName->SetText(_sDefaultName);
m_pName->GrabFocus();
- m_pUp->SetModeImage(Image(BitmapEx(BMP_NAVIGATION_BTN_UP_SC)));
- m_pNewFolder->SetModeImage(Image(BitmapEx(BMP_NAVIGATION_CREATEFOLDER_SC)));
+ m_pUp->SetModeImage(Image(StockImage::Yes, BMP_NAVIGATION_BTN_UP_SC));
+ m_pNewFolder->SetModeImage(Image(StockImage::Yes, BMP_NAVIGATION_CREATEFOLDER_SC));
m_pView->SetDoubleClickHdl( LINK( this, OCollectionView, Dbl_Click_FileView ) );
m_pView->EnableAutoResize();
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 6d480eba43ad..6c4cdcc05da9 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -279,7 +279,7 @@ namespace dbaui
void DbaIndexDialog::fillIndexList()
{
- Image aPKeyIcon(BitmapEx(BMP_PKEYICON));
+ Image aPKeyIcon(StockImage::Yes, BMP_PKEYICON);
// fill the list with the index names
m_pIndexList->Clear();
sal_Int32 nPos = 0;
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 8e6a57e909a5..782e62d1b4e0 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -37,8 +37,8 @@ using namespace ::dbaui;
OWizNameMatching::OWizNameMatching(vcl::Window* pParent)
: OWizardPage(pParent, "NameMatching", "dbaccess/ui/namematchingpage.ui")
{
- Image aImgUp(BitmapEx(BMP_UP));
- Image aImgDown(BitmapEx(BMP_DOWN));
+ Image aImgUp(StockImage::Yes, BMP_UP);
+ Image aImgDown(StockImage::Yes, BMP_DOWN);
get(m_pTABLE_LEFT, "leftlabel");
get(m_pTABLE_RIGHT, "rightlabel");
get(m_pCTRL_LEFT, "left");
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 42f25cb2cf12..29144469ad6f 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -232,7 +232,7 @@ OWizTypeSelect::OWizTypeSelect( vcl::Window* pParent, SvStream* _pStream )
m_pColumnNames->SetSelectHdl(LINK(this,OWizTypeSelect,ColumnSelectHdl));
- m_imgPKey = Image(BitmapEx(BMP_PRIMARY_KEY));
+ m_imgPKey = Image(StockImage::Yes, BMP_PRIMARY_KEY);
m_pTypeControl->Show();
m_pTypeControl->Init();
diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx
index 4410caf7e4db..a17795afc449 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -139,7 +139,7 @@ namespace dbaui
lcl_getTableImageResourceID_nothrow( *m_pData, _rName, sImageResourceID );
if (!sImageResourceID.isEmpty() && !_out_rImage)
- _out_rImage = Image(BitmapEx(sImageResourceID));
+ _out_rImage = Image(StockImage::Yes, sImageResourceID);
}
}
}
@@ -149,7 +149,7 @@ namespace dbaui
Image aObjectImage;
OUString sImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType) );
if (!sImageResourceID.isEmpty())
- aObjectImage = Image(BitmapEx(sImageResourceID));
+ aObjectImage = Image(StockImage::Yes, sImageResourceID);
return aObjectImage;
}
@@ -201,13 +201,13 @@ namespace dbaui
Image aFolderImage;
if (!sImageResourceID.isEmpty())
- aFolderImage = Image(BitmapEx(sImageResourceID));
+ aFolderImage = Image(StockImage::Yes, sImageResourceID);
return aFolderImage;
}
Image ImageProvider::getDatabaseImage()
{
- return Image(BitmapEx(DATABASE_TREE_ICON));
+ return Image(StockImage::Yes, DATABASE_TREE_ICON);
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index c7d84e2ad904..c7be7a9d94f8 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -191,7 +191,7 @@ void OTableWindow::FillListBox()
}
// mark all primary keys with special image
- Image aPrimKeyImage = Image(BitmapEx(BMP_PRIMARY_KEY));
+ Image aPrimKeyImage = Image(StockImage::Yes, BMP_PRIMARY_KEY);
if (GetData()->IsShowAll())
{