[Libreoffice-commits] core.git: postprocess/CustomTarget_images.mk reportdesign/inc reportdesign/source
Caolán McNamara
caolanm at redhat.com
Wed Apr 26 08:27:30 UTC 2017
postprocess/CustomTarget_images.mk | 1
reportdesign/inc/RptResId.hrc | 21 ------
reportdesign/inc/bitmaps.hlst | 35 ++++++++++
reportdesign/source/ui/dlg/Navigator.cxx | 38 +++++------
reportdesign/source/ui/dlg/Navigator.src | 85 --------------------------
reportdesign/source/ui/report/StartMarker.cxx | 5 -
reportdesign/source/ui/report/report.src | 10 ---
7 files changed, 58 insertions(+), 137 deletions(-)
New commits:
commit 2fa6c2ecbf8b5a3c5f26beac6c3026b282e38c81
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 26 09:25:01 2017 +0100
remove reportdesign bitmaps from .src files
Change-Id: I9dfea090c130962591762cba88fcd69bbacf05fe
diff --git a/postprocess/CustomTarget_images.mk b/postprocess/CustomTarget_images.mk
index 46db5aa44132..dad9b1e1f0d0 100644
--- a/postprocess/CustomTarget_images.mk
+++ b/postprocess/CustomTarget_images.mk
@@ -60,6 +60,7 @@ $(packimages_DIR)/sourceimagelist.ilst : \
$(SRCDIR)/formula/inc/bitmaps.hlst \
$(SRCDIR)/fpicker/inc/bitmaps.hlst \
$(SRCDIR)/framework/inc/bitmaps.hlst \
+ $(SRCDIR)/reportdesign/inc/bitmaps.hlst \
$(SRCDIR)/sfx2/inc/bitmaps.hlst \
$(SRCDIR)/vcl/inc/bitmaps.hlst
grep res $^ | cut -d'"' -f2 | sed "s/^/%MODULE%\//" | sed "s/%MODULE%.res/%GLOBALRES%/g" > $@
diff --git a/reportdesign/inc/RptResId.hrc b/reportdesign/inc/RptResId.hrc
index 27cef2b7cc76..a3c93d89b3e1 100644
--- a/reportdesign/inc/RptResId.hrc
+++ b/reportdesign/inc/RptResId.hrc
@@ -191,27 +191,6 @@
#define RID_STR_VERTICALALIGN (RID_STRING_START + 160)
#define RID_STR_PARAADJUST (RID_STRING_START + 161)
-// bitmaps
-#define RID_SVXBMP_SELECT_REPORT (RID_BITMAP_START + 0 )
-#define RID_SVXBMP_FM_FIXEDTEXT (RID_BITMAP_START + 1 )
-#define RID_SVXBMP_INSERT_HFIXEDLINE (RID_BITMAP_START + 2 )
-#define RID_SVXBMP_INSERT_VFIXEDLINE (RID_BITMAP_START + 3 )
-#define RID_SVXBMP_FM_IMAGECONTROL (RID_BITMAP_START + 4 )
-#define RID_SVXBMP_FM_EDIT (RID_BITMAP_START + 5 )
-#define RID_SVXBMP_RPT_NEW_FUNCTION (RID_BITMAP_START + 6 )
-#define RID_SVXBMP_REPORTHEADERFOOTER (RID_BITMAP_START + 7 )
-#define RID_SVXBMP_PAGEHEADERFOOTER (RID_BITMAP_START + 8 )
-#define RID_SVXBMP_GROUPHEADER (RID_BITMAP_START + 9 )
-#define RID_SVXBMP_GROUPFOOTER (RID_BITMAP_START + 10)
-#define RID_SVXBMP_COLLAPSEDNODE (RID_BITMAP_START + 11)
-#define RID_SVXBMP_EXPANDEDNODE (RID_BITMAP_START + 12)
-#define RID_SVXBMP_SORTINGANDGROUPING (RID_BITMAP_START + 13)
-#define RID_SVXBMP_DRAWTBX_CS_BASIC (RID_BITMAP_START + 14)
-#define RID_SVXBMP_GROUP (RID_BITMAP_START + 15)
-#define RID_SVXBMP_ICON_DETAIL (RID_BITMAP_START + 16)
-#define RID_BMP_TREENODE_COLLAPSED (RID_BITMAP_START + 17)
-#define RID_BMP_TREENODE_EXPANDED (RID_BITMAP_START + 18)
-
// untyped ---------------------------------------------------------------------
#define RID_STR_BOOL (RID_UNTYPED_START + 0 )
#define RID_STR_FORCENEWPAGE_CONST (RID_UNTYPED_START + 1 )
diff --git a/reportdesign/inc/bitmaps.hlst b/reportdesign/inc/bitmaps.hlst
new file mode 100644
index 000000000000..7ffc7f90f4cb
--- /dev/null
+++ b/reportdesign/inc/bitmaps.hlst
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_REPORTDESIGN_INC_BITMAPS_HRC
+#define INCLUDED_REPORTDESIGN_INC_BITMAPS_HRC
+
+#define RID_SVXBMP_SELECT_REPORT "reportdesign/res/sx12464.png"
+#define RID_SVXBMP_FM_FIXEDTEXT "reportdesign/res/sx10597.png"
+#define RID_SVXBMP_INSERT_HFIXEDLINE "reportdesign/res/sx10928.png"
+#define RID_SVXBMP_INSERT_VFIXEDLINE "reportdesign/res/sx10929.png"
+#define RID_SVXBMP_FM_IMAGECONTROL "reportdesign/res/sx10710.png"
+#define RID_SVXBMP_FM_EDIT "reportdesign/res/sx10599.png"
+#define RID_SVXBMP_RPT_NEW_FUNCTION "reportdesign/res/sx12594.png"
+#define RID_SVXBMP_REPORTHEADERFOOTER "reportdesign/res/sx12453.png"
+#define RID_SVXBMP_PAGEHEADERFOOTER "reportdesign/res/sx12452.png"
+#define RID_SVXBMP_GROUPHEADER "reportdesign/res/sx12466.png"
+#define RID_SVXBMP_GROUPFOOTER "reportdesign/res/sx12468.png"
+#define RID_SVXBMP_COLLAPSEDNODE "reportdesign/res/sx18002.png"
+#define RID_SVXBMP_EXPANDEDNODE "reportdesign/res/sx18003.png"
+#define RID_SVXBMP_SORTINGANDGROUPING "reportdesign/res/sx12454.png"
+#define RID_SVXBMP_DRAWTBX_CS_BASIC "reportdesign/res/sx11047.png"
+#define RID_SVXBMP_GROUP "reportdesign/res/sx10454.png"
+#define RID_SVXBMP_ICON_DETAIL "reportdesign/res/sx12603.png"
+#define RID_BMP_TREENODE_COLLAPSED "res/plus.png"
+#define RID_BMP_TREENODE_EXPANDED "res/minus.png"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index d4cba5f0958a..a3d7e01a4f8d 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -20,6 +20,7 @@
#include "Navigator.hxx"
#include "uistrings.hrc"
+#include "bitmaps.hlst"
#include "ReportController.hxx"
#include "UITools.hxx"
#include "RptUndo.hxx"
@@ -60,21 +61,21 @@ using namespace ::com::sun::star;
using namespace utl;
using namespace ::comphelper;
-sal_uInt16 lcl_getImageId(const uno::Reference< report::XReportComponent>& _xElement)
+OUString lcl_getImageId(const uno::Reference< report::XReportComponent>& _xElement)
{
- sal_uInt16 nId = 0;
+ OUString sId;
uno::Reference< report::XFixedLine> xFixedLine(_xElement,uno::UNO_QUERY);
if ( uno::Reference< report::XFixedText>(_xElement,uno::UNO_QUERY).is() )
- nId = RID_SVXBMP_FM_FIXEDTEXT;
+ sId = RID_SVXBMP_FM_FIXEDTEXT;
else if ( xFixedLine.is() )
- nId = xFixedLine->getOrientation() ? RID_SVXBMP_INSERT_VFIXEDLINE : RID_SVXBMP_INSERT_HFIXEDLINE;
+ sId = xFixedLine->getOrientation() ? OUStringLiteral(RID_SVXBMP_INSERT_VFIXEDLINE) : OUStringLiteral(RID_SVXBMP_INSERT_HFIXEDLINE);
else if ( uno::Reference< report::XFormattedField>(_xElement,uno::UNO_QUERY).is() )
- nId = RID_SVXBMP_FM_EDIT;
+ sId = RID_SVXBMP_FM_EDIT;
else if ( uno::Reference< report::XImageControl>(_xElement,uno::UNO_QUERY).is() )
- nId = RID_SVXBMP_FM_IMAGECONTROL;
+ sId = RID_SVXBMP_FM_IMAGECONTROL;
else if ( uno::Reference< report::XShape>(_xElement,uno::UNO_QUERY).is() )
- nId = RID_SVXBMP_DRAWTBX_CS_BASIC;
- return nId;
+ sId = RID_SVXBMP_DRAWTBX_CS_BASIC;
+ return sId;
}
OUString lcl_getName(const uno::Reference< beans::XPropertySet>& _xElement)
@@ -148,8 +149,8 @@ class NavigatorTree : public ::cppu::BaseMutex
::rtl::Reference< comphelper::OSelectionChangeMultiplexer> m_pSelectionListener;
unsigned short m_nTimerCounter;
- SvTreeListEntry* insertEntry(const OUString& _sName,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition,UserData* _pData);
- void traverseSection(const uno::Reference< report::XSection>& _xSection,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition = TREELIST_APPEND);
+ SvTreeListEntry* insertEntry(const OUString& _sName,SvTreeListEntry* _pParent, const OUString& rImageId, sal_uLong _nPosition,UserData* _pData);
+ void traverseSection(const uno::Reference< report::XSection>& _xSection,SvTreeListEntry* _pParent, const OUString& rImageId, sal_uLong _nPosition = TREELIST_APPEND);
void traverseFunctions(const uno::Reference< report::XFunctions>& _xFunctions,SvTreeListEntry* _pParent);
protected:
@@ -230,8 +231,8 @@ NavigatorTree::NavigatorTree( vcl::Window* pParent,OReportController& _rControll
SetHelpId( HID_REPORT_NAVIGATOR_TREE );
SetNodeBitmaps(
- Image(BitmapEx(ModuleRes(RID_SVXBMP_COLLAPSEDNODE))),
- Image(BitmapEx(ModuleRes(RID_SVXBMP_EXPANDEDNODE)))
+ Image(BitmapEx(RID_SVXBMP_COLLAPSEDNODE)),
+ Image(BitmapEx(RID_SVXBMP_EXPANDEDNODE))
);
SetDragDropMode(DragDropMode::ALL);
@@ -518,13 +519,12 @@ void NavigatorTree::_selectionChanged( const lang::EventObject& aEvent )
m_pSelectionListener->unlock();
}
-SvTreeListEntry* NavigatorTree::insertEntry(const OUString& _sName,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition,UserData* _pData)
+SvTreeListEntry* NavigatorTree::insertEntry(const OUString& _sName,SvTreeListEntry* _pParent, const OUString& rImageId, sal_uLong _nPosition,UserData* _pData)
{
SvTreeListEntry* pEntry = nullptr;
- if ( _nImageId )
+ if (!rImageId.isEmpty())
{
- ModuleRes aRes(_nImageId);
- BitmapEx aBitmap(aRes);
+ BitmapEx aBitmap(rImageId);
const Image aImage(aBitmap);
pEntry = InsertEntry(_sName,aImage,aImage,_pParent,false,_nPosition,_pData);
}
@@ -533,9 +533,9 @@ SvTreeListEntry* NavigatorTree::insertEntry(const OUString& _sName,SvTreeListEnt
return pEntry;
}
-void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xSection,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition)
+void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xSection,SvTreeListEntry* _pParent, const OUString& rImageId, sal_uLong _nPosition)
{
- SvTreeListEntry* pSection = insertEntry(_xSection->getName(),_pParent,_nImageId,_nPosition,new UserData(this,_xSection));
+ SvTreeListEntry* pSection = insertEntry(_xSection->getName(),_pParent, rImageId, _nPosition,new UserData(this,_xSection));
const sal_Int32 nCount = _xSection->getCount();
for (sal_Int32 i = 0; i < nCount; ++i)
{
@@ -716,7 +716,7 @@ void NavigatorTree::_elementInserted( const container::ContainerEvent& _rEvent )
uno::Reference< report::XReportComponent> xElement(xProp,uno::UNO_QUERY);
if ( xProp.is() )
sName = lcl_getName(xProp);
- insertEntry(sName,pEntry,(!xElement.is() ? sal_uInt16(RID_SVXBMP_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),TREELIST_APPEND,new UserData(this,xProp));
+ insertEntry(sName,pEntry,(!xElement.is() ? OUString(RID_SVXBMP_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),TREELIST_APPEND,new UserData(this,xProp));
}
if ( !IsExpanded(pEntry) )
Expand(pEntry);
diff --git a/reportdesign/source/ui/dlg/Navigator.src b/reportdesign/source/ui/dlg/Navigator.src
index dc13f2b395a2..c0caf74d1dad 100644
--- a/reportdesign/source/ui/dlg/Navigator.src
+++ b/reportdesign/source/ui/dlg/Navigator.src
@@ -22,91 +22,6 @@
#include <svx/svxids.hrc>
#include <svl/solar.hrc>
-Bitmap RID_SVXBMP_SELECT_REPORT
-{
- File = "sx12464.png";
-};
-
-Bitmap RID_SVXBMP_FM_FIXEDTEXT
-{
- File = "sx10597.png";
-};
-
-Bitmap RID_SVXBMP_INSERT_HFIXEDLINE
-{
- File = "sx10928.png";
-};
-
-Bitmap RID_SVXBMP_INSERT_VFIXEDLINE
-{
- File = "sx10929.png";
-};
-
-Bitmap RID_SVXBMP_FM_IMAGECONTROL
-{
- File = "sx10710.png";
-};
-
-Bitmap RID_SVXBMP_FM_EDIT
-{
- File = "sx10599.png";
-};
-
-Bitmap RID_SVXBMP_RPT_NEW_FUNCTION
-{
- File = "sx12594.png";
-};
-
-Bitmap RID_SVXBMP_REPORTHEADERFOOTER
-{
- File = "sx12453.png";
-};
-
-Bitmap RID_SVXBMP_PAGEHEADERFOOTER
-{
- File = "sx12452.png";
-};
-
-Bitmap RID_SVXBMP_GROUPHEADER
-{
- File = "sx12466.png";
-};
-
-Bitmap RID_SVXBMP_GROUPFOOTER
-{
- File = "sx12468.png";
-};
-
-Bitmap RID_SVXBMP_COLLAPSEDNODE
-{
- File = "sx18002.png";
-};
-
-Bitmap RID_SVXBMP_EXPANDEDNODE
-{
- File = "sx18003.png";
-};
-
-Bitmap RID_SVXBMP_SORTINGANDGROUPING
-{
- File = "sx12454.png";
-};
-
-Bitmap RID_SVXBMP_DRAWTBX_CS_BASIC
-{
- File = "sx11047.png";
-};
-
-Bitmap RID_SVXBMP_GROUP
-{
- File = "sx10454.png";
-};
-
-Bitmap RID_SVXBMP_ICON_DETAIL
-{
- File = "sx12603.png";
-};
-
String RID_STR_FUNCTIONS
{
Text [ en-US ] = "Functions" ;
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 90d35d2c43f3..5e070d8076f7 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -20,6 +20,7 @@
#include <vcl/image.hxx>
#include <vcl/svapp.hxx>
#include "RptResId.hrc"
+#include "bitmaps.hlst"
#include "ModuleHelper.hxx"
#include "ColorChanger.hxx"
#include "ReportDefines.hxx"
@@ -194,8 +195,8 @@ void OStartMarker::initDefaultNodeImages()
{
if ( !s_pDefCollapsed )
{
- s_pDefCollapsed = new Image(BitmapEx(ModuleRes(RID_BMP_TREENODE_COLLAPSED)));
- s_pDefExpanded = new Image(BitmapEx(ModuleRes(RID_BMP_TREENODE_EXPANDED)));
+ s_pDefCollapsed = new Image(BitmapEx(RID_BMP_TREENODE_COLLAPSED));
+ s_pDefExpanded = new Image(BitmapEx(RID_BMP_TREENODE_EXPANDED));
}
Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded;
diff --git a/reportdesign/source/ui/report/report.src b/reportdesign/source/ui/report/report.src
index f281af9e623b..af7f1b0e3876 100644
--- a/reportdesign/source/ui/report/report.src
+++ b/reportdesign/source/ui/report/report.src
@@ -92,16 +92,6 @@ String RID_STR_PROPTITLE_GROUP
Text [ en-US ] = "Group";
};
-Bitmap RID_BMP_TREENODE_COLLAPSED
-{
- File = "plus.png";
-};
-
-Bitmap RID_BMP_TREENODE_EXPANDED
-{
- File = "minus.png";
-};
-
String RID_STR_UNDO_CHANGEPOSITION
{
Text [ en-US ] = "Change Object";
More information about the Libreoffice-commits
mailing list