diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-13 14:47:58 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-13 15:05:16 +0100 |
commit | ef7e9d5c8d64ec168927267067ffb4b2a539086d (patch) | |
tree | 9f781a8a78601a0999aa386d04c893f0e6c995d7 /sw | |
parent | 12dcf5e6e770b1933252a1f919663ba45ded4cdf (diff) |
sw: prefix members of SwTextIter
Kendy says this helps his latest changes to the
bin/rename-sw-abbreviations.sh script.
Change-Id: I95d82c5e8d69360e82154fa0390a6b2d1b9bf5d4
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/frminf.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/text/itradj.cxx | 34 | ||||
-rw-r--r-- | sw/source/core/text/itrcrsr.cxx | 194 | ||||
-rw-r--r-- | sw/source/core/text/itrform2.cxx | 350 | ||||
-rw-r--r-- | sw/source/core/text/itrpaint.cxx | 42 | ||||
-rw-r--r-- | sw/source/core/text/itrtxt.cxx | 132 | ||||
-rw-r--r-- | sw/source/core/text/itrtxt.hxx | 120 | ||||
-rw-r--r-- | sw/source/core/text/pormulti.cxx | 76 | ||||
-rw-r--r-- | sw/source/core/text/txtdrop.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/text/txtfld.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/text/txtftn.cxx | 108 | ||||
-rw-r--r-- | sw/source/core/text/txthyph.cxx | 20 | ||||
-rw-r--r-- | sw/source/core/text/txttab.cxx | 46 |
13 files changed, 580 insertions, 580 deletions
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx index b59345a5ef9a..97ddfefba5ac 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 2d9cc7a37e71..c0670bd09e28 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 35d7c5188705..2b2a42562f20 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 31f1400ecc36..579344450ac3 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 3b034e1d2cf7..e147e7b9f425 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 b6aa6a7cb35e..db5430e8b045 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 ddddc49e4638..c4ec33ba65cf 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 ); + if( m_pCurr->IsFormatAdj() ) + const_cast<SwTextAdjuster*>(this)->CalcAdjLine( m_pCurr ); } // Special treatment for DropCaps @@ -335,7 +335,7 @@ inline SwTwips SwTextMargin::GetLeftMargin() const inline SwTwips SwTextMargin::Left() const { - return (nDropLines >= nLineNr && 1 != nLineNr) ? nFirst + nDropLeft : nLeft; + return (nDropLines >= m_nLineNr && 1 != m_nLineNr) ? nFirst + nDropLeft : nLeft; } #endif diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 137ed694edfa..541798a01b7b 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -1252,7 +1252,7 @@ SwSpaceManipulator::~SwSpaceManipulator() void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, SwMultiPortion& rMulti, const SwMultiPortion* pEnvPor ) { - SwTextGridItem const*const pGrid(GetGridItem(pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); const bool bHasGrid = pGrid && GetInfo().SnapToGrid(); sal_uInt16 nRubyHeight = 0; bool bRubyTop = false; @@ -1272,7 +1272,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, if ( bRubyInGrid ) { GetInfo().SetSnapToGrid( ! bRubyTop ); - rMulti.Height( pCurr->Height() ); + rMulti.Height( m_pCurr->Height() ); } SwLayoutModeModifier aLayoutModeModifier( *GetInfo().GetOut() ); @@ -1412,7 +1412,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, { if ( bRubyTop != ( pLay == &rMulti.GetRoot() ) ) // adjust base text - nAdjustment = ( pCurr->Height() - nRubyHeight - pPor->Height() ) / 2; + nAdjustment = ( m_pCurr->Height() - nRubyHeight - pPor->Height() ) / 2; else if ( bRubyTop ) // adjust upper ruby text nAdjustment = nRubyHeight - pPor->Height(); @@ -1531,7 +1531,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, } else { - nOfst += pCurr->Height() - nRubyHeight; + nOfst += m_pCurr->Height() - nRubyHeight; GetInfo().SetSnapToGrid( false ); } } else @@ -1669,13 +1669,13 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, // We set nTmpX (which is used for portion calculating) to the // current Y value - const SwPageFrm* pPage = pFrm->FindPageFrm(); + const SwPageFrm* pPage = m_pFrm->FindPageFrm(); OSL_ENSURE( pPage, "No page in frame!"); const SwLayoutFrm* pUpperFrm = pPage; - if ( pFrm->IsInTab() ) + if ( m_pFrm->IsInTab() ) { - pUpperFrm = pFrm->GetUpper(); + pUpperFrm = m_pFrm->GetUpper(); while ( pUpperFrm && !pUpperFrm->IsCellFrm() ) pUpperFrm = pUpperFrm->GetUpper(); assert(pUpperFrm); //pFrm is in table but does not have an upper cell frame @@ -1686,7 +1686,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, if ( ATT_VAR_SIZE == rFrameFormatSize.GetHeightSizeType() ) pUpperFrm = pPage; } - if ( pUpperFrm == pPage && !pFrm->IsInFootnote() ) + if ( pUpperFrm == pPage && !m_pFrm->IsInFootnote() ) pUpperFrm = pPage->FindBodyCont(); nMaxWidth = pUpperFrm ? @@ -1701,7 +1701,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, SwMultiPortion* pOldMulti = pMulti; pMulti = &rMulti; - SwLineLayout *pOldCurr = pCurr; + SwLineLayout *pOldCurr = m_pCurr; sal_Int32 nOldStart = GetStart(); SwTwips nMinWidth = nTmpX + 1; SwTwips nActWidth = nMaxWidth; @@ -1750,7 +1750,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, SwLinePortion *pNextSecond = nullptr; bool bRet = false; - SwTextGridItem const*const pGrid(GetGridItem(pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); const bool bHasGrid = pGrid && GRID_LINES_CHARS == pGrid->GetGridType(); bool bRubyTop = false; @@ -1760,8 +1760,8 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, do { - pCurr = &rMulti.GetRoot(); - nStart = nStartIdx; + m_pCurr = &rMulti.GetRoot(); + m_nStart = nStartIdx; bRet = false; FormatReset( aInf ); aInf.X( nTmpX ); @@ -1794,7 +1794,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, aInf.SetSnapToGrid( bOldGridModeAllowed ); rMulti.CalcSize( *this, aInf ); - pCurr->SetRealHeight( pCurr->Height() ); + m_pCurr->SetRealHeight( m_pCurr->Height() ); if( rMulti.IsBidi() ) { @@ -1805,15 +1805,15 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, if( rMulti.HasRotation() && !rMulti.IsDouble() ) break; // second line has to be formatted - else if( pCurr->GetLen()<nMultiLen || rMulti.IsRuby() || aInf.GetRest()) + else if( m_pCurr->GetLen()<nMultiLen || rMulti.IsRuby() || aInf.GetRest()) { - sal_Int32 nFirstLen = pCurr->GetLen(); - delete pCurr->GetNext(); - pCurr->SetNext( new SwLineLayout() ); - pCurr = pCurr->GetNext(); - nStart = aInf.GetIdx(); + sal_Int32 nFirstLen = m_pCurr->GetLen(); + delete m_pCurr->GetNext(); + m_pCurr->SetNext( new SwLineLayout() ); + m_pCurr = m_pCurr->GetNext(); + m_nStart = aInf.GetIdx(); aInf.X( nTmpX ); - SwTextFormatInfo aTmp( aInf, *pCurr, nActWidth ); + SwTextFormatInfo aTmp( aInf, *m_pCurr, nActWidth ); if( rMulti.IsRuby() ) { aTmp.SetRuby( !rMulti.OnTop() ); @@ -1843,7 +1843,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, rMulti.CalcSize( *this, aInf ); rMulti.GetRoot().SetRealHeight( rMulti.GetRoot().Height() ); - pCurr->SetRealHeight( pCurr->Height() ); + m_pCurr->SetRealHeight( m_pCurr->Height() ); if( rMulti.IsRuby() ) { pNextSecond = aTmp.GetRest(); @@ -1852,7 +1852,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, } else pNextFirst = aTmp.GetRest(); - if( ( !aTmp.IsRuby() && nFirstLen + pCurr->GetLen() < nMultiLen ) + if( ( !aTmp.IsRuby() && nFirstLen + m_pCurr->GetLen() < nMultiLen ) || aTmp.GetRest() ) // our guess for width of multiportion was too small, // text did not fit into multiportion @@ -1894,8 +1894,8 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, pMulti = pOldMulti; - pCurr = pOldCurr; - nStart = nOldStart; + m_pCurr = pOldCurr; + m_nStart = nOldStart; SetPropFont( 0 ); rMulti.SetLen( rMulti.GetRoot().GetLen() + ( rMulti.GetRoot().GetNext() ? @@ -2196,7 +2196,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine, if ( GetInfo().SnapToGrid() ) { SwTextGridItem const*const pGrid( - GetGridItem(pFrm->FindPageFrm())); + GetGridItem(m_pFrm->FindPageFrm())); if ( pGrid ) { bRubyTop = ! pGrid->GetRubyTextBelow(); @@ -2205,7 +2205,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine, } pTmp = new SwRubyPortion( *pCreate, *GetInfo().GetFont(), - *pFrm->GetTextNode()->getIDocumentSettingAccess(), + *m_pFrm->GetTextNode()->getIDocumentSettingAccess(), nMultiPos, static_cast<const SwRubyPortion*>(pHelpMulti)->GetRubyOffset(), pRubyPos ); } @@ -2245,19 +2245,19 @@ SwTextCursorSave::SwTextCursorSave( SwTextCursor* pTextCursor, long nSpaceAdd ) { pTextCrsr = pTextCursor; - nStart = pTextCursor->nStart; - pTextCursor->nStart = nCurrStart; - pCurr = pTextCursor->pCurr; - pTextCursor->pCurr = &pMulti->GetRoot(); + nStart = pTextCursor->m_nStart; + pTextCursor->m_nStart = nCurrStart; + pCurr = pTextCursor->m_pCurr; + pTextCursor->m_pCurr = &pMulti->GetRoot(); while( pTextCursor->Y() + pTextCursor->GetLineHeight() < nY && pTextCursor->Next() ) ; // nothing - nWidth = pTextCursor->pCurr->Width(); + nWidth = pTextCursor->m_pCurr->Width(); nOldProp = pTextCursor->GetPropFont(); if ( pMulti->IsDouble() || pMulti->IsBidi() ) { - bSpaceChg = pMulti->ChgSpaceAdd( pTextCursor->pCurr, nSpaceAdd ); + bSpaceChg = pMulti->ChgSpaceAdd( pTextCursor->m_pCurr, nSpaceAdd ); sal_Int32 nSpaceCnt; if ( pMulti->IsDouble() ) @@ -2274,12 +2274,12 @@ SwTextCursorSave::SwTextCursorSave( SwTextCursor* pTextCursor, } if( nSpaceAdd > 0 && !pMulti->HasTabulator() ) - pTextCursor->pCurr->Width( static_cast<sal_uInt16>(nWidth + nSpaceAdd * nSpaceCnt / SPACING_PRECISION_FACTOR ) ); + pTextCursor->m_pCurr->Width( static_cast<sal_uInt16>(nWidth + nSpaceAdd * nSpaceCnt / SPACING_PRECISION_FACTOR ) ); // For a BidiPortion we have to calculate the offset from the // end of the portion if ( nX && pMulti->IsBidi() ) - nX = pTextCursor->pCurr->Width() - nX; + nX = pTextCursor->m_pCurr->Width() - nX; } else bSpaceChg = false; @@ -2288,10 +2288,10 @@ SwTextCursorSave::SwTextCursorSave( SwTextCursor* pTextCursor, SwTextCursorSave::~SwTextCursorSave() { if( bSpaceChg ) - SwDoubleLinePortion::ResetSpaceAdd( pTextCrsr->pCurr ); - pTextCrsr->pCurr->Width( nWidth ); - pTextCrsr->pCurr = pCurr; - pTextCrsr->nStart = nStart; + SwDoubleLinePortion::ResetSpaceAdd( pTextCrsr->m_pCurr ); + pTextCrsr->m_pCurr->Width( nWidth ); + pTextCrsr->m_pCurr = pCurr; + pTextCrsr->m_nStart = nStart; pTextCrsr->SetPropFont( nOldProp ); } diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 33a8f31bb889..7c4abafdb1b0 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -435,7 +435,7 @@ void SwTextFormatter::CalcDropHeight( const sal_uInt16 nLines ) sal_uInt16 nHeight = 0; sal_uInt16 nDropLns = 0; const bool bRegisterOld = IsRegisterOn(); - bRegisterOn = false; + m_bRegisterOn = false; Top(); @@ -456,7 +456,7 @@ void SwTextFormatter::CalcDropHeight( const sal_uInt16 nLines ) { CalcAscentAndHeight( nAscent, nHeight ); nDropHght = nDropHght + nHeight; - bRegisterOn = bRegisterOld; + m_bRegisterOn = bRegisterOld; } if ( !Next() ) { @@ -470,7 +470,7 @@ void SwTextFormatter::CalcDropHeight( const sal_uInt16 nLines ) nDropHght = nDropHght + nAscent; Top(); } - bRegisterOn = bRegisterOld; + m_bRegisterOn = bRegisterOld; SetDropDescent( nHeight - nAscent ); SetDropHeight( nDropHght ); SetDropLines( nDropLns ); @@ -510,7 +510,7 @@ SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf ) return nullptr; sal_Int32 nPorLen = pDropFormat->GetWholeWord() ? 0 : pDropFormat->GetChars(); - nPorLen = pFrm->GetTextNode()->GetDropLen( nPorLen ); + nPorLen = m_pFrm->GetTextNode()->GetDropLen( nPorLen ); if( !nPorLen ) { static_cast<SwTextFormatter*>(this)->ClearDropFormat(); @@ -563,7 +563,7 @@ SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf ) if ( pFormat ) { const SwAttrSet& rSet = pFormat->GetAttrSet(); - pTmpFnt->SetDiffFnt( &rSet, pFrm->GetTextNode()->getIDocumentSettingAccess() ); + pTmpFnt->SetDiffFnt( &rSet, m_pFrm->GetTextNode()->getIDocumentSettingAccess() ); } // we do not allow a vertical font for the drop portion @@ -604,17 +604,17 @@ void SwTextPainter::PaintDropPortion() Top(); - GetInfo().SetpSpaceAdd( pCurr->GetpLLSpaceAdd() ); + GetInfo().SetpSpaceAdd( m_pCurr->GetpLLSpaceAdd() ); GetInfo().ResetSpaceIdx(); - GetInfo().SetKanaComp( pCurr->GetpKanaComp() ); + GetInfo().SetKanaComp( m_pCurr->GetpKanaComp() ); GetInfo().ResetKanaIdx(); // 8047: Drops and Dummies - while( !pCurr->GetLen() && Next() ) + while( !m_pCurr->GetLen() && Next() ) ; // MarginPortion und Adjustment! - const SwLinePortion *pPor = pCurr->GetFirstPortion(); + const SwLinePortion *pPor = m_pCurr->GetFirstPortion(); long nX = 0; while( pPor && !pPor->IsDropPortion() ) { diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index d86959233161..8e7907a61a35 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -72,7 +72,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf, const SwTextAttr *pHint ) const { SwExpandPortion *pRet = nullptr; - SwFrm *pFrame = pFrm; + SwFrm *pFrame = m_pFrm; SwField *pField = const_cast<SwField*>(pHint->GetFormatField().GetField()); const bool bName = rInf.GetOpt().IsFieldName(); @@ -279,7 +279,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf, if( !bName ) { pTmpFnt = new SwFont( *pFnt ); - pTmpFnt->SetDiffFnt( &pChFormat->GetAttrSet(), pFrm->GetTextNode()->getIDocumentSettingAccess() ); + pTmpFnt->SetDiffFnt( &pChFormat->GetAttrSet(), m_pFrm->GetTextNode()->getIDocumentSettingAccess() ); } { OUString const aStr( (bName) @@ -449,7 +449,7 @@ static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTextFor SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) const { - if( rInf.IsNumDone() || rInf.GetTextStart() != nStart + if( rInf.IsNumDone() || rInf.GetTextStart() != m_nStart || rInf.GetTextStart() != rInf.GetIdx() ) return nullptr; @@ -545,7 +545,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con // we do not allow a vertical font pNumFnt->SetVertical( pNumFnt->GetOrientation(), - pFrm->IsVertical() ); + m_pFrm->IsVertical() ); // --> OD 2008-01-23 #newlistelevelattrs# pRet = new SwBulletPortion( rNumFormat.GetBulletChar(), @@ -590,7 +590,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA ); // we do not allow a vertical font - pNumFnt->SetVertical( pNumFnt->GetOrientation(), pFrm->IsVertical() ); + pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrm->IsVertical() ); pRet = new SwNumberPortion( aText, pNumFnt, bLeft, bCenter, nMinDist, diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index ed13bd3ec992..2c5255cff428 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -791,51 +791,51 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, SwTextAttr *pHint ) { - OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), "NewFootnotePortion with unswapped frame" ); - if( !pFrm->IsFootnoteAllowed() ) + if( !m_pFrm->IsFootnoteAllowed() ) return nullptr; SwTextFootnote *pFootnote = static_cast<SwTextFootnote*>(pHint); const SwFormatFootnote& rFootnote = static_cast<const SwFormatFootnote&>(pFootnote->GetFootnote()); - SwDoc *pDoc = pFrm->GetNode()->GetDoc(); + SwDoc *pDoc = m_pFrm->GetNode()->GetDoc(); if( rInf.IsTest() ) return new SwFootnotePortion( rFootnote.GetViewNumStr( *pDoc ), pFootnote ); - SwSwapIfSwapped swap(pFrm); + SwSwapIfSwapped swap(m_pFrm); sal_uInt16 nReal; { - sal_uInt16 nOldReal = pCurr->GetRealHeight(); - sal_uInt16 nOldAscent = pCurr->GetAscent(); - sal_uInt16 nOldHeight = pCurr->Height(); + sal_uInt16 nOldReal = m_pCurr->GetRealHeight(); + sal_uInt16 nOldAscent = m_pCurr->GetAscent(); + sal_uInt16 nOldHeight = m_pCurr->Height(); CalcRealHeight(); - nReal = pCurr->GetRealHeight(); + nReal = m_pCurr->GetRealHeight(); if( nReal < nOldReal ) nReal = nOldReal; - pCurr->SetRealHeight( nOldReal ); - pCurr->Height( nOldHeight ); - pCurr->SetAscent( nOldAscent ); + m_pCurr->SetRealHeight( nOldReal ); + m_pCurr->Height( nOldHeight ); + m_pCurr->SetAscent( nOldAscent ); } SwTwips nLower = Y() + nReal; - const bool bVertical = pFrm->IsVertical(); + const bool bVertical = m_pFrm->IsVertical(); if( bVertical ) - nLower = pFrm->SwitchHorizontalToVertical( nLower ); + nLower = m_pFrm->SwitchHorizontalToVertical( nLower ); - nLower = lcl_GetFootnoteLower( pFrm, nLower ); + nLower = lcl_GetFootnoteLower( m_pFrm, nLower ); // We just refresh. // The Connect does not do anything useful in this case, but will // mostly throw away the Footnote and create it anew. if( !rInf.IsQuick() ) - pFrm->ConnectFootnote( pFootnote, nLower ); + m_pFrm->ConnectFootnote( pFootnote, nLower ); - SwTextFrm *pScrFrm = pFrm->FindFootnoteRef( pFootnote ); - SwFootnoteBossFrm *pBoss = pFrm->FindFootnoteBossFrm( !rFootnote.IsEndNote() ); + SwTextFrm *pScrFrm = m_pFrm->FindFootnoteRef( pFootnote ); + SwFootnoteBossFrm *pBoss = m_pFrm->FindFootnoteBossFrm( !rFootnote.IsEndNote() ); SwFootnoteFrm *pFootnoteFrm = nullptr; if( pScrFrm ) pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pScrFrm, pFootnote ); @@ -858,8 +858,8 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, SwFrm* pFootnoteCont = pBoss->FindFootnoteCont(); // If the Parent is within an Area, it can only be a Column of this // Area. If this one is not the first Column, we can avoid it. - if( !pFrm->IsInTab() && ( GetLineNr() > 1 || pFrm->GetPrev() || - ( !bAtSctEnd && pFrm->GetIndPrev() ) || + if( !m_pFrm->IsInTab() && ( GetLineNr() > 1 || m_pFrm->GetPrev() || + ( !bAtSctEnd && m_pFrm->GetIndPrev() ) || ( pSct && pBoss->GetPrev() ) ) ) { if( !pFootnoteCont ) @@ -889,7 +889,7 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, SwTwips nTmpBot = Y() + nReal * 2; if( bVertical ) - nTmpBot = pFrm->SwitchHorizontalToVertical( nTmpBot ); + nTmpBot = m_pFrm->SwitchHorizontalToVertical( nTmpBot ); SWRECTFN( pFootnoteCont ) @@ -928,19 +928,19 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, */ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf ) const { - OSL_ENSURE( pFrm->IsInFootnote() && !pFrm->GetIndPrev() && !rInf.IsFootnoteDone(), + OSL_ENSURE( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() && !rInf.IsFootnoteDone(), "This is the wrong place for a ftnnumber" ); - if( rInf.GetTextStart() != nStart || + if( rInf.GetTextStart() != m_nStart || rInf.GetTextStart() != rInf.GetIdx() ) return nullptr; - const SwFootnoteFrm* pFootnoteFrm = pFrm->FindFootnoteFrm(); + const SwFootnoteFrm* pFootnoteFrm = m_pFrm->FindFootnoteFrm(); const SwTextFootnote* pFootnote = pFootnoteFrm->GetAttr(); // Aha! So we're in the Footnote Area! SwFormatFootnote& rFootnote = (SwFormatFootnote&)pFootnote->GetFootnote(); - SwDoc *pDoc = pFrm->GetNode()->GetDoc(); + SwDoc *pDoc = m_pFrm->GetNode()->GetDoc(); OUString aFootnoteText( rFootnote.GetViewNumStr( *pDoc, true )); const SwEndNoteInfo* pInfo; @@ -951,7 +951,7 @@ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf const SwAttrSet& rSet = pInfo->GetCharFormat(*pDoc)->GetAttrSet(); const SwAttrSet* pParSet = &rInf.GetCharAttr(); - const IDocumentSettingAccess* pIDSA = pFrm->GetTextNode()->getIDocumentSettingAccess(); + const IDocumentSettingAccess* pIDSA = m_pFrm->GetTextNode()->getIDocumentSettingAccess(); SwFont *pNumFnt = new SwFont( pParSet, pIDSA ); // #i37142# @@ -970,10 +970,10 @@ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf pNumFnt->SetWeight( WEIGHT_NORMAL, SW_CTL ); pNumFnt->SetDiffFnt(&rSet, pIDSA ); - pNumFnt->SetVertical( pNumFnt->GetOrientation(), pFrm->IsVertical() ); + pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrm->IsVertical() ); SwFootnoteNumPortion* pNewPor = new SwFootnoteNumPortion( aFootnoteText, pNumFnt ); - pNewPor->SetLeft( !pFrm->IsRightToLeft() ); + pNewPor->SetLeft( !m_pFrm->IsRightToLeft() ); return pNewPor; } @@ -988,17 +988,17 @@ OUString lcl_GetPageNumber( const SwPageFrm* pPage ) SwErgoSumPortion *SwTextFormatter::NewErgoSumPortion( SwTextFormatInfo &rInf ) const { // We cannot assume we're a Follow - if( !pFrm->IsInFootnote() || pFrm->GetPrev() || - rInf.IsErgoDone() || rInf.GetIdx() != pFrm->GetOfst() || - pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() ) + if( !m_pFrm->IsInFootnote() || m_pFrm->GetPrev() || + rInf.IsErgoDone() || rInf.GetIdx() != m_pFrm->GetOfst() || + m_pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() ) return nullptr; // Aha, wir sind also im Fussnotenbereich - const SwFootnoteInfo &rFootnoteInfo = pFrm->GetNode()->GetDoc()->GetFootnoteInfo(); - SwTextFrm *pQuoFrm = pFrm->FindQuoVadisFrm(); + const SwFootnoteInfo &rFootnoteInfo = m_pFrm->GetNode()->GetDoc()->GetFootnoteInfo(); + SwTextFrm *pQuoFrm = m_pFrm->FindQuoVadisFrm(); if( !pQuoFrm ) return nullptr; - const SwPageFrm* pPage = pFrm->FindPageFrm(); + const SwPageFrm* pPage = m_pFrm->FindPageFrm(); const SwPageFrm* pQuoPage = pQuoFrm->FindPageFrm(); if( pPage == pQuoFrm->FindPageFrm() ) return nullptr; // If the QuoVadis is on the same Column/Page @@ -1015,21 +1015,21 @@ SwErgoSumPortion *SwTextFormatter::NewErgoSumPortion( SwTextFormatInfo &rInf ) c sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) { - OSL_ENSURE( ! pFrm->IsVertical() || ! pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrm->IsVertical() || ! m_pFrm->IsSwapped(), "SwTextFormatter::FormatQuoVadis with swapped frame" ); - if( !pFrm->IsInFootnote() || pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() ) + if( !m_pFrm->IsInFootnote() || m_pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() ) return nOffset; - const SwFrm* pErgoFrm = pFrm->FindFootnoteFrm()->GetFollow(); - if( !pErgoFrm && pFrm->HasFollow() ) - pErgoFrm = pFrm->GetFollow(); + const SwFrm* pErgoFrm = m_pFrm->FindFootnoteFrm()->GetFollow(); + if( !pErgoFrm && m_pFrm->HasFollow() ) + pErgoFrm = m_pFrm->GetFollow(); if( !pErgoFrm ) return nOffset; - if( pErgoFrm == pFrm->GetNext() ) + if( pErgoFrm == m_pFrm->GetNext() ) { - SwFrm *pCol = pFrm->FindColFrm(); + SwFrm *pCol = m_pFrm->FindColFrm(); while( pCol && !pCol->GetNext() ) pCol = pCol->GetUpper()->FindColFrm(); if( pCol ) @@ -1037,14 +1037,14 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) } else { - const SwPageFrm* pPage = pFrm->FindPageFrm(); + const SwPageFrm* pPage = m_pFrm->FindPageFrm(); const SwPageFrm* pErgoPage = pErgoFrm->FindPageFrm(); if( pPage == pErgoPage ) return nOffset; // If the ErgoSum is on the same Page } SwTextFormatInfo &rInf = GetInfo(); - const SwFootnoteInfo &rFootnoteInfo = pFrm->GetNode()->GetDoc()->GetFootnoteInfo(); + const SwFootnoteInfo &rFootnoteInfo = m_pFrm->GetNode()->GetDoc()->GetFootnoteInfo(); if( rFootnoteInfo.aQuoVadis.isEmpty() ) return nOffset; @@ -1054,13 +1054,13 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) // TODO: ResetFont(); FeedInf( rInf ); SeekStartAndChg( rInf, true ); - if( GetRedln() && pCurr->HasRedline() ) + if( GetRedln() && m_pCurr->HasRedline() ) GetRedln()->Seek( *pFnt, nOffset, 0 ); // A tricky special case: Flyfrms extend into the Line and are at the // position we want to insert the Quovadis text // Let's see if it is that bad indeed: - SwLinePortion *pPor = pCurr->GetFirstPortion(); + SwLinePortion *pPor = m_pCurr->GetFirstPortion(); sal_uInt16 nLastLeft = 0; while( pPor ) { @@ -1105,19 +1105,19 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) sal_Int32 nRet; { - SwSwapIfNotSwapped swap(pFrm); + SwSwapIfNotSwapped swap(m_pFrm); - nRet = FormatLine( nStart ); + nRet = FormatLine( m_nStart ); } Right( rInf.Left() + nOldRealWidth - 1 ); - nLastLeft = nOldRealWidth - pCurr->Width(); + nLastLeft = nOldRealWidth - m_pCurr->Width(); FeedInf( rInf ); // It's possible that there's a Margin Portion at the end, which would // just cause a lot of trouble, when respanning - pPor = pCurr->FindLastPortion(); + pPor = m_pCurr->FindLastPortion(); SwGluePortion *pGlue = pPor->IsMarginPortion() ? static_cast<SwMarginPortion*>(pPor) : nullptr; if( pGlue ) { @@ -1140,8 +1140,8 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) { case SVX_ADJUST_BLOCK: { - if( !pCurr->GetLen() || - CH_BREAK != GetInfo().GetChar(nStart+pCurr->GetLen()-1)) + if( !m_pCurr->GetLen() || + CH_BREAK != GetInfo().GetChar(m_nStart+m_pCurr->GetLen()-1)) nLastLeft = pQuo->GetAscent(); nQuoWidth = nQuoWidth + nLastLeft; break; @@ -1195,13 +1195,13 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) pCurrPor = pQuo; } - pCurr->Width( pCurr->Width() + nQuoWidth ); + m_pCurr->Width( m_pCurr->Width() + nQuoWidth ); // And adjust again, due to the adjustment and due to the following special // case: // The DummyUser has set a smaller Font in the Line than the one used // by the QuoVadis text ... - CalcAdjustLine( pCurr ); + CalcAdjustLine( m_pCurr ); return nRet; } @@ -1216,10 +1216,10 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) void SwTextFormatter::MakeDummyLine() { sal_uInt16 nRstHeight = GetFrmRstHeight(); - if( pCurr && nRstHeight > pCurr->Height() ) + if( m_pCurr && nRstHeight > m_pCurr->Height() ) { SwLineLayout *pLay = new SwLineLayout; - nRstHeight = nRstHeight - pCurr->Height(); + nRstHeight = nRstHeight - m_pCurr->Height(); pLay->Height( nRstHeight ); pLay->SetAscent( nRstHeight ); Insert( pLay ); diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx index 9e603137ecc9..741cdca0bdc2 100644 --- a/sw/source/core/text/txthyph.cxx +++ b/sw/source/core/text/txthyph.cxx @@ -131,16 +131,16 @@ bool SwTextFormatter::Hyphenate( SwInterHyphInfo &rHyphInf ) // We never need to hyphenate anything in the last row // Except for, if it contains a FlyPortion or if it's the // last row of the Master - if( !GetNext() && !rInf.GetTextFly().IsOn() && !pFrm->GetFollow() ) + if( !GetNext() && !rInf.GetTextFly().IsOn() && !m_pFrm->GetFollow() ) return false; - sal_Int32 nWrdStart = nStart; + sal_Int32 nWrdStart = m_nStart; // We need to retain the old row // E.g.: The attribute for hyphenation was not set, but // it's always set in SwTextFrm::Hyphenate, because we want // to set breakpoints. - SwLineLayout *pOldCurr = pCurr; + SwLineLayout *pOldCurr = m_pCurr; InitCntHyph(); @@ -151,26 +151,26 @@ bool SwTextFormatter::Hyphenate( SwInterHyphInfo &rHyphInf ) { SwParaPortion *pPara = new SwParaPortion(); SetParaPortion( &rInf, pPara ); - pCurr = pPara; + m_pCurr = pPara; OSL_ENSURE( IsParaLine(), "SwTextFormatter::Hyphenate: not the first" ); } else - pCurr = new SwLineLayout(); + m_pCurr = new SwLineLayout(); nWrdStart = FormatLine( nWrdStart ); // Man muss immer im Hinterkopf behalten, dass es z.B. // Felder gibt, die aufgetrennt werden koennen ... - if( pCurr->PrtWidth() && pCurr->GetLen() ) + if( m_pCurr->PrtWidth() && m_pCurr->GetLen() ) { // Wir muessen uns darauf einstellen, dass in der Zeile // FlyFrms haengen, an denen auch umgebrochen werden darf. // Wir suchen also die erste HyphPortion in dem angegebenen // Bereich. - SwLinePortion *pPos = pCurr->GetPortion(); + SwLinePortion *pPos = m_pCurr->GetPortion(); const sal_Int32 nPamStart = rHyphInf.nStart; - nWrdStart = nStart; + nWrdStart = m_nStart; const sal_Int32 nEnd = rHyphInf.GetEnd(); while( pPos ) { @@ -199,8 +199,8 @@ bool SwTextFormatter::Hyphenate( SwInterHyphInfo &rHyphInf ) } // Das alte LineLayout wird wieder eingestellt ... - delete pCurr; - pCurr = pOldCurr; + delete m_pCurr; + m_pCurr = pOldCurr; if( pOldCurr->IsParaPortion() ) { diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index 3549126258e3..ba9e12742804 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -70,17 +70,17 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto sal_uInt16 nNewTabPos; bool bAutoTabStop = true; { - const bool bRTL = pFrm->IsRightToLeft(); + const bool bRTL = m_pFrm->IsRightToLeft(); // #i24363# tab stops relative to indent // nTabLeft: The absolute value, the tab stops are relative to: Tabs origin. // #i91133# const bool bTabsRelativeToIndent = - pFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT); + m_pFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT); const SwTwips nTabLeft = bRTL - ? pFrm->Frm().Right() - + ? m_pFrm->Frm().Right() - ( bTabsRelativeToIndent ? GetTabLeft() : 0 ) - : pFrm->Frm().Left() + + : m_pFrm->Frm().Left() + ( bTabsRelativeToIndent ? GetTabLeft() : 0 ); // The absolute position, where we started the line formatting @@ -88,7 +88,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto if ( bRTL ) { Point aPoint( nLinePos, 0 ); - pFrm->SwitchLTRtoRTL( aPoint ); + m_pFrm->SwitchLTRtoRTL( aPoint ); nLinePos = aPoint.X(); } @@ -105,15 +105,15 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto nLinePos + nTabPos; SwTwips nMyRight; - if ( pFrm->IsVertLR() ) + if ( m_pFrm->IsVertLR() ) nMyRight = Left(); else nMyRight = Right(); - if ( pFrm->IsVertical() ) + if ( m_pFrm->IsVertical() ) { - Point aRightTop( nMyRight, pFrm->Frm().Top() ); - pFrm->SwitchHorizontalToVertical( aRightTop ); + Point aRightTop( nMyRight, m_pFrm->Frm().Top() ); + m_pFrm->SwitchHorizontalToVertical( aRightTop ); nMyRight = aRightTop.Y(); } @@ -129,7 +129,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto // any hard set tab stops: // Note: If there are no user defined tab stops, there is always a // default tab stop. - const SvxTabStop* pTabStop = aLineInf.GetTabStop( nSearchPos, nMyRight ); + const SvxTabStop* pTabStop = m_aLineInf.GetTabStop( nSearchPos, nMyRight ); if ( pTabStop ) { cFill = ' ' != pTabStop->GetFill() ? pTabStop->GetFill() : 0; @@ -145,17 +145,17 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto } else { - sal_uInt16 nDefTabDist = aLineInf.GetDefTabStop(); + sal_uInt16 nDefTabDist = m_aLineInf.GetDefTabStop(); if( USHRT_MAX == nDefTabDist ) { const SvxTabStopItem& rTab = - static_cast<const SvxTabStopItem &>(pFrm->GetAttrSet()-> + static_cast<const SvxTabStopItem &>(m_pFrm->GetAttrSet()-> GetPool()->GetDefaultItem( RES_PARATR_TABSTOP )); if( rTab.Count() ) nDefTabDist = (sal_uInt16)rTab[0].GetTabPos(); else nDefTabDist = SVX_TAB_DEFDIST; - aLineInf.SetDefTabStop( nDefTabDist ); + m_aLineInf.SetDefTabStop( nDefTabDist ); } SwTwips nCount = nSearchPos; @@ -169,7 +169,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto : ( ( nCount + 1 ) * nDefTabDist ); // --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips: - const SwTwips nMinimumTabWidth = pFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ? 0 : 50; + const SwTwips nMinimumTabWidth = m_pFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ? 0 : 50; if( ( bRTL && nTabLeft - nNextPos >= nCurrentAbsPos - nMinimumTabWidth ) || ( !bRTL && nNextPos + nTabLeft <= nCurrentAbsPos + nMinimumTabWidth ) ) { @@ -194,17 +194,17 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto if ( bRTL ) { Point aPoint( Left(), 0 ); - pFrm->SwitchLTRtoRTL( aPoint ); - nLeftMarginTabPos = pFrm->Frm().Right() - aPoint.X(); + m_pFrm->SwitchLTRtoRTL( aPoint ); + nLeftMarginTabPos = m_pFrm->Frm().Right() - aPoint.X(); } else { - nLeftMarginTabPos = Left() - pFrm->Frm().Left(); + nLeftMarginTabPos = Left() - m_pFrm->Frm().Left(); } } - if( pCurr->HasForcedLeftMargin() ) + if( m_pCurr->HasForcedLeftMargin() ) { - SwLinePortion* pPor = pCurr->GetPortion(); + SwLinePortion* pPor = m_pCurr->GetPortion(); while( pPor && !pPor->IsFlyPortion() ) { pPor = pPor->GetPortion(); @@ -226,11 +226,11 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto // a tab stop at the left margin can be applied. If this condition is // not hold, it is overruled by compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST. const bool bTabAtLeftMarginAllowed = - ( !aLineInf.IsListTabStopIncluded() || + ( !m_aLineInf.IsListTabStopIncluded() || !pTabStop || - nNextPos != aLineInf.GetListTabStopPosition() ) || + nNextPos != m_aLineInf.GetListTabStopPosition() ) || // compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST: - pFrm->GetTextNode()->getIDocumentSettingAccess()-> + m_pFrm->GetTextNode()->getIDocumentSettingAccess()-> get(DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST); if ( bTabAtLeftMarginAllowed ) { @@ -254,7 +254,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto if ( bAuto ) { if ( SVX_TAB_ADJUST_DECIMAL == eAdj && - 1 == aLineInf.NumberOfTabStops() ) + 1 == m_aLineInf.NumberOfTabStops() ) pTabPor = new SwAutoTabDecimalPortion( nNewTabPos, cDec, cFill ); } else |