summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-01-11 09:07:13 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-01-12 20:30:10 +0100
commite56a6707137c20c3626fc697a08548bd9951e85a (patch)
tree44fa0d1b2707a65643c172558d9fd057acde4ea7
parent32676270d194b68d7dd811511feb0903876b5c06 (diff)
sw: prefix members of SwLinePortion, SwPosSize, SwRepaint and SwTextMargin
See tdf#94879 for motivation. Change-Id: I83fc138714ad170fad0465b884d6297134a0d806 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109076 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/source/core/text/itrcrsr.cxx52
-rw-r--r--sw/source/core/text/itrtxt.hxx62
-rw-r--r--sw/source/core/text/porexp.cxx4
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/text/porfly.cxx12
-rw-r--r--sw/source/core/text/porlay.cxx30
-rw-r--r--sw/source/core/text/porlay.hxx14
-rw-r--r--sw/source/core/text/porlin.cxx6
-rw-r--r--sw/source/core/text/porlin.hxx106
-rw-r--r--sw/source/core/text/porrst.cxx8
-rw-r--r--sw/source/core/text/possiz.hxx34
-rw-r--r--sw/source/core/text/txttab.cxx2
12 files changed, 166 insertions, 166 deletions
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index a4e3dca7c1ec..327c178497e2 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -184,7 +184,7 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrame *pNewFrame, SwTextSizeInfo *p
if ( m_pFrame->IsRightToLeft() )
{
// this calculation is identical this the calculation for L2R layout - see below
- nLeft = m_pFrame->getFrameArea().Left() +
+ mnLeft = m_pFrame->getFrameArea().Left() +
m_pFrame->getFramePrintArea().Left() +
nLMWithNum -
pNode->GetLeftMarginWithNum() -
@@ -203,7 +203,7 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrame *pNewFrame, SwTextSizeInfo *p
!pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
{
// this calculation is identical this the calculation for R2L layout - see above
- nLeft = m_pFrame->getFrameArea().Left() +
+ mnLeft = m_pFrame->getFrameArea().Left() +
m_pFrame->getFramePrintArea().Left() +
nLMWithNum -
pNode->GetLeftMarginWithNum() -
@@ -215,28 +215,28 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrame *pNewFrame, SwTextSizeInfo *p
}
else
{
- nLeft = m_pFrame->getFrameArea().Left() +
+ mnLeft = m_pFrame->getFrameArea().Left() +
std::max( tools::Long( rSpace.GetTextLeft() + nLMWithNum ),
m_pFrame->getFramePrintArea().Left() );
}
}
- nRight = m_pFrame->getFrameArea().Left() + m_pFrame->getFramePrintArea().Left() + m_pFrame->getFramePrintArea().Width();
+ mnRight = m_pFrame->getFrameArea().Left() + m_pFrame->getFramePrintArea().Left() + m_pFrame->getFramePrintArea().Width();
- if( nLeft >= nRight &&
+ if( mnLeft >= mnRight &&
// #i53066# Omit adjustment of nLeft for numbered
// paras inside cells inside new documents:
( pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ||
!m_pFrame->IsInTab() ||
( !nLMWithNum && (!bLabelAlignmentActive || bListLevelIndentsApplicable) ) ) )
{
- nLeft = m_pFrame->getFramePrintArea().Left() + m_pFrame->getFrameArea().Left();
- if( nLeft >= nRight ) // e.g. with large paragraph indentations in slim table columns
- nRight = nLeft + 1; // einen goennen wir uns immer
+ mnLeft = m_pFrame->getFramePrintArea().Left() + m_pFrame->getFrameArea().Left();
+ if( mnLeft >= mnRight ) // e.g. with large paragraph indentations in slim table columns
+ mnRight = mnLeft + 1; // einen goennen wir uns immer
}
if( m_pFrame->IsFollow() && m_pFrame->GetOffset() )
- nFirst = nLeft;
+ mnFirst = mnLeft;
else
{
short nFLOfst = 0;
@@ -306,20 +306,20 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrame *pNewFrame, SwTextSizeInfo *p
!pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
{
if ( nFirstLineOfs < 0 && m_pFrame->IsInTab() &&
- nLeft == m_pFrame->getFramePrintArea().Left() + m_pFrame->getFrameArea().Left() &&
+ mnLeft == m_pFrame->getFramePrintArea().Left() + m_pFrame->getFrameArea().Left() &&
!m_pFrame->IsRightToLeft() &&
!bListLevelIndentsApplicableAndLabelAlignmentActive )
{
// tdf#130218 always show hanging indent in narrow table cells
// to avoid hiding the text content of the first line
- nLeft -= nFirstLineOfs;
+ mnLeft -= nFirstLineOfs;
}
- nFirst = nLeft + nFirstLineOfs;
+ mnFirst = mnLeft + nFirstLineOfs;
}
else
{
- nFirst = m_pFrame->getFrameArea().Left() +
+ mnFirst = m_pFrame->getFrameArea().Left() +
std::max( rSpace.GetTextLeft() + nLMWithNum+ nFirstLineOfs,
m_pFrame->getFramePrintArea().Left() );
}
@@ -328,21 +328,21 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrame *pNewFrame, SwTextSizeInfo *p
// value for the new list label position and space mode LABEL_ALIGNMENT
// and label alignment CENTER and RIGHT in L2R layout respectively
// label alignment LEFT and CENTER in R2L layout
- nFirst += m_pFrame->GetAdditionalFirstLineOffset();
+ mnFirst += m_pFrame->GetAdditionalFirstLineOffset();
- if( nFirst >= nRight )
- nFirst = nRight - 1;
+ if( mnFirst >= mnRight )
+ mnFirst = mnRight - 1;
}
const SvxAdjustItem& rAdjust = m_pFrame->GetTextNodeForParaProps()->GetSwAttrSet().GetAdjust();
- nAdjust = rAdjust.GetAdjust();
+ mnAdjust = rAdjust.GetAdjust();
// left is left and right is right
if ( m_pFrame->IsRightToLeft() )
{
- if ( SvxAdjust::Left == nAdjust )
- nAdjust = SvxAdjust::Right;
- else if ( SvxAdjust::Right == nAdjust )
- nAdjust = SvxAdjust::Left;
+ if ( SvxAdjust::Left == mnAdjust )
+ mnAdjust = SvxAdjust::Right;
+ else if ( SvxAdjust::Right == mnAdjust )
+ mnAdjust = SvxAdjust::Left;
}
m_bOneBlock = rAdjust.GetOneWord() == SvxAdjust::Block;
@@ -357,17 +357,17 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrame *pNewFrame, SwTextSizeInfo *p
void SwTextMargin::DropInit()
{
- nDropLeft = nDropLines = nDropHeight = nDropDescent = 0;
+ mnDropLeft = mnDropLines = mnDropHeight = mnDropDescent = 0;
const SwParaPortion *pPara = GetInfo().GetParaPortion();
if( pPara )
{
const SwDropPortion *pPorDrop = pPara->FindDropPortion();
if ( pPorDrop )
{
- nDropLeft = pPorDrop->GetDropLeft();
- nDropLines = pPorDrop->GetLines();
- nDropHeight = pPorDrop->GetDropHeight();
- nDropDescent = pPorDrop->GetDropDescent();
+ mnDropLeft = pPorDrop->GetDropLeft();
+ mnDropLines = pPorDrop->GetLines();
+ mnDropHeight = pPorDrop->GetDropHeight();
+ mnDropDescent = pPorDrop->GetDropDescent();
}
}
}
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index 52bbbe06fd4a..8090b23a60a8 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -141,32 +141,32 @@ public:
class SwTextMargin : public SwTextIter
{
private:
- SwTwips nLeft;
- SwTwips nRight;
- SwTwips nFirst;
- sal_uInt16 nDropLeft;
- sal_uInt16 nDropHeight;
- sal_uInt16 nDropDescent;
- sal_uInt16 nDropLines;
- SvxAdjust nAdjust;
+ SwTwips mnLeft;
+ SwTwips mnRight;
+ SwTwips mnFirst;
+ sal_uInt16 mnDropLeft;
+ sal_uInt16 mnDropHeight;
+ sal_uInt16 mnDropDescent;
+ sal_uInt16 mnDropLines;
+ SvxAdjust mnAdjust;
// #i91133#
SwTwips mnTabLeft;
protected:
// For FormatQuoVadis
- void Right( const SwTwips nNew ) { nRight = nNew; }
+ void Right( const SwTwips nNew ) { mnRight = nNew; }
void CtorInitTextMargin( SwTextFrame *pFrame, SwTextSizeInfo *pInf );
explicit SwTextMargin(SwTextNode const * pTextNode)
: SwTextIter(pTextNode)
- , nLeft(0)
- , nRight(0)
- , nFirst(0)
- , nDropLeft(0)
- , nDropHeight(0)
- , nDropDescent(0)
- , nDropLines(0)
- , nAdjust(SvxAdjust::Left)
+ , mnLeft(0)
+ , mnRight(0)
+ , mnFirst(0)
+ , mnDropLeft(0)
+ , mnDropHeight(0)
+ , mnDropDescent(0)
+ , mnDropLines(0)
+ , mnAdjust(SvxAdjust::Left)
, mnTabLeft(0)
{
}
@@ -178,8 +178,8 @@ public:
}
inline SwTwips GetLeftMargin() const;
inline SwTwips Left() const;
- SwTwips Right() const { return nRight; }
- SwTwips FirstLeft() const { return nFirst; }
+ SwTwips Right() const { return mnRight; }
+ SwTwips FirstLeft() const { return mnFirst; }
SwTwips CurrWidth() const { return m_pCurr->PrtWidth(); }
SwTwips GetLineStart() const;
SwTwips GetLineEnd() const { return GetLineStart() + CurrWidth(); }
@@ -187,11 +187,11 @@ public:
bool IsOneBlock() const { return m_bOneBlock; }
bool IsLastBlock() const { return m_bLastBlock; }
bool IsLastCenter() const { return m_bLastCenter; }
- SvxAdjust GetAdjust() const { return nAdjust; }
+ SvxAdjust GetAdjust() const { return mnAdjust; }
sal_uInt16 GetLineWidth() const
{ return sal_uInt16( Right() - GetLeftMargin() + 1 ); }
- SwTwips GetLeftMin() const { return std::min(nFirst, nLeft); }
- bool HasNegFirst() const { return nFirst < nLeft; }
+ SwTwips GetLeftMin() const { return std::min(mnFirst, mnLeft); }
+ bool HasNegFirst() const { return mnFirst < mnLeft; }
// #i91133#
SwTwips GetTabLeft() const
@@ -199,13 +199,13 @@ public:
return mnTabLeft;
}
// DropCaps
- sal_uInt16 GetDropLines() const { return nDropLines; }
- void SetDropLines( const sal_uInt16 nNew ) { nDropLines = nNew; }
- sal_uInt16 GetDropLeft() const { return nDropLeft; }
- sal_uInt16 GetDropHeight() const { return nDropHeight; }
- void SetDropHeight( const sal_uInt16 nNew ) { nDropHeight = nNew; }
- sal_uInt16 GetDropDescent() const { return nDropDescent; }
- void SetDropDescent( const sal_uInt16 nNew ) { nDropDescent = nNew; }
+ sal_uInt16 GetDropLines() const { return mnDropLines; }
+ void SetDropLines( const sal_uInt16 nNew ) { mnDropLines = nNew; }
+ sal_uInt16 GetDropLeft() const { return mnDropLeft; }
+ sal_uInt16 GetDropHeight() const { return mnDropHeight; }
+ void SetDropHeight( const sal_uInt16 nNew ) { mnDropHeight = nNew; }
+ sal_uInt16 GetDropDescent() const { return mnDropDescent; }
+ void SetDropDescent( const sal_uInt16 nNew ) { mnDropDescent = nNew; }
void DropInit();
// Returns the TextPos for start and end of the current line without whitespace
@@ -327,12 +327,12 @@ inline bool SwTextIter::SeekStartAndChg( SwTextSizeInfo &rInf, const bool bPara
inline SwTwips SwTextMargin::GetLeftMargin() const
{
- return IsFirstTextLine() ? nFirst : Left();
+ return IsFirstTextLine() ? mnFirst : Left();
}
inline SwTwips SwTextMargin::Left() const
{
- return (nDropLines >= m_nLineNr && 1 != m_nLineNr) ? nFirst + nDropLeft : nLeft;
+ return (mnDropLines >= m_nLineNr && 1 != m_nLineNr) ? mnFirst + mnDropLeft : mnLeft;
}
#endif
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index 0e79a2145e7b..7a72b94e669d 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -159,7 +159,7 @@ sal_uInt16 SwBlankPortion::MayUnderflow( const SwTextFormatInfo &rInf,
*/
void SwBlankPortion::FormatEOL( SwTextFormatInfo &rInf )
{
- sal_uInt16 nMay = MayUnderflow( rInf, rInf.GetIdx() - nLineLength, true );
+ sal_uInt16 nMay = MayUnderflow( rInf, rInf.GetIdx() - mnLineLength, true );
if( !nMay )
return;
@@ -213,7 +213,7 @@ void SwBlankPortion::HandlePortion( SwPortionHandler& rPH ) const
SwPostItsPortion::SwPostItsPortion( bool bScrpt )
: bScript( bScrpt )
{
- nLineLength = TextFrameIndex(1);
+ mnLineLength = TextFrameIndex(1);
SetWhichPor( PortionType::PostIts );
}
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 8688490ffe38..1d793dac0d2f 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -544,7 +544,7 @@ bool SwNumberPortion::Format( SwTextFormatInfo &rInf )
if( rInf.IsNumDone() )
{
// SetAscent( rInf.GetAscent() );
- OSL_ENSURE( Height() && nAscent, "NumberPortions without Height | Ascent" );
+ OSL_ENSURE( Height() && mnAscent, "NumberPortions without Height | Ascent" );
tools::Long nDiff( 0 );
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 24961c08b68d..8fcbb7ff4ae9 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -251,7 +251,7 @@ SwFlyCntPortion::SwFlyCntPortion()
: m_bMax(false)
, m_eAlign(sw::LineAlign::NONE)
{
- nLineLength = TextFrameIndex(1);
+ mnLineLength = TextFrameIndex(1);
SetWhichPor(PortionType::FlyCnt);
}
@@ -385,20 +385,20 @@ void SwFlyCntPortion::SetBase( const SwTextFrame& rFrame, const Point &rBase,
SwTwips nRelPos = aObjPositioning.GetRelPosY();
if ( nRelPos < 0 )
{
- nAscent = static_cast<sal_uInt16>(-nRelPos);
- if( nAscent > Height() )
- Height( nAscent );
+ mnAscent = static_cast<sal_uInt16>(-nRelPos);
+ if( mnAscent > Height() )
+ Height( mnAscent );
}
else
{
- nAscent = 0;
+ mnAscent = 0;
Height( Height() + static_cast<sal_uInt16>(nRelPos) );
}
}
else
{
Height( 1 );
- nAscent = 0;
+ mnAscent = 0;
}
}
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 7787f5c87f40..225fd2081c3c 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -402,8 +402,8 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
continue;
}
- TextFrameIndex const nPorSttIdx = rInf.GetLineStart() + nLineLength;
- nLineLength += pPos->GetLen();
+ TextFrameIndex const nPorSttIdx = rInf.GetLineStart() + mnLineLength;
+ mnLineLength += pPos->GetLen();
AddPrtWidth( pPos->Width() );
// #i3952#
@@ -453,7 +453,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
{
if (!pPos->IsPostItsPortion()) bOnlyPostIts = false;
- if( bTmpDummy && !nLineLength )
+ if( bTmpDummy && !mnLineLength )
{
if( pPos->IsFlyPortion() )
{
@@ -481,7 +481,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
nPosHeight = nTmp;
}
Height( nPosHeight, false );
- nAscent = nPosAscent;
+ mnAscent = nPosAscent;
nMaxDescent = nPosHeight - nPosAscent;
}
}
@@ -511,8 +511,8 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
}
else
{
- if( nAscent < nPosAscent )
- nAscent = nPosAscent;
+ if( mnAscent < nPosAscent )
+ mnAscent = nPosAscent;
if( nMaxDescent < nPosHeight - nPosAscent )
nMaxDescent = nPosHeight - nPosAscent;
}
@@ -545,32 +545,32 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
if( pFlyCnt->Height() == Height() )
{
pFlyCnt->SetMax( true );
- if( Height() > nMaxDescent + nAscent )
+ if( Height() > nMaxDescent + mnAscent )
{
if( sw::LineAlign::BOTTOM == pFlyCnt->GetAlign() )
- nAscent = Height() - nMaxDescent;
+ mnAscent = Height() - nMaxDescent;
else if( sw::LineAlign::CENTER == pFlyCnt->GetAlign() )
- nAscent = ( Height() + nAscent - nMaxDescent ) / 2;
+ mnAscent = ( Height() + mnAscent - nMaxDescent ) / 2;
}
- pFlyCnt->SetAscent( nAscent );
+ pFlyCnt->SetAscent( mnAscent );
}
}
if( bTmpDummy && nFlyHeight )
{
- nAscent = nFlyAscent;
+ mnAscent = nFlyAscent;
if( nFlyDescent > nFlyHeight - nFlyAscent )
Height( nFlyHeight + nFlyDescent, false );
else
Height( nFlyHeight, false );
}
- else if( nMaxDescent > Height() - nAscent )
- Height( nMaxDescent + nAscent, false );
+ else if( nMaxDescent > Height() - mnAscent )
+ Height( nMaxDescent + mnAscent, false );
if( bOnlyPostIts && !( bHasBlankPortion && bHasOnlyBlankPortions ) )
{
Height( rInf.GetFont()->GetHeight( rInf.GetVsh(), *rInf.GetOut() ) );
- nAscent = rInf.GetFont()->GetAscent( rInf.GetVsh(), *rInf.GetOut() );
+ mnAscent = rInf.GetFont()->GetAscent( rInf.GetVsh(), *rInf.GetOut() );
}
}
}
@@ -2463,7 +2463,7 @@ SwTwips SwLineLayout::GetHangingMargin_() const
}
// the last post its portion
else if ( pPor->IsPostItsPortion() && ! pPor->GetNextPortion() )
- nDiff = nAscent;
+ nDiff = mnAscent;
pPor = pPor->GetNextPortion();
}
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index e3f6f882eabb..0c91b53f1465 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -63,15 +63,15 @@ public:
// nRightOfst gives the right margin
class SwRepaint : public SwRect
{
- SwTwips nOfst;
- SwTwips nRightOfst;
+ SwTwips m_nOffset;
+ SwTwips m_nRightOffset;
public:
- SwRepaint() : SwRect(), nOfst( 0 ), nRightOfst( 0 ) {}
+ SwRepaint() : SwRect(), m_nOffset( 0 ), m_nRightOffset( 0 ) {}
- SwTwips GetOffset() const { return nOfst; }
- void SetOffset( const SwTwips nNew ) { nOfst = nNew; }
- SwTwips GetRightOfst() const { return nRightOfst; }
- void SetRightOfst( const SwTwips nNew ) { nRightOfst = nNew; }
+ SwTwips GetOffset() const { return m_nOffset; }
+ void SetOffset( const SwTwips nNew ) { m_nOffset = nNew; }
+ SwTwips GetRightOfst() const { return m_nRightOffset; }
+ void SetRightOfst( const SwTwips nNew ) { m_nRightOffset = nNew; }
};
/// Collection of SwLinePortion instances, representing one line of text.
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index b94d4b7896c9..035f670d464b 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -65,9 +65,9 @@ sal_uInt16 SwLinePortion::GetViewWidth( const SwTextSizeInfo & ) const
SwLinePortion::SwLinePortion( ) :
mpNextPortion( nullptr ),
- nLineLength( 0 ),
- nAscent( 0 ),
- nWhichPor( PortionType::NONE ),
+ mnLineLength( 0 ),
+ mnAscent( 0 ),
+ mnWhichPor( PortionType::NONE ),
m_bJoinBorderWithPrev(false),
m_bJoinBorderWithNext(false)
{
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 50b19ad0782c..a71c1112a99b 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -53,12 +53,12 @@ protected:
// Here we have areas with different attributes
SwLinePortion *mpNextPortion;
// Count of chars and spaces on the line
- TextFrameIndex nLineLength;
- sal_uInt16 nAscent; // Maximum ascender
+ TextFrameIndex mnLineLength;
+ sal_uInt16 mnAscent; // Maximum ascender
SwLinePortion();
private:
- PortionType nWhichPor; // Who's who?
+ PortionType mnWhichPor; // Who's who?
bool m_bJoinBorderWithPrev;
bool m_bJoinBorderWithNext;
@@ -71,12 +71,12 @@ public:
// Access methods
SwLinePortion *GetNextPortion() const { return mpNextPortion; }
inline SwLinePortion &operator=(const SwLinePortion &rPortion);
- TextFrameIndex GetLen() const { return nLineLength; }
- void SetLen(TextFrameIndex const nLen) { nLineLength = nLen; }
+ TextFrameIndex GetLen() const { return mnLineLength; }
+ void SetLen(TextFrameIndex const nLen) { mnLineLength = nLen; }
void SetNextPortion( SwLinePortion *pNew ){ mpNextPortion = pNew; }
- sal_uInt16 &GetAscent() { return nAscent; }
- sal_uInt16 GetAscent() const { return nAscent; }
- void SetAscent( const sal_uInt16 nNewAsc ) { nAscent = nNewAsc; }
+ sal_uInt16 &GetAscent() { return mnAscent; }
+ sal_uInt16 GetAscent() const { return mnAscent; }
+ void SetAscent( const sal_uInt16 nNewAsc ) { mnAscent = nNewAsc; }
void PrtWidth( sal_uInt16 nNewWidth ) { Width( nNewWidth ); }
sal_uInt16 PrtWidth() const { return Width(); }
void AddPrtWidth( const sal_uInt16 nNew ) { Width( Width() + nNew ); }
@@ -91,49 +91,49 @@ public:
// Returns 0, if there's no payload
virtual SwLinePortion *Compress();
- void SetWhichPor( const PortionType nNew ) { nWhichPor = nNew; }
- PortionType GetWhichPor( ) const { return nWhichPor; }
+ void SetWhichPor( const PortionType nNew ) { mnWhichPor = nNew; }
+ PortionType GetWhichPor( ) const { return mnWhichPor; }
// Group queries
- bool InTextGrp() const { return (sal_uInt16(nWhichPor) & PORGRP_TXT) != 0; }
- bool InGlueGrp() const { return (sal_uInt16(nWhichPor) & PORGRP_GLUE) != 0; }
- bool InTabGrp() const { return (sal_uInt16(nWhichPor) & PORGRP_TAB) != 0; }
- bool InHyphGrp() const { return (sal_uInt16(nWhichPor) & PORGRP_HYPH) != 0; }
- bool InNumberGrp() const { return (sal_uInt16(nWhichPor) & PORGRP_NUMBER) != 0; }
- bool InFixGrp() const { return (sal_uInt16(nWhichPor) & PORGRP_FIX) != 0; }
- bool InFieldGrp() const { return (sal_uInt16(nWhichPor) & PORGRP_FLD) != 0; }
- bool InToxRefGrp() const { return (sal_uInt16(nWhichPor) & PORGRP_TOXREF) != 0; }
- bool InToxRefOrFieldGrp() const { return (sal_uInt16(nWhichPor) & ( PORGRP_FLD | PORGRP_TOXREF )) != 0; }
- bool InExpGrp() const { return (sal_uInt16(nWhichPor) & PORGRP_EXP) != 0; }
- bool InFixMargGrp() const { return (sal_uInt16(nWhichPor) & PORGRP_FIXMARG) != 0; }
+ bool InTextGrp() const { return (sal_uInt16(mnWhichPor) & PORGRP_TXT) != 0; }
+ bool InGlueGrp() const { return (sal_uInt16(mnWhichPor) & PORGRP_GLUE) != 0; }
+ bool InTabGrp() const { return (sal_uInt16(mnWhichPor) & PORGRP_TAB) != 0; }
+ bool InHyphGrp() const { return (sal_uInt16(mnWhichPor) & PORGRP_HYPH) != 0; }
+ bool InNumberGrp() const { return (sal_uInt16(mnWhichPor) & PORGRP_NUMBER) != 0; }
+ bool InFixGrp() const { return (sal_uInt16(mnWhichPor) & PORGRP_FIX) != 0; }
+ bool InFieldGrp() const { return (sal_uInt16(mnWhichPor) & PORGRP_FLD) != 0; }
+ bool InToxRefGrp() const { return (sal_uInt16(mnWhichPor) & PORGRP_TOXREF) != 0; }
+ bool InToxRefOrFieldGrp() const { return (sal_uInt16(mnWhichPor) & ( PORGRP_FLD | PORGRP_TOXREF )) != 0; }
+ bool InExpGrp() const { return (sal_uInt16(mnWhichPor) & PORGRP_EXP) != 0; }
+ bool InFixMargGrp() const { return (sal_uInt16(mnWhichPor) & PORGRP_FIXMARG) != 0; }
bool InSpaceGrp() const { return InTextGrp() || IsMultiPortion(); }
// Individual queries
- bool IsGrfNumPortion() const { return nWhichPor == PortionType::GrfNum; }
- bool IsFlyCntPortion() const { return nWhichPor == PortionType::FlyCnt; }
- bool IsBlankPortion() const { return nWhichPor == PortionType::Blank; }
- bool IsBreakPortion() const { return nWhichPor == PortionType::Break; }
- bool IsErgoSumPortion() const { return nWhichPor == PortionType::ErgoSum; }
- bool IsQuoVadisPortion() const { return nWhichPor == PortionType::QuoVadis; }
- bool IsTabLeftPortion() const { return nWhichPor == PortionType::TabLeft; }
- bool IsTabRightPortion() const { return nWhichPor == PortionType::TabRight; }
- bool IsFootnoteNumPortion() const { return nWhichPor == PortionType::FootnoteNum; }
- bool IsFootnotePortion() const { return nWhichPor == PortionType::Footnote; }
- bool IsDropPortion() const { return nWhichPor == PortionType::Drop; }
- bool IsLayPortion() const { return nWhichPor == PortionType::Lay; }
- bool IsParaPortion() const { return nWhichPor == PortionType::Para; }
- bool IsMarginPortion() const { return nWhichPor == PortionType::Margin; }
- bool IsFlyPortion() const { return nWhichPor == PortionType::Fly; }
- bool IsHolePortion() const { return nWhichPor == PortionType::Hole; }
- bool IsSoftHyphPortion() const { return nWhichPor == PortionType::SoftHyphen; }
- bool IsPostItsPortion() const { return nWhichPor == PortionType::PostIts; }
- bool IsCombinedPortion() const { return nWhichPor == PortionType::Combined; }
- bool IsTextPortion() const { return nWhichPor == PortionType::Text; }
- bool IsHangingPortion() const { return nWhichPor == PortionType::Hanging; }
- bool IsKernPortion() const { return nWhichPor == PortionType::Kern; }
- bool IsArrowPortion() const { return nWhichPor == PortionType::Arrow; }
- bool IsMultiPortion() const { return nWhichPor == PortionType::Multi; }
- bool IsNumberPortion() const { return nWhichPor == PortionType::Number; } // #i23726#
- bool IsControlCharPortion() const { return nWhichPor == PortionType::ControlChar || nWhichPor == PortionType::Bookmark; }
+ bool IsGrfNumPortion() const { return mnWhichPor == PortionType::GrfNum; }
+ bool IsFlyCntPortion() const { return mnWhichPor == PortionType::FlyCnt; }
+ bool IsBlankPortion() const { return mnWhichPor == PortionType::Blank; }
+ bool IsBreakPortion() const { return mnWhichPor == PortionType::Break; }
+ bool IsErgoSumPortion() const { return mnWhichPor == PortionType::ErgoSum; }
+ bool IsQuoVadisPortion() const { return mnWhichPor == PortionType::QuoVadis; }
+ bool IsTabLeftPortion() const { return mnWhichPor == PortionType::TabLeft; }
+ bool IsTabRightPortion() const { return mnWhichPor == PortionType::TabRight; }
+ bool IsFootnoteNumPortion() const { return mnWhichPor == PortionType::FootnoteNum; }
+ bool IsFootnotePortion() const { return mnWhichPor == PortionType::Footnote; }
+ bool IsDropPortion() const { return mnWhichPor == PortionType::Drop; }
+ bool IsLayPortion() const { return mnWhichPor == PortionType::Lay; }
+ bool IsParaPortion() const { return mnWhichPor == PortionType::Para; }
+ bool IsMarginPortion() const { return mnWhichPor == PortionType::Margin; }
+ bool IsFlyPortion() const { return mnWhichPor == PortionType::Fly; }
+ bool IsHolePortion() const { return mnWhichPor == PortionType::Hole; }
+ bool IsSoftHyphPortion() const { return mnWhichPor == PortionType::SoftHyphen; }
+ bool IsPostItsPortion() const { return mnWhichPor == PortionType::PostIts; }
+ bool IsCombinedPortion() const { return mnWhichPor == PortionType::Combined; }
+ bool IsTextPortion() const { return mnWhichPor == PortionType::Text; }
+ bool IsHangingPortion() const { return mnWhichPor == PortionType::Hanging; }
+ bool IsKernPortion() const { return mnWhichPor == PortionType::Kern; }
+ bool IsArrowPortion() const { return mnWhichPor == PortionType::Arrow; }
+ bool IsMultiPortion() const { return mnWhichPor == PortionType::Multi; }
+ bool IsNumberPortion() const { return mnWhichPor == PortionType::Number; } // #i23726#
+ bool IsControlCharPortion() const { return mnWhichPor == PortionType::ControlChar || mnWhichPor == PortionType::Bookmark; }
// Positioning
SwLinePortion *FindPrevPortion( const SwLinePortion *pRoot );
@@ -174,9 +174,9 @@ public:
inline SwLinePortion &SwLinePortion::operator=(const SwLinePortion &rPortion)
{
*static_cast<SwPosSize*>(this) = rPortion;
- nLineLength = rPortion.nLineLength;
- nAscent = rPortion.nAscent;
- nWhichPor = rPortion.nWhichPor;
+ mnLineLength = rPortion.mnLineLength;
+ mnAscent = rPortion.mnAscent;
+ mnWhichPor = rPortion.mnWhichPor;
m_bJoinBorderWithPrev = rPortion.m_bJoinBorderWithPrev;
m_bJoinBorderWithNext = rPortion.m_bJoinBorderWithNext;
return *this;
@@ -185,9 +185,9 @@ inline SwLinePortion &SwLinePortion::operator=(const SwLinePortion &rPortion)
inline SwLinePortion::SwLinePortion(const SwLinePortion &rPortion) :
SwPosSize( rPortion ),
mpNextPortion( nullptr ),
- nLineLength( rPortion.nLineLength ),
- nAscent( rPortion.nAscent ),
- nWhichPor( rPortion.nWhichPor ),
+ mnLineLength( rPortion.mnLineLength ),
+ mnAscent( rPortion.mnAscent ),
+ mnWhichPor( rPortion.mnWhichPor ),
m_bJoinBorderWithPrev( rPortion.m_bJoinBorderWithPrev ),
m_bJoinBorderWithNext( rPortion.m_bJoinBorderWithNext )
{
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 6326a2e7c9df..fe94c2e9aa0b 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -96,7 +96,7 @@ void SwTmpEndPortion::Paint( const SwTextPaintInfo &rInf ) const
SwBreakPortion::SwBreakPortion( const SwLinePortion &rPortion )
: SwLinePortion( rPortion )
{
- nLineLength = TextFrameIndex(1);
+ mnLineLength = TextFrameIndex(1);
m_eRedline = RedlineType::None;
SetWhichPor( PortionType::Break );
}
@@ -173,7 +173,7 @@ SwKernPortion::SwKernPortion( SwLinePortion &rPortion, short nKrn,
{
Height( rPortion.Height() );
SetAscent( rPortion.GetAscent() );
- nLineLength = TextFrameIndex(0);
+ mnLineLength = TextFrameIndex(0);
SetWhichPor( PortionType::Kern );
if( nKern > 0 )
Width( nKern );
@@ -186,7 +186,7 @@ SwKernPortion::SwKernPortion( const SwLinePortion& rPortion ) :
Height( rPortion.Height() );
SetAscent( rPortion.GetAscent() );
- nLineLength = TextFrameIndex(0);
+ mnLineLength = TextFrameIndex(0);
SetWhichPor( PortionType::Kern );
}
@@ -236,7 +236,7 @@ SwArrowPortion::SwArrowPortion( const SwLinePortion &rPortion ) :
{
Height( rPortion.Height() );
SetAscent( rPortion.GetAscent() );
- nLineLength = TextFrameIndex(0);
+ mnLineLength = TextFrameIndex(0);
SetWhichPor( PortionType::Arrow );
}
diff --git a/sw/source/core/text/possiz.hxx b/sw/source/core/text/possiz.hxx
index 63782e4c91e8..42546305a801 100644
--- a/sw/source/core/text/possiz.hxx
+++ b/sw/source/core/text/possiz.hxx
@@ -25,17 +25,17 @@
// Compared to the SV sizes SwPosSize is always positive
class SwPosSize
{
- sal_uInt16 nWidth;
- sal_uInt16 nHeight;
+ sal_uInt16 m_nWidth;
+ sal_uInt16 m_nHeight;
public:
SwPosSize( const sal_uInt16 nW = 0, const sal_uInt16 nH = 0 )
- : nWidth(nW)
- , nHeight(nH)
+ : m_nWidth(nW)
+ , m_nHeight(nH)
{
}
explicit SwPosSize( const Size &rSize )
- : nWidth(sal_uInt16(rSize.Width()))
- ,nHeight(sal_uInt16(rSize.Height()))
+ : m_nWidth(sal_uInt16(rSize.Width()))
+ ,m_nHeight(sal_uInt16(rSize.Height()))
{
}
#if defined(__COVERITY__)
@@ -47,25 +47,25 @@ public:
SwPosSize(SwPosSize &&) = default;
SwPosSize & operator =(SwPosSize const &) = default;
SwPosSize & operator =(SwPosSize &&) = default;
- sal_uInt16 Height() const { return nHeight; }
- virtual void Height(const sal_uInt16 nNew, const bool = true) { nHeight = nNew; }
- sal_uInt16 Width() const { return nWidth; }
- void Width( const sal_uInt16 nNew ) { nWidth = nNew; }
- Size SvLSize() const { return Size( nWidth, nHeight ); }
+ sal_uInt16 Height() const { return m_nHeight; }
+ virtual void Height(const sal_uInt16 nNew, const bool = true) { m_nHeight = nNew; }
+ sal_uInt16 Width() const { return m_nWidth; }
+ void Width( const sal_uInt16 nNew ) { m_nWidth = nNew; }
+ Size SvLSize() const { return Size( m_nWidth, m_nHeight ); }
void SvLSize( const Size &rSize )
{
- nWidth = sal_uInt16(rSize.Width());
- nHeight = sal_uInt16(rSize.Height());
+ m_nWidth = sal_uInt16(rSize.Width());
+ m_nHeight = sal_uInt16(rSize.Height());
}
void SvXSize( const Size &rSize )
{
- nHeight = sal_uInt16(rSize.Width());
- nWidth = sal_uInt16(rSize.Height());
+ m_nHeight = sal_uInt16(rSize.Width());
+ m_nWidth = sal_uInt16(rSize.Height());
}
SwPosSize& operator=( const Size &rSize )
{
- nWidth = sal_uInt16(rSize.Width());
- nHeight = sal_uInt16(rSize.Height());
+ m_nWidth = sal_uInt16(rSize.Width());
+ m_nHeight = sal_uInt16(rSize.Height());
return *this;
}
};
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 3fde39337859..51cf0567ad81 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -292,7 +292,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto
SwTabPortion::SwTabPortion( const sal_uInt16 nTabPosition, const sal_Unicode cFillChar, const bool bAutoTab )
: SwFixPortion(), nTabPos(nTabPosition), cFill(cFillChar), bAutoTabStop( bAutoTab )
{
- nLineLength = TextFrameIndex(1);
+ mnLineLength = TextFrameIndex(1);
OSL_ENSURE(!IsFilled() || ' ' != cFill, "SwTabPortion::CTOR: blanks ?!");
SetWhichPor( PortionType::Table );
}