[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Nov 13 06:05:44 PST 2015
sw/source/core/text/frminf.cxx | 10 -
sw/source/core/text/itradj.cxx | 34 +--
sw/source/core/text/itrcrsr.cxx | 194 ++++++++++-----------
sw/source/core/text/itrform2.cxx | 350 +++++++++++++++++++--------------------
sw/source/core/text/itrpaint.cxx | 42 ++--
sw/source/core/text/itrtxt.cxx | 132 +++++++-------
sw/source/core/text/itrtxt.hxx | 120 ++++++-------
sw/source/core/text/pormulti.cxx | 76 ++++----
sw/source/core/text/txtdrop.cxx | 18 +-
sw/source/core/text/txtfld.cxx | 10 -
sw/source/core/text/txtftn.cxx | 108 ++++++------
sw/source/core/text/txthyph.cxx | 20 +-
sw/source/core/text/txttab.cxx | 46 ++---
13 files changed, 580 insertions(+), 580 deletions(-)
New commits:
commit ef7e9d5c8d64ec168927267067ffb4b2a539086d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Nov 13 14:47:58 2015 +0100
sw: prefix members of SwTextIter
Kendy says this helps his latest changes to the
bin/rename-sw-abbreviations.sh script.
Change-Id: I95d82c5e8d69360e82154fa0390a6b2d1b9bf5d4
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index b59345a..97ddfef 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -24,9 +24,9 @@
sal_Int32 SwTextMargin::GetTextStart() const
{
const OUString &rText = GetInfo().GetText();
- const sal_Int32 nEnd = nStart + pCurr->GetLen();
+ const sal_Int32 nEnd = m_nStart + m_pCurr->GetLen();
- for( sal_Int32 i = nStart; i < nEnd; ++i )
+ for( sal_Int32 i = m_nStart; i < nEnd; ++i )
{
const sal_Unicode aChar = rText[i];
if( CH_TAB != aChar && ' ' != aChar )
@@ -38,14 +38,14 @@ sal_Int32 SwTextMargin::GetTextStart() const
sal_Int32 SwTextMargin::GetTextEnd() const
{
const OUString &rText = GetInfo().GetText();
- const sal_Int32 nEnd = nStart + pCurr->GetLen();
- for( sal_Int32 i = nEnd - 1; i >= nStart; --i )
+ const sal_Int32 nEnd = m_nStart + m_pCurr->GetLen();
+ for( sal_Int32 i = nEnd - 1; i >= m_nStart; --i )
{
const sal_Unicode aChar = rText[i];
if( CH_TAB != aChar && CH_BREAK != aChar && ' ' != aChar )
return i + 1;
}
- return nStart;
+ return m_nStart;
}
// Does the paragraph fit into one line?
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 2d9cc7a..c0670bd 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -45,16 +45,16 @@ void SwTextAdjuster::FormatBlock( )
const SwLinePortion *pFly = nullptr;
bool bSkip = !IsLastBlock() &&
- nStart + pCurr->GetLen() >= GetInfo().GetText().getLength();
+ m_nStart + m_pCurr->GetLen() >= GetInfo().GetText().getLength();
// Multi-line fields are tricky, because we need to check whether there are
// any other text portions in the paragraph.
if( bSkip )
{
- const SwLineLayout *pLay = pCurr->GetNext();
+ const SwLineLayout *pLay = m_pCurr->GetNext();
while( pLay && !pLay->GetLen() )
{
- const SwLinePortion *pPor = pCurr->GetFirstPortion();
+ const SwLinePortion *pPor = m_pCurr->GetFirstPortion();
while( pPor && bSkip )
{
if( pPor->InTextGrp() )
@@ -70,8 +70,8 @@ void SwTextAdjuster::FormatBlock( )
if( !GetInfo().GetParaPortion()->HasFly() )
{
if( IsLastCenter() )
- CalcFlyAdjust( pCurr );
- pCurr->FinishSpaceAdd();
+ CalcFlyAdjust( m_pCurr );
+ m_pCurr->FinishSpaceAdd();
return;
}
else
@@ -79,7 +79,7 @@ void SwTextAdjuster::FormatBlock( )
const SwLinePortion *pTmpFly = nullptr;
// End at the last Fly
- const SwLinePortion *pPos = pCurr->GetFirstPortion();
+ const SwLinePortion *pPos = m_pCurr->GetFirstPortion();
while( pPos )
{
// Look for the last Fly which has text coming after it:
@@ -96,16 +96,16 @@ void SwTextAdjuster::FormatBlock( )
if( !pFly )
{
if( IsLastCenter() )
- CalcFlyAdjust( pCurr );
- pCurr->FinishSpaceAdd();
+ CalcFlyAdjust( m_pCurr );
+ m_pCurr->FinishSpaceAdd();
return;
}
}
}
const sal_Int32 nOldIdx = GetInfo().GetIdx();
- GetInfo().SetIdx( nStart );
- CalcNewBlock( pCurr, pFly );
+ GetInfo().SetIdx( m_nStart );
+ CalcNewBlock( m_pCurr, pFly );
GetInfo().SetIdx( nOldIdx );
GetInfo().GetParaPortion()->GetRepaint().SetOfst(0);
}
@@ -340,7 +340,7 @@ void SwTextAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
// all kashida positions are invalid
// do regular blank justification
pCurrent->FinishSpaceAdd();
- GetInfo().SetIdx( nStart );
+ GetInfo().SetIdx( m_nStart );
CalcNewBlock( pCurrent, pStopAt, nReal, true );
return;
}
@@ -358,7 +358,7 @@ void SwTextAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
// no kashidas left
// do regular blank justification
pCurrent->FinishSpaceAdd();
- GetInfo().SetIdx( nStart );
+ GetInfo().SetIdx( m_nStart );
CalcNewBlock( pCurrent, pStopAt, nReal, true );
return;
}
@@ -589,7 +589,7 @@ void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
sal_Int32 nLen = 0;
// If we only have one line, the text portion is consecutive and we center, then ...
- bool bComplete = 0 == nStart;
+ bool bComplete = 0 == m_nStart;
const bool bTabCompat = GetTextFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT);
bool bMultiTab = false;
@@ -685,7 +685,7 @@ SwFlyPortion *SwTextAdjuster::CalcFlyPortion( const long nRealWidth,
{
SwTextFly aTextFly( GetTextFrm() );
- const sal_uInt16 nCurrWidth = pCurr->PrtWidth();
+ const sal_uInt16 nCurrWidth = m_pCurr->PrtWidth();
SwFlyPortion *pFlyPortion = nullptr;
SwRect aLineVert( rCurrRect );
@@ -735,12 +735,12 @@ void SwTextAdjuster::CalcDropAdjust()
// 1) Skip dummies
Top();
- if( !pCurr->IsDummy() || NextLine() )
+ if( !m_pCurr->IsDummy() || NextLine() )
{
// Adjust first
GetAdjusted();
- SwLinePortion *pPor = pCurr->GetFirstPortion();
+ SwLinePortion *pPor = m_pCurr->GetFirstPortion();
// 2) Make sure we include the ropPortion
// 3) pLeft is the GluePor preceding the DropPor
@@ -770,7 +770,7 @@ void SwTextAdjuster::CalcDropAdjust()
// Adjust first
GetAdjusted();
- pPor = pCurr->GetFirstPortion();
+ pPor = m_pCurr->GetFirstPortion();
const SwMarginPortion *pMar = pPor->IsMarginPortion() ?
static_cast<SwMarginPortion*>(pPor) : nullptr;
if( !pMar )
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 35d7c51..2b2a425 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -162,15 +162,15 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI
{
CtorInitTextIter( pNewFrm, pNewInf );
- pInf = pNewInf;
+ m_pInf = pNewInf;
GetInfo().SetFont( GetFnt() );
- const SwTextNode *pNode = pFrm->GetTextNode();
+ const SwTextNode *pNode = m_pFrm->GetTextNode();
- const SvxLRSpaceItem &rSpace = pFrm->GetTextNode()->GetSwAttrSet().GetLRSpace();
+ const SvxLRSpaceItem &rSpace = m_pFrm->GetTextNode()->GetSwAttrSet().GetLRSpace();
// #i95907#
// #i111284#
const bool bListLevelIndentsApplicableAndLabelAlignmentActive(
- AreListLevelIndentsApplicableAndLabelAlignmentActive( *(pFrm->GetTextNode()) ) );
+ AreListLevelIndentsApplicableAndLabelAlignmentActive( *(m_pFrm->GetTextNode()) ) );
// Carefully adjust the text formatting ranges.
@@ -184,11 +184,11 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI
// Note: These values have already been used during calculation
// of the printing area of the paragraph.
const int nLMWithNum = pNode->GetLeftMarginWithNum( true );
- if ( pFrm->IsRightToLeft() )
+ if ( m_pFrm->IsRightToLeft() )
{
// this calculation is identical this the calculation for L2R layout - see below
- nLeft = pFrm->Frm().Left() +
- pFrm->Prt().Left() +
+ nLeft = m_pFrm->Frm().Left() +
+ m_pFrm->Prt().Left() +
nLMWithNum -
pNode->GetLeftMarginWithNum() -
// #i95907#
@@ -206,8 +206,8 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI
!pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
{
// this calculation is identical this the calculation for R2L layout - see above
- nLeft = pFrm->Frm().Left() +
- pFrm->Prt().Left() +
+ nLeft = m_pFrm->Frm().Left() +
+ m_pFrm->Prt().Left() +
nLMWithNum -
pNode->GetLeftMarginWithNum() -
// #i95907#
@@ -218,27 +218,27 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI
}
else
{
- nLeft = pFrm->Frm().Left() +
+ nLeft = m_pFrm->Frm().Left() +
std::max( long( rSpace.GetTextLeft() + nLMWithNum ),
- pFrm->Prt().Left() );
+ m_pFrm->Prt().Left() );
}
}
- nRight = pFrm->Frm().Left() + pFrm->Prt().Left() + pFrm->Prt().Width();
+ nRight = m_pFrm->Frm().Left() + m_pFrm->Prt().Left() + m_pFrm->Prt().Width();
if( nLeft >= nRight &&
// #i53066# Omit adjustment of nLeft for numbered
// paras inside cells inside new documents:
( pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ||
- !pFrm->IsInTab() ||
+ !m_pFrm->IsInTab() ||
!nLMWithNum ) )
{
- nLeft = pFrm->Prt().Left() + pFrm->Frm().Left();
+ nLeft = m_pFrm->Prt().Left() + m_pFrm->Frm().Left();
if( nLeft >= nRight ) // e.g. with large paragraph indentations in slim table columns
nRight = nLeft + 1; // einen goennen wir uns immer
}
- if( pFrm->IsFollow() && pFrm->GetOfst() )
+ if( m_pFrm->IsFollow() && m_pFrm->GetOfst() )
nFirst = nLeft;
else
{
@@ -252,7 +252,7 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI
if (aLang != LANGUAGE_KOREAN && aLang != LANGUAGE_JAPANESE)
nFirstLineOfs<<=1;
- const SvxLineSpacingItem *pSpace = aLineInf.GetLineSpacing();
+ const SvxLineSpacingItem *pSpace = m_aLineInf.GetLineSpacing();
if( pSpace )
{
switch( pSpace->GetLineSpaceRule() )
@@ -303,7 +303,7 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI
// #i95907#
// #i111284#
- if ( pFrm->IsRightToLeft() ||
+ if ( m_pFrm->IsRightToLeft() ||
bListLevelIndentsApplicableAndLabelAlignmentActive ||
!pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
{
@@ -311,25 +311,25 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI
}
else
{
- nFirst = pFrm->Frm().Left() +
+ nFirst = m_pFrm->Frm().Left() +
std::max( rSpace.GetTextLeft() + nLMWithNum+ nFirstLineOfs,
- pFrm->Prt().Left() );
+ m_pFrm->Prt().Left() );
}
// Note: <SwTextFrm::GetAdditionalFirstLineOffset()> returns a negative
// 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 += pFrm->GetAdditionalFirstLineOffset();
+ nFirst += m_pFrm->GetAdditionalFirstLineOffset();
if( nFirst >= nRight )
nFirst = nRight - 1;
}
- const SvxAdjustItem& rAdjust = pFrm->GetTextNode()->GetSwAttrSet().GetAdjust();
+ const SvxAdjustItem& rAdjust = m_pFrm->GetTextNode()->GetSwAttrSet().GetAdjust();
nAdjust = static_cast<sal_uInt16>(rAdjust.GetAdjust());
// left is left and right is right
- if ( pFrm->IsRightToLeft() )
+ if ( m_pFrm->IsRightToLeft() )
{
if ( SVX_ADJUST_LEFT == nAdjust )
nAdjust = SVX_ADJUST_RIGHT;
@@ -337,9 +337,9 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI
nAdjust = SVX_ADJUST_LEFT;
}
- bOneBlock = rAdjust.GetOneWord() == SVX_ADJUST_BLOCK;
- bLastBlock = rAdjust.GetLastBlock() == SVX_ADJUST_BLOCK;
- bLastCenter = rAdjust.GetLastBlock() == SVX_ADJUST_CENTER;
+ m_bOneBlock = rAdjust.GetOneWord() == SVX_ADJUST_BLOCK;
+ m_bLastBlock = rAdjust.GetLastBlock() == SVX_ADJUST_BLOCK;
+ m_bLastCenter = rAdjust.GetLastBlock() == SVX_ADJUST_CENTER;
// #i91133#
mnTabLeft = pNode->GetLeftMarginForTabCalculation();
@@ -377,7 +377,7 @@ SwTwips SwTextMargin::GetLineStart() const
{
SwTwips nRet = GetLeftMargin();
if( GetAdjust() != SVX_ADJUST_LEFT &&
- !pCurr->GetFirstPortion()->IsMarginPortion() )
+ !m_pCurr->GetFirstPortion()->IsMarginPortion() )
{
// If the first portion is a Margin, then the
// adjustment is expressed by the portions.
@@ -407,7 +407,7 @@ bool SwTextCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
// Somehow twisted: nOfst names the position behind the last
// character of the last line == This is the position in front of the first character
// of the line, in which we are situated:
- if( nOfst != GetStart() || !pCurr->GetLen() )
+ if( nOfst != GetStart() || !m_pCurr->GetLen() )
{
// 8810: Master line RightMargin, after that LeftMargin
const bool bRet = GetCharRect( pOrig, nOfst, pCMS, nMax );
@@ -423,7 +423,7 @@ bool SwTextCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
long nX = 0;
long nLast = 0;
- SwLinePortion *pPor = pCurr->GetFirstPortion();
+ SwLinePortion *pPor = m_pCurr->GetFirstPortion();
sal_uInt16 nTmpHeight, nTmpAscent;
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
@@ -475,7 +475,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwCrsrMoveState* pCMS )
{
const OUString aText = GetInfo().GetText();
- SwTextSizeInfo aInf( GetInfo(), &aText, nStart );
+ SwTextSizeInfo aInf( GetInfo(), &aText, m_nStart );
if( GetPropFont() )
aInf.GetFont()->SetProportion( GetPropFont() );
sal_uInt16 nTmpAscent, nTmpHeight; // Line height
@@ -494,7 +494,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
pCMS->m_pSpecialPos->nExtendRange );
bool bWidth = pCMS && pCMS->m_bRealWidth;
- if( !pCurr->GetLen() && !pCurr->Width() )
+ if( !m_pCurr->GetLen() && !m_pCurr->Width() )
{
if ( pCMS && pCMS->m_bRealHeight )
{
@@ -508,13 +508,13 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
sal_uInt16 nPorAscent = nTmpAscent;
SwTwips nX = 0;
SwTwips nTmpFirst = 0;
- SwLinePortion *pPor = pCurr->GetFirstPortion();
+ SwLinePortion *pPor = m_pCurr->GetFirstPortion();
SwBidiPortion* pLastBidiPor = nullptr;
SwTwips nLastBidiPorWidth = 0;
- std::deque<sal_uInt16>* pKanaComp = pCurr->GetpKanaComp();
+ std::deque<sal_uInt16>* pKanaComp = m_pCurr->GetpKanaComp();
sal_uInt16 nSpaceIdx = 0;
size_t nKanaIdx = 0;
- long nSpaceAdd = pCurr->IsSpaceAdd() ? pCurr->GetLLSpaceAdd( 0 ) : 0;
+ long nSpaceAdd = m_pCurr->IsSpaceAdd() ? m_pCurr->GetLLSpaceAdd( 0 ) : 0;
bool bNoText = true;
@@ -539,10 +539,10 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
}
if( pPor->IsMultiPortion() && static_cast<SwMultiPortion*>(pPor)->HasTabulator() )
{
- if ( pCurr->IsSpaceAdd() )
+ if ( m_pCurr->IsSpaceAdd() )
{
- if ( ++nSpaceIdx < pCurr->GetLLSpaceAddCount() )
- nSpaceAdd = pCurr->GetLLSpaceAdd( nSpaceIdx );
+ if ( ++nSpaceIdx < m_pCurr->GetLLSpaceAddCount() )
+ nSpaceAdd = m_pCurr->GetLLSpaceAdd( nSpaceIdx );
else
nSpaceAdd = 0;
}
@@ -557,10 +557,10 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
else
{
// fix margin portion => next SpaceAdd, KanaComp value
- if ( pCurr->IsSpaceAdd() )
+ if ( m_pCurr->IsSpaceAdd() )
{
- if ( ++nSpaceIdx < pCurr->GetLLSpaceAddCount() )
- nSpaceAdd = pCurr->GetLLSpaceAdd( nSpaceIdx );
+ if ( ++nSpaceIdx < m_pCurr->GetLLSpaceAddCount() )
+ nSpaceAdd = m_pCurr->GetLLSpaceAdd( nSpaceIdx );
else
nSpaceAdd = 0;
}
@@ -613,10 +613,10 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
if( pPor->InFixMargGrp() && ! pPor->IsMarginPortion() )
{
// update to current SpaceAdd, KanaComp values
- if ( pCurr->IsSpaceAdd() )
+ if ( m_pCurr->IsSpaceAdd() )
{
- if ( ++nSpaceIdx < pCurr->GetLLSpaceAddCount() )
- nSpaceAdd = pCurr->GetLLSpaceAdd( nSpaceIdx );
+ if ( ++nSpaceIdx < m_pCurr->GetLLSpaceAddCount() )
+ nSpaceAdd = m_pCurr->GetLLSpaceAdd( nSpaceIdx );
else
nSpaceAdd = 0;
}
@@ -634,10 +634,10 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
{
if ( static_cast<SwMultiPortion*>(pPor)->HasTabulator() )
{
- if ( pCurr->IsSpaceAdd() )
+ if ( m_pCurr->IsSpaceAdd() )
{
- if ( ++nSpaceIdx < pCurr->GetLLSpaceAddCount() )
- nSpaceAdd = pCurr->GetLLSpaceAdd( nSpaceIdx );
+ if ( ++nSpaceIdx < m_pCurr->GetLLSpaceAddCount() )
+ nSpaceAdd = m_pCurr->GetLLSpaceAdd( nSpaceIdx );
else
nSpaceAdd = 0;
}
@@ -666,7 +666,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
{
if( pPor->IsMultiPortion() )
{
- nTmpAscent = AdjustBaseLine( *pCurr, pPor );
+ nTmpAscent = AdjustBaseLine( *m_pCurr, pPor );
GetInfo().SetMulti( true );
pOrig->Pos().Y() += nTmpAscent - nPorAscent;
@@ -709,12 +709,12 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
// In a multi-portion we use GetCharRect()-function
// recursively and must add the x-position
// of the multi-portion.
- sal_Int32 nOldStart = nStart;
- SwTwips nOldY = nY;
+ sal_Int32 nOldStart = m_nStart;
+ SwTwips nOldY = m_nY;
sal_uInt8 nOldProp = GetPropFont();
- nStart = aInf.GetIdx();
- SwLineLayout* pOldCurr = pCurr;
- pCurr = &static_cast<SwMultiPortion*>(pPor)->GetRoot();
+ m_nStart = aInf.GetIdx();
+ SwLineLayout* pOldCurr = m_pCurr;
+ m_pCurr = &static_cast<SwMultiPortion*>(pPor)->GetRoot();
if( static_cast<SwMultiPortion*>(pPor)->IsDouble() )
SetPropFont( 50 );
@@ -724,7 +724,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
const sal_uInt16 nRubyHeight = bHasGrid ?
pGrid->GetRubyHeight() : 0;
- if( nStart + pCurr->GetLen() <= nOfst && GetNext() &&
+ if( m_nStart + m_pCurr->GetLen() <= nOfst && GetNext() &&
( ! static_cast<SwMultiPortion*>(pPor)->IsRuby() ||
static_cast<SwMultiPortion*>(pPor)->OnTop() ) )
{
@@ -743,22 +743,22 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
}
const bool bSpaceChg = static_cast<SwMultiPortion*>(pPor)->
- ChgSpaceAdd( pCurr, nSpaceAdd );
+ ChgSpaceAdd( m_pCurr, nSpaceAdd );
Point aOldPos = pOrig->Pos();
// Ok, for ruby portions in grid mode we have to
// temporarily set the inner line height to the
// outer line height because that value is needed
// for the adjustment inside the recursion
- const sal_uInt16 nOldRubyHeight = pCurr->Height();
- const sal_uInt16 nOldRubyRealHeight = pCurr->GetRealHeight();
+ const sal_uInt16 nOldRubyHeight = m_pCurr->Height();
+ const sal_uInt16 nOldRubyRealHeight = m_pCurr->GetRealHeight();
const bool bChgHeight =
static_cast<SwMultiPortion*>(pPor)->IsRuby() && bHasGrid;
if ( bChgHeight )
{
- pCurr->Height( pOldCurr->Height() - nRubyHeight );
- pCurr->SetRealHeight( pOldCurr->GetRealHeight() -
+ m_pCurr->Height( pOldCurr->Height() - nRubyHeight );
+ m_pCurr->SetRealHeight( pOldCurr->GetRealHeight() -
nRubyHeight );
}
@@ -773,8 +773,8 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
if ( bChgHeight )
{
- pCurr->Height( nOldRubyHeight );
- pCurr->SetRealHeight( nOldRubyRealHeight );
+ m_pCurr->Height( nOldRubyHeight );
+ m_pCurr->SetRealHeight( nOldRubyRealHeight );
}
// if we are still in the first row of
@@ -788,15 +788,15 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
nOldProp = 100;
GetInfo().GetFont()->SetProportion( 100 );
- if ( pCurr == &static_cast<SwMultiPortion*>(pPor)->GetRoot() )
+ if ( m_pCurr == &static_cast<SwMultiPortion*>(pPor)->GetRoot() )
{
GetInfo().SetFirstMulti( true );
// we want to treat a double line portion like a
// single line portion, if there is no text in
// the second line
- if ( !pCurr->GetNext() ||
- !pCurr->GetNext()->GetLen() )
+ if ( !m_pCurr->GetNext() ||
+ !m_pCurr->GetNext()->GetLen() )
GetInfo().SetMulti( false );
}
}
@@ -869,12 +869,12 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
}
if( bSpaceChg )
- SwDoubleLinePortion::ResetSpaceAdd( pCurr );
+ SwDoubleLinePortion::ResetSpaceAdd( m_pCurr );
- pCurr = pOldCurr;
- nStart = nOldStart;
- nY = nOldY;
- bPrev = false;
+ m_pCurr = pOldCurr;
+ m_nStart = nOldStart;
+ m_nY = nOldY;
+ m_bPrev = false;
return;
}
@@ -980,10 +980,10 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
{
if( pPor->InFixMargGrp() && ! pPor->IsMarginPortion() )
{
- if ( pCurr->IsSpaceAdd() )
+ if ( m_pCurr->IsSpaceAdd() )
{
- if ( ++nSpaceIdx < pCurr->GetLLSpaceAddCount() )
- nSpaceAdd = pCurr->GetLLSpaceAdd( nSpaceIdx );
+ if ( ++nSpaceIdx < m_pCurr->GetLLSpaceAddCount() )
+ nSpaceAdd = m_pCurr->GetLLSpaceAdd( nSpaceIdx );
else
nSpaceAdd = 0;
}
@@ -998,10 +998,10 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
if( pPor->IsMultiPortion() &&
static_cast<SwMultiPortion*>(pPor)->HasTabulator() )
{
- if ( pCurr->IsSpaceAdd() )
+ if ( m_pCurr->IsSpaceAdd() )
{
- if ( ++nSpaceIdx < pCurr->GetLLSpaceAddCount() )
- nSpaceAdd = pCurr->GetLLSpaceAdd( nSpaceIdx );
+ if ( ++nSpaceIdx < m_pCurr->GetLLSpaceAddCount() )
+ nSpaceAdd = m_pCurr->GetLLSpaceAdd( nSpaceIdx );
else
nSpaceAdd = 0;
}
@@ -1155,7 +1155,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
if ( pCMS && pCMS->m_bRealHeight )
{
- nTmpAscent = AdjustBaseLine( *pCurr, nullptr, nPorHeight, nPorAscent );
+ nTmpAscent = AdjustBaseLine( *m_pCurr, nullptr, nPorHeight, nPorAscent );
if ( nTmpAscent > nPorAscent )
pCMS->m_aRealHeight.X() = nTmpAscent - nPorAscent;
else
@@ -1290,23 +1290,23 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
// If there are attribute changes in the line, search for the paragraph,
// in which nX is situated.
- SwLinePortion *pPor = pCurr->GetFirstPortion();
- sal_Int32 nCurrStart = nStart;
+ SwLinePortion *pPor = m_pCurr->GetFirstPortion();
+ sal_Int32 nCurrStart = m_nStart;
bool bHolePortion = false;
bool bLastHyph = false;
- std::deque<sal_uInt16> *pKanaComp = pCurr->GetpKanaComp();
+ std::deque<sal_uInt16> *pKanaComp = m_pCurr->GetpKanaComp();
sal_Int32 nOldIdx = GetInfo().GetIdx();
sal_uInt16 nSpaceIdx = 0;
size_t nKanaIdx = 0;
- long nSpaceAdd = pCurr->IsSpaceAdd() ? pCurr->GetLLSpaceAdd( 0 ) : 0;
+ long nSpaceAdd = m_pCurr->IsSpaceAdd() ? m_pCurr->GetLLSpaceAdd( 0 ) : 0;
short nKanaComp = pKanaComp ? (*pKanaComp)[0] : 0;
// nWidth is the width of the line, or the width of
// the paragraph with the font change, in which nX is situated.
sal_uInt16 nWidth = pPor->Width();
- if ( pCurr->IsSpaceAdd() || pKanaComp )
+ if ( m_pCurr->IsSpaceAdd() || pKanaComp )
{
if ( pPor->InSpaceGrp() && nSpaceAdd )
{
@@ -1317,10 +1317,10 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
( pPor->IsMultiPortion() && static_cast<SwMultiPortion*>(pPor)->HasTabulator() )
)
{
- if ( pCurr->IsSpaceAdd() )
+ if ( m_pCurr->IsSpaceAdd() )
{
- if ( ++nSpaceIdx < pCurr->GetLLSpaceAddCount() )
- nSpaceAdd = pCurr->GetLLSpaceAdd( nSpaceIdx );
+ if ( ++nSpaceIdx < m_pCurr->GetLLSpaceAddCount() )
+ nSpaceAdd = m_pCurr->GetLLSpaceAdd( nSpaceIdx );
else
nSpaceAdd = 0;
}
@@ -1350,7 +1350,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
bHolePortion = pPor->IsHolePortion();
pPor = pPor->GetPortion();
nWidth = pPor->Width();
- if ( pCurr->IsSpaceAdd() || pKanaComp )
+ if ( m_pCurr->IsSpaceAdd() || pKanaComp )
{
if ( pPor->InSpaceGrp() && nSpaceAdd )
{
@@ -1362,10 +1362,10 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
( pPor->IsMultiPortion() && static_cast<SwMultiPortion*>(pPor)->HasTabulator() )
)
{
- if ( pCurr->IsSpaceAdd() )
+ if ( m_pCurr->IsSpaceAdd() )
{
- if ( ++nSpaceIdx < pCurr->GetLLSpaceAddCount() )
- nSpaceAdd = pCurr->GetLLSpaceAdd( nSpaceIdx );
+ if ( ++nSpaceIdx < m_pCurr->GetLLSpaceAddCount() )
+ nSpaceAdd = m_pCurr->GetLLSpaceAdd( nSpaceIdx );
else
nSpaceAdd = 0;
}
@@ -1528,7 +1528,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
}
// Skip space at the end of the line
- if( bLastPortion && (pCurr->GetNext() || pFrm->GetFollow() )
+ if( bLastPortion && (m_pCurr->GetNext() || m_pFrm->GetFollow() )
&& rText[nCurrStart + nLength - 1] == ' ' )
--nLength;
@@ -1538,12 +1538,12 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if( pPor->IsMultiPortion() )
{
// In a multi-portion we use GetCrsrOfst()-function recursively
- SwTwips nTmpY = rPoint.Y() - pCurr->GetAscent() + pPor->GetAscent();
+ SwTwips nTmpY = rPoint.Y() - m_pCurr->GetAscent() + pPor->GetAscent();
// if we are in the first line of a double line portion, we have
// to add a value to nTmpY for not staying in this line
// we also want to skip the first line, if we are inside ruby
- if ( ( static_cast<SwTextSizeInfo*>(pInf)->IsMulti() &&
- static_cast<SwTextSizeInfo*>(pInf)->IsFirstMulti() ) ||
+ if ( ( static_cast<SwTextSizeInfo*>(m_pInf)->IsMulti() &&
+ static_cast<SwTextSizeInfo*>(m_pInf)->IsFirstMulti() ) ||
( static_cast<SwMultiPortion*>(pPor)->IsRuby() &&
static_cast<SwMultiPortion*>(pPor)->OnTop() ) )
nTmpY += static_cast<SwMultiPortion*>(pPor)->Height();
@@ -1567,7 +1567,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if( static_cast<SwMultiPortion*>(pPor)->HasRotation() )
{
- nTmpY -= nY;
+ nTmpY -= m_nY;
if( !static_cast<SwMultiPortion*>(pPor)->IsRevers() )
nTmpY = pPor->Height() - nTmpY;
if( nTmpY < 0 )
@@ -1661,7 +1661,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
aDrawInf.SetSpace( nSpaceAdd );
aDrawInf.SetFont( aSizeInf.GetFont() );
- aDrawInf.SetFrm( pFrm );
+ aDrawInf.SetFrm( m_pFrm );
aDrawInf.SetSnapToGrid( aSizeInf.SnapToGrid() );
aDrawInf.SetPosMatchesBounds( pCMS && pCMS->m_bPosMatchesBounds );
@@ -1706,11 +1706,11 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
&& (pLower->IsTextFrm() || pLower->IsLayoutFrm());
Point aTmpPoint( rPoint );
- if ( pFrm->IsRightToLeft() )
- pFrm->SwitchLTRtoRTL( aTmpPoint );
+ if ( m_pFrm->IsRightToLeft() )
+ m_pFrm->SwitchLTRtoRTL( aTmpPoint );
- if ( pFrm->IsVertical() )
- pFrm->SwitchHorizontalToVertical( aTmpPoint );
+ if ( m_pFrm->IsVertical() )
+ m_pFrm->SwitchHorizontalToVertical( aTmpPoint );
if( bChgNodeInner && pTmp->Frm().IsInside( aTmpPoint ) &&
!( pTmp->IsProtected() ) )
@@ -1720,7 +1720,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
// After a change of the frame, our font must be still
// available for/in the OutputDevice.
// For comparison: Paint and new SwFlyCntPortion !
- static_cast<SwTextSizeInfo*>(pInf)->SelectFont();
+ static_cast<SwTextSizeInfo*>(m_pInf)->SelectFont();
// 6776: The pIter->GetCrsrOfst is returning here
// from a nesting with COMPLETE_STRING.
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 31f1400..5793444 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -90,7 +90,7 @@ inline void ClearFly( SwTextFormatInfo &rInf )
void SwTextFormatter::CtorInitTextFormatter( SwTextFrm *pNewFrm, SwTextFormatInfo *pNewInf )
{
CtorInitTextPainter( pNewFrm, pNewInf );
- pInf = pNewInf;
+ m_pInf = pNewInf;
pDropFormat = GetInfo().GetDropFormat();
pMulti = nullptr;
@@ -105,10 +105,10 @@ void SwTextFormatter::CtorInitTextFormatter( SwTextFrm *pNewFrm, SwTextFormatInf
m_nHintEndIndex = 0;
m_pFirstOfBorderMerge = nullptr;
- if( nStart > GetInfo().GetText().getLength() )
+ if( m_nStart > GetInfo().GetText().getLength() )
{
OSL_ENSURE( false, "+SwTextFormatter::CTOR: bad offset" );
- nStart = GetInfo().GetText().getLength();
+ m_nStart = GetInfo().GetText().getLength();
}
}
@@ -127,13 +127,13 @@ SwTextFormatter::~SwTextFormatter()
void SwTextFormatter::Insert( SwLineLayout *pLay )
{
// Insert BEHIND the current element
- if ( pCurr )
+ if ( m_pCurr )
{
- pLay->SetNext( pCurr->GetNext() );
- pCurr->SetNext( pLay );
+ pLay->SetNext( m_pCurr->GetNext() );
+ m_pCurr->SetNext( pLay );
}
else
- pCurr = pLay;
+ m_pCurr = pLay;
}
sal_uInt16 SwTextFormatter::GetFrmRstHeight() const
@@ -143,12 +143,12 @@ sal_uInt16 SwTextFormatter::GetFrmRstHeight() const
// GetFrmRstHeight() is being called with Footnote.
// Wrong: const SwFrm *pUpper = pFrm->GetUpper();
- const SwFrm *pPage = static_cast<const SwFrm*>(pFrm->FindPageFrm());
+ const SwFrm *pPage = static_cast<const SwFrm*>(m_pFrm->FindPageFrm());
const SwTwips nHeight = pPage->Frm().Top()
+ pPage->Prt().Top()
+ pPage->Prt().Height() - Y();
if( 0 > nHeight )
- return pCurr->Height();
+ return m_pCurr->Height();
else
return sal_uInt16( nHeight );
}
@@ -173,7 +173,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
rInf.SetFly( nullptr );
FeedInf( rInf );
- rInf.SetLast( pCurr );
+ rInf.SetLast( m_pCurr );
// pUnderflow does not need to be deleted, because it will drown in the following
// Truncate()
rInf.SetUnderflow(nullptr);
@@ -182,7 +182,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
rInf.SetPaintOfst( GetLeftMargin() );
// We look for the portion with the under-flow position
- SwLinePortion *pPor = pCurr->GetFirstPortion();
+ SwLinePortion *pPor = m_pCurr->GetFirstPortion();
if( pPor != pUnderflow )
{
// pPrev will be the last portion before pUnderflow,
@@ -274,17 +274,17 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
// The SwLineLayout is an exception to this, which splits at the first
// portion change.
// Here only the other way around:
- if( rInf.GetLast() == pCurr )
+ if( rInf.GetLast() == m_pCurr )
{
if( pPor->InTextGrp() && !pPor->InExpGrp() )
{
- const sal_uInt16 nOldWhich = pCurr->GetWhichPor();
- *static_cast<SwLinePortion*>(pCurr) = *pPor;
- pCurr->SetPortion( pPor->GetPortion() );
- pCurr->SetWhichPor( nOldWhich );
+ const sal_uInt16 nOldWhich = m_pCurr->GetWhichPor();
+ *static_cast<SwLinePortion*>(m_pCurr) = *pPor;
+ m_pCurr->SetPortion( pPor->GetPortion() );
+ m_pCurr->SetWhichPor( nOldWhich );
pPor->SetPortion( nullptr );
delete pPor;
- pPor = pCurr;
+ pPor = m_pCurr;
}
}
pPor->Truncate();
@@ -305,11 +305,11 @@ void SwTextFormatter::InsertPortion( SwTextFormatInfo &rInf,
{
// The new portion is inserted, but everything's different for
// LineLayout...
- if( pPor == pCurr )
+ if( pPor == m_pCurr )
{
- if ( pCurr->GetPortion() )
+ if ( m_pCurr->GetPortion() )
{
- pPor = pCurr->GetPortion();
+ pPor = m_pCurr->GetPortion();
}
// #i112181#
@@ -329,10 +329,10 @@ void SwTextFormatter::InsertPortion( SwTextFormatInfo &rInf,
rInf.SetOtherThanFootnoteInside( rInf.IsOtherThanFootnoteInside() || !pPor->IsFootnotePortion() );
// Adjust maxima
- if( pCurr->Height() < pPor->Height() )
- pCurr->Height( pPor->Height() );
- if( pCurr->GetAscent() < pPor->GetAscent() )
- pCurr->SetAscent( pPor->GetAscent() );
+ if( m_pCurr->Height() < pPor->Height() )
+ m_pCurr->Height( pPor->Height() );
+ if( m_pCurr->GetAscent() < pPor->GetAscent() )
+ m_pCurr->SetAscent( pPor->GetAscent() );
}
// Sometimes chains are constructed (e.g. by hyphenate)
@@ -355,13 +355,13 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
// First NewTextPortion() decides whether pCurr ends up in pPor.
// We need to make sure that the font is being set in any case.
// This is done automatically in CalcAscent.
- rInf.SetLast( pCurr );
+ rInf.SetLast( m_pCurr );
rInf.ForcedLeftMargin( 0 );
- OSL_ENSURE( pCurr->FindLastPortion() == pCurr, "pLast supposed to equal pCurr" );
+ OSL_ENSURE( m_pCurr->FindLastPortion() == m_pCurr, "pLast supposed to equal pCurr" );
- if( !pCurr->GetAscent() && !pCurr->Height() )
- CalcAscent( rInf, pCurr );
+ if( !m_pCurr->GetAscent() && !m_pCurr->Height() )
+ CalcAscent( rInf, m_pCurr );
SeekAndChg( rInf );
@@ -380,7 +380,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
SwLinePortion *pPor = NewPortion( rInf );
// Asian grid stuff
- SwTextGridItem const*const pGrid(GetGridItem(pFrm->FindPageFrm()));
+ SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm()));
const bool bHasGrid = pGrid && rInf.SnapToGrid() &&
GRID_LINES_CHARS == pGrid->GetGridType();
@@ -487,11 +487,11 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
if ( ! pGridKernPortion )
pGridKernPortion = pPor->IsKernPortion() ?
static_cast<SwKernPortion*>(pPor) :
- new SwKernPortion( *pCurr );
+ new SwKernPortion( *m_pCurr );
// if we have a new GridKernPortion, we initially calculate
// its size so that its ends on the grid
- const SwPageFrm* pPageFrm = pFrm->FindPageFrm();
+ const SwPageFrm* pPageFrm = m_pFrm->FindPageFrm();
const SwLayoutFrm* pBody = pPageFrm->FindBodyCont();
SWRECTFN( pPageFrm )
@@ -503,7 +503,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
if ( bVert )
{
Point aPoint( nStartX, 0 );
- pFrm->SwitchHorizontalToVertical( aPoint );
+ m_pFrm->SwitchHorizontalToVertical( aPoint );
nStartX = aPoint.Y();
}
@@ -542,7 +542,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
nUnderLineStart = GetLeftMargin() + rInf.X();
if ( pPor->IsFlyPortion() )
- pCurr->SetFly( true );
+ m_pCurr->SetFly( true );
// some special cases, where we have to take care for the repaint
// offset:
// 1. Underlined portions due to special underline feature
@@ -701,8 +701,8 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
else if( rInf.GetLast() && rInf.LastKernPortion() )
rInf.GetLast()->FormatEOL( rInf );
}
- if( pCurr->GetPortion() && pCurr->GetPortion()->InNumberGrp()
- && static_cast<SwNumberPortion*>(pCurr->GetPortion())->IsHide() )
+ if( m_pCurr->GetPortion() && m_pCurr->GetPortion()->InNumberGrp()
+ && static_cast<SwNumberPortion*>(m_pCurr->GetPortion())->IsHide() )
rInf.SetNumDone( false );
// Delete fly in any case
@@ -767,8 +767,8 @@ void SwTextFormatter::CalcAscent( SwTextFormatInfo &rInf, SwLinePortion *pPor )
if( !rInf.GetText().isEmpty() )
{
if ( pPor->GetLen() || !rInf.GetIdx()
- || ( pCurr != pLast && !pLast->IsFlyPortion() )
- || !pCurr->IsRest() ) // instead of !rInf.GetRest()
+ || ( m_pCurr != pLast && !pLast->IsFlyPortion() )
+ || !m_pCurr->IsRest() ) // instead of !rInf.GetRest()
bChg = SeekAndChg( rInf );
else
bChg = SeekAndChgBefore( rInf );
@@ -909,8 +909,8 @@ SwTextPortion *SwTextFormatter::WhichTextPor( SwTextFormatInfo &rInf ) const
}
if( !pPor )
{
- if( !rInf.X() && !pCurr->GetPortion() && !pCurr->GetLen() && !GetFnt()->IsURL() )
- pPor = pCurr;
+ if( !rInf.X() && !m_pCurr->GetPortion() && !m_pCurr->GetLen() && !GetFnt()->IsURL() )
+ pPor = m_pCurr;
else
{
pPor = new SwTextPortion;
@@ -1017,7 +1017,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
rInf.SetNumDone(true);
rInf.SetRest(nullptr);
- pCurr->SetRest( true );
+ m_pCurr->SetRest( true );
return pPor;
}
@@ -1030,7 +1030,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
// 1. The ErgoSumTexts
if( !rInf.IsErgoDone() )
{
- if( pFrm->IsInFootnote() && !pFrm->GetIndPrev() )
+ if( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() )
pPor = static_cast<SwLinePortion*>(NewErgoSumPortion( rInf ));
rInf.SetErgoDone( true );
}
@@ -1038,19 +1038,19 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
// 2. Arrow portions
if( !pPor && !rInf.IsArrowDone() )
{
- if( pFrm->GetOfst() && !pFrm->IsFollow() &&
- rInf.GetIdx() == pFrm->GetOfst() )
- pPor = new SwArrowPortion( *pCurr );
+ if( m_pFrm->GetOfst() && !m_pFrm->IsFollow() &&
+ rInf.GetIdx() == m_pFrm->GetOfst() )
+ pPor = new SwArrowPortion( *m_pCurr );
rInf.SetArrowDone( true );
}
// 3. Kerning portions at beginning of line in grid mode
- if ( ! pPor && ! pCurr->GetPortion() )
+ if ( ! pPor && ! m_pCurr->GetPortion() )
{
SwTextGridItem const*const pGrid(
GetGridItem(GetTextFrm()->FindPageFrm()));
if ( pGrid )
- pPor = new SwKernPortion( *pCurr );
+ pPor = new SwKernPortion( *m_pCurr );
}
// 4. The line rests (multiline fields)
@@ -1060,7 +1060,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
// Only for pPor of course
if( pPor )
{
- pCurr->SetRest( true );
+ m_pCurr->SetRest( true );
rInf.SetRest(nullptr);
}
}
@@ -1073,7 +1073,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
OSL_ENSURE( ( ! rInf.IsMulti() && ! pMulti ) || pMulti->HasRotation(),
"Rotated number portion trouble" );
- const bool bFootnoteNum = pFrm->IsFootnoteNumFrm();
+ const bool bFootnoteNum = m_pFrm->IsFootnoteNumFrm();
rInf.GetParaPortion()->SetFootnoteNum( bFootnoteNum );
if( bFootnoteNum )
pPor = static_cast<SwLinePortion*>(NewFootnoteNumPortion( rInf ));
@@ -1084,7 +1084,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
// it's crucial whether the SwFootnoteFrm is aFollow
if( !rInf.IsErgoDone() && !pPor && ! rInf.IsMulti() )
{
- if( pFrm->IsInFootnote() && !pFrm->GetIndPrev() )
+ if( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() )
pPor = static_cast<SwLinePortion*>(NewErgoSumPortion( rInf ));
rInf.SetErgoDone( true );
}
@@ -1105,17 +1105,17 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
pPor = static_cast<SwLinePortion*>(NewDropPortion( rInf ));
// 9. Kerning portions at beginning of line in grid mode
- if ( !pPor && !pCurr->GetPortion() )
+ if ( !pPor && !m_pCurr->GetPortion() )
{
SwTextGridItem const*const pGrid(
GetGridItem(GetTextFrm()->FindPageFrm()));
if ( pGrid )
- pPor = new SwKernPortion( *pCurr );
+ pPor = new SwKernPortion( *m_pCurr );
}
}
// 10. Decimal tab portion at the beginning of each line in table cells
- if ( !pPor && !pCurr->GetPortion() &&
+ if ( !pPor && !m_pCurr->GetPortion() &&
GetTextFrm()->IsInTab() &&
GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) )
{
@@ -1174,7 +1174,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
{
// LineBreaks and Flys (bug05.sdw)
// IsDummy()
- if( rInf.IsNewLine() && (!rInf.GetFly() || !pCurr->IsDummy()) )
+ if( rInf.IsNewLine() && (!rInf.GetFly() || !m_pCurr->IsDummy()) )
return nullptr;
// Wenn der Text an den Fly gestossen ist, oder wenn
@@ -1458,11 +1458,11 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
// Man darf nicht vergessen, dass pCurr als GetLast() vernuenftige
// Werte bereithalten muss:
- if( !pCurr->Height() )
+ if( !m_pCurr->Height() )
{
- OSL_ENSURE( pCurr->Height(), "SwTextFormatter::NewPortion: limbo dance" );
- pCurr->Height( pPor->Height() );
- pCurr->SetAscent( pPor->GetAscent() );
+ OSL_ENSURE( m_pCurr->Height(), "SwTextFormatter::NewPortion: limbo dance" );
+ m_pCurr->Height( pPor->Height() );
+ m_pCurr->SetAscent( pPor->GetAscent() );
}
OSL_ENSURE( !pPor || pPor->Height(),
@@ -1477,7 +1477,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
{
- OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
+ OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(),
"SwTextFormatter::FormatLine( nStartPos ) with unswapped frame" );
// For the formatting routines, we set pOut to the reference device.
@@ -1492,11 +1492,11 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
// Recycling muss bei geaenderter Zeilenhoehe unterdrueckt werden
// und auch bei geaendertem Ascent (Absenken der Grundlinie).
- const sal_uInt16 nOldHeight = pCurr->Height();
- const sal_uInt16 nOldAscent = pCurr->GetAscent();
+ const sal_uInt16 nOldHeight = m_pCurr->Height();
+ const sal_uInt16 nOldAscent = m_pCurr->GetAscent();
- pCurr->SetEndHyph( false );
- pCurr->SetMidHyph( false );
+ m_pCurr->SetEndHyph( false );
+ m_pCurr->SetMidHyph( false );
// fly positioning can make it necessary format a line several times
// for this, we have to keep a copy of our rest portion
@@ -1509,13 +1509,13 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
// for an optimal repaint rectangle, we want to compare fly portions
// before and after the BuildPortions call
const bool bOptimizeRepaint = AllowRepaintOpt();
- const sal_Int32 nOldLineEnd = nStartPos + pCurr->GetLen();
+ const sal_Int32 nOldLineEnd = nStartPos + m_pCurr->GetLen();
std::vector<long> flyStarts;
// these are the conditions for a fly position comparison
- if ( bOptimizeRepaint && pCurr->IsFly() )
+ if ( bOptimizeRepaint && m_pCurr->IsFly() )
{
- SwLinePortion* pPor = pCurr->GetFirstPortion();
+ SwLinePortion* pPor = m_pCurr->GetFirstPortion();
long nPOfst = 0;
while ( pPor )
{
@@ -1551,11 +1551,11 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
if( GetInfo().IsStop() )
{
- pCurr->SetLen( 0 );
- pCurr->Height( GetFrmRstHeight() + 1 );
- pCurr->SetRealHeight( GetFrmRstHeight() + 1 );
- pCurr->Width(0);
- pCurr->Truncate();
+ m_pCurr->SetLen( 0 );
+ m_pCurr->Height( GetFrmRstHeight() + 1 );
+ m_pCurr->SetRealHeight( GetFrmRstHeight() + 1 );
+ m_pCurr->Width(0);
+ m_pCurr->Truncate();
return nStartPos;
}
else if( GetInfo().IsDropInit() )
@@ -1564,32 +1564,32 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
GetInfo().SetDropInit( false );
}
- pCurr->CalcLine( *this, GetInfo() );
+ m_pCurr->CalcLine( *this, GetInfo() );
CalcRealHeight( GetInfo().IsNewLine() );
//#i120864# For Special case that at the first calculation couldn't get
//correct height. And need to recalculate for the right height.
- SwLinePortion* pPorTmp = pCurr->GetPortion();
+ SwLinePortion* pPorTmp = m_pCurr->GetPortion();
if ( IsFlyInCntBase() && (!IsQuick() || (pPorTmp && pPorTmp->IsFlyCntPortion() && !pPorTmp->GetPortion() &&
- pCurr->Height() > pPorTmp->Height())))
+ m_pCurr->Height() > pPorTmp->Height())))
{
sal_uInt16 nTmpAscent, nTmpHeight;
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
AlignFlyInCntBase( Y() + long( nTmpAscent ) );
- pCurr->CalcLine( *this, GetInfo() );
+ m_pCurr->CalcLine( *this, GetInfo() );
CalcRealHeight();
}
// bBuild entscheidet, ob noch eine Ehrenrunde gedreht wird
- if ( pCurr->GetRealHeight() <= GetInfo().GetLineHeight() )
+ if ( m_pCurr->GetRealHeight() <= GetInfo().GetLineHeight() )
{
- pCurr->SetRealHeight( GetInfo().GetLineHeight() );
+ m_pCurr->SetRealHeight( GetInfo().GetLineHeight() );
bBuild = false;
}
else
{
bBuild = ( GetInfo().GetTextFly().IsOn() && ChkFlyUnderflow(GetInfo()) )
- || GetInfo().CheckFootnotePortion(pCurr);
+ || GetInfo().CheckFootnotePortion(m_pCurr);
if( bBuild )
{
GetInfo().SetNumDone( bOldNumDone );
@@ -1606,9 +1606,9 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
if ( xSaveField )
GetInfo().SetRest( new SwFieldPortion( *xSaveField ) );
- pCurr->SetLen( 0 );
- pCurr->Width(0);
- pCurr->Truncate();
+ m_pCurr->SetLen( 0 );
+ m_pCurr->Width(0);
+ m_pCurr->Truncate();
}
}
}
@@ -1619,7 +1619,7 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
if (GetInfo().GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN))
{
sal_uInt16 nSum = 0;
- SwLinePortion* pPor = pCurr->GetFirstPortion();
+ SwLinePortion* pPor = m_pCurr->GetFirstPortion();
while (pPor)
{
@@ -1627,14 +1627,14 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
pPor = pPor->GetPortion();
}
- if (nSum > pCurr->Width())
- pCurr->Width(nSum);
+ if (nSum > m_pCurr->Width())
+ m_pCurr->Width(nSum);
}
// calculate optimal repaint rectangle
if ( bOptimizeRepaint )
{
- GetInfo().SetPaintOfst( ::lcl_CalcOptRepaint( *this, *pCurr, nOldLineEnd, flyStarts ) );
+ GetInfo().SetPaintOfst( ::lcl_CalcOptRepaint( *this, *m_pCurr, nOldLineEnd, flyStarts ) );
flyStarts.clear();
}
else
@@ -1651,21 +1651,21 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
// delete master copy of rest portion
xSaveField.reset();
- sal_Int32 nNewStart = nStartPos + pCurr->GetLen();
+ sal_Int32 nNewStart = nStartPos + m_pCurr->GetLen();
// adjust text if kana compression is enabled
if ( GetInfo().CompressLine() )
{
- SwTwips nRepaintOfst = CalcKanaAdj( pCurr );
+ SwTwips nRepaintOfst = CalcKanaAdj( m_pCurr );
// adjust repaint offset
if ( nRepaintOfst < GetInfo().GetPaintOfst() )
GetInfo().SetPaintOfst( nRepaintOfst );
}
- CalcAdjustLine( pCurr );
+ CalcAdjustLine( m_pCurr );
- if( nOldHeight != pCurr->Height() || nOldAscent != pCurr->GetAscent() )
+ if( nOldHeight != m_pCurr->Height() || nOldAscent != m_pCurr->GetAscent() )
{
SetFlyInCntBase();
GetInfo().SetPaintOfst( 0 ); //geaenderte Zeilenhoehe => kein Recycling
@@ -1675,7 +1675,7 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos)
}
if ( IsFlyInCntBase() && !IsQuick() )
- UpdatePos( pCurr, GetTopLeft(), GetStart() );
+ UpdatePos( m_pCurr, GetTopLeft(), GetStart() );
return nNewStart;
}
@@ -1690,10 +1690,10 @@ void SwTextFormatter::RecalcRealHeight()
void SwTextFormatter::CalcRealHeight( bool bNewLine )
{
- sal_uInt16 nLineHeight = pCurr->Height();
- pCurr->SetClipping( false );
+ sal_uInt16 nLineHeight = m_pCurr->Height();
+ m_pCurr->SetClipping( false );
- SwTextGridItem const*const pGrid(GetGridItem(pFrm->FindPageFrm()));
+ SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm()));
if ( pGrid && GetInfo().SnapToGrid() )
{
const sal_uInt16 nGridWidth = pGrid->GetBaseHeight();
@@ -1701,20 +1701,20 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine )
const bool bRubyTop = ! pGrid->GetRubyTextBelow();
nLineHeight = nGridWidth + nRubyHeight;
- const sal_uInt16 nAmpRatio = (pCurr->Height() + nLineHeight - 1)/nLineHeight;
+ const sal_uInt16 nAmpRatio = (m_pCurr->Height() + nLineHeight - 1)/nLineHeight;
nLineHeight *= nAmpRatio;
- const sal_uInt16 nAsc = pCurr->GetAscent() +
+ const sal_uInt16 nAsc = m_pCurr->GetAscent() +
( bRubyTop ?
- ( nLineHeight - pCurr->Height() + nRubyHeight ) / 2 :
- ( nLineHeight - pCurr->Height() - nRubyHeight ) / 2 );
+ ( nLineHeight - m_pCurr->Height() + nRubyHeight ) / 2 :
+ ( nLineHeight - m_pCurr->Height() - nRubyHeight ) / 2 );
- pCurr->Height( nLineHeight );
- pCurr->SetAscent( nAsc );
- pInf->GetParaPortion()->SetFixLineHeight();
+ m_pCurr->Height( nLineHeight );
+ m_pCurr->SetAscent( nAsc );
+ m_pInf->GetParaPortion()->SetFixLineHeight();
// we ignore any line spacing options except from ...
- const SvxLineSpacingItem* pSpace = aLineInf.GetLineSpacing();
+ const SvxLineSpacingItem* pSpace = m_aLineInf.GetLineSpacing();
if ( ! IsParaLine() && pSpace &&
SVX_INTER_LINE_SPACE_PROP == pSpace->GetInterLineSpaceRule() )
{
@@ -1727,7 +1727,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine )
nLineHeight = (sal_uInt16)(nTmp / 100);
}
- pCurr->SetRealHeight( nLineHeight );
+ m_pCurr->SetRealHeight( nLineHeight );
return;
}
@@ -1735,10 +1735,10 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine )
// sollten kein Register etc. beachten. Dummerweise hat kann es eine leere
// Zeile am Absatzende geben (bei leeren Abs?tzen oder nach einem
// Shift-Return), die das Register durchaus beachten soll.
- if( !pCurr->IsDummy() || ( !pCurr->GetNext() &&
+ if( !m_pCurr->IsDummy() || ( !m_pCurr->GetNext() &&
GetStart() >= GetTextFrm()->GetText().getLength() && !bNewLine ) )
{
- const SvxLineSpacingItem *pSpace = aLineInf.GetLineSpacing();
+ const SvxLineSpacingItem *pSpace = m_aLineInf.GetLineSpacing();
if( pSpace )
{
switch( pSpace->GetLineSpaceRule() )
@@ -1768,9 +1768,9 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine )
pCurr->GetAscent() )
pCurr->SetClipping( true );
#endif
- pCurr->SetAscent( nAsc );
- pCurr->Height( nLineHeight );
- pInf->GetParaPortion()->SetFixLineHeight();
+ m_pCurr->SetAscent( nAsc );
+ m_pCurr->Height( nLineHeight );
+ m_pInf->GetParaPortion()->SetFixLineHeight();
}
}
break;
@@ -1784,12 +1784,12 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine )
{
nLineHeight = pSpace->GetLineHeight();
const sal_uInt16 nAsc = ( 4 * nLineHeight ) / 5; // 80%
- if( nAsc < pCurr->GetAscent() ||
- nLineHeight - nAsc < pCurr->Height() - pCurr->GetAscent() )
- pCurr->SetClipping( true );
- pCurr->Height( nLineHeight );
- pCurr->SetAscent( nAsc );
- pInf->GetParaPortion()->SetFixLineHeight();
+ if( nAsc < m_pCurr->GetAscent() ||
+ nLineHeight - nAsc < m_pCurr->Height() - m_pCurr->GetAscent() )
+ m_pCurr->SetClipping( true );
+ m_pCurr->Height( nLineHeight );
+ m_pCurr->SetAscent( nAsc );
+ m_pInf->GetParaPortion()->SetFixLineHeight();
}
break;
default: OSL_FAIL( ": unknown LineSpaceRule" );
@@ -1831,17 +1831,17 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine )
if( IsRegisterOn() )
{
- SwTwips nTmpY = Y() + pCurr->GetAscent() + nLineHeight - pCurr->Height();
- SWRECTFN( pFrm )
+ SwTwips nTmpY = Y() + m_pCurr->GetAscent() + nLineHeight - m_pCurr->Height();
+ SWRECTFN( m_pFrm )
if ( bVert )
- nTmpY = pFrm->SwitchHorizontalToVertical( nTmpY );
+ nTmpY = m_pFrm->SwitchHorizontalToVertical( nTmpY );
nTmpY = (*fnRect->fnYDiff)( nTmpY, RegStart() );
const sal_uInt16 nDiff = sal_uInt16( nTmpY % RegDiff() );
if( nDiff )
nLineHeight += RegDiff() - nDiff;
}
}
- pCurr->SetRealHeight( nLineHeight );
+ m_pCurr->SetRealHeight( nLineHeight );
}
void SwTextFormatter::FeedInf( SwTextFormatInfo &rInf ) const
@@ -1851,9 +1851,9 @@ void SwTextFormatter::FeedInf( SwTextFormatInfo &rInf ) const
rInf.Init();
rInf.ChkNoHyph( CntEndHyph(), CntMidHyph() );
- rInf.SetRoot( pCurr );
- rInf.SetLineStart( nStart );
- rInf.SetIdx( nStart );
+ rInf.SetRoot( m_pCurr );
+ rInf.SetLineStart( m_nStart );
+ rInf.SetIdx( m_nStart );
// Handle overflows:
// #i34348# Changed type from sal_uInt16 to SwTwips
@@ -1886,15 +1886,15 @@ void SwTextFormatter::FeedInf( SwTextFormatInfo &rInf ) const
void SwTextFormatter::FormatReset( SwTextFormatInfo &rInf )
{
- pCurr->Truncate();
- pCurr->Init();
- if( pBlink && pCurr->IsBlinking() )
- pBlink->Delete( pCurr );
+ m_pCurr->Truncate();
+ m_pCurr->Init();
+ if( pBlink && m_pCurr->IsBlinking() )
+ pBlink->Delete( m_pCurr );
// delete pSpaceAdd und pKanaComp
- pCurr->FinishSpaceAdd();
- pCurr->FinishKanaComp();
- pCurr->ResetFlags();
+ m_pCurr->FinishSpaceAdd();
+ m_pCurr->FinishKanaComp();
+ m_pCurr->ResetFlags();
FeedInf( rInf );
}
@@ -1917,8 +1917,8 @@ SwTwips SwTextFormatter::CalcBottomLine() const
SwTwips nMin = GetInfo().GetTextFly().GetMinBottom();
if( nMin && ++nMin > nRet )
{
- SwTwips nDist = pFrm->Frm().Height() - pFrm->Prt().Height()
- - pFrm->Prt().Top();
+ SwTwips nDist = m_pFrm->Frm().Height() - m_pFrm->Prt().Height()
+ - m_pFrm->Prt().Top();
if( nRet + nDist < nMin )
{
const bool bRepaint = HasTruncLines() &&
@@ -1940,8 +1940,8 @@ SwTwips SwTextFormatter::_CalcFitToContent()
{
FormatReset( GetInfo() );
BuildPortions( GetInfo() );
- pCurr->CalcLine( *this, GetInfo() );
- return pCurr->Width();
+ m_pCurr->CalcLine( *this, GetInfo() );
+ return m_pCurr->Width();
}
// determines if the calculation of a repaint offset is allowed
@@ -1951,8 +1951,8 @@ bool SwTextFormatter::AllowRepaintOpt() const
{
// reformat position in front of current line? Only in this case
// we want to set the repaint offset
- bool bOptimizeRepaint = nStart < GetInfo().GetReformatStart() &&
- pCurr->GetLen();
+ bool bOptimizeRepaint = m_nStart < GetInfo().GetReformatStart() &&
+ m_pCurr->GetLen();
// a special case is the last line of a block adjusted paragraph:
if ( bOptimizeRepaint )
@@ -1966,10 +1966,10 @@ bool SwTextFormatter::AllowRepaintOpt() const
else
{
// ????: Blank in der letzten Masterzeile (blocksat.sdw)
- bOptimizeRepaint = nullptr == pCurr->GetNext() && !pFrm->GetFollow();
+ bOptimizeRepaint = nullptr == m_pCurr->GetNext() && !m_pFrm->GetFollow();
if ( bOptimizeRepaint )
{
- SwLinePortion *pPos = pCurr->GetFirstPortion();
+ SwLinePortion *pPos = m_pCurr->GetFirstPortion();
while ( pPos && !pPos->IsFlyPortion() )
pPos = pPos->GetPortion();
bOptimizeRepaint = !pPos;
@@ -1999,11 +1999,11 @@ bool SwTextFormatter::AllowRepaintOpt() const
void SwTextFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
{
- OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
+ OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(),
"SwTextFormatter::CalcUnclipped with unswapped frame" );
long nFlyAsc, nFlyDesc;
- pCurr->MaxAscentDescent( rTop, rBottom, nFlyAsc, nFlyDesc );
+ m_pCurr->MaxAscentDescent( rTop, rBottom, nFlyAsc, nFlyDesc );
rTop = Y() + GetCurr()->GetAscent();
rBottom = rTop + nFlyDesc;
rTop -= nFlyAsc;
@@ -2012,7 +2012,7 @@ void SwTextFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
sal_Int32 nStartIdx, bool bAlways ) const
{
- OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
+ OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(),
"SwTextFormatter::UpdatePos with unswapped frame" );
if( GetInfo().IsTest() )
@@ -2133,12 +2133,12 @@ void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
void SwTextFormatter::AlignFlyInCntBase( long nBaseLine ) const
{
- OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
+ OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(),
"SwTextFormatter::AlignFlyInCntBase with unswapped frame" );
if( GetInfo().IsTest() )
return;
- SwLinePortion *pFirst = pCurr->GetFirstPortion();
+ SwLinePortion *pFirst = m_pCurr->GetFirstPortion();
SwLinePortion *pPos = pFirst;
objectpositioning::AsCharFlags nFlags = AS_CHAR_NOFLAG;
if( GetMulti() && GetMulti()->HasRotation() )
@@ -2154,7 +2154,7 @@ void SwTextFormatter::AlignFlyInCntBase( long nBaseLine ) const
{
if( pPos->IsFlyCntPortion() || pPos->IsGrfNumPortion() )
{
- pCurr->MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, pPos );
+ m_pCurr->MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, pPos );
if( pPos->IsGrfNumPortion() )
static_cast<SwGrfNumPortion*>(pPos)->SetBase( nTmpAscent, nTmpDescent,
@@ -2189,11 +2189,11 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const
SwRect aLine( GetLeftMargin(), Y(), rInf.RealWidth(), nHeight );
SwRect aLineVert( aLine );
- if ( pFrm->IsVertical() )
- pFrm->SwitchHorizontalToVertical( aLineVert );
+ if ( m_pFrm->IsVertical() )
+ m_pFrm->SwitchHorizontalToVertical( aLineVert );
SwRect aInter( rInf.GetTextFly().GetFrm( aLineVert ) );
- if ( pFrm->IsVertical() )
- pFrm->SwitchVerticalToHorizontal( aInter );
+ if ( m_pFrm->IsVertical() )
+ m_pFrm->SwitchVerticalToHorizontal( aInter );
if( !aInter.HasArea() )
return false;
@@ -2209,11 +2209,11 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const
aLine.Width( pPos->Width() );
aLineVert = aLine;
- if ( pFrm->IsVertical() )
- pFrm->SwitchHorizontalToVertical( aLineVert );
+ if ( m_pFrm->IsVertical() )
+ m_pFrm->SwitchHorizontalToVertical( aLineVert );
aInter = rInf.GetTextFly().GetFrm( aLineVert );
- if ( pFrm->IsVertical() )
- pFrm->SwitchVerticalToHorizontal( aInter );
+ if ( m_pFrm->IsVertical() )
+ m_pFrm->SwitchVerticalToHorizontal( aInter );
// New flys from below?
if( !pPos->IsFlyPortion() )
@@ -2227,7 +2227,7 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const
// RealHeight including spacing
rInf.SetLineHeight( nHeight );
// Height without extra spacing
- rInf.SetLineNetHeight( pCurr->Height() );
+ rInf.SetLineNetHeight( m_pCurr->Height() );
return true;
}
}
@@ -2238,7 +2238,7 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const
if ( ! aInter.IsOver( aLine ) )
{
rInf.SetLineHeight( nHeight );
- rInf.SetLineNetHeight( pCurr->Height() );
+ rInf.SetLineNetHeight( m_pCurr->Height() );
return true;
}
else
@@ -2253,7 +2253,7 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const
static_cast<const SwFlyPortion*>(pPos)->GetFixWidth() != aInter.Width() )
{
rInf.SetLineHeight( nHeight );
- rInf.SetLineNetHeight( pCurr->Height() );
+ rInf.SetLineNetHeight( m_pCurr->Height() );
return true;
}
}
@@ -2285,7 +2285,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
{
// Real line height has already been calculated, we only have to
// search for intersections in the lower part of the strip
- nAscent = pCurr->GetAscent();
+ nAscent = m_pCurr->GetAscent();
nHeight = rInf.GetLineNetHeight();
nTop += rInf.GetLineHeight() - nHeight;
}
@@ -2295,14 +2295,14 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
nHeight = pLast->Height();
// We make a first guess for the lines real height
- if ( ! pCurr->GetRealHeight() )
+ if ( ! m_pCurr->GetRealHeight() )
CalcRealHeight();
- if ( pCurr->GetRealHeight() > nHeight )
- nTop += pCurr->GetRealHeight() - nHeight;
+ if ( m_pCurr->GetRealHeight() > nHeight )
+ nTop += m_pCurr->GetRealHeight() - nHeight;
else
// Important for fixed space between lines
- nHeight = pCurr->GetRealHeight();
+ nHeight = m_pCurr->GetRealHeight();
}
const long nLeftMar = GetLeftMargin();
@@ -2312,18 +2312,18 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
+ nLeftMar - nLeftMin , nHeight );
SwRect aLineVert( aLine );
- if ( pFrm->IsRightToLeft() )
- pFrm->SwitchLTRtoRTL( aLineVert );
+ if ( m_pFrm->IsRightToLeft() )
+ m_pFrm->SwitchLTRtoRTL( aLineVert );
- if ( pFrm->IsVertical() )
- pFrm->SwitchHorizontalToVertical( aLineVert );
+ if ( m_pFrm->IsVertical() )
+ m_pFrm->SwitchHorizontalToVertical( aLineVert );
SwRect aInter( rTextFly.GetFrm( aLineVert ) );
- if ( pFrm->IsRightToLeft() )
- pFrm->SwitchRTLtoLTR( aInter );
+ if ( m_pFrm->IsRightToLeft() )
+ m_pFrm->SwitchRTLtoLTR( aInter );
- if ( pFrm->IsVertical() )
- pFrm->SwitchVerticalToHorizontal( aInter );
+ if ( m_pFrm->IsVertical() )
+ m_pFrm->SwitchVerticalToHorizontal( aInter );
if( aInter.IsOver( aLine ) )
{
@@ -2338,9 +2338,9 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
aInter.Left( nFrmLeft );
long nAddMar = 0;
- if ( pFrm->IsRightToLeft() )
+ if ( m_pFrm->IsRightToLeft() )
{
- nAddMar = pFrm->Frm().Right() - Right();
+ nAddMar = m_pFrm->Frm().Right() - Right();
if ( nAddMar < 0 )
nAddMar = 0;
}
@@ -2367,7 +2367,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
{
rInf.SetNewLine( true );
// 8221: We know that for dummies, it holds ascent == height
- pCurr->SetDummy(true);
+ m_pCurr->SetDummy(true);
}
// aInter becomes frame-local
@@ -2375,7 +2375,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
SwFlyPortion *pFly = new SwFlyPortion( aInter );
if( bForced )
{
- pCurr->SetForcedLeftMargin();
+ m_pCurr->SetForcedLeftMargin();
rInf.ForcedLeftMargin( (sal_uInt16)aInter.Width() );
}
@@ -2399,8 +2399,8 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
// That means we can comfortably grow up to this value; that's how
// we save a few empty lines.
long nNextTop = rTextFly.GetNextTop();
- if ( pFrm->IsVertical() )
- nNextTop = pFrm->SwitchVerticalToHorizontal( nNextTop );
+ if ( m_pFrm->IsVertical() )
+ nNextTop = m_pFrm->SwitchVerticalToHorizontal( nNextTop );
if( nNextTop > aInter.Bottom() )
{
SwTwips nH = nNextTop - aInter.Top();
@@ -2435,10 +2435,10 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
if( pFly->Fix() < rInf.Width() )
rInf.Width( pFly->Fix() );
- SwTextGridItem const*const pGrid(GetGridItem(pFrm->FindPageFrm()));
+ SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm()));
if ( pGrid )
{
- const SwPageFrm* pPageFrm = pFrm->FindPageFrm();
+ const SwPageFrm* pPageFrm = m_pFrm->FindPageFrm();
const SwLayoutFrm* pBody = pPageFrm->FindBodyCont();
SWRECTFN( pPageFrm )
@@ -2454,7 +2454,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
if ( bVert )
{
Point aPoint( nStartX, 0 );
- pFrm->SwitchHorizontalToVertical( aPoint );
+ m_pFrm->SwitchHorizontalToVertical( aPoint );
nStartX = aPoint.Y();
}
@@ -2476,7 +2476,7 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf,
SwTextAttr *pHint ) const
{
SwFlyCntPortion *pRet = nullptr;
- const SwFrm *pFrame = static_cast<SwFrm*>(pFrm);
+ const SwFrm *pFrame = static_cast<SwFrm*>(m_pFrm);
SwFlyInCntFrm *pFly;
SwFrameFormat* pFrameFormat = static_cast<SwTextFlyCnt*>(pHint)->GetFlyCnt().GetFrameFormat();
@@ -2492,7 +2492,7 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf,
// OD 08.01.2004 #i11859# - use new method <SwLineLayout::MaxAscentDescent(..)>
//SwLinePortion *pPos = pCurr->GetFirstPortion();
//lcl_MaxAscDescent( pPos, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc );
- pCurr->MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc );
+ m_pCurr->MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc );
// If the ascent of the frame is larger than the ascent of the current position,
// we use this one when calculating the base, or the frame would be positioned
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 3b034e1..e147e7b 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -72,7 +72,7 @@ bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt )
void SwTextPainter::CtorInitTextPainter( SwTextFrm *pNewFrm, SwTextPaintInfo *pNewInf )
{
CtorInitTextCursor( pNewFrm, pNewInf );
- pInf = pNewInf;
+ m_pInf = pNewInf;
SwFont *pMyFnt = GetFnt();
GetInfo().SetFont( pMyFnt );
#if OSL_DEBUG_LEVEL > 1
@@ -88,7 +88,7 @@ void SwTextPainter::CtorInitTextPainter( SwTextFrm *pNewFrm, SwTextPaintInfo *pN
SwLinePortion *SwTextPainter::CalcPaintOfst( const SwRect &rPaint )
{
- SwLinePortion *pPor = pCurr->GetFirstPortion();
+ SwLinePortion *pPor = m_pCurr->GetFirstPortion();
GetInfo().SetPaintOfst( 0 );
SwTwips nPaintOfst = rPaint.Left();
@@ -96,7 +96,7 @@ SwLinePortion *SwTextPainter::CalcPaintOfst( const SwRect &rPaint )
// nPaintOfst ist dokumentglobal, deswegen nLeftMar aufaddieren
// const sal_uInt16 nLeftMar = sal_uInt16(GetLeftMargin());
// 8310: painten von LineBreaks in leeren Zeilen.
- if( nPaintOfst && pCurr->Width() )
+ if( nPaintOfst && m_pCurr->Width() )
{
SwLinePortion *pLast = nullptr;
// 7529 und 4757: nicht <= nPaintOfst
@@ -145,9 +145,9 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
// Adjustierung ggf. nachholen
GetAdjusted();
- GetInfo().SetpSpaceAdd( pCurr->GetpLLSpaceAdd() );
+ GetInfo().SetpSpaceAdd( m_pCurr->GetpLLSpaceAdd() );
GetInfo().ResetSpaceIdx();
- GetInfo().SetKanaComp( pCurr->GetpKanaComp() );
+ GetInfo().SetKanaComp( m_pCurr->GetpKanaComp() );
GetInfo().ResetKanaIdx();
// The size of the frame
GetInfo().SetIdx( GetStart() );
@@ -158,7 +158,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
// 6882: Leerzeilen duerfen nicht wegoptimiert werden bei Paragraphzeichen.
const bool bEndPor = GetInfo().GetOpt().IsParagraph() && GetInfo().GetText().isEmpty();
- SwLinePortion *pPor = bEndPor ? pCurr->GetFirstPortion() : CalcPaintOfst( rPaint );
+ SwLinePortion *pPor = bEndPor ? m_pCurr->GetFirstPortion() : CalcPaintOfst( rPaint );
// Optimization!
const SwTwips nMaxRight = std::min( rPaint.Right(), Right() );
@@ -173,7 +173,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
// 8084: Optimization, less painting
// AMA: By 8084 7538 has been revived
// bDrawInWindow entfernt, damit DropCaps auch gedruckt werden
- bPaintDrop = pPor == pCurr->GetFirstPortion()
+ bPaintDrop = pPor == m_pCurr->GetFirstPortion()
&& GetDropLines() >= GetLineNr();
}
@@ -195,7 +195,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
GetInfo().GetPos().Y() + nTmpHeight > rPaint.Top() + rPaint.Height() )
{
bClip = false;
- rClip.ChgClip( rPaint, pFrm, pCurr->HasUnderscore() );
+ rClip.ChgClip( rPaint, m_pFrm, m_pCurr->HasUnderscore() );
}
#if OSL_DEBUG_LEVEL > 1
static bool bClipAlways = false;
@@ -222,9 +222,9 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
const SwRect aLineRect( aPnt1, aPnt2 );
- if( pCurr->IsClipping() )
+ if( m_pCurr->IsClipping() )
{
- rClip.ChgClip( aLineRect, pFrm );
+ rClip.ChgClip( aLineRect, m_pFrm );
bClip = false;
}
@@ -251,7 +251,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
{
const SwTwips nOldY = GetInfo().Y();
- GetInfo().Y( GetInfo().GetPos().Y() + AdjustBaseLine( *pCurr, nullptr,
+ GetInfo().Y( GetInfo().GetPos().Y() + AdjustBaseLine( *m_pCurr, nullptr,
GetInfo().GetFont()->GetHeight( GetInfo().GetVsh(), *pOut ),
GetInfo().GetFont()->GetAscent( GetInfo().GetVsh(), *pOut )
) );
@@ -267,12 +267,12 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if( bEndPor )
SeekStartAndChg( GetInfo() );
- const bool bRest = pCurr->IsRest();
+ const bool bRest = m_pCurr->IsRest();
bool bFirst = true;
SwArrowPortion *pArrow = nullptr;
// Reference portion for the paragraph end portion
- SwLinePortion* pEndTempl = pCurr->GetFirstPortion();
+ SwLinePortion* pEndTempl = m_pCurr->GetFirstPortion();
while( pPor )
{
@@ -283,7 +283,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if ( bAdjustBaseLine )
{
- GetInfo().Y( GetInfo().GetPos().Y() + AdjustBaseLine( *pCurr, pPor ) );
+ GetInfo().Y( GetInfo().GetPos().Y() + AdjustBaseLine( *m_pCurr, pPor ) );
// we store the last portion, because a possible paragraph
// end character has the same font as this portion
@@ -303,7 +303,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
{
sal_Int32 nOffset = GetInfo().GetIdx();
SeekStartAndChg( GetInfo(), true );
- if( GetRedln() && pCurr->HasRedline() )
+ if( GetRedln() && m_pCurr->HasRedline() )
GetRedln()->Seek( *pFnt, nOffset, 0 );
}
else if( pPor->InTextGrp() || pPor->InFieldGrp() || pPor->InTabGrp() )
@@ -329,7 +329,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
GetInfo().X() + pPor->Width() + ( pPor->Height() / 2 ) > nMaxRight )
{
bClip = false;
- rClip.ChgClip( rPaint, pFrm, pCurr->HasUnderscore() );
+ rClip.ChgClip( rPaint, m_pFrm, m_pCurr->HasUnderscore() );
}
// Portions, which lay "below" the text like post-its
@@ -422,7 +422,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if ( bAdjustBaseLine )
GetInfo().Y( GetInfo().GetPos().Y()
- + AdjustBaseLine( *pCurr, &aEnd ) );
+ + AdjustBaseLine( *m_pCurr, &aEnd ) );
GetInfo().X( GetInfo().X() + GetCurr()->GetHangingMargin() );
aEnd.Paint( GetInfo() );
GetInfo().Y( nOldY );
@@ -438,7 +438,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if( bUnderSz || bNextUndersized )
{
if ( bAdjustBaseLine )
- GetInfo().Y( GetInfo().GetPos().Y() + pCurr->GetAscent() );
+ GetInfo().Y( GetInfo().GetPos().Y() + m_pCurr->GetAscent() );
if( pArrow )
GetInfo().DrawRedArrow( *pArrow );
@@ -460,8 +460,8 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
}
}
- if( pCurr->IsClipping() )
- rClip.ChgClip( rPaint, pFrm );
+ if( m_pCurr->IsClipping() )
+ rClip.ChgClip( rPaint, m_pFrm );
}
void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
@@ -577,7 +577,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
// and the font of the lowest portion.
if ( nAdjustBaseLine )
{
- const sal_uInt16 nTmpBaseLineOfst = AdjustBaseLine( *pCurr, pPor );
+ const sal_uInt16 nTmpBaseLineOfst = AdjustBaseLine( *m_pCurr, pPor );
if ( nMaxBaseLineOfst < nTmpBaseLineOfst )
{
nMaxBaseLineOfst = nTmpBaseLineOfst;
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index b6aa6a7..db5430e 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -41,65 +41,65 @@ void SwTextIter::CtorInitTextIter( SwTextFrm *pNewFrm, SwTextInfo *pNewInf )
CtorInitAttrIter( *pNode, pNewFrm->GetPara()->GetScriptInfo(), pNewFrm );
- pFrm = pNewFrm;
- pInf = pNewInf;
- aLineInf.CtorInitLineInfo( pNode->GetSwAttrSet(), *pNode );
- nFrameStart = pFrm->Frm().Pos().Y() + pFrm->Prt().Pos().Y();
+ m_pFrm = pNewFrm;
+ m_pInf = pNewInf;
+ m_aLineInf.CtorInitLineInfo( pNode->GetSwAttrSet(), *pNode );
+ m_nFrameStart = m_pFrm->Frm().Pos().Y() + m_pFrm->Prt().Pos().Y();
SwTextIter::Init();
// Order is important: only execute FillRegister if GetValue!=0
- bRegisterOn = pNode->GetSwAttrSet().GetRegister().GetValue()
- && pFrm->FillRegister( nRegStart, nRegDiff );
+ m_bRegisterOn = pNode->GetSwAttrSet().GetRegister().GetValue()
+ && m_pFrm->FillRegister( m_nRegStart, m_nRegDiff );
}
void SwTextIter::Init()
{
- pCurr = pInf->GetParaPortion();
- nStart = pInf->GetTextStart();
- nY = nFrameStart;
- bPrev = true;
- pPrev = nullptr;
- nLineNr = 1;
+ m_pCurr = m_pInf->GetParaPortion();
+ m_nStart = m_pInf->GetTextStart();
+ m_nY = m_nFrameStart;
+ m_bPrev = true;
+ m_pPrev = nullptr;
+ m_nLineNr = 1;
}
void SwTextIter::CalcAscentAndHeight( sal_uInt16 &rAscent, sal_uInt16 &rHeight ) const
{
rHeight = GetLineHeight();
- rAscent = pCurr->GetAscent() + rHeight - pCurr->Height();
+ rAscent = m_pCurr->GetAscent() + rHeight - m_pCurr->Height();
}
SwLineLayout *SwTextIter::_GetPrev()
{
- pPrev = nullptr;
- bPrev = true;
- SwLineLayout *pLay = pInf->GetParaPortion();
- if( pCurr == pLay )
+ m_pPrev = nullptr;
+ m_bPrev = true;
+ SwLineLayout *pLay = m_pInf->GetParaPortion();
+ if( m_pCurr == pLay )
return nullptr;
- while( pLay->GetNext() != pCurr )
+ while( pLay->GetNext() != m_pCurr )
pLay = pLay->GetNext();
- return pPrev = pLay;
+ return m_pPrev = pLay;
}
const SwLineLayout *SwTextIter::GetPrev()
{
- if(! bPrev)
+ if(! m_bPrev)
_GetPrev();
- return pPrev;
+ return m_pPrev;
}
const SwLineLayout *SwTextIter::Prev()
{
- if( !bPrev )
+ if( !m_bPrev )
_GetPrev();
- if( pPrev )
+ if( m_pPrev )
{
- bPrev = false;
- pCurr = pPrev;
- nStart = nStart - pCurr->GetLen();
- nY = nY - GetLineHeight();
- if( !pCurr->IsDummy() && !(--nLineNr) )
- ++nLineNr;
- return pCurr;
+ m_bPrev = false;
+ m_pCurr = m_pPrev;
+ m_nStart = m_nStart - m_pCurr->GetLen();
+ m_nY = m_nY - GetLineHeight();
+ if( !m_pCurr->IsDummy() && !(--m_nLineNr) )
+ ++m_nLineNr;
+ return m_pCurr;
}
else
return nullptr;
@@ -107,15 +107,15 @@ const SwLineLayout *SwTextIter::Prev()
const SwLineLayout *SwTextIter::Next()
{
- if(pCurr->GetNext())
+ if(m_pCurr->GetNext())
{
- pPrev = pCurr;
- bPrev = true;
- nStart = nStart + pCurr->GetLen();
- nY += GetLineHeight();
- if( pCurr->GetLen() || ( nLineNr>1 && !pCurr->IsDummy() ) )
- ++nLineNr;
- return pCurr = pCurr->GetNext();
+ m_pPrev = m_pCurr;
+ m_bPrev = true;
+ m_nStart = m_nStart + m_pCurr->GetLen();
+ m_nY += GetLineHeight();
+ if( m_pCurr->GetLen() || ( m_nLineNr>1 && !m_pCurr->IsDummy() ) )
+ ++m_nLineNr;
+ return m_pCurr = m_pCurr->GetNext();
}
else
return nullptr;
@@ -133,7 +133,7 @@ const SwLineLayout *SwTextIter::NextLine()
const SwLineLayout *SwTextIter::GetNextLine() const
{
- const SwLineLayout *pNext = pCurr->GetNext();
+ const SwLineLayout *pNext = m_pCurr->GetNext();
while( pNext && pNext->IsDummy() && pNext->GetNext() )
{
pNext = pNext->GetNext();
@@ -143,19 +143,19 @@ const SwLineLayout *SwTextIter::GetNextLine() const
const SwLineLayout *SwTextIter::GetPrevLine()
{
- const SwLineLayout *pRoot = pInf->GetParaPortion();
- if( pRoot == pCurr )
+ const SwLineLayout *pRoot = m_pInf->GetParaPortion();
+ if( pRoot == m_pCurr )
return nullptr;
const SwLineLayout *pLay = pRoot;
- while( pLay->GetNext() != pCurr )
+ while( pLay->GetNext() != m_pCurr )
pLay = pLay->GetNext();
if( pLay->IsDummy() )
{
const SwLineLayout *pTmp = pRoot;
pLay = pRoot->IsDummy() ? nullptr : pRoot;
- while( pTmp->GetNext() != pCurr )
+ while( pTmp->GetNext() != m_pCurr )
{
if( !pTmp->IsDummy() )
pLay = pTmp;
@@ -192,9 +192,9 @@ void SwTextIter::Bottom()
void SwTextIter::CharToLine(const sal_Int32 nChar)
{
- while( nStart + pCurr->GetLen() <= nChar && Next() )
+ while( m_nStart + m_pCurr->GetLen() <= nChar && Next() )
;
- while( nStart > nChar && Prev() )
+ while( m_nStart > nChar && Prev() )
;
}
@@ -202,13 +202,13 @@ void SwTextIter::CharToLine(const sal_Int32 nChar)
const SwLineLayout *SwTextCursor::CharCrsrToLine( const sal_Int32 nPosition )
{
CharToLine( nPosition );
- if( nPosition != nStart )
+ if( nPosition != m_nStart )
bRightMargin = false;
- bool bPrevious = bRightMargin && pCurr->GetLen() && GetPrev() &&
+ bool bPrevious = bRightMargin && m_pCurr->GetLen() && GetPrev() &&
GetPrev()->GetLen();
if( bPrevious && nPosition && CH_BREAK == GetInfo().GetChar( nPosition-1 ) )
bPrevious = false;
- return bPrevious ? PrevLine() : pCurr;
+ return bPrevious ? PrevLine() : m_pCurr;
}
sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine,
@@ -224,7 +224,7 @@ sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine,
sal_uInt16 nOfst = rLine.GetRealHeight() - rLine.Height();
- SwTextGridItem const*const pGrid(GetGridItem(pFrm->FindPageFrm()));
+ SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm()));
if ( pGrid && GetInfo().SnapToGrid() )
{
@@ -234,7 +234,7 @@ sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine,
if ( GetInfo().IsMulti() )
// we are inside the GetCharRect recursion for multi portions
// we center the portion in its surrounding line
- nOfst = ( pCurr->Height() - nPorHeight ) / 2 + nPorAscent;
+ nOfst = ( m_pCurr->Height() - nPorHeight ) / 2 + nPorAscent;
else
{
// We have to take care for ruby portions.
@@ -292,11 +292,11 @@ sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine,
const SwLineLayout *SwTextIter::TwipsToLine( const SwTwips y)
{
- while( nY + GetLineHeight() <= y && Next() )
+ while( m_nY + GetLineHeight() <= y && Next() )
;
- while( nY > y && Prev() )
+ while( m_nY > y && Prev() )
;
- return pCurr;
+ return m_pCurr;
}
// Local helper function to check, if pCurr needs a field rest portion:
@@ -316,16 +316,16 @@ static bool lcl_NeedsFieldRest( const SwLineLayout* pCurr )
void SwTextIter::TruncLines( bool bNoteFollow )
{
- SwLineLayout *pDel = pCurr->GetNext();
- const sal_Int32 nEnd = nStart + pCurr->GetLen();
+ SwLineLayout *pDel = m_pCurr->GetNext();
+ const sal_Int32 nEnd = m_nStart + m_pCurr->GetLen();
if( pDel )
{
- pCurr->SetNext( nullptr );
+ m_pCurr->SetNext( nullptr );
if( GetHints() && bNoteFollow )
{
GetInfo().GetParaPortion()->SetFollowField( pDel->IsRest() ||
- lcl_NeedsFieldRest( pCurr ) );
+ lcl_NeedsFieldRest( m_pCurr ) );
// bug 88534: wrong positioning of flys
SwTextFrm* pFollow = GetTextFrm()->GetFollow();
@@ -361,24 +361,24 @@ void SwTextIter::TruncLines( bool bNoteFollow )
}
delete pDel;
}
- if( pCurr->IsDummy() &&
- !pCurr->GetLen() &&
- nStart < GetTextFrm()->GetText().getLength() )
- pCurr->SetRealHeight( 1 );
+ if( m_pCurr->IsDummy() &&
+ !m_pCurr->GetLen() &&
+ m_nStart < GetTextFrm()->GetText().getLength() )
+ m_pCurr->SetRealHeight( 1 );
if( GetHints() )
- pFrm->RemoveFootnote( nEnd );
+ m_pFrm->RemoveFootnote( nEnd );
}
void SwTextIter::CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const
{
nEndCnt = 0;
nMidCnt = 0;
- if ( bPrev && pPrev && !pPrev->IsEndHyph() && !pPrev->IsMidHyph() )
+ if ( m_bPrev && m_pPrev && !m_pPrev->IsEndHyph() && !m_pPrev->IsMidHyph() )
return;
- SwLineLayout *pLay = pInf->GetParaPortion();
- if( pCurr == pLay )
+ SwLineLayout *pLay = m_pInf->GetParaPortion();
+ if( m_pCurr == pLay )
return;
- while( pLay != pCurr )
+ while( pLay != m_pCurr )
{
if ( pLay->IsEndHyph() )
nEndCnt++;
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index ddddc49..c4ec33b 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -31,22 +31,22 @@ class SwFlyPortion;
class SwTextIter : public SwAttrIter
{
protected:
- SwLineInfo aLineInf;
- SwTextFrm *pFrm;
- SwTextInfo *pInf;
- SwLineLayout *pCurr;
- SwLineLayout *pPrev;
- SwTwips nFrameStart;
- SwTwips nY;
- SwTwips nRegStart; // The register's start position (Y)
- sal_Int32 nStart; // Start in the text string, end = pCurr->GetLen()
- sal_uInt16 nRegDiff; // Register's line distance
- sal_uInt16 nLineNr; // Line number
- bool bPrev : 1;
- bool bRegisterOn : 1; // Keep in register
- bool bOneBlock : 1; // Justified text: Dispose single words
- bool bLastBlock : 1; // Justified text: Also the last line
- bool bLastCenter : 1; // Justified text: Center last line
+ SwLineInfo m_aLineInf;
+ SwTextFrm *m_pFrm;
+ SwTextInfo *m_pInf;
+ SwLineLayout *m_pCurr;
+ SwLineLayout *m_pPrev;
+ SwTwips m_nFrameStart;
+ SwTwips m_nY;
+ SwTwips m_nRegStart; // The register's start position (Y)
+ sal_Int32 m_nStart; // Start in the text string, end = pCurr->GetLen()
+ sal_uInt16 m_nRegDiff; // Register's line distance
+ sal_uInt16 m_nLineNr; // Line number
+ bool m_bPrev : 1;
+ bool m_bRegisterOn : 1; // Keep in register
+ bool m_bOneBlock : 1; // Justified text: Dispose single words
+ bool m_bLastBlock : 1; // Justified text: Also the last line
+ bool m_bLastCenter : 1; // Justified text: Center last line
SwLineLayout *_GetPrev();
@@ -55,47 +55,47 @@ protected:
void CtorInitTextIter( SwTextFrm *pFrm, SwTextInfo *pInf );
explicit SwTextIter(SwTextNode* pTextNode)
: SwAttrIter(pTextNode)
- , pFrm(nullptr)
- , pInf(nullptr)
- , pCurr(nullptr)
- , pPrev(nullptr)
- , nFrameStart(0)
- , nY(0)
- , nRegStart(0)
- , nStart(0)
- , nRegDiff(0)
- , nLineNr(0)
- , bPrev(false)
- , bRegisterOn(false)
- , bOneBlock(false)
- , bLastBlock(false)
- , bLastCenter(false)
+ , m_pFrm(nullptr)
+ , m_pInf(nullptr)
+ , m_pCurr(nullptr)
+ , m_pPrev(nullptr)
+ , m_nFrameStart(0)
+ , m_nY(0)
+ , m_nRegStart(0)
+ , m_nStart(0)
+ , m_nRegDiff(0)
+ , m_nLineNr(0)
+ , m_bPrev(false)
+ , m_bRegisterOn(false)
+ , m_bOneBlock(false)
+ , m_bLastBlock(false)
+ , m_bLastCenter(false)
{
}
public:
SwTextIter(SwTextFrm *pTextFrm, SwTextInfo *pTextInf)
: SwAttrIter(pTextFrm->GetTextNode())
- , bOneBlock(false)
- , bLastBlock(false)
- , bLastCenter(false)
+ , m_bOneBlock(false)
+ , m_bLastBlock(false)
+ , m_bLastCenter(false)
{
CtorInitTextIter(pTextFrm, pTextInf);
}
- inline const SwLineLayout *GetCurr() const { return pCurr; } // NEVER 0!
- inline const SwLineLayout *GetNext() const { return pCurr->GetNext(); }
+ inline const SwLineLayout *GetCurr() const { return m_pCurr; } // NEVER 0!
+ inline const SwLineLayout *GetNext() const { return m_pCurr->GetNext(); }
const SwLineLayout *GetPrev();
- inline sal_Int32 GetLength() const { return pCurr->GetLen(); }
- inline sal_uInt16 GetLineNr() const { return nLineNr; }
- inline sal_Int32 GetStart() const { return nStart; }
+ inline sal_Int32 GetLength() const { return m_pCurr->GetLen(); }
+ inline sal_uInt16 GetLineNr() const { return m_nLineNr; }
+ inline sal_Int32 GetStart() const { return m_nStart; }
inline sal_Int32 GetEnd() const { return GetStart() + GetLength(); }
- inline SwTwips Y() const { return nY; }
+ inline SwTwips Y() const { return m_nY; }
- inline SwTwips RegStart() const { return nRegStart; }
- inline sal_uInt16 RegDiff() const { return nRegDiff; }
- inline bool IsRegisterOn() const { return bRegisterOn; }
+ inline SwTwips RegStart() const { return m_nRegStart; }
+ inline sal_uInt16 RegDiff() const { return m_nRegDiff; }
+ inline bool IsRegisterOn() const { return m_bRegisterOn; }
- inline SwTextInfo &GetInfo() { return *pInf; }
- inline const SwTextInfo &GetInfo() const { return *pInf; }
+ inline SwTextInfo &GetInfo() { return *m_pInf; }
+ inline const SwTextInfo &GetInfo() const { return *m_pInf; }
inline void Top() { Init(); }
void Bottom();
@@ -114,26 +114,26 @@ public:
// Truncates all after pCurr
void TruncLines( bool bNoteFollow = false );
- inline sal_uInt16 GetLineHeight() const { return pCurr->GetRealHeight(); }
+ inline sal_uInt16 GetLineHeight() const { return m_pCurr->GetRealHeight(); }
void CalcAscentAndHeight( sal_uInt16 &rAscent, sal_uInt16 &rHeight ) const;
// Lots of trouble for querying pCurr == pPara
inline bool IsFirstTextLine() const
- { return nStart == GetInfo().GetTextStart() &&
- !( pCurr->IsDummy() && GetNextLine() ); }
+ { return m_nStart == GetInfo().GetTextStart() &&
+ !( m_pCurr->IsDummy() && GetNextLine() ); }
// Replacement for the old IsFirstLine()
inline bool IsParaLine() const
- { return pCurr == pInf->GetParaPortion(); }
+ { return m_pCurr == m_pInf->GetParaPortion(); }
- const SwLineInfo &GetLineInfo() const { return aLineInf; }
- inline SwTwips GetFirstPos() const { return nFrameStart; }
+ const SwLineInfo &GetLineInfo() const { return m_aLineInf; }
+ inline SwTwips GetFirstPos() const { return m_nFrameStart; }
inline bool SeekAndChg( SwTextSizeInfo &rInf );
inline bool SeekAndChgBefore( SwTextSizeInfo &rInf );
inline bool SeekStartAndChg( SwTextSizeInfo &rInf, const bool bPara=false );
- inline SwTextFrm *GetTextFrm() { return pFrm; }
- inline const SwTextFrm *GetTextFrm() const { return pFrm; }
+ inline SwTextFrm *GetTextFrm() { return m_pFrm; }
+ inline const SwTextFrm *GetTextFrm() const { return m_pFrm; }
// Counts consecutive hyphens in order to be within the boundary given by MaxHyphens
void CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const;
@@ -181,13 +181,13 @@ public:
inline SwTwips Left() const;
inline SwTwips Right() const { return nRight; }
inline SwTwips FirstLeft() const { return nFirst; }
- inline SwTwips CurrWidth() const { return pCurr->PrtWidth(); }
+ inline SwTwips CurrWidth() const { return m_pCurr->PrtWidth(); }
SwTwips GetLineStart() const;
inline SwTwips GetLineEnd() const { return GetLineStart() + CurrWidth(); }
inline Point GetTopLeft() const { return Point( GetLineStart(), Y() ); }
- inline bool IsOneBlock() const { return bOneBlock; }
- inline bool IsLastBlock() const { return bLastBlock; }
- inline bool IsLastCenter() const { return bLastCenter; }
+ inline bool IsOneBlock() const { return m_bOneBlock; }
+ inline bool IsLastBlock() const { return m_bLastBlock; }
+ inline bool IsLastCenter() const { return m_bLastCenter; }
inline sal_uInt16 GetAdjust() const { return nAdjust; }
inline sal_uInt16 GetLineWidth() const
{ return sal_uInt16( Right() - GetLeftMargin() + 1 ); }
@@ -252,8 +252,8 @@ public:
// For adjusting afterwards
inline void GetAdjusted() const
{
- if( pCurr->IsFormatAdj() )
- const_cast<SwTextAdjuster*>(this)->CalcAdjLine( pCurr );
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list