summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-01-17 14:01:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-17 20:50:29 +0100
commit30ca50c8d57096bb153aae3aad49cd2d7fd44987 (patch)
tree490d5db264acbcdf13685141a08c1c3ea73dd17c
parenttdf#122516: fix timestamp in MariaDb/mysql (diff)
downloadcore-30ca50c8d57096bb153aae3aad49cd2d7fd44987.tar.gz
core-30ca50c8d57096bb153aae3aad49cd2d7fd44987.zip
rename SwLinePortion::GetPortion -> GetNextPortion
to make it obvious when reading the code that we have a linked list here Change-Id: Ia7b8592af36a87723e7ef7b301331dc71357002b Reviewed-on: https://gerrit.libreoffice.org/66513 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/source/core/text/frmcrsr.cxx2
-rw-r--r--sw/source/core/text/inftxt.cxx12
-rw-r--r--sw/source/core/text/itradj.cxx30
-rw-r--r--sw/source/core/text/itrcrsr.cxx58
-rw-r--r--sw/source/core/text/itrform2.cxx72
-rw-r--r--sw/source/core/text/itrpaint.cxx8
-rw-r--r--sw/source/core/text/itrtxt.cxx6
-rw-r--r--sw/source/core/text/porexp.cxx12
-rw-r--r--sw/source/core/text/porfld.cxx20
-rw-r--r--sw/source/core/text/porglue.cxx22
-rw-r--r--sw/source/core/text/porlay.cxx76
-rw-r--r--sw/source/core/text/porlin.cxx42
-rw-r--r--sw/source/core/text/porlin.hxx10
-rw-r--r--sw/source/core/text/pormulti.cxx68
-rw-r--r--sw/source/core/text/porrst.cxx6
-rw-r--r--sw/source/core/text/portxt.cxx26
-rw-r--r--sw/source/core/text/txtdrop.cxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx6
-rw-r--r--sw/source/core/text/txtftn.cxx14
-rw-r--r--sw/source/core/text/txthyph.cxx18
-rw-r--r--sw/source/core/text/txttab.cxx14
21 files changed, 262 insertions, 262 deletions
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index c756aedf4cd2..1c269af60167 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -901,7 +901,7 @@ static void lcl_VisualMoveRecursion(const SwLineLayout& rCurrLine, TextFrameInde
{
nIdx = nIdx + pPor->GetLen();
pLast = pPor;
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
if ( bRight )
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index febc786e7fc2..b3318f656fad 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -646,9 +646,9 @@ void SwTextPaintInfo::DrawText_( const OUString &rText, const SwLinePortion &rPo
aDrawInf.SetSnapToGrid( SnapToGrid() );
// for underlining we must know when not to add extra space behind
// a character in justified mode
- aDrawInf.SetSpaceStop( ! rPor.GetPortion() ||
- rPor.GetPortion()->InFixMargGrp() ||
- rPor.GetPortion()->IsHolePortion() );
+ aDrawInf.SetSpaceStop( ! rPor.GetNextPortion() ||
+ rPor.GetNextPortion()->InFixMargGrp() ||
+ rPor.GetNextPortion()->IsHolePortion() );
// Draw text next to the left border
Point aFontPos(aPos);
@@ -1201,7 +1201,7 @@ void SwTextPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
}
}
nIdx += nLen;
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
} while ( pPos );
drawcontinue:
@@ -1556,7 +1556,7 @@ SwTextFormatInfo::SwTextFormatInfo( const SwTextFormatInfo& rInf,
bool SwTextFormatInfo::CheckFootnotePortion_( SwLineLayout const * pCurr )
{
const sal_uInt16 nHeight = pCurr->GetRealHeight();
- for( SwLinePortion *pPor = pCurr->GetPortion(); pPor; pPor = pPor->GetPortion() )
+ for( SwLinePortion *pPor = pCurr->GetNextPortion(); pPor; pPor = pPor->GetNextPortion() )
{
if( pPor->IsFootnotePortion() && nHeight > static_cast<SwFootnotePortion*>(pPor)->Orig() )
{
@@ -1679,7 +1679,7 @@ bool SwTextFormatInfo::LastKernPortion()
pKern = pPor;
else if( pPor->Width() || ( pPor->GetLen() && !pPor->IsHolePortion() ) )
pKern = nullptr;
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
if( pKern )
{
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index b4fca7913754..edd57c030e77 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -60,7 +60,7 @@ void SwTextAdjuster::FormatBlock( )
{
if( pPor->InTextGrp() )
bSkip = false;
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
pLay = bSkip ? pLay->GetNext() : nullptr;
}
@@ -91,7 +91,7 @@ void SwTextAdjuster::FormatBlock( )
pFly = pTmpFly; // A Fly with follow-up text!
pTmpFly = nullptr;
}
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
// End if we didn't find one
if( !pFly )
@@ -286,7 +286,7 @@ void SwTextAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
const bool bDoNotJustifyLinesWithManualBreak =
GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK);
- SwLinePortion *pPos = pCurrent->GetPortion();
+ SwLinePortion *pPos = pCurrent->GetNextPortion();
while( pPos )
{
@@ -388,7 +388,7 @@ void SwTextAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
pCurrent->SetLLSpaceAdd( 0, nSpaceIdx );
break;
}
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
}
@@ -409,7 +409,7 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
// Do not forget: CalcRightMargin() sets pCurrent->Width() to the line width!
CalcRightMargin( pCurrent );
- SwLinePortion* pPos = pCurrent->GetPortion();
+ SwLinePortion* pPos = pCurrent->GetNextPortion();
while( pPos )
{
@@ -479,13 +479,13 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
}
nX += pPos->Width();
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
// set portion width
nKanaIdx = 0;
sal_uInt16 nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
- pPos = pCurrent->GetPortion();
+ pPos = pCurrent->GetNextPortion();
long nDecompress = 0;
while( pPos )
@@ -518,7 +518,7 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
nDecompress = 0;
}
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
return nRepaintOfst;
@@ -585,7 +585,7 @@ void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
// CalcRightMargin also calculates a possible overlap with FlyFrames.
CalcRightMargin( pCurrent );
- SwLinePortion *pPos = pLeft->GetPortion();
+ SwLinePortion *pPos = pLeft->GetNextPortion();
TextFrameIndex nLen(0);
// If we only have one line, the text portion is consecutive and we center, then ...
@@ -642,7 +642,7 @@ void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
bComplete = false;
}
nLen = nLen + pPos->GetLen();
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
if( ! bTabCompat && ! bMultiTab && SvxAdjust::Right == GetAdjust() )
@@ -744,16 +744,16 @@ void SwTextAdjuster::CalcDropAdjust()
// 2) Make sure we include the ropPortion
// 3) pLeft is the GluePor preceding the DropPor
- if( pPor->InGlueGrp() && pPor->GetPortion()
- && pPor->GetPortion()->IsDropPortion() )
+ if( pPor->InGlueGrp() && pPor->GetNextPortion()
+ && pPor->GetNextPortion()->IsDropPortion() )
{
- const SwLinePortion *pDropPor = static_cast<SwDropPortion*>( pPor->GetPortion() );
+ const SwLinePortion *pDropPor = static_cast<SwDropPortion*>( pPor->GetNextPortion() );
SwGluePortion *pLeft = static_cast<SwGluePortion*>( pPor );
// 4) pRight: Find the GluePor coming after the DropPor
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
while( pPor && !pPor->InFixMargGrp() )
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
SwGluePortion *pRight = ( pPor && pPor->InGlueGrp() ) ?
static_cast<SwGluePortion*>(pPor) : nullptr;
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 1aa6a311fc6d..699299ed62e0 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -85,12 +85,12 @@ static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig,
nFieldLen = 0;
}
- if ( ! pPor->GetPortion() || nFieldIdx + nFieldLen > nCharOfst )
+ if ( ! pPor->GetNextPortion() || nFieldIdx + nFieldLen > nCharOfst )
break;
nFieldIdx = nFieldIdx + nFieldLen;
rOrig.Pos().AdjustX(pPor->Width() );
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
} while ( true );
@@ -438,7 +438,7 @@ void SwTextCursor::GetEndCharRect(SwRect* pOrig, const TextFrameIndex nOfst,
nPorHeight = pPor->Height();
nPorAscent = pPor->GetAscent();
}
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
const Size aCharSize( 1, nTmpHeight );
@@ -565,7 +565,7 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, TextFrameIndex const nOfst,
++nKanaIdx;
}
}
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
if( !pPor )
@@ -623,8 +623,8 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, TextFrameIndex const nOfst,
)
++nKanaIdx;
}
- if ( !pPor->IsFlyPortion() || ( pPor->GetPortion() &&
- !pPor->GetPortion()->IsMarginPortion() ) )
+ if ( !pPor->IsFlyPortion() || ( pPor->GetNextPortion() &&
+ !pPor->GetNextPortion()->IsMarginPortion() ) )
nX += pPor->PrtWidth();
}
if( pPor->IsMultiPortion() )
@@ -658,7 +658,7 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, TextFrameIndex const nOfst,
}
aInf.SetIdx( aInf.GetIdx() + pPor->GetLen() );
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
else
{
@@ -947,12 +947,12 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, TextFrameIndex const nOfst,
while( pTmp->HasFollow() && pTmp->GetExp().isEmpty() )
{
sal_uInt16 nAddX = pTmp->Width();
- SwLinePortion *pNext = pTmp->GetPortion();
+ SwLinePortion *pNext = pTmp->GetNextPortion();
while( pNext && !pNext->InFieldGrp() )
{
OSL_ENSURE( !pNext->GetLen(), "Where's my field follow?" );
nAddX = nAddX + pNext->Width();
- pNext = pNext->GetPortion();
+ pNext = pNext->GetNextPortion();
}
if( !pNext )
break;
@@ -987,8 +987,8 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, TextFrameIndex const nOfst,
if( pKanaComp && ( nKanaIdx + 1 ) < pKanaComp->size() )
++nKanaIdx;
}
- if ( !pPor->IsFlyPortion() || ( pPor->GetPortion() &&
- !pPor->GetPortion()->IsMarginPortion() ) )
+ if ( !pPor->IsFlyPortion() || ( pPor->GetNextPortion() &&
+ !pPor->GetNextPortion()->IsMarginPortion() ) )
nX += pPor->PrtWidth();
}
if( pPor->IsMultiPortion() &&
@@ -1010,11 +1010,11 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, TextFrameIndex const nOfst,
nPorHeight = pPor->Height();
nPorAscent = pPor->GetAscent();
}
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
if( aInf.GetIdx() == nOfst && pPor && pPor->InHyphGrp() &&
- pPor->GetPortion() && pPor->GetPortion()->InFixGrp() )
+ pPor->GetNextPortion() && pPor->GetNextPortion()->InFixGrp() )
{
// All special portions have to be skipped
// Taking the German word "zusammen" as example: zu-[FLY]sammen, 'u' == 19, 's' == 20; Right()
@@ -1028,7 +1028,7 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, TextFrameIndex const nOfst,
nPorHeight = pPor->Height();
nPorAscent = pPor->GetAscent();
}
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
}
if( pPor && pCMS )
@@ -1341,12 +1341,12 @@ TextFrameIndex SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoin
30 :
nWidth;
- while( pPor->GetPortion() && nWidth30 < nX && !pPor->IsBreakPortion() )
+ while( pPor->GetNextPortion() && nWidth30 < nX && !pPor->IsBreakPortion() )
{
nX = nX - nWidth;
nCurrStart = nCurrStart + pPor->GetLen();
bHolePortion = pPor->IsHolePortion();
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
nWidth = pPor->Width();
if ( m_pCurr->IsSpaceAdd() || pKanaComp )
{
@@ -1388,18 +1388,18 @@ TextFrameIndex SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoin
bLastHyph = pPor->InHyphGrp();
}
- const bool bLastPortion = (nullptr == pPor->GetPortion());
+ const bool bLastPortion = (nullptr == pPor->GetNextPortion());
if( nX==nWidth )
{
- SwLinePortion *pNextPor = pPor->GetPortion();
+ SwLinePortion *pNextPor = pPor->GetNextPortion();
while( pNextPor && pNextPor->InFieldGrp() && !pNextPor->Width() )
{
nCurrStart = nCurrStart + pPor->GetLen();
pPor = pNextPor;
if( !pPor->IsFlyPortion() && !pPor->IsMarginPortion() )
bLastHyph = pPor->InHyphGrp();
- pNextPor = pPor->GetPortion();
+ pNextPor = pPor->GetNextPortion();
}
}
@@ -1448,7 +1448,7 @@ TextFrameIndex SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoin
// 7849, 7816: pPor->GetHyphPortion is mandatory!
if( bHolePortion || ( !bRightAllowed && bLastHyph ) ||
- ( pPor->IsMarginPortion() && !pPor->GetPortion() &&
+ ( pPor->IsMarginPortion() && !pPor->GetNextPortion() &&
// 46598: Consider the situation: We might end up behind the last character,
// in the last line of a centered paragraph
nCurrStart < TextFrameIndex(rText.getLength())))
@@ -1495,13 +1495,13 @@ TextFrameIndex SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoin
!static_cast<SwFieldPortion*>(pPor)->HasFollow() ) )
++nCurrStart;
}
- else if ( ( !pPor->IsFlyPortion() || ( pPor->GetPortion() &&
- !pPor->GetPortion()->IsMarginPortion() &&
- !pPor->GetPortion()->IsHolePortion() ) )
+ else if ( ( !pPor->IsFlyPortion() || ( pPor->GetNextPortion() &&
+ !pPor->GetNextPortion()->IsMarginPortion() &&
+ !pPor->GetNextPortion()->IsHolePortion() ) )
&& ( nWidth/2 < nX ) &&
( !bFieldInfo ||
- ( pPor->GetPortion() &&
- pPor->GetPortion()->IsPostItsPortion() ) )
+ ( pPor->GetNextPortion() &&
+ pPor->GetNextPortion()->IsPostItsPortion() ) )
&& ( bRightAllowed || !bLastHyph ))
++nCurrStart;
@@ -1680,8 +1680,8 @@ TextFrameIndex SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoin
aDrawInf.GetCursorBidiLevel();
if( bFieldInfo && nLength == pPor->GetLen() &&
- ( ! pPor->GetPortion() ||
- ! pPor->GetPortion()->IsPostItsPortion() ) )
+ ( ! pPor->GetNextPortion() ||
+ ! pPor->GetNextPortion()->IsPostItsPortion() ) )
--nLength;
}
if( nOldProp )
@@ -1730,8 +1730,8 @@ TextFrameIndex SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoin
// 7684: We end up in front of the HyphPortion. We must assure
// that we end up in the string.
// If we are at end of line in front of FlyFrames, we must proceed the same way.
- if( nOffset && pPor->GetLen() == nLength && pPor->GetPortion() &&
- !pPor->GetPortion()->GetLen() && pPor->GetPortion()->InHyphGrp() )
+ if( nOffset && pPor->GetLen() == nLength && pPor->GetNextPortion() &&
+ !pPor->GetNextPortion()->GetLen() && pPor->GetNextPortion()->InHyphGrp() )
--nOffset;
return nOffset;
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 45741df205f6..56ec331f1b6b 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -194,11 +194,11 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
{
pTmpPrev->Move( rInf );
rInf.SetLast( pTmpPrev );
- pTmpPrev = pTmpPrev->GetPortion();
+ pTmpPrev = pTmpPrev->GetNextPortion();
OSL_ENSURE( pTmpPrev, "Underflow: losing control!" );
};
}
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
pPor = pTmpPrev;
if( pPor && // Skip flys and initials when underflow.
@@ -252,7 +252,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
rInf.SetFly( pFly );
CalcFlyWidth( rInf );
}
- rInf.GetLast()->SetPortion(nullptr);
+ rInf.GetLast()->SetNextPortion(nullptr);
// The SwLineLayout is an exception to this, which splits at the first
// portion change.
@@ -263,9 +263,9 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
{
const sal_uInt16 nOldWhich = m_pCurr->GetWhichPor();
*static_cast<SwLinePortion*>(m_pCurr) = *pPor;
- m_pCurr->SetPortion( pPor->GetPortion() );
+ m_pCurr->SetNextPortion( pPor->GetNextPortion() );
m_pCurr->SetWhichPor( nOldWhich );
- pPor->SetPortion( nullptr );
+ pPor->SetNextPortion( nullptr );
delete pPor;
pPor = m_pCurr;
}
@@ -273,7 +273,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
// Make sure that m_pFirstOfBorderMerge does not point to a portion which
// will be deleted by Truncate() below.
- SwLinePortion* pNext = pPor->GetPortion();
+ SwLinePortion* pNext = pPor->GetNextPortion();
while (pNext)
{
if (pNext == m_pFirstOfBorderMerge)
@@ -281,7 +281,7 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
m_pFirstOfBorderMerge = nullptr;
break;
}
- pNext = pNext->GetPortion();
+ pNext = pNext->GetNextPortion();
}
pPor->Truncate();
SwLinePortion *const pRest( rInf.GetRest() );
@@ -303,9 +303,9 @@ void SwTextFormatter::InsertPortion( SwTextFormatInfo &rInf,
// LineLayout...
if( pPor == m_pCurr )
{
- if ( m_pCurr->GetPortion() )
+ if ( m_pCurr->GetNextPortion() )
{
- pPor = m_pCurr->GetPortion();
+ pPor = m_pCurr->GetNextPortion();
}
// i#112181 - Prevent footnote anchor being wrapped to next line
@@ -315,10 +315,10 @@ void SwTextFormatter::InsertPortion( SwTextFormatInfo &rInf,
else
{
SwLinePortion *pLast = rInf.GetLast();
- if( pLast->GetPortion() )
+ if( pLast->GetNextPortion() )
{
- while( pLast->GetPortion() )
- pLast = pLast->GetPortion();
+ while( pLast->GetNextPortion() )
+ pLast = pLast->GetNextPortion();
rInf.SetLast( pLast );
}
pLast->Insert( pPor );
@@ -338,7 +338,7 @@ void SwTextFormatter::InsertPortion( SwTextFormatInfo &rInf,
{
pPor->Move( rInf );
rInf.SetLast( pPor );
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
}
@@ -477,7 +477,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
SwKernPortion* pKrn =
new SwKernPortion( *rInf.GetLast(), nLstHeight,
pLast->InFieldGrp() && pPor->InFieldGrp() );
- rInf.GetLast()->SetPortion( nullptr );
+ rInf.GetLast()->SetNextPortion( nullptr );
MergeCharacterBorder(*pKrn, rInf.GetLast()->FindLastPortion(), rInf);
InsertPortion( rInf, pKrn );
}
@@ -651,12 +651,12 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
OSL_ENSURE( pGridKernPortion, "No GridKernPortion available" );
// calculate size
- SwLinePortion* pTmpPor = pGridKernPortion->GetPortion();
+ SwLinePortion* pTmpPor = pGridKernPortion->GetNextPortion();
sal_uInt16 nSumWidth = pPor->Width();
while ( pTmpPor )
{
nSumWidth = nSumWidth + pTmpPor->Width();
- pTmpPor = pTmpPor->GetPortion();
+ pTmpPor = pTmpPor->GetNextPortion();
}
const SwTwips i = nSumWidth ?
@@ -690,7 +690,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
if( !pPor->IsDropPortion() )
{
SwLinePortion *pPrev = rInf.GetLast() ? rInf.GetLast()->FindLastPortion() : nullptr;
- for ( SwLinePortion *pNext = pPor ; pNext!= nullptr ; pNext=pNext->GetPortion())
+ for ( SwLinePortion *pNext = pPor ; pNext!= nullptr ; pNext=pNext->GetNextPortion())
{
if ( !pNext->IsParaPortion() )
MergeCharacterBorder(*pNext, pPrev, rInf);
@@ -717,8 +717,8 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
else if( rInf.GetLast() && rInf.LastKernPortion() )
rInf.GetLast()->FormatEOL( rInf );
}
- if( m_pCurr->GetPortion() && m_pCurr->GetPortion()->InNumberGrp()
- && static_cast<SwNumberPortion*>(m_pCurr->GetPortion())->IsHide() )
+ if( m_pCurr->GetNextPortion() && m_pCurr->GetNextPortion()->InNumberGrp()
+ && static_cast<SwNumberPortion*>(m_pCurr->GetNextPortion())->IsHide() )
rInf.SetNumDone( false );
// Delete fly in any case
@@ -923,7 +923,7 @@ SwTextPortion *SwTextFormatter::WhichTextPor( SwTextFormatInfo &rInf ) const
}
if( !pPor )
{
- if( !rInf.X() && !m_pCurr->GetPortion() && !m_pCurr->GetLen() )
+ if( !rInf.X() && !m_pCurr->GetNextPortion() && !m_pCurr->GetLen() )
pPor = m_pCurr;
else
pPor = new SwTextPortion;
@@ -1057,7 +1057,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
}
// 3. Kerning portions at beginning of line in grid mode
- if ( ! pPor && ! m_pCurr->GetPortion() )
+ if ( ! pPor && ! m_pCurr->GetNextPortion() )
{
SwTextGridItem const*const pGrid(
GetGridItem(GetTextFrame()->FindPageFrame()));
@@ -1117,7 +1117,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
pPor = static_cast<SwLinePortion*>(NewDropPortion( rInf ));
// 9. Kerning portions at beginning of line in grid mode
- if ( !pPor && !m_pCurr->GetPortion() )
+ if ( !pPor && !m_pCurr->GetNextPortion() )
{
SwTextGridItem const*const pGrid(
GetGridItem(GetTextFrame()->FindPageFrame()));
@@ -1127,7 +1127,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
}
// 10. Decimal tab portion at the beginning of each line in table cells
- if ( !pPor && !m_pCurr->GetPortion() &&
+ if ( !pPor && !m_pCurr->GetNextPortion() &&
GetTextFrame()->IsInTab() &&
GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::TAB_COMPAT))
{
@@ -1147,7 +1147,7 @@ static bool lcl_OldFieldRest( const SwLineLayout* pCurr )
{
if( !pCurr->GetNext() )
return false;
- const SwLinePortion *pPor = pCurr->GetNext()->GetPortion();
+ const SwLinePortion *pPor = pCurr->GetNext()->GetNextPortion();
bool bRet = false;
while( pPor && !bRet )
{
@@ -1155,7 +1155,7 @@ static bool lcl_OldFieldRest( const SwLineLayout* pCurr )
(pPor->IsMultiPortion() && static_cast<const SwMultiPortion*>(pPor)->IsFollowField());
if( !pPor->GetLen() )
break;
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
return bRet;
}
@@ -1518,7 +1518,7 @@ TextFrameIndex SwTextFormatter::FormatLine(TextFrameIndex const nStartPos)
flyStarts.push_back( nPOfst );
nPOfst += pPor->Width();
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
}
@@ -1563,8 +1563,8 @@ TextFrameIndex SwTextFormatter::FormatLine(TextFrameIndex const nStartPos)
//i#120864 For Special case that at the first calculation couldn't get
//correct height. And need to recalculate for the right height.
- SwLinePortion* pPorTmp = m_pCurr->GetPortion();
- if ( IsFlyInCntBase() && (!IsQuick() || (pPorTmp && pPorTmp->IsFlyCntPortion() && !pPorTmp->GetPortion() &&
+ SwLinePortion* pPorTmp = m_pCurr->GetNextPortion();
+ if ( IsFlyInCntBase() && (!IsQuick() || (pPorTmp && pPorTmp->IsFlyCntPortion() && !pPorTmp->GetNextPortion() &&
m_pCurr->Height() > pPorTmp->Height())))
{
sal_uInt16 nTmpAscent, nTmpHeight;
@@ -1618,7 +1618,7 @@ TextFrameIndex SwTextFormatter::FormatLine(TextFrameIndex const nStartPos)
while (pPor)
{
nSum += pPor->Width();
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
if (nSum > m_pCurr->Width())
@@ -1946,7 +1946,7 @@ bool SwTextFormatter::AllowRepaintOpt() const
{
SwLinePortion *pPos = m_pCurr->GetFirstPortion();
while ( pPos && !pPos->IsFlyPortion() )
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
bOptimizeRepaint = !pPos;
}
}
@@ -2104,7 +2104,7 @@ void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
const_cast<SwTextFormatter*>(this)->pMulti = nullptr;
}
pPos->Move( aTmpInf );
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
}
@@ -2151,7 +2151,7 @@ void SwTextFormatter::AlignFlyInCntBase( long nBaseLine ) const
nFlyAsc, nFlyDesc, nFlags );
}
}
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
}
@@ -2237,7 +2237,7 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const
}
aLine.Left( aLine.Left() + pPos->Width() );
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
}
return false;
@@ -2636,7 +2636,7 @@ void SwTextFormatter::MergeCharacterBorder( SwLinePortion& rPortion, SwLinePorti
if( nMaxAscent < pActPor->GetAscent() )
nMaxAscent = pActPor->GetAscent();
- pActPor = pActPor->GetPortion();
+ pActPor = pActPor->GetNextPortion();
if( !pActPor && !bReachCurrent )
{
pActPor = &rPortion;
@@ -2654,7 +2654,7 @@ void SwTextFormatter::MergeCharacterBorder( SwLinePortion& rPortion, SwLinePorti
if( nMaxAscent > pActPor->GetAscent() )
pActPor->SetAscent(nMaxAscent);
- pActPor = pActPor->GetPortion();
+ pActPor = pActPor->GetNextPortion();
if( !pActPor && !bReachCurrent )
{
pActPor = &rPortion;
@@ -2762,7 +2762,7 @@ namespace {
}
nX = nX + pPor->Width();
nIdx = nIdx + pPor->GetLen();
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
return nPOfst + rThis.GetLeftMargin();
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 4e65a4b9bedc..dcbea78f30e2 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -114,7 +114,7 @@ SwLinePortion *SwTextPainter::CalcPaintOfst( const SwRect &rPaint )
else
pPor->Move( GetInfo() );
pLast = pPor;
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
// 7529: if PostIts return also pLast.
@@ -177,7 +177,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
break;
}
}
- pPorIter = pPorIter->GetPortion();
+ pPorIter = pPorIter->GetNextPortion();
}
}
if( !bEndPor && nTmpLeft >= nMaxRight )
@@ -356,7 +356,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
}
// Portions, which lay "below" the text like post-its
- SwLinePortion *pNext = pPor->GetPortion();
+ SwLinePortion *pNext = pPor->GetNextPortion();
if( GetInfo().OnWin() && pNext && !pNext->Width() )
{
// Fix 11289: Fields were omitted here because of Last!=Owner during
@@ -646,7 +646,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
++nNumberOfPortions;
nTmpIdx += pPor->GetLen();
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
// resulting height
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index 0f7e796f1565..dd5d7efe39e9 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -302,14 +302,14 @@ void SwTextIter::TwipsToLine( const SwTwips y)
// Local helper function to check, if pCurr needs a field rest portion:
static bool lcl_NeedsFieldRest( const SwLineLayout* pCurr )
{
- const SwLinePortion *pPor = pCurr->GetPortion();
+ const SwLinePortion *pPor = pCurr->GetNextPortion();
bool bRet = false;
while( pPor && !bRet )
{
bRet = pPor->InFieldGrp() && static_cast<const SwFieldPortion*>(pPor)->HasFollow();
- if( !pPor->GetPortion() || !pPor->GetPortion()->InFieldGrp() )
+ if( !pPor->GetNextPortion() || !pPor->GetNextPortion()->InFieldGrp() )
break;
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
return bRet;
}
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index aa9f1f62f576..67e516ca2daf 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -74,8 +74,8 @@ void SwExpandPortion::Paint( const SwTextPaintInfo &rInf ) const
rInf.DrawBorder( *this );
// Do we have to repaint a post it portion?
- if( rInf.OnWin() && pPortion && !pPortion->Width() )
- pPortion->PrePaint( rInf, this );
+ if( rInf.OnWin() && mpNextPortion && !mpNextPortion->Width() )
+ mpNextPortion->PrePaint( rInf, this );
// The contents of field portions is not considered during the
// calculation of the directions. Therefore we let vcl handle
@@ -107,10 +107,10 @@ sal_uInt16 SwBlankPortion::MayUnderflow( const SwTextFormatInfo &rInf,
if( rInf.StopUnderflow() )
return 0;
const SwLinePortion *pPos = rInf.GetRoot();
- if( pPos->GetPortion() )
- pPos = pPos->GetPortion();
+ if( pPos->GetNextPortion() )
+ pPos = pPos->GetNextPortion();
while( pPos && pPos->IsBlankPortion() )
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
if( !pPos || !rInf.GetIdx() || ( !pPos->GetLen() && pPos == rInf.GetRoot() ) )
return 0; // There are just BlankPortions left
@@ -125,7 +125,7 @@ sal_uInt16 SwBlankPortion::MayUnderflow( const SwTextFormatInfo &rInf,
if( nIdx && !const_cast<SwTextFormatInfo&>(rInf).GetFly() )
{
while( pPos && !pPos->IsFlyPortion() )
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
if( !pPos )
{
// We check to see if there are useful line breaks, blanks or fields etc. left
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 5e6cc5e5d338..ff838aeb3e6b 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -624,9 +624,9 @@ void SwNumberPortion::Paint( const SwTextPaintInfo &rInf ) const
{
if ( IsHide() && rInf.GetParaPortion() && rInf.GetParaPortion()->GetNext() )
{
- SwLinePortion *pTmp = GetPortion();
+ SwLinePortion *pTmp = GetNextPortion();
while ( pTmp && !pTmp->InTextGrp() )
- pTmp = pTmp->GetPortion();
+ pTmp = pTmp->GetNextPortion();
if ( !pTmp )
return;
}
@@ -641,7 +641,7 @@ void SwNumberPortion::Paint( const SwTextPaintInfo &rInf ) const
{
nSumWidth = nSumWidth + pTmp->Width();
if ( static_cast<const SwNumberPortion*>(pTmp)->HasFollow() )
- pTmp = pTmp->GetPortion();
+ pTmp = pTmp->GetNextPortion();
else
{
nOffset = pTmp->Width() - static_cast<const SwNumberPortion*>(pTmp)->nFixWidth;
@@ -880,9 +880,9 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const
return;
if ( IsHide() && rInf.GetParaPortion() && rInf.GetParaPortion()->GetNext() )
{
- SwLinePortion *pTmp = GetPortion();
+ SwLinePortion *pTmp = GetNextPortion();
while ( pTmp && !pTmp->InTextGrp() )
- pTmp = pTmp->GetPortion();
+ pTmp = pTmp->GetNextPortion();
if ( !pTmp )
return;
}
@@ -915,7 +915,7 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const
if( m_bReplace )
{
- const long nTmpH = GetPortion() ? GetPortion()->GetAscent() : 120;
+ const long nTmpH = GetNextPortion() ? GetNextPortion()->GetAscent() : 120;
aSize = Size( nTmpH, nTmpH );
aPos.setY( rInf.Y() - nTmpH );
}
@@ -1038,7 +1038,7 @@ void SwTextFrame::StopAnimation( OutputDevice* pOut )
SwLineLayout *pLine = GetPara();
while( pLine )
{
- SwLinePortion *pPor = pLine->GetPortion();
+ SwLinePortion *pPor = pLine->GetNextPortion();
while( pPor )
{
if( pPor->IsGrfNumPortion() )
@@ -1046,7 +1046,7 @@ void SwTextFrame::StopAnimation( OutputDevice* pOut )
// The NumberPortion is always at the first char,
// which means we can cancel as soon as we've reached a portion
// with a length > 0
- pPor = pPor->GetLen() ? nullptr : pPor->GetPortion();
+ pPor = pPor->GetLen() ? nullptr : pPor->GetNextPortion();
}
pLine = pLine->GetLen() ? nullptr : pLine->GetNext();
}
@@ -1095,8 +1095,8 @@ void SwCombinedPortion::Paint( const SwTextPaintInfo &rInf ) const
rInf.DrawViewOpt( *this, POR_FLD );
// do we have to repaint a post it portion?
- if( rInf.OnWin() && pPortion && !pPortion->Width() )
- pPortion->PrePaint( rInf, this );
+ if( rInf.OnWin() && mpNextPortion && !mpNextPortion->Width() )
+ mpNextPortion->PrePaint( rInf, this );
const sal_Int32 nCount = m_aExpand.getLength();
if( !nCount )
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 888596ac60be..30a525657540 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -176,13 +176,13 @@ void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
{
if( pPos->InFixMargGrp() )
pLeft = static_cast<SwGluePortion*>(pPos);
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
if( pPos == pRight)
pPos = nullptr;
}
// Two adjoining FlyPortions are merged
- if( pRight && pLeft && pLeft->GetPortion() == pRight )
+ if( pRight && pLeft && pLeft->GetNextPortion() == pRight )
{
pRight->MoveAllGlue( pLeft );
pRight = nullptr;
@@ -233,20 +233,20 @@ void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
pRight->MoveGlue( pLeft, short( pPrev->PrtWidth() ) );
// Now fix the linking of our portions.
SwLinePortion *pPrevPrev = pPrev->FindPrevPortion( pLeft );
- pPrevPrev->SetPortion( pRight );
- pPrev->SetPortion( pRight->GetPortion() );
- pRight->SetPortion( pPrev );
- if ( pPrev->GetPortion() && pPrev->InTextGrp()
- && pPrev->GetPortion()->IsHolePortion() )
+ pPrevPrev->SetNextPortion( pRight );
+ pPrev->SetNextPortion( pRight->GetNextPortion() );
+ pRight->SetNextPortion( pPrev );
+ if ( pPrev->GetNextPortion() && pPrev->InTextGrp()
+ && pPrev->GetNextPortion()->IsHolePortion() )
{
SwHolePortion *pHolePor =
- static_cast<SwHolePortion*>(pPrev->GetPortion());
- if ( !pHolePor->GetPortion() ||
- !pHolePor->GetPortion()->InFixMargGrp() )
+ static_cast<SwHolePortion*>(pPrev->GetNextPortion());
+ if ( !pHolePor->GetNextPortion() ||
+ !pHolePor->GetNextPortion()->InFixMargGrp() )
{
pPrev->AddPrtWidth( pHolePor->GetBlankWidth() );
pPrev->SetLen(pPrev->GetLen() + TextFrameIndex(1));
- pPrev->SetPortion( pHolePor->GetPortion() );
+ pPrev->SetNextPortion( pHolePor->GetNextPortion() );
delete pHolePor;
}
}
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index ef435fc6f133..7b646331e9b3 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -213,35 +213,35 @@ SwLinePortion *SwLineLayout::Insert( SwLinePortion *pIns )
{
// First attribute change: copy mass and length from *pIns into the first
// text portion
- if( !pPortion )
+ if( !mpNextPortion )
{
if( GetLen() )
{
- pPortion = SwTextPortion::CopyLinePortion(*this);
+ mpNextPortion = SwTextPortion::CopyLinePortion(*this);
if( IsBlinking() && pBlink )
{
SetBlinking( false );
- pBlink->Replace( this, pPortion );
+ pBlink->Replace( this, mpNextPortion );
}
}
else
{
- SetPortion( pIns );
+ SetNextPortion( pIns );
return pIns;
}
}
// Call with scope or we'll end up with recursion!
- return pPortion->SwLinePortion::Insert( pIns );
+ return mpNextPortion->SwLinePortion::Insert( pIns );
}
SwLinePortion *SwLineLayout::Append( SwLinePortion *pIns )
{
// First attribute change: copy mass and length from *pIns into the first
// text portion
- if( !pPortion )
- pPortion = SwTextPortion::CopyLinePortion(*this);
+ if( !mpNextPortion )
+ mpNextPortion = SwTextPortion::CopyLinePortion(*this);
// Call with scope or we'll end up with recursion!
- return pPortion->SwLinePortion::Append( pIns );
+ return mpNextPortion->SwLinePortion::Append( pIns );
}
// For special treatment of empty lines
@@ -259,15 +259,15 @@ bool SwLineLayout::Format( SwTextFormatInfo &rInf )
// MarginPortion.
SwMarginPortion *SwLineLayout::CalcLeftMargin()
{
- SwMarginPortion *pLeft = (GetPortion() && GetPortion()->IsMarginPortion()) ?
- static_cast<SwMarginPortion *>(GetPortion()) : nullptr;
- if( !GetPortion() )
- SetPortion(SwTextPortion::CopyLinePortion(*this));
+ SwMarginPortion *pLeft = (GetNextPortion() && GetNextPortion()->IsMarginPortion()) ?
+ static_cast<SwMarginPortion *>(GetNextPortion()) : nullptr;
+ if( !GetNextPortion() )
+ SetNextPortion(SwTextPortion::CopyLinePortion(*this));
if( !pLeft )
{
pLeft = new SwMarginPortion;
- pLeft->SetPortion( GetPortion() );
- SetPortion( pLeft );
+ pLeft->SetNextPortion( GetNextPortion() );
+ SetNextPortion( pLeft );
}
else
{
@@ -275,18 +275,18 @@ SwMarginPortion *SwLineLayout::CalcLeftMargin()
pLeft->Width( 0 );
pLeft->SetLen(TextFrameIndex(0));
pLeft->SetAscent( 0 );
- pLeft->SetPortion( nullptr );
+ pLeft->SetNextPortion( nullptr );
pLeft->SetFixWidth(0);
}
- SwLinePortion *pPos = pLeft->GetPortion();
+ SwLinePortion *pPos = pLeft->GetNextPortion();
while( pPos )
{
if( pPos->IsFlyPortion() )
{
// The FlyPortion gets sucked out...
pLeft->Join( static_cast<SwGluePortion*>(pPos) );
- pPos = pLeft->GetPortion();
+ pPos = pLeft->GetNextPortion();
if( GetpKanaComp() && !GetKanaComp().empty() )
GetKanaComp().pop_front();
}
@@ -354,20 +354,20 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
bool bHasBlankPortion = false;
bool bHasOnlyBlankPortions = true;
- if( pPortion )
+ if( mpNextPortion )
{
SetContent( false );
- if( pPortion->IsBreakPortion() )
+ if( mpNextPortion->IsBreakPortion() )
{
- SetLen( pPortion->GetLen() );
+ SetLen( mpNextPortion->GetLen() );
if( GetLen() )
bTmpDummy = false;
}
else
{
const sal_uInt16 nLineHeight = Height();
- Init( GetPortion() );
- SwLinePortion *pPos = pPortion;
+ Init( GetNextPortion() );
+ SwLinePortion *pPos = mpNextPortion;
SwLinePortion *pLast = this;
sal_uInt16 nMaxDescent = 0;
@@ -384,7 +384,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
{
// Only take over Height and Ascent if the rest of the line
// is empty.
- if( !pPos->GetPortion() )
+ if( !pPos->GetNextPortion() )
{
if( !Height() )
Height( pPos->Height() );
@@ -392,7 +392,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
SetAscent( pPos->GetAscent() );
}
delete pLast->Cut( pPos );
- pPos = pLast->GetPortion();
+ pPos = pLast->GetNextPortion();
continue;
}
@@ -408,7 +408,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
lcl_HasOnlyBlanks( rInf.GetText(), nPorSttIdx, nPorSttIdx + pPos->GetLen() ) ) )
{
pLast = pPos;
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
bHasBlankPortion = true;
continue;
}
@@ -418,7 +418,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
if( pPos->IsDropPortion() && static_cast<SwDropPortion*>(pPos)->GetLines() > 1)
{
pLast = pPos;
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
continue;
}
@@ -529,7 +529,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
bTmpDummy &= !HasContent() && ( !pPos->Width() || pPos->IsFlyPortion() );
pLast = pPos;
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
if( pFlyCnt )
@@ -617,9 +617,9 @@ void SwLineLayout::MaxAscentDescent( SwTwips& _orAscent,
_orObjDescent = 0;
const SwLinePortion* pTmpPortion = this;
- if ( !pTmpPortion->GetLen() && pTmpPortion->GetPortion() )
+ if ( !pTmpPortion->GetLen() && pTmpPortion->GetNextPortion() )
{
- pTmpPortion = pTmpPortion->GetPortion();
+ pTmpPortion = pTmpPortion->GetNextPortion();
}
while ( pTmpPortion )
@@ -627,7 +627,7 @@ void SwLineLayout::MaxAscentDescent( SwTwips& _orAscent,
if ( !pTmpPortion->IsBreakPortion() && !pTmpPortion->IsFlyPortion() &&
( !_bNoFlyCntPorAndLinePor ||
( !pTmpPortion->IsFlyCntPortion() &&
- !(pTmpPortion == this && pTmpPortion->GetPortion() ) ) ) )
+ !(pTmpPortion == this && pTmpPortion->GetNextPortion() ) ) ) )
{
SwTwips nPortionAsc = static_cast<SwTwips>(pTmpPortion->GetAscent());
SwTwips nPortionDesc = static_cast<SwTwips>(pTmpPortion->Height()) -
@@ -649,7 +649,7 @@ void SwLineLayout::MaxAscentDescent( SwTwips& _orAscent,
_orDescent = std::max( _orDescent, nPortionDesc );
}
}
- pTmpPortion = pTmpPortion->GetPortion();
+ pTmpPortion = pTmpPortion->GetNextPortion();
}
}
@@ -670,7 +670,7 @@ SwLineLayout::SwLineLayout()
SwLinePortion *SwLineLayout::GetFirstPortion() const
{
- const SwLinePortion *pRet = pPortion ? pPortion : this;
+ const SwLinePortion *pRet = mpNextPortion ? mpNextPortion : this;
return const_cast<SwLinePortion*>(pRet);
}
@@ -2177,9 +2177,9 @@ const SwDropPortion *SwParaPortion::FindDropPortion() const
pLay = pLay->GetNext();
while( pLay )
{
- const SwLinePortion *pPos = pLay->GetPortion();
+ const SwLinePortion *pPos = pLay->GetNextPortion();
while ( pPos && !pPos->GetLen() )
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
if( pPos && pPos->IsDropPortion() )
return static_cast<const SwDropPortion *>(pPos);
pLay = pLay->GetLen() ? nullptr : pLay->GetNext();
@@ -2194,7 +2194,7 @@ void SwLineLayout::Init( SwLinePortion* pNextPortion )
SetLen(TextFrameIndex(0));
SetAscent( 0 );
SetRealHeight( 0 );
- SetPortion( pNextPortion );
+ SetNextPortion( pNextPortion );
}
// looks for hanging punctuation portions in the paragraph
@@ -2202,7 +2202,7 @@ void SwLineLayout::Init( SwLinePortion* pNextPortion )
// If no such portion is found, the Margin/Hanging-flags will be updated.
SwTwips SwLineLayout::GetHangingMargin_() const
{
- SwLinePortion* pPor = GetPortion();
+ SwLinePortion* pPor = GetNextPortion();
bool bFound = false;
SwTwips nDiff = 0;
while( pPor)
@@ -2214,10 +2214,10 @@ SwTwips SwLineLayout::GetHangingMargin_() const
bFound = true;
}
// the last post its portion
- else if ( pPor->IsPostItsPortion() && ! pPor->GetPortion() )
+ else if ( pPor->IsPostItsPortion() && ! pPor->GetNextPortion() )
nDiff = nAscent;
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
if( !bFound ) // update the hanging-flag
const_cast<SwLineLayout*>(this)->SetHanging( false );
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index 7a9c81925fb7..5cb568f89641 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -30,7 +30,7 @@
static bool ChkChain( SwLinePortion *pStart )
{
- SwLinePortion *pPor = pStart->GetPortion();
+ SwLinePortion *pPor = pStart->GetNextPortion();
sal_uInt16 nCount = 0;
while( pPor )
{
@@ -40,13 +40,13 @@ static bool ChkChain( SwLinePortion *pStart )
if( nCount >= 200 || pPor == pStart )
{
// the lifesaver
- pPor = pStart->GetPortion();
- pStart->SetPortion(nullptr);
+ pPor = pStart->GetNextPortion();
+ pStart->SetNextPortion(nullptr);
pPor->Truncate();
- pStart->SetPortion( pPor );
+ pStart->SetNextPortion( pPor );
return false;
}
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
return true;
}
@@ -69,7 +69,7 @@ sal_uInt16 SwLinePortion::GetViewWidth( const SwTextSizeInfo & ) const
}
SwLinePortion::SwLinePortion( ) :
- pPortion( nullptr ),
+ mpNextPortion( nullptr ),
nLineLength( 0 ),
nAscent( 0 ),
nWhichPor( POR_LIN ),
@@ -154,24 +154,24 @@ void SwLinePortion::CalcTextSize( const SwTextSizeInfo &rInf )
// all following portions will be deleted
void SwLinePortion::Truncate_()
{
- SwLinePortion *pPos = pPortion;
+ SwLinePortion *pPos = mpNextPortion;
do
{ OSL_ENSURE( pPos != this, "SwLinePortion::Truncate: loop" );
SwLinePortion *pLast = pPos;
- pPos = pPos->GetPortion();
- pLast->SetPortion( nullptr );
+ pPos = pPos->GetNextPortion();
+ pLast->SetNextPortion( nullptr );
delete pLast;
} while( pPos );
- pPortion = nullptr;
+ mpNextPortion = nullptr;
}
// It always will be inserted after us.
SwLinePortion *SwLinePortion::Insert( SwLinePortion *pIns )
{
- pIns->FindLastPortion()->SetPortion( pPortion );
- SetPortion( pIns );
+ pIns->FindLastPortion()->SetNextPortion( mpNextPortion );
+ SetNextPortion( pIns );
#if OSL_DEBUG_LEVEL > 0
ChkChain( this );
#endif
@@ -182,9 +182,9 @@ SwLinePortion *SwLinePortion::FindLastPortion()
{
SwLinePortion *pPos = this;
// Find the end and link pLinPortion to the last one...
- while( pPos->GetPortion() )
+ while( pPos->GetNextPortion() )
{
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
return pPos;
}
@@ -192,8 +192,8 @@ SwLinePortion *SwLinePortion::FindLastPortion()
SwLinePortion *SwLinePortion::Append( SwLinePortion *pIns )
{
SwLinePortion *pPos = FindLastPortion();
- pPos->SetPortion( pIns );
- pIns->SetPortion( nullptr );
+ pPos->SetNextPortion( pIns );
+ pIns->SetNextPortion( nullptr );
#if OSL_DEBUG_LEVEL > 0
ChkChain( this );
#endif
@@ -204,8 +204,8 @@ SwLinePortion *SwLinePortion::Cut( SwLinePortion *pVictim )
{
SwLinePortion *pPrev = pVictim->FindPrevPortion( this );
OSL_ENSURE( pPrev, "SwLinePortion::Cut(): can't cut" );
- pPrev->SetPortion( pVictim->GetPortion() );
- pVictim->SetPortion(nullptr);
+ pPrev->SetNextPortion( pVictim->GetNextPortion() );
+ pVictim->SetNextPortion(nullptr);
return pVictim;
}
@@ -213,11 +213,11 @@ SwLinePortion *SwLinePortion::FindPrevPortion( const SwLinePortion *pRoot )
{
OSL_ENSURE( pRoot != this, "SwLinePortion::FindPrevPortion(): invalid root" );
SwLinePortion *pPos = const_cast<SwLinePortion*>(pRoot);
- while( pPos->GetPortion() && pPos->GetPortion() != this )
+ while( pPos->GetNextPortion() && pPos->GetNextPortion() != this )
{
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
- OSL_ENSURE( pPos->GetPortion(),
+ OSL_ENSURE( pPos->GetNextPortion(),
"SwLinePortion::FindPrevPortion: blowing in the wind");
return pPos;
}
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 729740024890..661eaf7b0534 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -53,7 +53,7 @@ class SwLinePortion: public SwPosSize
{
protected:
// Here we have areas with different attributes
- SwLinePortion *pPortion;
+ SwLinePortion *mpNextPortion;
// Count of chars and spaces on the line
TextFrameIndex nLineLength;
sal_uInt16 nAscent; // Maximum ascender
@@ -71,11 +71,11 @@ public:
virtual ~SwLinePortion();
// Access methods
- SwLinePortion *GetPortion() const { return pPortion; }
+ SwLinePortion *GetNextPortion() const { return mpNextPortion; }
inline SwLinePortion &operator=(const SwLinePortion &rPortion);
TextFrameIndex GetLen() const { return nLineLength; }
void SetLen(TextFrameIndex const nLen) { nLineLength = nLen; }
- void SetPortion( SwLinePortion *pNew ){ pPortion = pNew; }
+ 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; }
@@ -186,7 +186,7 @@ inline SwLinePortion &SwLinePortion::operator=(const SwLinePortion &rPortion)
inline SwLinePortion::SwLinePortion(const SwLinePortion &rPortion) :
SwPosSize( rPortion ),
- pPortion( nullptr ),
+ mpNextPortion( nullptr ),
nLineLength( rPortion.nLineLength ),
nAscent( rPortion.nAscent ),
nWhichPor( rPortion.nWhichPor ),
@@ -197,7 +197,7 @@ inline SwLinePortion::SwLinePortion(const SwLinePortion &rPortion) :
inline void SwLinePortion::Truncate()
{
- if ( pPortion )
+ if ( mpNextPortion )
Truncate_();
}
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index b8c742410a4f..a5b349e20e98 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -143,7 +143,7 @@ void SwMultiPortion::ActualizeTabulator()
{
SwLinePortion* pPor = GetRoot().GetFirstPortion();
// First line
- for( bTab1 = bTab2 = false; pPor; pPor = pPor->GetPortion() )
+ for( bTab1 = bTab2 = false; pPor; pPor = pPor->GetNextPortion() )
if( pPor->InTabGrp() )
SetTab1( true );
if( GetRoot().GetNext() )
@@ -154,7 +154,7 @@ void SwMultiPortion::ActualizeTabulator()
{
if( pPor->InTabGrp() )
SetTab2( true );
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
} while ( pPor );
}
}
@@ -221,7 +221,7 @@ TextFrameIndex SwBidiPortion::GetSpaceCnt(const SwTextSizeInfo &rInf) const
TextFrameIndex nNull(0);
TextFrameIndex nBlanks(0);
- for (SwLinePortion* pPor = GetRoot().GetFirstPortion(); pPor; pPor = pPor->GetPortion())
+ for (SwLinePortion* pPor = GetRoot().GetFirstPortion(); pPor; pPor = pPor->GetNextPortion())
{
if( pPor->InTextGrp() )
nBlanks = nBlanks + static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nNull );
@@ -458,7 +458,7 @@ void SwDoubleLinePortion::CalcBlanks( SwTextFormatInfo &rInf )
TextFrameIndex nStart = rInf.GetIdx();
SetTab1( false );
SetTab2( false );
- for (nBlank1 = TextFrameIndex(0); pPor; pPor = pPor->GetPortion())
+ for (nBlank1 = TextFrameIndex(0); pPor; pPor = pPor->GetNextPortion())
{
if( pPor->InTextGrp() )
nBlank1 = nBlank1 + static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nNull );
@@ -472,7 +472,7 @@ void SwDoubleLinePortion::CalcBlanks( SwTextFormatInfo &rInf )
pPor = GetRoot().GetNext()->GetFirstPortion();
nLineDiff -= GetRoot().GetNext()->Width();
}
- for (nBlank2 = TextFrameIndex(0); pPor; pPor = pPor->GetPortion())
+ for (nBlank2 = TextFrameIndex(0); pPor; pPor = pPor->GetNextPortion())
{
if( pPor->InTextGrp() )
nBlank2 = nBlank2 + static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nNull );
@@ -601,11 +601,11 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
pField->SetFollow( true );
if( OnTop() )
- GetRoot().SetPortion( pField );
+ GetRoot().SetNextPortion( pField );
else
{
GetRoot().SetNext( new SwLineLayout() );
- GetRoot().GetNext()->SetPortion( pField );
+ GetRoot().GetNext()->SetNextPortion( pField );
}
// ruby portions have the same direction as the frame directions
@@ -667,7 +667,7 @@ void SwRubyPortion::Adjust_( SwTextFormatInfo &rInf )
{
TextFrameIndex nCharCnt(0);
SwLinePortion *pPor;
- for( pPor = pCurr->GetFirstPortion(); pPor; pPor = pPor->GetPortion() )
+ for( pPor = pCurr->GetFirstPortion(); pPor; pPor = pPor->GetNextPortion() )
{
if( pPor->InTextGrp() )
static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nCharCnt );
@@ -696,14 +696,14 @@ void SwRubyPortion::Adjust_( SwTextFormatInfo &rInf )
}
if( nLeft || nRight )
{
- if( !pCurr->GetPortion() )
- pCurr->SetPortion(SwTextPortion::CopyLinePortion(*pCurr));
+ if( !pCurr->GetNextPortion() )
+ pCurr->SetNextPortion(SwTextPortion::CopyLinePortion(*pCurr));
if( nLeft )
{
SwMarginPortion *pMarg = new SwMarginPortion;
pMarg->AddPrtWidth( nLeft );
- pMarg->SetPortion( pCurr->GetPortion() );
- pCurr->SetPortion( pMarg );
+ pMarg->SetNextPortion( pCurr->GetNextPortion() );
+ pCurr->SetNextPortion( pMarg );
}
if( nRight )
{
@@ -736,7 +736,7 @@ void SwRubyPortion::CalcRubyOffset()
{
if( pPor->InFieldGrp() )
pField = static_cast<const SwFieldPortion*>(pPor);
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
if( pField )
{
@@ -1543,9 +1543,9 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
rMulti.Height( nOldHeight );
// do we have to repaint a post it portion?
- if( GetInfo().OnWin() && rMulti.GetPortion() &&
- ! rMulti.GetPortion()->Width() )
- rMulti.GetPortion()->PrePaint( GetInfo(), &rMulti );
+ if( GetInfo().OnWin() && rMulti.GetNextPortion() &&
+ ! rMulti.GetNextPortion()->Width() )
+ rMulti.GetNextPortion()->PrePaint( GetInfo(), &rMulti );
// old values must be saved and restored at the end
TextFrameIndex const nOldLen = GetInfo().GetLen();
@@ -1707,7 +1707,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
else
bSeeked = false;
- SwLinePortion *pNext = pPor->GetPortion();
+ SwLinePortion *pNext = pPor->GetNextPortion();
if(GetInfo().OnWin() && pNext && !pNext->Width() )
{
if ( !bSeeked )
@@ -1834,11 +1834,11 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
static bool lcl_ExtractFieldFollow( SwLineLayout* pLine, SwLinePortion* &rpField )
{
SwLinePortion* pLast = pLine;
- rpField = pLine->GetPortion();
+ rpField = pLine->GetNextPortion();
while( rpField && !rpField->InFieldGrp() )
{
pLast = rpField;
- rpField = rpField->GetPortion();
+ rpField = rpField->GetNextPortion();
}
bool bRet = rpField != nullptr;
if( bRet )
@@ -1846,7 +1846,7 @@ static bool lcl_ExtractFieldFollow( SwLineLayout* pLine, SwLinePortion* &rpField
if( static_cast<SwFieldPortion*>(rpField)->IsFollow() )
{
rpField->Truncate();
- pLast->SetPortion( nullptr );
+ pLast->SetNextPortion( nullptr );
}
else
rpField = nullptr;
@@ -1979,13 +1979,13 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
}
else
{
- pFirstRest = rMulti.GetRoot().GetPortion();
+ pFirstRest = rMulti.GetRoot().GetNextPortion();
pSecondRest = rMulti.GetRoot().GetNext() ?
- rMulti.GetRoot().GetNext()->GetPortion() : nullptr;
+ rMulti.GetRoot().GetNext()->GetNextPortion() : nullptr;
if( pFirstRest )
- rMulti.GetRoot().SetPortion( nullptr );
+ rMulti.GetRoot().SetNextPortion( nullptr );
if( pSecondRest )
- rMulti.GetRoot().GetNext()->SetPortion( nullptr );
+ rMulti.GetRoot().GetNext()->SetNextPortion( nullptr );
rMulti.SetFormatted();
nMultiLen = nMultiLen - rInf.GetIdx();
}
@@ -2097,7 +2097,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
BuildPortions( aTmp );
const SwLinePortion *pRightPortion = rMulti.OnRight() ?
- rMulti.GetRoot().GetNext()->GetPortion() : nullptr;
+ rMulti.GetRoot().GetNext()->GetNextPortion() : nullptr;
if (pRightPortion)
{
// The ruby text on the right is vertical.
@@ -2255,7 +2255,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
if( pNextSecond )
{
pTmp->GetRoot().SetNext( new SwLineLayout() );
- pTmp->GetRoot().GetNext()->SetPortion( pNextSecond );
+ pTmp->GetRoot().GetNext()->SetNextPortion( pNextSecond );
}
pTmp->SetFollowField();
}
@@ -2287,16 +2287,16 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
SwLinePortion* pPor = aRoot.GetFirstPortion();
while ( pPor )
{
- if ( pPor->GetPortion() && pPor->GetPortion()->IsHolePortion() )
+ if ( pPor->GetNextPortion() && pPor->GetNextPortion()->IsHolePortion() )
{
- SwLinePortion* pHolePor = pPor->GetPortion();
- pPor->SetPortion( nullptr );
+ SwLinePortion* pHolePor = pPor->GetNextPortion();
+ pPor->SetNextPortion( nullptr );
aRoot.SetLen( aRoot.GetLen() - pHolePor->GetLen() );
rMulti.SetLen( rMulti.GetLen() - pHolePor->GetLen() );
- rMulti.SetPortion( pHolePor );
+ rMulti.SetNextPortion( pHolePor );
break;
}
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
pTmp = new SwBidiPortion( nMultiLen + rInf.GetIdx(),
@@ -2314,7 +2314,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
if( pNextFirst && pTmp )
{
pTmp->SetFollowField();
- pTmp->GetRoot().SetPortion( pNextFirst );
+ pTmp->GetRoot().SetNextPortion( pNextFirst );
}
else
// A follow field portion is still waiting. If nobody wants it,
@@ -2380,7 +2380,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
pField = nullptr;
pTmpMulti = static_cast<const SwMultiPortion*>(pPor);
}
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
// If the last portion is a multi-portion, we enter it
// and look for a field portion inside.
// If we are already in a multiportion, we could change to the
@@ -2476,7 +2476,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
pLay->SetNext( new SwLineLayout() );
pLay = pLay->GetNext();
}
- pLay->SetPortion( pRest );
+ pLay->SetNextPortion( pRest );
}
return pTmp;
}
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 5caa4d716c0a..c00393358385 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -89,7 +89,7 @@ sal_uInt16 SwBreakPortion::GetViewWidth( const SwTextSizeInfo & ) const
{ return 0; }
SwLinePortion *SwBreakPortion::Compress()
-{ return (GetPortion() && GetPortion()->InTextGrp() ? nullptr : this); }
+{ return (GetNextPortion() && GetNextPortion()->InTextGrp() ? nullptr : this); }
void SwBreakPortion::Paint( const SwTextPaintInfo &rInf ) const
{
@@ -149,8 +149,8 @@ void SwKernPortion::Paint( const SwTextPaintInfo &rInf ) const
rInf.DrawBorder( *this );
// do we have to repaint a post it portion?
- if( rInf.OnWin() && pPortion && !pPortion->Width() )
- pPortion->PrePaint( rInf, this );
+ if( rInf.OnWin() && mpNextPortion && !mpNextPortion->Width() )
+ mpNextPortion->PrePaint( rInf, this );
if( rInf.GetFont()->IsPaintBlank() )
{
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 73bf691adfa1..b1b0b317e77d 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -96,11 +96,11 @@ static TextFrameIndex lcl_AddSpace(const SwTextSizeInfo &rInf,
if (!MsLangId::isKorean(aLang))
{
- const SwLinePortion* pPor = rPor.GetPortion();
+ const SwLinePortion* pPor = rPor.GetNextPortion();
if ( pPor && ( pPor->IsKernPortion() ||
pPor->IsControlCharPortion() ||
pPor->IsPostItsPortion() ) )
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
nCnt += SwScriptInfo::CountCJKCharacters( *pStr, nPos, nEnd, aLang );
@@ -136,11 +136,11 @@ static TextFrameIndex lcl_AddSpace(const SwTextSizeInfo &rInf,
{
nCnt = SwScriptInfo::ThaiJustify( *pStr, nullptr, nullptr, nPos, nEnd - nPos );
- const SwLinePortion* pPor = rPor.GetPortion();
+ const SwLinePortion* pPor = rPor.GetNextPortion();
if ( pPor && ( pPor->IsKernPortion() ||
pPor->IsControlCharPortion() ||
pPor->IsPostItsPortion() ) )
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
if ( nCnt && ( ! pPor || pPor->IsHolePortion() || pPor->InFixMargGrp() ) )
--nCnt;
@@ -177,9 +177,9 @@ static TextFrameIndex lcl_AddSpace(const SwTextSizeInfo &rInf,
if (nPos < TextFrameIndex(rInf.GetText().getLength()))
{
sal_uInt8 nNextScript = 0;
- const SwLinePortion* pPor = rPor.GetPortion();
+ const SwLinePortion* pPor = rPor.GetNextPortion();
if ( pPor && pPor->IsKernPortion() )
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
if (!pPor || pPor->InFixMargGrp())
return nCnt;
@@ -448,7 +448,7 @@ bool SwTextPortion::Format( SwTextFormatInfo &rInf )
Width( 0 );
SetLen( TextFrameIndex(0) );
SetAscent( 0 );
- SetPortion( nullptr ); // ????
+ SetNextPortion( nullptr ); // ????
return true;
}
@@ -470,8 +470,8 @@ bool SwTextPortion::Format( SwTextFormatInfo &rInf )
void SwTextPortion::FormatEOL( SwTextFormatInfo &rInf )
{
if( !(
- ( !GetPortion() || ( GetPortion()->IsKernPortion() &&
- !GetPortion()->GetPortion() ) ) &&
+ ( !GetNextPortion() || ( GetNextPortion()->IsKernPortion() &&
+ !GetNextPortion()->GetNextPortion() ) ) &&
GetLen() &&
rInf.GetIdx() < TextFrameIndex(rInf.GetText().getLength()) &&
TextFrameIndex(1) < rInf.GetIdx() &&
@@ -548,8 +548,8 @@ void SwTextPortion::Paint( const SwTextPaintInfo &rInf ) const
rInf.DrawBorder( *this );
// do we have to repaint a post it portion?
- if( rInf.OnWin() && pPortion && !pPortion->Width() )
- pPortion->PrePaint( rInf, this );
+ if( rInf.OnWin() && mpNextPortion && !mpNextPortion->Width() )
+ mpNextPortion->PrePaint( rInf, this );
auto const* pWrongList = rInf.GetpWrongList();
auto const* pGrammarCheckList = rInf.GetGrammarCheckList();
@@ -652,13 +652,13 @@ long SwTextPortion::CalcSpacing( long nSpaceAdd, const SwTextSizeInfo &rInf ) co
{
nSpaceAdd = -nSpaceAdd;
nCnt = GetLen();
- SwLinePortion* pPor = GetPortion();
+ SwLinePortion* pPor = GetNextPortion();
// we do not want an extra space in front of margin portions
if ( nCnt )
{
while ( pPor && !pPor->Width() && ! pPor->IsHolePortion() )
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
if ( !pPor || pPor->InFixMargGrp() || pPor->IsHolePortion() )
--nCnt;
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 99df1d7fe026..b6250bee6469 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -673,7 +673,7 @@ void SwTextPainter::PaintDropPortion()
while( pPor && !pPor->IsDropPortion() )
{
nX = nX + pPor->Width();
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
Point aLineOrigin( GetTopLeft() );
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 4e610dff40fc..f1f3708f9fde 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -3417,12 +3417,12 @@ void SwTextFrame::CalcAdditionalFirstLineOffset()
{
SwTwips nNumberPortionWidth( pFirstPortion->Width() );
- const SwLinePortion* pPortion = pFirstPortion->GetPortion();
+ const SwLinePortion* pPortion = pFirstPortion->GetNextPortion();
while ( pPortion &&
pPortion->InNumberGrp() && !pPortion->IsFootnoteNumPortion())
{
nNumberPortionWidth += pPortion->Width();
- pPortion = pPortion->GetPortion();
+ pPortion = pPortion->GetNextPortion();
}
if ( ( IsRightToLeft() &&
@@ -3797,7 +3797,7 @@ void SwTextFrame::VisitPortions( SwPortionHandler& rPH ) const
while ( pPor )
{
pPor->HandlePortion( rPH );
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
rPH.LineBreak(pLine->Width());
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 6c32d30b9795..2682ee021493 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1048,7 +1048,7 @@ TextFrameIndex SwTextFormatter::FormatQuoVadis(TextFrameIndex const nOffset)
if ( pPor->IsFlyPortion() )
nLastLeft = static_cast<SwFlyPortion*>(pPor)->GetFix() +
static_cast<SwFlyPortion*>(pPor)->Width();
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
// The old game all over again: we want the Line to wrap around
@@ -1106,7 +1106,7 @@ TextFrameIndex SwTextFormatter::FormatQuoVadis(TextFrameIndex const nOffset)
pGlue->Width( 0 );
pGlue->SetLen(TextFrameIndex(0));
pGlue->SetAscent( 0 );
- pGlue->SetPortion( nullptr );
+ pGlue->SetNextPortion( nullptr );
pGlue->SetFixWidth(0);
}
@@ -1160,7 +1160,7 @@ TextFrameIndex SwTextFormatter::FormatQuoVadis(TextFrameIndex const nOffset)
pGlue = new SwGluePortion(0);
pGlue->Width( nLastLeft );
pPor->Append( pGlue );
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
}
@@ -1170,9 +1170,9 @@ TextFrameIndex SwTextFormatter::FormatQuoVadis(TextFrameIndex const nOffset)
{
// pPor->Append deletes the pPortion pointer of pPor.
// Therefore we have to keep a pointer to the next portion
- pQuo = static_cast<SwQuoVadisPortion*>(pCurrPor->GetPortion());
+ pQuo = static_cast<SwQuoVadisPortion*>(pCurrPor->GetNextPortion());
pPor->Append( pCurrPor );
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
pCurrPor = pQuo;
}
@@ -1480,7 +1480,7 @@ void SwParaPortion::SetErgoSumNum( const OUString& rErgo )
{
if ( pPor->IsQuoVadisPortion() )
pQuo = static_cast<SwQuoVadisPortion*>(pPor);
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
if( pQuo )
pQuo->SetNumber( rErgo );
@@ -1502,7 +1502,7 @@ bool SwParaPortion::UpdateQuoVadis( const OUString &rQuo )
{
if ( pPor->IsQuoVadisPortion() )
pQuo = static_cast<SwQuoVadisPortion*>(pPor);
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
if( !pQuo )
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 12badb24e92e..887f1e154cca 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -90,8 +90,8 @@ bool SwTextFrame::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
if( aLine.Prev() )
{
SwLinePortion *pPor = aLine.GetCurr()->GetFirstPortion();
- while( pPor->GetPortion() )
- pPor = pPor->GetPortion();
+ while( pPor->GetNextPortion() )
+ pPor = pPor->GetNextPortion();
if( pPor->GetWhichPor() == POR_SOFTHYPH ||
pPor->GetWhichPor() == POR_SOFTHYPHSTR )
aLine.Next();
@@ -167,7 +167,7 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
// at which line breaking is possible. So we search for the first
// HyphPortion in the specified range.
- SwLinePortion *pPos = m_pCurr->GetPortion();
+ SwLinePortion *pPos = m_pCurr->GetNextPortion();
const TextFrameIndex nPamStart = rHyphInf.m_nStart;
nWrdStart = m_nStart;
const TextFrameIndex nEnd = rHyphInf.m_nEnd;
@@ -190,7 +190,7 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
}
nWrdStart = nWrdStart + pPos->GetLen();
- pPos = pPos->GetPortion();
+ pPos = pPos->GetNextPortion();
}
// When pPos is null, no hyphen position was found.
if( !pPos )
@@ -254,11 +254,11 @@ bool SwTextPortion::CreateHyphen( SwTextFormatInfo &rInf, SwTextGuess const &rGu
{
const Reference< XHyphenatedWord >& xHyphWord = rGuess.HyphWord();
- OSL_ENSURE( !pPortion, "SwTextPortion::CreateHyphen(): another portion, another planet..." );
+ OSL_ENSURE( !mpNextPortion, "SwTextPortion::CreateHyphen(): another portion, another planet..." );
OSL_ENSURE( xHyphWord.is(), "SwTextPortion::CreateHyphen(): You are lucky! The code is robust here." );
if( rInf.IsHyphForbud() ||
- pPortion || // robust
+ mpNextPortion || // robust
!xHyphWord.is() || // more robust
// multi-line fields can't be hyphenated interactively
( rInf.IsInterHyph() && InFieldGrp() ) )
@@ -539,9 +539,9 @@ void SwSoftHyphPortion::FormatEOL( SwTextFormatInfo &rInf )
bool SwSoftHyphPortion::GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const
{
if( IsExpand() || ( rInf.OnWin() && rInf.GetOpt().IsSoftHyph() ) ||
- ( GetPortion() && ( GetPortion()->InFixGrp() ||
- GetPortion()->IsDropPortion() || GetPortion()->IsLayPortion() ||
- GetPortion()->IsParaPortion() || GetPortion()->IsBreakPortion() ) ) )
+ ( GetNextPortion() && ( GetNextPortion()->InFixGrp() ||
+ GetNextPortion()->IsDropPortion() || GetNextPortion()->IsLayPortion() ||
+ GetNextPortion()->IsParaPortion() || GetNextPortion()->IsBreakPortion() ) ) )
{
return SwHyphPortion::GetExpText( rInf, rText );
}
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 3c32608813c3..488c60076da7 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -204,10 +204,10 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto
}
if( m_pCurr->HasForcedLeftMargin() )
{
- SwLinePortion* pPor = m_pCurr->GetPortion();
+ SwLinePortion* pPor = m_pCurr->GetNextPortion();
while( pPor && !pPor->IsFlyPortion() )
{
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
if ( pPor )
{
@@ -424,7 +424,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf )
Width( 0 );
SetLen( TextFrameIndex(0) );
SetAscent( 0 );
- SetPortion( nullptr ); //?????
+ SetNextPortion( nullptr ); //?????
}
return true;
}
@@ -443,13 +443,13 @@ bool SwTabPortion::PostFormat( SwTextFormatInfo &rInf )
// If the tab position is larger than the right margin, it gets scaled down by default.
// However, if compat mode enabled, we allow tabs to go over the margin: the rest of the paragraph is not broken into lines.
const sal_uInt16 nRight = bTabOverMargin ? GetTabPos() : std::min(GetTabPos(), rInf.Width());
- const SwLinePortion *pPor = GetPortion();
+ const SwLinePortion *pPor = GetNextPortion();
sal_uInt16 nPorWidth = 0;
while( pPor )
{
nPorWidth = nPorWidth + pPor->Width();
- pPor = pPor->GetPortion();
+ pPor = pPor->GetNextPortion();
}
const sal_uInt16 nWhich = GetWhichPor();
@@ -538,8 +538,8 @@ void SwTabPortion::Paint( const SwTextPaintInfo &rInf ) const
rInf.DrawBorder( *this );
// do we have to repaint a post it portion?
- if( rInf.OnWin() && pPortion && !pPortion->Width() )
- pPortion->PrePaint( rInf, this );
+ if( rInf.OnWin() && mpNextPortion && !mpNextPortion->Width() )
+ mpNextPortion->PrePaint( rInf, this );
// display special characters
if( rInf.OnWin() && rInf.GetOpt().IsTab() )