summaryrefslogtreecommitdiff
path: root/extensions
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 /extensions
parentb14830db341ef1a136bf9f5e5ba3c7ea521bea48 (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. 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 'extensions')
-rw-r--r--extensions/source/bibliography/toolbar.cxx6
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx4
-rw-r--r--extensions/source/propctrlr/selectlabeldialog.cxx10
-rw-r--r--extensions/source/propctrlr/taborder.cxx2
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx2
5 files changed, 12 insertions, 12 deletions
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index e0e57846e16c..c63d7792200b 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -572,9 +572,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 c811a0f90d8d..89800e43ea66 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 cad96ca645cd..77a126f877f0 100644
--- a/extensions/source/propctrlr/selectlabeldialog.cxx
+++ b/extensions/source/propctrlr/selectlabeldialog.cxx
@@ -66,8 +66,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));
@@ -101,7 +101,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) );
@@ -112,7 +112,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
@@ -200,7 +200,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 5e6705c2d203..a4d0cfb5f1d0 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -78,7 +78,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 5625ab1a102e..123af1dc51e8 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -90,7 +90,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