summaryrefslogtreecommitdiff
path: root/sw/source/core/text
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/source/core/text
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/source/core/text')
-rw-r--r--sw/source/core/text/atrhndl.hxx2
-rw-r--r--sw/source/core/text/itrtxt.hxx2
-rw-r--r--sw/source/core/text/pordrop.hxx4
-rw-r--r--sw/source/core/text/porexp.hxx4
-rw-r--r--sw/source/core/text/porfld.hxx4
-rw-r--r--sw/source/core/text/porftn.hxx2
-rw-r--r--sw/source/core/text/porhyph.hxx2
-rw-r--r--sw/source/core/text/pormulti.hxx2
-rw-r--r--sw/source/core/text/porrst.hxx12
-rw-r--r--sw/source/core/text/txtdrop.cxx8
-rw-r--r--sw/source/core/text/txtfly.cxx2
-rw-r--r--sw/source/core/text/xmldump.cxx2
12 files changed, 23 insertions, 23 deletions
diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index e6a08f422d1b..688b0aed12c5 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -45,7 +45,7 @@ private:
class SwAttrStack
{
private:
- SwTextAttr* m_pInitialArray[ INITIAL_NUM_ATTR ];
+ SwTextAttr* m_pInitialArray[ INITIAL_NUM_ATTR ];
SwTextAttr** m_pArray;
sal_uInt16 m_nCount; // number of elements on stack
sal_uInt16 m_nSize; // number of positions in Array
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index c61e759eb289..bdf6cd043042 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -302,7 +302,7 @@ class SwHookOut
{
SwTextSizeInfo* pInf;
VclPtr<OutputDevice> pOut;
- bool bOnWin;
+ bool const bOnWin;
public:
explicit SwHookOut( SwTextSizeInfo& rInfo );
~SwHookOut();
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index f2e20517261d..2001260768dd 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -35,7 +35,7 @@ class SwDropPortionPart
{
std::unique_ptr<SwDropPortionPart> pFollow;
std::unique_ptr<SwFont> pFnt;
- TextFrameIndex nLen;
+ TextFrameIndex const nLen;
sal_uInt16 nWidth;
bool m_bJoinBorderWithNext;
bool m_bJoinBorderWithPrev;
@@ -64,7 +64,7 @@ class SwDropPortion : public SwTextPortion
std::unique_ptr<SwDropPortionPart> pPart; // due to script/attribute changes
sal_uInt16 nLines; // Line count
sal_uInt16 nDropHeight; // Height
- sal_uInt16 nDropDescent; // Distance to the next line
+ sal_uInt16 const nDropDescent; // Distance to the next line
sal_uInt16 nDistance; // Distance to the text
sal_uInt16 nFix; // Fixed position
short nY; // Y Offset
diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx
index ad0448356495..3373cdfda8eb 100644
--- a/sw/source/core/text/porexp.hxx
+++ b/sw/source/core/text/porexp.hxx
@@ -39,7 +39,7 @@ public:
class SwBlankPortion : public SwExpandPortion
{
sal_Unicode cChar;
- bool bMulti; // For multiportion brackets
+ bool const bMulti; // For multiportion brackets
public:
SwBlankPortion( sal_Unicode cCh, bool bMult = false )
: cChar( cCh ), bMulti( bMult )
@@ -59,7 +59,7 @@ public:
class SwPostItsPortion : public SwExpandPortion
{
- bool bScript;
+ bool const bScript;
public:
explicit SwPostItsPortion( bool bScrpt );
virtual void Paint( const SwTextPaintInfo &rInf ) const override;
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index d014ec9a0bce..151404197cd9 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -121,8 +121,8 @@ class SwNumberPortion : public SwFieldPortion
{
protected:
sal_uInt16 nFixWidth; // See Glues
- sal_uInt16 nMinDist; // Minimal distance to the text
- bool mbLabelAlignmentPosAndSpaceModeActive;
+ sal_uInt16 const nMinDist; // Minimal distance to the text
+ bool const mbLabelAlignmentPosAndSpaceModeActive;
public:
SwNumberPortion( const OUString &rExpand,
diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx
index 7b0ae819dbe0..97b5275ed696 100644
--- a/sw/source/core/text/porftn.hxx
+++ b/sw/source/core/text/porftn.hxx
@@ -26,7 +26,7 @@ class SwTextFootnote;
class SwFootnotePortion : public SwFieldPortion
{
- SwTextFootnote *pFootnote;
+ SwTextFootnote * const pFootnote;
sal_uInt16 nOrigHeight;
// #i98418#
bool mbPreferredScriptTypeSet;
diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx
index 1df9b1ed6500..b00bddc1cf5d 100644
--- a/sw/source/core/text/porhyph.hxx
+++ b/sw/source/core/text/porhyph.hxx
@@ -37,7 +37,7 @@ public:
class SwHyphStrPortion : public SwHyphPortion
{
- OUString aExpand;
+ OUString const aExpand;
public:
explicit SwHyphStrPortion(const OUString &rStr)
: aExpand(rStr + "-")
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index f0ad72a7577c..7d3f0348a0cf 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -217,7 +217,7 @@ public:
class SwBidiPortion : public SwMultiPortion
{
- sal_uInt8 nLevel;
+ sal_uInt8 const nLevel;
public:
SwBidiPortion(TextFrameIndex nEnd, sal_uInt8 nLv);
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index cadd8f871b43..f90e7abdf5f6 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -50,9 +50,9 @@ public:
class SwKernPortion : public SwLinePortion
{
- short nKern;
- bool bBackground;
- bool bGridKern;
+ short const nKern;
+ bool const bBackground;
+ bool const bGridKern;
public:
@@ -75,7 +75,7 @@ public:
class SwArrowPortion : public SwLinePortion
{
Point aPos;
- bool bLeft;
+ bool const bLeft;
public:
explicit SwArrowPortion( const SwLinePortion &rPortion );
explicit SwArrowPortion( const SwTextPaintInfo &rInf );
@@ -91,7 +91,7 @@ public:
// The SwHangingPortion is the corresponding textportion to do that.
class SwHangingPortion : public SwTextPortion
{
- sal_uInt16 nInnerWidth;
+ sal_uInt16 const nInnerWidth;
public:
explicit SwHangingPortion( SwPosSize aSize ) : nInnerWidth( aSize.Width() )
{
@@ -122,7 +122,7 @@ class SwControlCharPortion : public SwLinePortion
private:
mutable sal_uInt16 mnViewWidth; // used to cache a calculated value
mutable sal_uInt16 mnHalfCharWidth; // used to cache a calculated value
- sal_Unicode mcChar;
+ sal_Unicode const mcChar;
public:
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 043f3eb5e376..a19d7086f5ac 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -68,10 +68,10 @@ static bool lcl_IsDropFlyInter( const SwTextFormatInfo &rInf,
class SwDropSave
{
SwTextPaintInfo* pInf;
- sal_Int32 nIdx;
- sal_Int32 nLen;
- long nX;
- long nY;
+ sal_Int32 const nIdx;
+ sal_Int32 const nLen;
+ long const nX;
+ long const nY;
public:
explicit SwDropSave( const SwTextPaintInfo &rInf );
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 62ba00132d7c..e42173f7ff9e 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -67,7 +67,7 @@ namespace
// #i68520#
struct AnchoredObjOrder
{
- bool mbR2L;
+ bool const mbR2L;
SwRectFn mfnRect;
AnchoredObjOrder( const bool bR2L,
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 7ad0a25fdf98..6dc0eb71971d 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -30,7 +30,7 @@
class XmlPortionDumper:public SwPortionHandler
{
private:
- xmlTextWriterPtr writer;
+ xmlTextWriterPtr const writer;
TextFrameIndex ofs;
const OUString& m_rText;
OUString m_aLine;