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>2018-12-08 19:15:09 +0100
commit15f0d61206dddee12159b68aeab5c860e3d5aff4 (patch)
tree9eee7e6918281ba7e5ffd3e06d74a2fa4fe28de3 /extensions
parentceb32911f07b63fda074facba377eeb4d5946cdf (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>
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.cxx4
5 files changed, 13 insertions, 13 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..a3e1a492ef3f 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
@@ -268,7 +268,7 @@ Image UpdateCheckUI::GetBubbleImage( OUString const &rURL )
}
if ( aImage.GetSizePixel().Width() == 0 )
- aImage = Image(BitmapEx(SV_RESID_BITMAP_INFOBOX));
+ aImage = Image(StockImage::Yes, SV_RESID_BITMAP_INFOBOX);
return aImage;
}