summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-11 15:51:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-12 12:46:45 +0200
commitd4d37662b090cb237585156a47cd8e1f1cbe2656 (patch)
tree70e59ca62b055d7e49325a268d952e0ea057b2e9 /reportdesign
parentf2e65b3dbcd4c0ca91781067255854a0c5141d60 (diff)
loplugin:constfields in reportdesign,sal,sax
and improve the rewriter so I spend less time fixing formatting Change-Id: Ic2a6e5e31a5a202d2d02a47d77c484a57a5ec514 Reviewed-on: https://gerrit.libreoffice.org/61676 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/inc/RptObject.hxx8
-rw-r--r--reportdesign/inc/UndoActions.hxx8
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx2
-rw-r--r--reportdesign/source/core/inc/ReportControlModel.hxx2
-rw-r--r--reportdesign/source/core/inc/Shape.hxx2
-rw-r--r--reportdesign/source/core/sdr/UndoEnv.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlFunction.hxx2
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.hxx2
-rw-r--r--reportdesign/source/ui/inc/ColorListener.hxx4
-rw-r--r--reportdesign/source/ui/inc/ColumnInfo.hxx4
-rw-r--r--reportdesign/source/ui/inc/DesignView.hxx4
-rw-r--r--reportdesign/source/ui/inc/Formula.hxx2
-rw-r--r--reportdesign/source/ui/inc/FunctionHelper.hxx4
-rw-r--r--reportdesign/source/ui/inc/GroupsSorting.hxx2
-rw-r--r--reportdesign/source/ui/inc/RptUndo.hxx6
-rw-r--r--reportdesign/source/ui/inc/ViewsWindow.hxx4
-rw-r--r--reportdesign/source/ui/inc/dlgedclip.hxx2
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx2
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx4
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx2
20 files changed, 34 insertions, 34 deletions
diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx
index 31e3346c074d..f663a59787f7 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -46,7 +46,7 @@ typedef ::std::multimap< sal_Int16, OUString > IndexToNameMap;
class REPORTDESIGN_DLLPUBLIC DlgEdHint: public SfxHint
{
private:
- DlgEdHintKind eHintKind;
+ DlgEdHintKind const eHintKind;
DlgEdHint(DlgEdHint&) = delete;
void operator =(DlgEdHint&) = delete;
@@ -68,7 +68,7 @@ protected:
mutable css::uno::Reference< css::beans::XPropertyChangeListener> m_xPropertyChangeListener;
mutable css::uno::Reference< css::report::XReportComponent> m_xReportComponent;
css::uno::Reference< css::uno::XInterface > m_xKeepShapeAlive;
- OUString m_sComponentName;
+ OUString const m_sComponentName;
bool m_bIsListening;
OObjectBase(const css::uno::Reference< css::report::XReportComponent>& _xComponent);
@@ -215,7 +215,7 @@ private:
void impl_createDataProvider_nothrow( const css::uno::Reference< css::frame::XModel>& _xModel);
virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& rxUnoShape ) override;
- sal_uInt16 m_nType;
+ sal_uInt16 const m_nType;
bool m_bOnlyOnce;
};
@@ -228,7 +228,7 @@ class REPORTDESIGN_DLLPUBLIC OUnoObject: public SdrUnoObj , public OObjectBase
friend class OObjectBase;
friend class DlgEdFactory;
- sal_uInt16 m_nObjectType;
+ sal_uInt16 const m_nObjectType;
// tdf#118730 remember if this object was created interactively (due to ::EndCreate being called)
bool m_bSetDefaultLabel;
diff --git a/reportdesign/inc/UndoActions.hxx b/reportdesign/inc/UndoActions.hxx
index 9088eb693202..0219c9e39e45 100644
--- a/reportdesign/inc/UndoActions.hxx
+++ b/reportdesign/inc/UndoActions.hxx
@@ -170,7 +170,7 @@ namespace rptui
m_xOwnElement; // object owned by the action
css::uno::Reference< css::container::XIndexContainer >
m_xContainer;
- Action m_eAction;
+ Action const m_eAction;
public:
OUndoContainerAction(SdrModel& rMod
@@ -231,9 +231,9 @@ namespace rptui
class REPORTDESIGN_DLLPUBLIC ORptUndoPropertyAction: public OCommentUndoAction
{
css::uno::Reference< css::beans::XPropertySet> m_xObj;
- OUString m_aPropertyName;
- css::uno::Any m_aNewValue;
- css::uno::Any m_aOldValue;
+ OUString const m_aPropertyName;
+ css::uno::Any const m_aNewValue;
+ css::uno::Any const m_aOldValue;
/** sets either the old value or the new value again at the property set.
*
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 6b273ea26fc4..de9df0d5a02d 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2262,7 +2262,7 @@ class OStylesHelper:
typedef ::std::map< OUString, uno::Any , ::comphelper::UStringMixLess> TStyleElements;
TStyleElements m_aElements;
::std::vector<TStyleElements::iterator> m_aElementsPos;
- uno::Type m_aType;
+ uno::Type const m_aType;
protected:
virtual ~OStylesHelper() override {}
diff --git a/reportdesign/source/core/inc/ReportControlModel.hxx b/reportdesign/source/core/inc/ReportControlModel.hxx
index 72dc147aabb3..1154446671dc 100644
--- a/reportdesign/source/core/inc/ReportControlModel.hxx
+++ b/reportdesign/source/core/inc/ReportControlModel.hxx
@@ -77,7 +77,7 @@ namespace reportdesign
::comphelper::OInterfaceContainerHelper2 aContainerListeners;
OReportComponentProperties aComponent;
OFormatProperties aFormatProperties;
- css::container::XContainer* m_pOwner;
+ css::container::XContainer* const m_pOwner;
::std::vector< css::uno::Reference< css::report::XFormatCondition> >
m_aFormatConditions;
osl::Mutex& m_rMutex;
diff --git a/reportdesign/source/core/inc/Shape.hxx b/reportdesign/source/core/inc/Shape.hxx
index b7c9e6d882f9..2fd6d6c32041 100644
--- a/reportdesign/source/core/inc/Shape.hxx
+++ b/reportdesign/source/core/inc/Shape.hxx
@@ -50,7 +50,7 @@ namespace reportdesign
sal_Int32 m_nZOrder;
bool m_bOpaque;
- OUString m_sServiceName;
+ OUString const m_sServiceName;
OUString m_CustomShapeEngine;
OUString m_CustomShapeData;
css::uno::Sequence< css::beans::PropertyValue > m_CustomShapeGeometry;
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index db5398ffd7dc..5d6b46cff3a6 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -61,7 +61,7 @@ namespace rptui
struct PropertyInfo
{
- bool bIsReadonlyOrTransient;
+ bool const bIsReadonlyOrTransient;
explicit PropertyInfo( const bool i_bIsTransientOrReadOnly )
:bIsReadonlyOrTransient( i_bIsTransientOrReadOnly )
diff --git a/reportdesign/source/filter/xml/xmlFunction.hxx b/reportdesign/source/filter/xml/xmlFunction.hxx
index 6f03bfa58133..1f1fe3e94d30 100644
--- a/reportdesign/source/filter/xml/xmlFunction.hxx
+++ b/reportdesign/source/filter/xml/xmlFunction.hxx
@@ -32,7 +32,7 @@ namespace rptxml
{
css::uno::Reference< css::report::XFunctions > m_xFunctions;
css::uno::Reference< css::report::XFunction > m_xFunction;
- bool m_bAddToReport;
+ bool const m_bAddToReport;
ORptFilter& GetOwnImport();
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx b/reportdesign/source/filter/xml/xmlStyleImport.hxx
index 28641a8b8f59..8ae7335f0006 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.hxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx
@@ -77,7 +77,7 @@ namespace rptxml
{
ORptFilter& m_rImport;
sal_Int32 m_nNumberFormatIndex;
- bool bAutoStyles : 1;
+ bool const bAutoStyles : 1;
//mutable rtl::Reference < SvXMLImportPropertyMapper > m_xControlImpPropMapper;
mutable rtl::Reference < SvXMLImportPropertyMapper > m_xCellImpPropMapper;
diff --git a/reportdesign/source/ui/inc/ColorListener.hxx b/reportdesign/source/ui/inc/ColorListener.hxx
index 0f8a89acad9e..2958437fe72b 100644
--- a/reportdesign/source/ui/inc/ColorListener.hxx
+++ b/reportdesign/source/ui/inc/ColorListener.hxx
@@ -32,9 +32,9 @@ namespace rptui
void operator =(const OColorListener&) = delete;
protected:
Link<OColorListener&,void> m_aCollapsedLink;
- svtools::ColorConfig m_aColorConfig;
+ svtools::ColorConfig const m_aColorConfig;
svtools::ExtendedColorConfig m_aExtendedColorConfig;
- OUString m_sColorEntry;
+ OUString const m_sColorEntry;
Color m_nColor;
Color m_nTextBoundaries;
bool m_bCollapsed;
diff --git a/reportdesign/source/ui/inc/ColumnInfo.hxx b/reportdesign/source/ui/inc/ColumnInfo.hxx
index 65062f9dc136..6a9a2e360960 100644
--- a/reportdesign/source/ui/inc/ColumnInfo.hxx
+++ b/reportdesign/source/ui/inc/ColumnInfo.hxx
@@ -25,8 +25,8 @@ namespace rptui
{
struct ColumnInfo
{
- OUString sColumnName;
- OUString sLabel;
+ OUString const sColumnName;
+ OUString const sLabel;
ColumnInfo(const OUString& i_sColumnName,const OUString& i_sLabel)
: sColumnName(i_sColumnName)
, sLabel(i_sLabel)
diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx
index fe9f7b20554e..1b09ff7f896f 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -70,8 +70,8 @@ namespace rptui
Idle m_aMarkIdle;
DlgEdMode m_eMode;
sal_uInt16 m_eActObj;
- Size m_aGridSizeCoarse;
- Size m_aGridSizeFine;
+ Size const m_aGridSizeCoarse;
+ Size const m_aGridSizeFine;
bool m_bDeleted;
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index a2f4aa707692..68c20917af4f 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -46,7 +46,7 @@ class FormulaDialog : public formula::FormulaModalDialog,
public formula::IControlReferenceHandler
{
std::shared_ptr< formula::IFunctionManager > m_aFunctionManager;
- formula::FormEditData* m_pFormulaData;
+ formula::FormEditData* const m_pFormulaData;
VclPtr<OAddFieldWindow> m_pAddField;
css::uno::Reference < css::beans::XPropertySet > m_xRowSet;
css::uno::Reference< css::report::meta::XFormulaParser> m_xParser;
diff --git a/reportdesign/source/ui/inc/FunctionHelper.hxx b/reportdesign/source/ui/inc/FunctionHelper.hxx
index df18ed34cb36..4d94f6f40bd9 100644
--- a/reportdesign/source/ui/inc/FunctionHelper.hxx
+++ b/reportdesign/source/ui/inc/FunctionHelper.hxx
@@ -83,8 +83,8 @@ class FunctionCategory : public formula::IFunctionCategory
{
mutable ::std::vector< std::shared_ptr< FunctionDescription > > m_aFunctions;
css::uno::Reference< css::report::meta::XFunctionCategory> m_xCategory;
- sal_uInt32 m_nFunctionCount;
- sal_uInt32 m_nNumber;
+ sal_uInt32 const m_nFunctionCount;
+ sal_uInt32 const m_nNumber;
const FunctionManager* m_pFunctionManager;
public:
FunctionCategory(const FunctionManager* _pFMgr,sal_uInt32 _nPos,const css::uno::Reference< css::report::meta::XFunctionCategory>& _xCategory);
diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx
index baa187dccb31..f8979053de55 100644
--- a/reportdesign/source/ui/inc/GroupsSorting.hxx
+++ b/reportdesign/source/ui/inc/GroupsSorting.hxx
@@ -80,7 +80,7 @@ class OGroupsSortingDialog : public FloatingWindow
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pReportListener;
css::uno::Reference< css::report::XGroups> m_xGroups;
css::uno::Reference< css::container::XNameAccess > m_xColumns;
- bool m_bReadOnly;
+ bool const m_bReadOnly;
private:
DECL_LINK( OnControlFocusLost, Control&, void );
DECL_LINK( OnControlFocusGot, Control&, void );
diff --git a/reportdesign/source/ui/inc/RptUndo.hxx b/reportdesign/source/ui/inc/RptUndo.hxx
index 9c125121b9e1..cf2bd6e50196 100644
--- a/reportdesign/source/ui/inc/RptUndo.hxx
+++ b/reportdesign/source/ui/inc/RptUndo.hxx
@@ -42,8 +42,8 @@ namespace rptui
m_aControls;
::std::vector< ::std::pair< OUString ,css::uno::Any> >
m_aValues;
- Action m_eAction;
- sal_uInt16 m_nSlot;
+ Action const m_eAction;
+ sal_uInt16 const m_nSlot;
bool m_bInserted;
virtual void implReInsert( ) = 0;
@@ -114,7 +114,7 @@ namespace rptui
{
css::uno::Reference< css::report::XGroup> m_xGroup; ///<! the group for the undo redo action
css::uno::Reference< css::report::XReportDefinition > m_xReportDefinition; ///<! the parent report definition
- Action m_eAction; ///<! the current action
+ Action const m_eAction; ///<! the current action
sal_Int32 m_nLastPosition; ///<! the last position of the group
void implReInsert( );
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index 1ac0e712632b..3a05a2ad7cd3 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -47,8 +47,8 @@ namespace rptui
struct RectangleLess
{
enum CompareMode { POS_LEFT,POS_RIGHT,POS_UPPER,POS_DOWN,POS_CENTER_HORIZONTAL,POS_CENTER_VERTICAL };
- CompareMode m_eCompareMode;
- Point m_aRefPoint;
+ CompareMode const m_eCompareMode;
+ Point const m_aRefPoint;
RectangleLess(CompareMode _eCompareMode,const Point& _rRefPoint ) : m_eCompareMode(_eCompareMode),m_aRefPoint(_rRefPoint){}
bool operator() (const tools::Rectangle& lhs, const tools::Rectangle& rhs) const
{
diff --git a/reportdesign/source/ui/inc/dlgedclip.hxx b/reportdesign/source/ui/inc/dlgedclip.hxx
index e9965a2b8d0c..75ebfacf1785 100644
--- a/reportdesign/source/ui/inc/dlgedclip.hxx
+++ b/reportdesign/source/ui/inc/dlgedclip.hxx
@@ -72,7 +72,7 @@ protected:
virtual void AddSupportedFormats() override;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
private:
- TSectionElements m_aCopyElements;
+ TSectionElements const m_aCopyElements;
};
}
#endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DLGEDCLIP_HXX
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index b1479e1401a2..20ca09cc0d31 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -199,7 +199,7 @@ namespace rptui
{
const sal_Char* programmaticName;
const char* uiNameResId;
- OString helpId;
+ OString const helpId;
} aCategories[] = {
{ "General", RID_STR_PROPPAGE_DEFAULT, HID_RPT_PROPDLG_TAB_GENERAL },
{ "Data", RID_STR_PROPPAGE_DATA, HID_RPT_PROPDLG_TAB_DATA },
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 48b509663757..e11ba27ccf19 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -532,8 +532,8 @@ namespace
lcl_pushBack( _out_rProperties, PROPERTY_CHARCASEMAP, uno::makeAny( pFontItem->GetEnumValue() ) );
}
struct Items {
- sal_uInt16 nWhich;
- OUString sPropertyName;
+ sal_uInt16 const nWhich;
+ OUString const sPropertyName;
};
const Items pItems[] = { {ITEMID_LANGUAGE,OUString(PROPERTY_CHARLOCALE)}
,{ITEMID_LANGUAGE_ASIAN,OUString(PROPERTY_CHARLOCALEASIAN)}
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 766e2ce045f1..d5b6261b9bf5 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -957,7 +957,7 @@ namespace
class ApplySectionViewAction
{
private:
- SectionViewAction m_eAction;
+ SectionViewAction const m_eAction;
public:
explicit ApplySectionViewAction()