summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/customize/cfgutil.cxx12
-rw-r--r--cui/source/dialogs/cuihyperdlg.cxx8
-rw-r--r--cui/source/dialogs/scriptdlg.cxx8
-rw-r--r--cui/source/options/dbregister.cxx2
-rw-r--r--cui/source/tabpages/labdlg.cxx6
5 files changed, 18 insertions, 18 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 17efb2d86497..267f8217784d 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -426,17 +426,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 e106826bdeba..a3e31a91dbd4 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -93,10 +93,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 d0eeb7b8c2ea..379ceeb47240 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -73,10 +73,10 @@ static 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 ebd641bb628d..d31876dadd98 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -389,7 +389,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
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index 4d8331e05c0e..cda14818ee05 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -112,9 +112,9 @@ SvxCaptionTabPage::SvxCaptionTabPage(TabPageParent pParent, const SfxItemSet& rI
aLineTypes.push_back(m_xLineTypes->get_text(i));
static_assert(CAPTYPE_BITMAPS_COUNT == 3, "unexpected");
- m_aBmpCapTypes[0] = Image(BitmapEx(RID_SVXBMP_LEGTYP1));
- m_aBmpCapTypes[1] = Image(BitmapEx(RID_SVXBMP_LEGTYP2));
- m_aBmpCapTypes[2] = Image(BitmapEx(RID_SVXBMP_LEGTYP3));
+ m_aBmpCapTypes[0] = Image(StockImage::Yes, RID_SVXBMP_LEGTYP1);
+ m_aBmpCapTypes[1] = Image(StockImage::Yes, RID_SVXBMP_LEGTYP2);
+ m_aBmpCapTypes[2] = Image(StockImage::Yes, RID_SVXBMP_LEGTYP3);
//------------install ValueSet--------------------------
m_xCT_CAPTTYPE->SetStyle( m_xCT_CAPTTYPE->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD );