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 /extensions | |
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 'extensions')
-rw-r--r-- | extensions/source/bibliography/toolbar.cxx | 6 | ||||
-rw-r--r-- | extensions/source/dbpilots/commonpagesdbp.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/selectlabeldialog.cxx | 10 | ||||
-rw-r--r-- | extensions/source/propctrlr/taborder.cxx | 2 | ||||
-rw-r--r-- | extensions/source/update/ui/updatecheckui.cxx | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 04a8f6f960e6..372f48258b0a 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -573,9 +573,9 @@ void BibToolBar::RebuildToolbar() void BibToolBar::ApplyImageList() { - SetItemImage(nTBC_BT_AUTOFILTER, Image(BitmapEx(nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? OUStringLiteral(RID_EXTBMP_AUTOFILTER_SC) : OUStringLiteral(RID_EXTBMP_AUTOFILTER_LC)))); - SetItemImage(nTBC_BT_FILTERCRIT, Image(BitmapEx(nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? OUStringLiteral(RID_EXTBMP_FILTERCRIT_SC) : OUStringLiteral(RID_EXTBMP_FILTERCRIT_LC)))); - SetItemImage(nTBC_BT_REMOVEFILTER, Image(BitmapEx(nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? OUStringLiteral(RID_EXTBMP_REMOVE_FILTER_SORT_SC) : OUStringLiteral(RID_EXTBMP_REMOVE_FILTER_SORT_LC)))); + SetItemImage(nTBC_BT_AUTOFILTER, Image(StockImage::Yes, nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? OUStringLiteral(RID_EXTBMP_AUTOFILTER_SC) : OUStringLiteral(RID_EXTBMP_AUTOFILTER_LC))); + SetItemImage(nTBC_BT_FILTERCRIT, Image(StockImage::Yes, nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? OUStringLiteral(RID_EXTBMP_FILTERCRIT_SC) : OUStringLiteral(RID_EXTBMP_FILTERCRIT_LC))); + SetItemImage(nTBC_BT_REMOVEFILTER, Image(StockImage::Yes, nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? OUStringLiteral(RID_EXTBMP_REMOVE_FILTER_SORT_SC) : OUStringLiteral(RID_EXTBMP_REMOVE_FILTER_SORT_LC))); AdjustToolBox(); } diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 08beda2a170b..ec79f59f03af 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -361,8 +361,8 @@ namespace dbp return; } - Image aTableImage(BitmapEx(BMP_TABLE)); - Image aQueryImage(BitmapEx(BMP_QUERY)); + Image aTableImage(StockImage::Yes, BMP_TABLE); + Image aQueryImage(StockImage::Yes, BMP_QUERY); lcl_fillEntries( *m_pTable, aTableNames, aTableImage, CommandType::TABLE ); lcl_fillEntries( *m_pTable, aQueryNames, aQueryImage, CommandType::QUERY ); diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index 82262284d70e..ee5bb51eadf6 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -65,8 +65,8 @@ namespace pcr m_pControlTree->EnableInplaceEditing( false ); m_pControlTree->SetStyle(m_pControlTree->GetStyle() | WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL); - m_pControlTree->SetNodeBitmaps(Image(BitmapEx(RID_EXTBMP_COLLAPSEDNODE)), - Image(BitmapEx(RID_EXTBMP_EXPANDEDNODE))); + m_pControlTree->SetNodeBitmaps(Image(StockImage::Yes, RID_EXTBMP_COLLAPSEDNODE), + Image(StockImage::Yes, RID_EXTBMP_EXPANDEDNODE)); m_pControlTree->SetSelectHdl(LINK(this, OSelectLabelDialog, OnEntrySelected)); m_pControlTree->SetDeselectHdl(LINK(this, OSelectLabelDialog, OnEntrySelected)); @@ -100,7 +100,7 @@ namespace pcr sal_Int16 nClassId = 0; try { nClassId = ::comphelper::getINT16(m_xControlModel->getPropertyValue(PROPERTY_CLASSID)); } catch(...) { } m_sRequiredService = (FormComponentType::RADIOBUTTON == nClassId) ? OUString(SERVICE_COMPONENT_GROUPBOX) : OUString(SERVICE_COMPONENT_FIXEDTEXT); - m_aRequiredControlImage = Image(BitmapEx(FormComponentType::RADIOBUTTON == nClassId ? OUStringLiteral(RID_EXTBMP_GROUPBOX) : OUStringLiteral(RID_EXTBMP_FIXEDTEXT))); + m_aRequiredControlImage = Image(StockImage::Yes, FormComponentType::RADIOBUTTON == nClassId ? OUStringLiteral(RID_EXTBMP_GROUPBOX) : OUStringLiteral(RID_EXTBMP_FIXEDTEXT)); // calc the currently set label control (so InsertEntries can calc m_pInitialSelection) Any aCurrentLabelControl( m_xControlModel->getPropertyValue(PROPERTY_CONTROLLABEL) ); @@ -111,7 +111,7 @@ namespace pcr aCurrentLabelControl >>= m_xInitialLabelControl; // insert the root - Image aRootImage(BitmapEx(RID_EXTBMP_FORMS)); + Image aRootImage(StockImage::Yes, RID_EXTBMP_FORMS); SvTreeListEntry* pRoot = m_pControlTree->InsertEntry(PcrRes(RID_STR_FORMS), aRootImage, aRootImage); // build the tree @@ -199,7 +199,7 @@ namespace pcr Reference< XIndexAccess > xCont(xAsSet, UNO_QUERY); if (xCont.is() && xCont->getCount()) { // yes -> step down - Image aFormImage(BitmapEx(RID_EXTBMP_FORM)); + Image aFormImage(StockImage::Yes, RID_EXTBMP_FORM); SvTreeListEntry* pCont = m_pControlTree->InsertEntry(sName, aFormImage, aFormImage, pContainerEntry); sal_Int32 nContChildren = InsertEntries(xCont, pCont); if (nContChildren) diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx index 157e6aaaf0fb..708918caca58 100644 --- a/extensions/source/propctrlr/taborder.cxx +++ b/extensions/source/propctrlr/taborder.cxx @@ -77,7 +77,7 @@ namespace pcr } } - return Image(BitmapEx(sImageId)); + return Image(StockImage::Yes, sImageId); } } diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index cdd17d77433d..eba67e6270b4 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -91,7 +91,7 @@ Image GetMenuBarIcon( MenuBar const * pMBar ) else sResID = RID_UPDATE_AVAILABLE_16; - return Image(BitmapEx(sResID)); + return Image(StockImage::Yes, sResID); } class BubbleWindow : public FloatingWindow |