summaryrefslogtreecommitdiff
path: root/svx/source/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-01 11:40:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-08 08:03:03 +0200
commit1a6397030381a45f27ab7a2a02e6e6d0f9987c84 (patch)
tree6e342854037b3b845215af09f36407495550254d /svx/source/inc
parent781544497a0913037bba160a4cf6b643e5ca1d1a (diff)
loplugin:constfields in svx
Change-Id: I643e8686e015ca85dd96221f1c93038f4fddf27b Reviewed-on: https://gerrit.libreoffice.org/61182 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/inc')
-rw-r--r--svx/source/inc/AccessibleFrameSelector.hxx2
-rw-r--r--svx/source/inc/charmapacc.hxx2
-rw-r--r--svx/source/inc/datanavi.hxx48
-rw-r--r--svx/source/inc/delayedevent.hxx2
-rw-r--r--svx/source/inc/docrecovery.hxx10
-rw-r--r--svx/source/inc/filtnav.hxx4
-rw-r--r--svx/source/inc/fmexpl.hxx12
-rw-r--r--svx/source/inc/fmshimp.hxx4
-rw-r--r--svx/source/inc/fmtextcontroldialogs.hxx2
-rw-r--r--svx/source/inc/fmtextcontrolfeature.hxx4
-rw-r--r--svx/source/inc/fmundo.hxx8
-rw-r--r--svx/source/inc/formcontrolling.hxx2
-rw-r--r--svx/source/inc/gridcell.hxx4
-rw-r--r--svx/source/inc/svxpixelctlaccessiblecontext.hxx4
-rw-r--r--svx/source/inc/svxrectctaccessiblecontext.hxx10
15 files changed, 56 insertions, 62 deletions
diff --git a/svx/source/inc/AccessibleFrameSelector.hxx b/svx/source/inc/AccessibleFrameSelector.hxx
index 177780f6afc4..8c1ce7e35c83 100644
--- a/svx/source/inc/AccessibleFrameSelector.hxx
+++ b/svx/source/inc/AccessibleFrameSelector.hxx
@@ -132,7 +132,7 @@ private:
FrameSelector* mpFrameSel;
- FrameBorderType meBorder;
+ FrameBorderType const meBorder;
};
diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx
index d594f390495e..5c0e5fd18735 100644
--- a/svx/source/inc/charmapacc.hxx
+++ b/svx/source/inc/charmapacc.hxx
@@ -44,7 +44,7 @@ namespace svx
struct SvxShowCharSetItem
{
SvxShowCharSet& mrParent;
- sal_uInt16 mnId;
+ sal_uInt16 const mnId;
OUString maText;
tools::Rectangle maRect;
rtl::Reference<SvxShowCharSetItemAcc> m_xItem;
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 786d4f767d81..c0f1ad4a2f69 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -129,17 +129,14 @@ namespace svxform
OUString m_sInstance_UI;
OUString m_sNone_UI;
- OUString m_sDoc_API;
- OUString m_sInstance_API;
- OUString m_sNone_API;
+ static constexpr OUStringLiteral const m_sDoc_API = "all";
+ static constexpr OUStringLiteral const m_sInstance_API = "instance";
+ static constexpr OUStringLiteral const m_sNone_API = "none";
ReplaceString( const ReplaceString& ) = delete;
public:
- ReplaceString() :
- m_sDoc_API( "all" ),
- m_sInstance_API( "instance" ),
- m_sNone_API( "none" )
+ ReplaceString()
{
m_sDoc_UI = SvxResId(RID_STR_REPLACE_DOC);
m_sInstance_UI = SvxResId(RID_STR_REPLACE_INST);
@@ -160,7 +157,7 @@ namespace svxform
/** convert submission replace string from UI to API.
Use 'none' as default. */
- OUString const & toAPI( const OUString& rStr ) const
+ OUString toAPI( const OUString& rStr ) const
{
if( rStr == m_sDoc_UI )
return m_sDoc_API;
@@ -177,18 +174,15 @@ namespace svxform
OUString m_sPut_UI;
OUString m_sGet_UI;
- OUString m_sPost_API;
- OUString m_sPut_API;
- OUString m_sGet_API;
+ static constexpr OUStringLiteral m_sPost_API = "post";
+ static constexpr OUStringLiteral m_sPut_API = "put";
+ static constexpr OUStringLiteral m_sGet_API = "get";
MethodString( const MethodString& ) = delete;
public:
- MethodString() :
- m_sPost_API( "post" ),
- m_sPut_API( "put" ),
- m_sGet_API( "get" )
+ MethodString()
{
m_sPost_UI = SvxResId(RID_STR_METHOD_POST);
m_sPut_UI = SvxResId(RID_STR_METHOD_PUT);
@@ -207,7 +201,7 @@ namespace svxform
}
/** convert from UI to API; put is default */
- OUString const & toAPI( const OUString& rStr ) const
+ OUString toAPI( const OUString& rStr ) const
{
if( rStr == m_sGet_UI )
return m_sGet_API;
@@ -221,8 +215,8 @@ namespace svxform
class XFormsPage : public TabPage
{
private:
- MethodString m_aMethodString;
- ReplaceString m_aReplaceString;
+ MethodString const m_aMethodString;
+ ReplaceString const m_aReplaceString;
VclPtr<ToolBox> m_pToolBox;
VclPtr<DataTreeListBox> m_pItemList;
@@ -237,7 +231,7 @@ namespace svxform
VclPtr<DataNavigatorWindow> m_pNaviWin;
bool m_bHasModel;
- DataGroupType m_eGroup;
+ DataGroupType const m_eGroup;
// these strings are not valid on the Submission and Binding Page
// mb: furthermore these are properties of an instance, thus
// it would be much better to get/set them through the UIHelper
@@ -427,10 +421,10 @@ namespace svxform
ItemNode* m_pItemNode;
DataItemType m_eItemType;
- OUString m_sFL_Element;
- OUString m_sFL_Attribute;
- OUString m_sFL_Binding;
- OUString m_sFT_BindingExp;
+ OUString const m_sFL_Element;
+ OUString const m_sFL_Attribute;
+ OUString const m_sFL_Binding;
+ OUString const m_sFT_BindingExp;
DECL_LINK( CheckHdl, Button*, void );
DECL_LINK( ConditionHdl, Button*, void );
@@ -460,7 +454,7 @@ namespace svxform
VclPtr<OKButton> m_pOKBtn;
Idle m_aResultIdle;
- OUString m_sPropertyName;
+ OUString const m_sPropertyName;
css::uno::Reference< css::xforms::XFormsUIHelper1 >
m_xUIHelper;
@@ -543,8 +537,8 @@ namespace svxform
class AddSubmissionDialog : public ModalDialog
{
private:
- MethodString m_aMethodString;
- ReplaceString m_aReplaceString;
+ MethodString const m_aMethodString;
+ ReplaceString const m_aReplaceString;
VclPtr<Edit> m_pNameED;
VclPtr<Edit> m_pActionED;
@@ -556,7 +550,7 @@ namespace svxform
VclPtr<OKButton> m_pOKBtn;
- ItemNode* m_pItemNode;
+ ItemNode* const m_pItemNode;
css::uno::Reference< css::xforms::XFormsUIHelper1 >
m_xUIHelper;
diff --git a/svx/source/inc/delayedevent.hxx b/svx/source/inc/delayedevent.hxx
index 4f7925c94b1d..4cda56f98947 100644
--- a/svx/source/inc/delayedevent.hxx
+++ b/svx/source/inc/delayedevent.hxx
@@ -61,7 +61,7 @@ namespace svxform
void CancelPendingCall();
private:
- Link<void*,void> m_aHandler;
+ Link<void*,void> const m_aHandler;
ImplSVEvent * m_nEventId;
private:
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index 0d9b81b0a208..c0fc7eda5cb6 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -213,7 +213,7 @@ class RecoveryCore : public ::cppu::WeakImplHelper< css::frame::XStatusListener
on the core dispatch implementation, we must know,
which URL we have to use for deregistration!
*/
- bool m_bListenForSaving;
+ bool const m_bListenForSaving;
// native interface
@@ -485,9 +485,9 @@ class RecoveryDialog : public Dialog
VclPtr<RecovDocList> m_pFileListLB;
VclPtr<PushButton> m_pNextBtn;
VclPtr<PushButton> m_pCancelBtn;
- OUString m_aTitleRecoveryInProgress;
- OUString m_aRecoveryOnlyFinish;
- OUString m_aRecoveryOnlyFinishDescr;
+ OUString const m_aTitleRecoveryInProgress;
+ OUString const m_aRecoveryOnlyFinish;
+ OUString const m_aRecoveryOnlyFinishDescr;
RecoveryCore* m_pCore;
css::uno::Reference< css::task::XStatusIndicator > m_xProgress;
@@ -548,7 +548,7 @@ class BrokenRecoveryDialog : public ModalDialog
OUString m_sSavePath;
RecoveryCore* m_pCore;
- bool m_bBeforeRecovery;
+ bool const m_bBeforeRecovery;
bool m_bExecutionNeeded;
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index 81693c2aeac9..1996960bc70e 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -55,7 +55,7 @@ class FmFilterAdapter;
class FmFilterData
{
- FmParentData* m_pParent;
+ FmParentData* const m_pParent;
OUString m_aText;
public:
@@ -127,7 +127,7 @@ public:
class FmFilterItem : public FmFilterData
{
- OUString m_aFieldName;
+ OUString const m_aFieldName;
const sal_Int32 m_nComponentIndex;
public:
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 6ea2cfb97155..b79465ed17a3 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -58,8 +58,8 @@ class SdrMarkList;
class FmEntryData;
class FmNavInsertedHint : public SfxHint
{
- FmEntryData* pEntryData;
- sal_uInt32 nPos;
+ FmEntryData* const pEntryData;
+ sal_uInt32 const nPos;
public:
FmNavInsertedHint( FmEntryData* pInsertedEntryData, sal_uInt32 nRelPos );
@@ -72,7 +72,7 @@ public:
class FmNavModelReplacedHint : public SfxHint
{
- FmEntryData* pEntryData; // the data of the entry that has got a new model
+ FmEntryData* const pEntryData; // the data of the entry that has got a new model
public:
FmNavModelReplacedHint( FmEntryData* pAffectedEntryData );
@@ -84,7 +84,7 @@ public:
class FmNavRemovedHint : public SfxHint
{
- FmEntryData* pEntryData;
+ FmEntryData* const pEntryData;
public:
FmNavRemovedHint( FmEntryData* pInsertedEntryData );
@@ -96,8 +96,8 @@ public:
class FmNavNameChangedHint : public SfxHint
{
- FmEntryData* pEntryData;
- OUString aNewName;
+ FmEntryData* const pEntryData;
+ OUString const aNewName;
public:
FmNavNameChangedHint( FmEntryData* pData, const OUString& rNewName );
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index 5c02d45e8992..beedf5973d3a 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -168,8 +168,8 @@ class SVX_DLLPUBLIC FmXFormShell final : public FmXFormShell_BASE
FmFormArray m_aSearchForms;
struct SAL_DLLPRIVATE InvalidSlotInfo {
- sal_uInt16 id;
- sal_uInt8 flags;
+ sal_uInt16 const id;
+ sal_uInt8 const flags;
InvalidSlotInfo(sal_uInt16 slotId, sal_uInt8 flgs) : id(slotId), flags(flgs) {};
};
std::vector<InvalidSlotInfo> m_arrInvalidSlots;
diff --git a/svx/source/inc/fmtextcontroldialogs.hxx b/svx/source/inc/fmtextcontroldialogs.hxx
index d08a5d0cde13..8fa79400404d 100644
--- a/svx/source/inc/fmtextcontroldialogs.hxx
+++ b/svx/source/inc/fmtextcontroldialogs.hxx
@@ -30,7 +30,7 @@ namespace svx
class TextControlCharAttribDialog : public SfxTabDialogController
{
private:
- SvxFontListItem m_aFontList;
+ SvxFontListItem const m_aFontList;
public:
TextControlCharAttribDialog(weld::Window* pParent, const SfxItemSet& rCoreSet, const SvxFontListItem& rFontList);
diff --git a/svx/source/inc/fmtextcontrolfeature.hxx b/svx/source/inc/fmtextcontrolfeature.hxx
index 6511ff981a98..651307bfe372 100644
--- a/svx/source/inc/fmtextcontrolfeature.hxx
+++ b/svx/source/inc/fmtextcontrolfeature.hxx
@@ -40,9 +40,9 @@ namespace svx
private:
css::uno::Reference< css::frame::XDispatch >
m_xDispatcher;
- css::util::URL m_aFeatureURL;
+ css::util::URL const m_aFeatureURL;
css::uno::Any m_aFeatureState;
- SfxSlotId m_nSlotId;
+ SfxSlotId const m_nSlotId;
FmTextControlShell* m_pInvalidator;
bool m_bFeatureEnabled;
diff --git a/svx/source/inc/fmundo.hxx b/svx/source/inc/fmundo.hxx
index 8dd367b5a46e..3d950ff473fc 100644
--- a/svx/source/inc/fmundo.hxx
+++ b/svx/source/inc/fmundo.hxx
@@ -47,9 +47,9 @@ class SdrObject;
class FmUndoPropertyAction: public SdrUndoAction
{
css::uno::Reference< css::beans::XPropertySet> xObj;
- OUString aPropertyName;
- css::uno::Any aNewValue;
- css::uno::Any aOldValue;
+ OUString const aPropertyName;
+ css::uno::Any const aNewValue;
+ css::uno::Any const aOldValue;
public:
FmUndoPropertyAction(FmFormModel& rMod, const css::beans::PropertyChangeEvent& evt);
@@ -95,7 +95,7 @@ private:
sal_Int32 m_nIndex; // index of the object within it's container
css::uno::Sequence< css::script::ScriptEventDescriptor >
m_aEvents; // events of the object
- Action m_eAction;
+ Action const m_eAction;
};
class FmUndoModelReplaceAction : public SdrUndoAction
diff --git a/svx/source/inc/formcontrolling.hxx b/svx/source/inc/formcontrolling.hxx
index f2379758c0af..a24a04321c7d 100644
--- a/svx/source/inc/formcontrolling.hxx
+++ b/svx/source/inc/formcontrolling.hxx
@@ -71,7 +71,7 @@ namespace svx
*/
class ControllerFeatures final
{
- IControllerFeatureInvalidation* m_pInvalidationCallback; // necessary as long as m_pImpl is not yet constructed
+ IControllerFeatureInvalidation* const m_pInvalidationCallback; // necessary as long as m_pImpl is not yet constructed
rtl::Reference<FormControllerHelper> m_pImpl;
public:
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index f5e5f420a5c7..d01c4e658f8a 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -83,7 +83,7 @@ private:
sal_Int32 m_nFormatKey;
sal_Int16 m_nFieldType;
sal_Int16 m_nTypeId;
- sal_uInt16 m_nId;
+ sal_uInt16 const m_nId;
sal_Int16 m_nFieldPos;
sal_Int16 m_nAlign; // specified with TXT_ALIGN_LEFT ....
bool m_bReadOnly : 1;
@@ -532,7 +532,7 @@ private:
class DbSpinField : public DbCellControl
{
private:
- sal_Int16 m_nStandardAlign;
+ sal_Int16 const m_nStandardAlign;
public:
diff --git a/svx/source/inc/svxpixelctlaccessiblecontext.hxx b/svx/source/inc/svxpixelctlaccessiblecontext.hxx
index 2ce8ca776d5d..40b48d90aa8c 100644
--- a/svx/source/inc/svxpixelctlaccessiblecontext.hxx
+++ b/svx/source/inc/svxpixelctlaccessiblecontext.hxx
@@ -107,9 +107,9 @@ private:
SvxPixelCtl& mrParentWindow;
rtl::Reference<SvxPixelCtlAccessible> mxParent;
bool m_bPixelColorOrBG;//Pixel Color Or BackGround Color
- tools::Rectangle maBoundingBox;
+ tools::Rectangle const maBoundingBox;
/// index of child in parent
- long mnIndexInParent;
+ long const mnIndexInParent;
};
class SvxPixelCtlAccessible final : public ::comphelper::OAccessibleSelectionHelper,
diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx
index f40fc64c7762..36ce4e7f6d43 100644
--- a/svx/source/inc/svxrectctaccessiblecontext.hxx
+++ b/svx/source/inc/svxrectctaccessiblecontext.hxx
@@ -223,25 +223,25 @@ private:
be set from the outside. Furthermore, it changes according to the
draw page's display mode.
*/
- OUString msDescription;
+ OUString const msDescription;
/** Name of this object. It changes according the draw page's
display mode.
*/
- OUString msName;
+ OUString const msName;
/// Reference to the parent object.
css::uno::Reference< css::accessibility::XAccessible >
mxParent;
/// Bounding box
- tools::Rectangle maBoundingBox;
+ tools::Rectangle const maBoundingBox;
/// index of child in parent
- long mnIndexInParent;
+ long const mnIndexInParent;
/// Indicates, if object is checked
- bool mbIsChecked;
+ bool mbIsChecked;
};