summaryrefslogtreecommitdiff
path: root/reportdesign
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 /reportdesign
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 'reportdesign')
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx7
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx4
2 files changed, 5 insertions, 6 deletions
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 2b9503642a84..b28fb5ed7fcb 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -230,8 +230,8 @@ NavigatorTree::NavigatorTree( vcl::Window* pParent,OReportController& _rControll
SetHelpId( HID_REPORT_NAVIGATOR_TREE );
SetNodeBitmaps(
- Image(BitmapEx(RID_SVXBMP_COLLAPSEDNODE)),
- Image(BitmapEx(RID_SVXBMP_EXPANDEDNODE))
+ Image(StockImage::Yes, RID_SVXBMP_COLLAPSEDNODE),
+ Image(StockImage::Yes, RID_SVXBMP_EXPANDEDNODE)
);
SetDragDropMode(DragDropMode::ALL);
@@ -522,8 +522,7 @@ SvTreeListEntry* NavigatorTree::insertEntry(const OUString& _sName,SvTreeListEnt
SvTreeListEntry* pEntry = nullptr;
if (!rImageId.isEmpty())
{
- BitmapEx aBitmap(rImageId);
- const Image aImage(aBitmap);
+ const Image aImage(StockImage::Yes, rImageId);
pEntry = InsertEntry(_sName,aImage,aImage,_pParent,false,_nPosition,_pData);
}
else
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 0b2b8b843f04..0a6476cfd34e 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -192,8 +192,8 @@ void OStartMarker::initDefaultNodeImages()
{
if ( !s_pDefCollapsed )
{
- s_pDefCollapsed = new Image(BitmapEx(RID_BMP_TREENODE_COLLAPSED));
- s_pDefExpanded = new Image(BitmapEx(RID_BMP_TREENODE_EXPANDED));
+ s_pDefCollapsed = new Image(StockImage::Yes, RID_BMP_TREENODE_COLLAPSED);
+ s_pDefExpanded = new Image(StockImage::Yes, RID_BMP_TREENODE_EXPANDED);
}
Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded;