summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-01 09:08:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-03 11:56:43 +0200
commit4969f4c0d3e2581aaa8a5b5a5769840fa6b6f8ea (patch)
treeeb42ab5be5d8c5ca3d23b686a8781c28822381b4 /sw/inc
parentd5cc52fec12e3c8d1c3561f172d3e1c5434290b3 (diff)
loplugin:constfields in sw
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f Reviewed-on: https://gerrit.libreoffice.org/61177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/EnhancedPDFExportHelper.hxx4
-rw-r--r--sw/inc/SwUndoField.hxx6
-rw-r--r--sw/inc/ToxLinkProcessor.hxx8
-rw-r--r--sw/inc/ToxTabStopTokenHandler.hxx6
-rw-r--r--sw/inc/accmap.hxx2
-rw-r--r--sw/inc/acmplwrd.hxx2
-rw-r--r--sw/inc/calc.hxx2
-rw-r--r--sw/inc/ccoll.hxx4
-rw-r--r--sw/inc/crstate.hxx2
-rw-r--r--sw/inc/ddefld.hxx2
-rw-r--r--sw/inc/docufld.hxx6
-rw-r--r--sw/inc/editsh.hxx2
-rw-r--r--sw/inc/expfld.hxx8
-rw-r--r--sw/inc/fldbas.hxx2
-rw-r--r--sw/inc/fmtfld.hxx2
-rw-r--r--sw/inc/fmthdft.hxx4
-rw-r--r--sw/inc/frmfmt.hxx2
-rw-r--r--sw/inc/gotodlg.hxx2
-rw-r--r--sw/inc/grfatr.hxx2
-rw-r--r--sw/inc/hhcwrp.hxx2
-rw-r--r--sw/inc/hints.hxx28
-rw-r--r--sw/inc/htmltbl.hxx36
-rw-r--r--sw/inc/modcfg.hxx2
-rw-r--r--sw/inc/modeltoviewhelper.hxx6
-rw-r--r--sw/inc/node.hxx6
-rw-r--r--sw/inc/pagedesc.hxx2
-rw-r--r--sw/inc/prtopt.hxx2
-rw-r--r--sw/inc/redline.hxx4
-rw-r--r--sw/inc/shellio.hxx16
-rw-r--r--sw/inc/shellres.hxx52
-rw-r--r--sw/inc/splargs.hxx6
-rw-r--r--sw/inc/swatrset.hxx2
-rw-r--r--sw/inc/swcli.hxx2
-rw-r--r--sw/inc/swscanner.hxx6
-rw-r--r--sw/inc/tblsel.hxx8
-rw-r--r--sw/inc/tox.hxx6
-rw-r--r--sw/inc/txatritr.hxx2
-rw-r--r--sw/inc/undobj.hxx4
-rw-r--r--sw/inc/unochart.hxx4
-rw-r--r--sw/inc/unosett.hxx2
-rw-r--r--sw/inc/unostyle.hxx10
-rw-r--r--sw/inc/unotxdoc.hxx6
42 files changed, 141 insertions, 141 deletions
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx
index 6aa5867377eb..933f7510c6e8 100644
--- a/sw/inc/EnhancedPDFExportHelper.hxx
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -205,8 +205,8 @@ class SwEnhancedPDFExportHelper
* in a page range without empty pages, or -1 if this page is empty. */
std::vector< sal_Int32 > maPageNumberMap;
- bool mbSkipEmptyPages;
- bool mbEditEngineOnly;
+ bool const mbSkipEmptyPages;
+ bool const mbEditEngineOnly;
const SwPrintData& mrPrintData;
diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx
index f27aed1a830c..f275e701f9bf 100644
--- a/sw/inc/SwUndoField.hxx
+++ b/sw/inc/SwUndoField.hxx
@@ -44,8 +44,8 @@ public:
class SwUndoFieldFromDoc : public SwUndoField
{
std::unique_ptr<SwField> pOldField, pNewField;
- SwMsgPoolItem * pHint;
- bool bUpdate;
+ SwMsgPoolItem * const pHint;
+ bool const bUpdate;
void DoImpl();
@@ -64,7 +64,7 @@ public:
class SwUndoFieldFromAPI : public SwUndoField
{
css::uno::Any aOldVal, aNewVal;
- sal_uInt16 nWhich;
+ sal_uInt16 const nWhich;
void DoImpl();
diff --git a/sw/inc/ToxLinkProcessor.hxx b/sw/inc/ToxLinkProcessor.hxx
index e53c537b758e..989f9aff19ec 100644
--- a/sw/inc/ToxLinkProcessor.hxx
+++ b/sw/inc/ToxLinkProcessor.hxx
@@ -61,8 +61,8 @@ private:
StartedLink(sal_Int32 startPosition, const OUString& characterStyle) :
mStartPosition(startPosition), mCharacterStyle(characterStyle) {
}
- sal_Int32 mStartPosition;
- OUString mCharacterStyle;
+ sal_Int32 const mStartPosition;
+ OUString const mCharacterStyle;
};
/** A link that has been encountered while parsing a tox.
@@ -76,8 +76,8 @@ private:
{
}
SwFormatINetFormat mINetFormat;
- sal_Int32 mStartTextPos;
- sal_Int32 mEndTextPos;
+ sal_Int32 const mStartTextPos;
+ sal_Int32 const mEndTextPos;
};
std::vector<std::unique_ptr<ClosedLink>> m_ClosedLinks;
diff --git a/sw/inc/ToxTabStopTokenHandler.hxx b/sw/inc/ToxTabStopTokenHandler.hxx
index 7da924599b5e..23a66cc405db 100644
--- a/sw/inc/ToxTabStopTokenHandler.hxx
+++ b/sw/inc/ToxTabStopTokenHandler.hxx
@@ -100,10 +100,10 @@ private:
long
CalculatePageMarginFromPageDescription(const SwTextNode& targetNode) const;
- sal_uInt32 mIndexOfSectionNode;
+ sal_uInt32 const mIndexOfSectionNode;
const SwPageDesc& mDefaultPageDescription;
- bool mTabPositionIsRelativeToParagraphIndent;
- TabStopReferencePolicy mTabStopReferencePolicy;
+ bool const mTabPositionIsRelativeToParagraphIndent;
+ TabStopReferencePolicy const mTabStopReferencePolicy;
};
}
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 6e2e0e2b7984..658bb171df91 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -120,7 +120,7 @@ class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder,
//mpSelectedFrameMap contains the old selected objects.
std::unique_ptr<SwAccessibleContextMap_Impl> mpSeletedFrameMap;
- OUString maDocName;
+ OUString const maDocName;
//InvalidateShapeInParaSelection() method is responsible for the updating the selected states of the objects.
void InvalidateShapeInParaSelection();
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
index 03199909d9c2..eea8dad22227 100644
--- a/sw/inc/acmplwrd.hxx
+++ b/sw/inc/acmplwrd.hxx
@@ -39,7 +39,7 @@ class SwAutoCompleteWord
/// contains extended strings carrying source information
editeng::SortedAutoCompleteStrings m_WordList;
- editeng::Trie m_LookupTree;
+ editeng::Trie const m_LookupTree;
SwAutoCompleteStringPtrDeque aLRULst;
std::unique_ptr<SwAutoCompleteWord_Impl> pImpl;
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 56241deed94b..ff1766d8cd39 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -193,7 +193,7 @@ class SwCalc
sal_Int32 m_nCommandPos;
SwDoc& m_rDoc;
- SvtSysLocale m_aSysLocale;
+ SvtSysLocale const m_aSysLocale;
const LocaleDataWrapper* m_pLocaleDataWrapper;
CharClass* m_pCharClass;
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index 59be8f9e7cb4..180f9dbe6645 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -29,8 +29,8 @@ enum class Master_CollCondition;
struct CommandStruct
{
- Master_CollCondition nCnd;
- sal_uLong nSubCond;
+ Master_CollCondition const nCnd;
+ sal_uLong const nSubCond;
};
sal_Int16 GetCommandContextIndex( const OUString &rContextName );
diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
index 29f959e196b8..56bbfac15f58 100644
--- a/sw/inc/crstate.hxx
+++ b/sw/inc/crstate.hxx
@@ -41,7 +41,7 @@ struct SwFillCursorPos
sal_uInt16 nSpaceOnlyCnt; ///< number of spaces to insert ("only spaces, no tabs" mode)
sal_uInt16 nColumnCnt; ///< number of necessary column breaks
sal_Int16 eOrient; ///< paragraph alignment
- SwFillMode eMode; ///< desired fill-up rule
+ SwFillMode const eMode; ///< desired fill-up rule
SwFillCursorPos( SwFillMode eMd ) :
nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nSpaceOnlyCnt(0), nColumnCnt( 0 ),
eOrient( css::text::HoriOrientation::NONE ), eMode( eMd )
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
index 510f6223874e..278e6a2963fa 100644
--- a/sw/inc/ddefld.hxx
+++ b/sw/inc/ddefld.hxx
@@ -50,7 +50,7 @@ namespace sw
// FieldType for DDE
class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType
{
- OUString aName;
+ OUString const aName;
OUString aExpansion;
tools::SvRef<sfx2::SvBaseLink> refLink;
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 043e55d1e5c0..ead0f04620b4 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -376,7 +376,7 @@ public:
class SwMacroFieldType : public SwFieldType
{
- SwDoc* m_pDoc;
+ SwDoc* const m_pDoc;
public:
SwMacroFieldType(SwDoc*);
@@ -425,7 +425,7 @@ public:
class SwPostItFieldType : public SwFieldType
{
private:
- SwDoc* mpDoc;
+ SwDoc* const mpDoc;
public:
SwPostItFieldType(SwDoc* pDoc);
@@ -668,7 +668,7 @@ public:
class SwScriptFieldType : public SwFieldType
{
- SwDoc* m_pDoc;
+ SwDoc* const m_pDoc;
public:
SwScriptFieldType( SwDoc* pDoc );
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 13617fb279df..b31fd2ce9943 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -118,7 +118,7 @@ enum class ParaBreakType {
/// For querying the INet-attributes for Navigator.
struct SwGetINetAttr
{
- OUString sText;
+ OUString const sText;
const SwTextINetFormat& rINetAttr;
SwGetINetAttr( const OUString& rText, const SwTextINetFormat& rAttr )
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 3081423d3627..025ff802190f 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -45,7 +45,7 @@ OUString ReplacePoint(const OUString& sTmpName, bool bWithCommandType = false);
struct SeqFieldLstElem
{
OUString sDlgEntry;
- sal_uInt16 nSeqNo;
+ sal_uInt16 const nSeqNo;
SeqFieldLstElem( const OUString& rStr, sal_uInt16 nNo )
: sDlgEntry( rStr ), nSeqNo( nNo )
@@ -144,7 +144,7 @@ class SwSetExpField;
class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
{
- OUString m_sName;
+ OUString const m_sName;
const SwNode* m_pOutlChgNd;
OUString m_sDelim;
sal_uInt16 m_nType;
@@ -278,7 +278,7 @@ inline bool SwSetExpField::IsSequenceField() const
class SwInputFieldType : public SwFieldType
{
- SwDoc* mpDoc;
+ SwDoc* const mpDoc;
public:
SwInputFieldType( SwDoc* pDoc );
@@ -294,7 +294,7 @@ class SW_DLLPUBLIC SwInputField : public SwField
OUString maHelp;
OUString maToolTip;
sal_uInt16 mnSubType;
- bool mbIsFormField;
+ bool const mbIsFormField;
SwFormatField* mpFormatField; // attribute to which the <SwInputField> belongs to
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 0204c99510a9..e6b977b5c295 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -231,7 +231,7 @@ class SW_DLLPUBLIC SwFieldType : public SwModify, public sw::BroadcasterMixin
{
css::uno::WeakReference<css::beans::XPropertySet> m_wXFieldMaster;
- SwFieldIds m_nWhich;
+ SwFieldIds const m_nWhich;
friend void FinitUI(); ///< In order to delete pointer!
static std::vector<OUString>* s_pFieldNames;
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 1b72d3e6b83c..6c1b805e952c 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -120,7 +120,7 @@ enum class SwFormatFieldHintWhich
class SW_DLLPUBLIC SwFormatFieldHint : public SfxHint
{
const SwFormatField* m_pField;
- SwFormatFieldHintWhich m_nWhich;
+ SwFormatFieldHintWhich const m_nWhich;
const SwView* m_pView;
public:
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index 7107d80d2894..e8a0c7a95e08 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -32,7 +32,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFormatHeader: public SfxPoolItem, public SwClient
{
- bool bActive; ///< Only for controlling (creation of content).
+ bool const bActive; ///< Only for controlling (creation of content).
public:
SwFormatHeader( bool bOn = false );
@@ -63,7 +63,7 @@ public:
class SW_DLLPUBLIC SwFormatFooter: public SfxPoolItem, public SwClient
{
- bool bActive; // Only for controlling (creation of content).
+ bool const bActive; // Only for controlling (creation of content).
public:
SwFormatFooter( bool bOn = false );
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index bd77ab2cff3d..f06da7bb8006 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -268,7 +268,7 @@ namespace sw
};
struct SW_DLLPUBLIC DrawFrameFormatHint final: SfxHint
{
- DrawFrameFormatHintId m_eId;
+ DrawFrameFormatHintId const m_eId;
DrawFrameFormatHint(DrawFrameFormatHintId eId) : m_eId(eId) {};
virtual ~DrawFrameFormatHint() override;
};
diff --git a/sw/inc/gotodlg.hxx b/sw/inc/gotodlg.hxx
index d45e28f1c06f..46418c660e23 100644
--- a/sw/inc/gotodlg.hxx
+++ b/sw/inc/gotodlg.hxx
@@ -36,7 +36,7 @@ public:
private:
SwView *m_pCreateView;
- SfxBindings *m_rBindings;
+ SfxBindings * const m_rBindings;
sal_uInt16 mnMaxPageCnt;
std::unique_ptr<weld::Entry> mxMtrPageCtrl;
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index 2b250a57e12b..4fff9948c883 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -80,7 +80,7 @@ public:
class SwRotationGrf : public SfxUInt16Item
{
private:
- Size aUnrotatedSize;
+ Size const aUnrotatedSize;
// tdf#115529 check and evtl. correct value, it is in 10th
// degrees and *has* to be in the range [0 .. 3600[
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index 6cfdec0f2347..95aa775c76d5 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -48,7 +48,7 @@ class SW_DLLPUBLIC SwHHCWrapper : public editeng::HangulHanjaConversion
bool m_bIsDrawObj;
bool m_bIsOtherContent;
bool m_bStartChk;
- bool m_bIsSelection; ///< true if only the selected text should be converted
+ bool const m_bIsSelection; ///< true if only the selected text should be converted
bool m_bStartDone;
bool m_bEndDone;
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index bdf2eceaa8a6..2519cf4700a9 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -64,15 +64,15 @@ public:
class SwFormatChg: public SwMsgPoolItem
{
public:
- SwFormat *pChangedFormat;
+ SwFormat * const pChangedFormat;
SwFormatChg( SwFormat *pFormat );
};
class SwInsText: public SwMsgPoolItem
{
public:
- sal_Int32 nPos;
- sal_Int32 nLen;
+ sal_Int32 const nPos;
+ sal_Int32 const nLen;
SwInsText( sal_Int32 nP, sal_Int32 nL );
};
@@ -80,7 +80,7 @@ public:
class SwDelChr: public SwMsgPoolItem
{
public:
- sal_Int32 nPos;
+ sal_Int32 const nPos;
SwDelChr( sal_Int32 nP );
};
@@ -88,8 +88,8 @@ public:
class SwDelText: public SwMsgPoolItem
{
public:
- sal_Int32 nStart;
- sal_Int32 nLen;
+ sal_Int32 const nStart;
+ sal_Int32 const nLen;
SwDelText( sal_Int32 nS, sal_Int32 nL );
};
@@ -112,8 +112,8 @@ public:
class RedlineDelText : public SfxHint
{
public:
- sal_Int32 nStart;
- sal_Int32 nLen;
+ sal_Int32 const nStart;
+ sal_Int32 const nLen;
RedlineDelText(sal_Int32 nS, sal_Int32 nL);
};
@@ -133,9 +133,9 @@ public:
class SwUpdateAttr : public SwMsgPoolItem
{
private:
- sal_Int32 m_nStart;
- sal_Int32 m_nEnd;
- sal_uInt16 m_nWhichAttr;
+ sal_Int32 const m_nStart;
+ sal_Int32 const m_nEnd;
+ sal_uInt16 const m_nWhichAttr;
public:
SwUpdateAttr( sal_Int32 nS, sal_Int32 nE, sal_uInt16 nW );
@@ -220,7 +220,7 @@ public:
*/
class SwAttrSetChg: public SwMsgPoolItem
{
- bool m_bDelSet;
+ bool const m_bDelSet;
SwAttrSet* m_pChgSet; ///< what has changed
const SwAttrSet* m_pTheChgdSet; ///< is only used to compare
public:
@@ -247,7 +247,7 @@ public:
class SwCondCollCondChg: public SwMsgPoolItem
{
public:
- SwFormat *pChangedFormat;
+ SwFormat * const pChangedFormat;
SwCondCollCondChg( SwFormat *pFormat );
};
@@ -280,7 +280,7 @@ public:
class SwStringMsgPoolItem : public SwMsgPoolItem
{
- OUString m_sStr;
+ OUString const m_sStr;
public:
const OUString& GetString() const { return m_sStr; }
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
index 966b7c407f96..cc0880d5bad0 100644
--- a/sw/inc/htmltbl.hxx
+++ b/sw/inc/htmltbl.hxx
@@ -54,7 +54,7 @@ class SwHTMLTableLayoutCnts
sal_uInt8 nPass1Done; ///< How many times has Pass 1 been called?
sal_uInt8 nWidthSet; ///< How many times has the width been set?
- bool bNoBreakTag; ///< <NOBR>-Tag over complete content.
+ bool const bNoBreakTag; ///< <NOBR>-Tag over complete content.
public:
@@ -86,10 +86,10 @@ class SwHTMLTableLayoutCell
sal_uInt16 nRowSpan; ///< ROWSPAN of cell.
sal_uInt16 nColSpan; ///< COLSPAN of cell.
- sal_uInt16 nWidthOption; ///< Given width of cell in Twip or %.
+ sal_uInt16 const nWidthOption; ///< Given width of cell in Twip or %.
- bool bPrcWidthOption : 1; ///< nWidth is %-value.
- bool bNoWrapOption : 1; ///< NOWRAP-option.
+ bool const bPrcWidthOption : 1; ///< nWidth is %-value.
+ bool const bNoWrapOption : 1; ///< NOWRAP-option.
public:
@@ -131,7 +131,7 @@ class SwHTMLTableLayoutColumn
sal_uInt16 nWidthOption; ///< Options of <COL> or <TD>/<TH>.
bool bRelWidthOption : 1;
- bool bLeftBorder : 1;
+ bool const bLeftBorder : 1;
public:
@@ -178,11 +178,11 @@ class SwHTMLTableLayout
sal_uLong m_nMin; ///< Minimal width of table (Twips).
sal_uLong m_nMax; ///< Maximal width of table (Twips).
- sal_uInt16 m_nRows; ///< Row count.
+ sal_uInt16 const m_nRows; ///< Row count.
sal_uInt16 m_nCols; ///< Column count.
- sal_uInt16 m_nLeftMargin; ///< Space to left margin (from paragraph).
- sal_uInt16 m_nRightMargin; ///< Space to left margin (from paragraph).
+ sal_uInt16 const m_nLeftMargin; ///< Space to left margin (from paragraph).
+ sal_uInt16 const m_nRightMargin; ///< Space to left margin (from paragraph).
sal_uInt16 m_nInhAbsLeftSpace; ///< Space inherited from surrounding box
sal_uInt16 m_nInhAbsRightSpace; ///< that was added to boxes.
@@ -193,16 +193,16 @@ class SwHTMLTableLayout
sal_uInt16 m_nRelTabWidth; ///< Relative width of table.
sal_uInt16 m_nWidthOption; ///< Width of table (in Twips or %).
- sal_uInt16 m_nCellPadding; ///< Space to contents (in Twips).
- sal_uInt16 m_nCellSpacing; ///< Cell spacing (in Twips).
- sal_uInt16 m_nBorder; /** Line strength of outer border, or rather the
+ sal_uInt16 const m_nCellPadding; ///< Space to contents (in Twips).
+ sal_uInt16 const m_nCellSpacing; ///< Cell spacing (in Twips).
+ sal_uInt16 const m_nBorder; /** Line strength of outer border, or rather the
space needed for it as calculated by Netscape. */
- sal_uInt16 m_nLeftBorderWidth;
- sal_uInt16 m_nRightBorderWidth;
+ sal_uInt16 const m_nLeftBorderWidth;
+ sal_uInt16 const m_nRightBorderWidth;
sal_uInt16 m_nInhLeftBorderWidth;
sal_uInt16 m_nInhRightBorderWidth;
- sal_uInt16 m_nBorderWidth;
+ sal_uInt16 const m_nBorderWidth;
sal_uInt16 m_nDelayedResizeAbsAvail; ///< Param for delayed Resize.
sal_uInt16 m_nLastResizeAbsAvail;
@@ -210,11 +210,11 @@ class SwHTMLTableLayout
sal_uInt8 m_nPass1Done; ///< Reference-values for
sal_uInt8 m_nWidthSet; ///< the runs through loop.
- SvxAdjust m_eTableAdjust; ///< Alignment of table.
+ SvxAdjust const m_eTableAdjust; ///< Alignment of table.
- bool m_bColsOption : 1; ///< Table has a COLS-option.
- bool m_bColTags : 1; ///< Table has COL/COLGRP tags.
- bool m_bPrcWidthOption : 1; ///< Width is given in percent.
+ bool const m_bColsOption : 1; ///< Table has a COLS-option.
+ bool const m_bColTags : 1; ///< Table has COL/COLGRP tags.
+ bool const m_bPrcWidthOption : 1; ///< Width is given in percent.
bool m_bUseRelWidth : 1; ///< SwTable gets relative width.
bool m_bMustResize : 1; ///< Table width must be defined.
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index dab488078d15..bf5148bee215 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -127,7 +127,7 @@ class SwInsertConfig : public utl::ConfigItem
bool m_bCaptionOrderNumberingFirst; //#i61007# caption order starting with numbering
SwInsertTableOptions m_aInsTableOpts;
- bool m_bIsWeb;
+ bool const m_bIsWeb;
const css::uno::Sequence<OUString>& GetPropertyNames();
diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx
index 8c7783221757..03707596662d 100644
--- a/sw/inc/modeltoviewhelper.hxx
+++ b/sw/inc/modeltoviewhelper.hxx
@@ -94,9 +94,9 @@ class ModelToViewHelper
, m_bVisible(bVisible)
{
}
- sal_Int32 m_nModelPos;
- sal_Int32 m_nViewPos;
- bool m_bVisible;
+ sal_Int32 const m_nModelPos;
+ sal_Int32 const m_nViewPos;
+ bool const m_bVisible;
};
typedef std::vector< ConversionMapEntry > ConversionMap;
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 43ceb38e724c..b37d96ac1d04 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -81,7 +81,7 @@ class SW_DLLPUBLIC SwNode
{
friend class SwNodes;
- SwNodeType m_nNodeType;
+ SwNodeType const m_nNodeType;
/// For text nodes: level of auto format. Was put here because we had still free bits.
sal_uInt8 m_nAFormatNumLvl : 3;
@@ -100,7 +100,7 @@ private:
#ifdef DBG_UTIL
static long s_nSerial;
- long m_nSerial;
+ long const m_nSerial;
#endif
/// all SwFrameFormat that are anchored at the node
@@ -307,7 +307,7 @@ class SAL_DLLPUBLIC_RTTI SwStartNode: public SwNode
friend class SwEndNode; ///< to set the theEndOfSection !!
SwEndNode* m_pEndOfSection;
- SwStartNodeType m_eStartNodeType;
+ SwStartNodeType const m_eStartNodeType;
/// for the initial StartNode
SwStartNode( SwNodes& rNodes, sal_uLong nPos );
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 3dd5a1d2d9e1..522986f87c1b 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -354,7 +354,7 @@ class SwPageDescExt
public:
SwPageDesc m_PageDesc;
private:
- SwDoc * m_pDoc;
+ SwDoc * const m_pDoc;
OUString m_sFollow;
void SetPageDesc(const SwPageDesc & rPageDesc);
diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx
index 45eaa167d125..5c53ee1a84bd 100644
--- a/sw/inc/prtopt.hxx
+++ b/sw/inc/prtopt.hxx
@@ -25,7 +25,7 @@
class SwPrintOptions : public SwPrintData, public utl::ConfigItem
{
private:
- bool bIsWeb;
+ bool const bIsWeb;
css::uno::Sequence<OUString> GetPropertyNames();
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index a2772c17caba..7e3b94ed1d0a 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -112,7 +112,7 @@ class SW_DLLPUBLIC SwRedlineData
OUString m_sComment;
DateTime m_aStamp;
RedlineType_t m_eType;
- std::size_t m_nAuthor;
+ std::size_t const m_nAuthor;
sal_uInt16 m_nSeqNo;
public:
@@ -174,7 +174,7 @@ class SW_DLLPUBLIC SwRangeRedline : public SwPaM
SwNodeIndex* m_pContentSect;
bool m_bDelLastPara : 1;
bool m_bIsVisible : 1;
- sal_uInt32 m_nId;
+ sal_uInt32 const m_nId;
boost::optional<long> m_oLOKLastNodeTop;
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 194ce40d0686..137cc4e4b50a 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -139,12 +139,12 @@ public:
class SW_DLLPUBLIC SwReader: public SwDocFac
{
SvStream* pStrm;
- tools::SvRef<SotStorage> pStg;
+ tools::SvRef<SotStorage> const pStg;
css::uno::Reference < css::embed::XStorage > xStg;
- SfxMedium* pMedium; // Who wants to obtain a Medium (W4W).
+ SfxMedium* const pMedium; // Who wants to obtain a Medium (W4W).
- SwPaM* pCursor;
- OUString aFileName;
+ SwPaM* const pCursor;
+ OUString const aFileName;
OUString sBaseURL;
bool mbSkipImages;
@@ -500,7 +500,7 @@ class SW_DLLPUBLIC SwWriter
css::uno::Reference < css::embed::XStorage > xStg;
SfxMedium* pMedium;
- SwPaM* pOutPam;
+ SwPaM* const pOutPam;
SwCursorShell *pShell;
SwDoc &rDoc;
@@ -527,9 +527,9 @@ ErrCode GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
struct SwReaderWriterEntry
{
Reader* pReader;
- FnGetReader fnGetReader;
- FnGetWriter fnGetWriter;
- bool bDelReader;
+ FnGetReader const fnGetReader;
+ FnGetWriter const fnGetWriter;
+ bool const bDelReader;
SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, bool bDel )
: pReader( nullptr ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx
index 7b8d70962350..c836592ccfbd 100644
--- a/sw/inc/shellres.hxx
+++ b/sw/inc/shellres.hxx
@@ -25,40 +25,40 @@
struct SW_DLLPUBLIC ShellResource
{
- OUString aPostItAuthor;
- OUString aPostItPage;
- OUString aPostItLine;
+ OUString const aPostItAuthor;
+ OUString const aPostItPage;
+ OUString const aPostItLine;
// Calc error-strings.
- OUString aCalc_Syntax;
- OUString aCalc_ZeroDiv;
- OUString aCalc_Brack;
- OUString aCalc_Pow;
- OUString aCalc_Overflow;
- OUString aCalc_Default;
- OUString aCalc_Error;
+ OUString const aCalc_Syntax;
+ OUString const aCalc_ZeroDiv;
+ OUString const aCalc_Brack;
+ OUString const aCalc_Pow;
+ OUString const aCalc_Overflow;
+ OUString const aCalc_Default;
+ OUString const aCalc_Error;
// For GetRefField - referenced item not found.
- OUString aGetRefField_RefItemNotFound;
+ OUString const aGetRefField_RefItemNotFound;
// For some list boxes - string "none"
- OUString aStrNone;
+ OUString const aStrNone;
// For fixed fields.
- OUString aFixedStr;
+ OUString const aFixedStr;
// Custom fields of type css::util::Duration.
- OUString sDurationFormat;
+ OUString const sDurationFormat;
//Names of TOXs.
- OUString aTOXIndexName;
- OUString aTOXUserName;
- OUString aTOXContentName;
- OUString aTOXIllustrationsName;
- OUString aTOXObjectsName;
- OUString aTOXTablesName;
- OUString aTOXAuthoritiesName;
- OUString aTOXCitationName;
+ OUString const aTOXIndexName;
+ OUString const aTOXUserName;
+ OUString const aTOXContentName;
+ OUString const aTOXIllustrationsName;
+ OUString const aTOXObjectsName;
+ OUString const aTOXTablesName;
+ OUString const aTOXAuthoritiesName;
+ OUString const aTOXCitationName;
OUString aLinkCtrlClick;
- OUString aLinkClick;
+ OUString const aLinkClick;
std::vector<OUString> aDocInfoLst;
@@ -81,9 +81,9 @@ struct SW_DLLPUBLIC ShellResource
private:
void GetAutoFormatNameLst_() const;
mutable std::unique_ptr<std::vector<OUString>> pAutoFormatNameLst;
- OUString sPageDescFirstName;
- OUString sPageDescFollowName;
- OUString sPageDescName;
+ OUString const sPageDescFirstName;
+ OUString const sPageDescFollowName;
+ OUString const sPageDescName;
};
inline const std::vector<OUString>& ShellResource::GetAutoFormatNameLst() const
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index efd4c33e6352..0c66737205f9 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -62,8 +62,8 @@ struct SwArgsBase // used for text conversion (Hangul/Hanja, ...)
struct SwConversionArgs : SwArgsBase
{
OUString aConvText; // convertible text found
- LanguageType nConvSrcLang; // (source) language to look for
- LanguageType nConvTextLang; // language of aConvText (if the latter one was found)
+ LanguageType const nConvSrcLang; // (source) language to look for
+ LanguageType nConvTextLang; // language of aConvText (if the latter one was found)
// used for chinese translation
LanguageType nConvTargetLang; // target language of text to be changed
@@ -89,7 +89,7 @@ struct SwSpellArgs : SwArgsBase
css::uno::Reference< css::linguistic2::XSpellAlternatives > xSpellAlt;
- bool bIsGrammarCheck;
+ bool const bIsGrammarCheck;
SwSpellArgs(css::uno::Reference<
css::linguistic2::XSpellChecker1 > const &rxSplChk,
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
index 3e369480bc56..397887d09429 100644
--- a/sw/inc/swatrset.hxx
+++ b/sw/inc/swatrset.hxx
@@ -141,7 +141,7 @@ private:
friend void InitCore(); // For creating/deleting of version maps.
friend void FinitCore();
- SwDoc* m_pDoc;
+ SwDoc* const m_pDoc;
public:
SwAttrPool( SwDoc* pDoc );
diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx
index 5149bec8fbf8..667e776ccd31 100644
--- a/sw/inc/swcli.hxx
+++ b/sw/inc/swcli.hxx
@@ -30,7 +30,7 @@ class EmbeddedObjectRef;
class SwOleClient : public SfxInPlaceClient
{
bool m_IsInDoVerb;
- bool m_IsOldCheckForOLEInCaption;
+ bool const m_IsOldCheckForOLEInCaption;
virtual void ObjectAreaChanged() override;
virtual void RequestNewObjectArea( tools::Rectangle& ) override;
diff --git a/sw/inc/swscanner.hxx b/sw/inc/swscanner.hxx
index de273d679b8b..05115ed10b27 100644
--- a/sw/inc/swscanner.hxx
+++ b/sw/inc/swscanner.hxx
@@ -31,7 +31,7 @@ class SwTextNode;
// during spell check
class SwScanner
{
- std::function<LanguageType (sal_Int32, sal_Int32, bool)> m_pGetLangOfChar;
+ std::function<LanguageType (sal_Int32, sal_Int32, bool)> const m_pGetLangOfChar;
OUString m_aWord;
const OUString m_aPreDashReplacementText;
OUString m_aText;
@@ -43,8 +43,8 @@ class SwScanner
sal_Int32 m_nLength;
sal_Int32 m_nOverriddenDashCount;
LanguageType m_aCurrentLang;
- sal_uInt16 m_nWordType;
- bool m_bClip;
+ sal_uInt16 const m_nWordType;
+ bool const m_bClip;
public:
SwScanner(const std::function<LanguageType(sal_Int32, sal_Int32, bool)>& pGetLangOfChar,
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index e7ef81b53ef3..0639db32f72e 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -121,7 +121,7 @@ bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv,
class SwSelUnion
{
SwRect m_aUnion; // The rectangle enclosing the selection.
- SwTabFrame *m_pTable; // The (Follow-)Table for the Union.
+ SwTabFrame * const m_pTable; // The (Follow-)Table for the Union.
public:
SwSelUnion( const SwRect &rRect, SwTabFrame *pTab ) :
@@ -156,9 +156,9 @@ typedef std::vector<std::unique_ptr<FndLine_>> FndLines_t;
class FndBox_
{
- SwTableBox* m_pBox;
+ SwTableBox* const m_pBox;
FndLines_t m_Lines;
- FndLine_* m_pUpper;
+ FndLine_* const m_pUpper;
SwTableLine *m_pLineBefore; // For deleting/restoring the layout.
SwTableLine *m_pLineBehind;
@@ -191,7 +191,7 @@ public:
class FndLine_
{
- SwTableLine* m_pLine;
+ SwTableLine* const m_pLine;
FndBoxes_t m_Boxes;
FndBox_* m_pUpper;
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 2ca0604d3926..e5c938e4e34e 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -159,8 +159,8 @@ public:
inline TOXTypes GetType() const;
private:
- OUString m_aName;
- TOXTypes m_eType;
+ OUString const m_aName;
+ TOXTypes const m_eType;
// @@@ public copy ctor, but no copy assignment?
SwTOXType & operator= (const SwTOXType &) = delete;
@@ -237,7 +237,7 @@ struct SW_DLLPUBLIC SwFormToken
struct SwFormTokenEqualToFormTokenType
{
- FormTokenType eType;
+ FormTokenType const eType;
SwFormTokenEqualToFormTokenType(FormTokenType _eType) : eType(_eType) {}
bool operator()(const SwFormToken & rToken)
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx
index 32b3e4bc3069..625b9cba2e1a 100644
--- a/sw/inc/txatritr.hxx
+++ b/sw/inc/txatritr.hxx
@@ -33,7 +33,7 @@ class SwScriptIterator
const OUString& m_rText;
sal_Int32 m_nChgPos;
sal_uInt16 nCurScript;
- bool bForward;
+ bool const bForward;
public:
SwScriptIterator( const OUString& rStr, sal_Int32 nStart,
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 2e84ff9c1d6e..8610ab3d38a6 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -52,7 +52,7 @@ class SwUndo
{
SwUndoId const m_nId;
RedlineFlags nOrigRedlineFlags;
- ViewShellId m_nViewShellId;
+ ViewShellId const m_nViewShellId;
bool m_isRepeatIgnored; ///< for multi-selection, only repeat 1st selection
protected:
@@ -290,7 +290,7 @@ public:
class SwUndoInsLayFormat : public SwUndoFlyBase
{
sal_uLong mnCursorSaveIndexPara; // Cursor position
- sal_Int32 mnCursorSaveIndexPos; // for undo
+ sal_Int32 const mnCursorSaveIndexPos; // for undo
public:
SwUndoInsLayFormat( SwFrameFormat* pFormat, sal_uLong nNodeIdx, sal_Int32 nCntIdx );
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index e3e413420217..0b4e9c73e752 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -235,8 +235,8 @@ class SwChartDataSequence :
::comphelper::OInterfaceContainerHelper2 m_aModifyListeners;
css::chart2::data::DataSequenceRole m_aRole;
- OUString m_aRowLabelText;
- OUString m_aColLabelText;
+ OUString const m_aRowLabelText;
+ OUString const m_aColLabelText;
rtl::Reference<SwChartDataProvider> m_xDataProvider;
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index e4203d3a315d..a6d49603cf7e 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -150,7 +150,7 @@ private:
SwDocShell* pDocShell; // Only if used as chapter numbering.
SwNumRule* pNumRule;
const SfxItemPropertySet* m_pPropertySet;
- bool bOwnNumRuleCreated;
+ bool const bOwnNumRuleCreated;
protected:
virtual ~SwXNumberingRules() override;
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index c59ac8602a49..4d60d9614630 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -117,7 +117,7 @@ class SwXAutoStyles :
public cppu::WeakImplHelper< css::style::XAutoStyles >,
public SwUnoCollection
{
- SwDocShell *m_pDocShell;
+ SwDocShell * const m_pDocShell;
css::uno::Reference< css::style::XAutoStyleFamily > m_xAutoCharStyles;
css::uno::Reference< css::style::XAutoStyleFamily > m_xAutoRubyStyles;
css::uno::Reference< css::style::XAutoStyleFamily > m_xAutoParaStyles;
@@ -146,7 +146,7 @@ class SwXAutoStyleFamily : public cppu::WeakImplHelper< css::style::XAutoStyleFa
public SwClient
{
SwDocShell *m_pDocShell;
- IStyleAccess::SwAutoStyleFamily m_eFamily;
+ IStyleAccess::SwAutoStyleFamily const m_eFamily;
protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
@@ -192,9 +192,9 @@ class SwXAutoStyle : public cppu::WeakImplHelper
public SwClient
{
private:
- std::shared_ptr<SfxItemSet> mpSet;
- IStyleAccess::SwAutoStyleFamily meFamily;
- SwDoc& mrDoc;
+ std::shared_ptr<SfxItemSet> mpSet;
+ IStyleAccess::SwAutoStyleFamily const meFamily;
+ SwDoc& mrDoc;
/// @throws css::beans::UnknownPropertyException
/// @throws css::lang::WrappedTargetException
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 6bb104a168ca..66ca09b98038 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -545,7 +545,7 @@ class SwXOutlineTarget : public cppu::WeakImplHelper
>
{
const SfxItemPropertySet* pPropSet;
- OUString sOutlineText;
+ OUString const sOutlineText;
public:
SwXOutlineTarget(const OUString& rOutlineText);
@@ -597,8 +597,8 @@ public:
// After printing the view options are restored
class SwViewOptionAdjust_Impl
{
- SwViewShell * m_pShell;
- SwViewOption m_aOldViewOptions;
+ SwViewShell * m_pShell;
+ SwViewOption const m_aOldViewOptions;
public:
SwViewOptionAdjust_Impl( SwViewShell& rSh, const SwViewOption &rViewOptions );
~SwViewOptionAdjust_Impl();