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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 12 | ||||
-rw-r--r-- | cui/source/dialogs/cuihyperdlg.cxx | 8 | ||||
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 8 | ||||
-rw-r--r-- | cui/source/options/dbregister.cxx | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 131930aa6688..23a88d295356 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -378,17 +378,17 @@ struct SvxConfigGroupBoxResource_Impl }; SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() : - m_hdImage(BitmapEx(RID_CUIBMP_HARDDISK)), - m_libImage(BitmapEx(RID_CUIBMP_LIB)), - m_macImage(BitmapEx(RID_CUIBMP_MACRO)), - m_docImage(BitmapEx(RID_CUIBMP_DOC)), + m_hdImage(StockImage::Yes, RID_CUIBMP_HARDDISK), + m_libImage(StockImage::Yes, RID_CUIBMP_LIB), + m_macImage(StockImage::Yes, RID_CUIBMP_MACRO), + m_docImage(StockImage::Yes, RID_CUIBMP_DOC), m_sMyMacros(CuiResId(RID_SVXSTR_MYMACROS)), m_sProdMacros(CuiResId(RID_SVXSTR_PRODMACROS)), m_sMacros(CuiResId(RID_SVXSTR_BASICMACROS)), m_sDlgMacros(CuiResId(RID_SVXSTR_PRODMACROS)), m_aStrGroupStyles(CuiResId(RID_SVXSTR_GROUP_STYLES)), - m_collapsedImage(BitmapEx(RID_CUIBMP_COLLAPSED)), - m_expandedImage(BitmapEx(RID_CUIBMP_EXPANDED)) + m_collapsedImage(StockImage::Yes, RID_CUIBMP_COLLAPSED), + m_expandedImage(StockImage::Yes, RID_CUIBMP_EXPANDED) { } diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 7a1ceb74a5b5..662eee177839 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -91,10 +91,10 @@ SvxHpLinkDlg::SvxHpLinkDlg (vcl::Window* pParent, SfxBindings* pBindings) std::vector<Image> imgVector; OUString aStrTitle; SvxIconChoiceCtrlEntry *pEntry; - imgVector.emplace_back(BitmapEx(RID_SVXBMP_HLINETTP)); - imgVector.emplace_back(BitmapEx(RID_SVXBMP_HLMAILTP)); - imgVector.emplace_back(BitmapEx(RID_SVXBMP_HLDOCTP)); - imgVector.emplace_back(BitmapEx(RID_SVXBMP_HLDOCNTP)); + imgVector.emplace_back(StockImage::Yes, RID_SVXBMP_HLINETTP); + imgVector.emplace_back(StockImage::Yes, RID_SVXBMP_HLMAILTP); + imgVector.emplace_back(StockImage::Yes, RID_SVXBMP_HLDOCTP); + imgVector.emplace_back(StockImage::Yes, RID_SVXBMP_HLDOCNTP); for(Image &aImage : imgVector ) { diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 2df5cd25e516..bc9197ef35f2 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -76,10 +76,10 @@ void ShowErrorDialog( const Any& aException ) SFTreeListBox::SFTreeListBox(vcl::Window* pParent) : SvTreeListBox(pParent) - , m_hdImage(BitmapEx(RID_CUIBMP_HARDDISK)) - , m_libImage(BitmapEx(RID_CUIBMP_LIB)) - , m_macImage(BitmapEx(RID_CUIBMP_MACRO)) - , m_docImage(BitmapEx(RID_CUIBMP_DOC)) + , m_hdImage(StockImage::Yes, RID_CUIBMP_HARDDISK) + , m_libImage(StockImage::Yes, RID_CUIBMP_LIB) + , m_macImage(StockImage::Yes, RID_CUIBMP_MACRO) + , m_docImage(StockImage::Yes, RID_CUIBMP_DOC) , m_sMyMacros(CuiResId(RID_SVXSTR_MYMACROS)) , m_sProdMacros(CuiResId(RID_SVXSTR_PRODMACROS)) { diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 4c334d9bcbe2..4ea77754afb4 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -392,7 +392,7 @@ void DbRegistrationOptionsPage::insertNewEntry( const OUString& _sName,const OUS SvTreeListEntry* pEntry = nullptr; if ( _bReadOnly ) { - Image aLocked(BitmapEx(RID_SVXBMP_LOCK)); + Image aLocked(StockImage::Yes, RID_SVXBMP_LOCK); pEntry = m_pPathBox->InsertEntry( aStr, aLocked, aLocked ); } else |