diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-07 10:29:02 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2018-12-10 11:09:00 +0100 |
commit | 89161e4d5835b93f0942e960a116a0d3863cc55c (patch) | |
tree | 5c614702f3f553bd41f8082e48b841cf9db4c2e9 /dbaccess | |
parent | 3f4874dcff0423e045151eb8f435b2b1d057733b (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 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppIconControl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/CollectionView.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WNameMatch.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WTypeSelect.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/imageprovider.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindow.cxx | 2 |
8 files changed, 14 insertions, 14 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 915321866cb8..18ea21ea731e 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -711,7 +711,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); } @@ -839,7 +839,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 df4ba366fb31..a314876eb116 100644 --- a/dbaccess/source/ui/app/AppIconControl.cxx +++ b/dbaccess/source/ui/app/AppIconControl.cxx @@ -51,7 +51,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 94d38e3a76f9..a01288b3c544 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -83,8 +83,8 @@ OCollectionView::OCollectionView( vcl::Window * pParent m_pName->GrabFocus(); m_pNewFolder->SetStyle( m_pNewFolder->GetStyle() | WB_NOPOINTERFOCUS ); - 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 571ea3f7ef54..764427f891ba 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -284,7 +284,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(); Indexes::const_iterator aIndexLoop = m_pIndexes->begin(); diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index 6099824c165e..08ece1690981 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -37,8 +37,8 @@ using namespace ::dbaui; // OWizColumnSelect OWizNameMatching::OWizNameMatching(vcl::Window* pParent) : OWizardPage(pParent, "NameMatching", "dbaccess/ui/namematchingpage.ui") - , m_aImgUp(BitmapEx(BMP_UP)) - , m_aImgDown(BitmapEx(BMP_DOWN)) + , m_aImgUp(StockImage::Yes, BMP_UP) + , m_aImgDown(StockImage::Yes, BMP_DOWN) { get(m_pTABLE_LEFT, "leftlabel"); get(m_pTABLE_RIGHT, "rightlabel"); diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index 6ab20d352a57..8535de2df552 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -235,7 +235,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 bcf7832a749e..205b3d20a8c8 100644 --- a/dbaccess/source/ui/misc/imageprovider.cxx +++ b/dbaccess/source/ui/misc/imageprovider.cxx @@ -141,7 +141,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); } } } @@ -151,7 +151,7 @@ namespace dbaui Image aObjectImage; OUString sImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType) ); if (!sImageResourceID.isEmpty()) - aObjectImage = Image(BitmapEx(sImageResourceID)); + aObjectImage = Image(StockImage::Yes, sImageResourceID); return aObjectImage; } @@ -203,13 +203,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 1ee977f3cb1b..d13d669d6dc3 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -192,7 +192,7 @@ bool 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()) { |