[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Sep 12 06:50:41 UTC 2016
sw/source/core/text/inftxt.cxx | 2
sw/source/core/text/itratr.cxx | 190 +++++++++++++++++++--------------------
sw/source/core/text/itratr.hxx | 76 +++++++--------
sw/source/core/text/itrform2.cxx | 22 ++--
sw/source/core/text/itrpaint.cxx | 18 +--
sw/source/core/text/redlnitr.cxx | 60 ++++++------
sw/source/core/text/txtdrop.cxx | 2
sw/source/core/text/txtfld.cxx | 8 -
sw/source/core/text/txtftn.cxx | 2
9 files changed, 190 insertions(+), 190 deletions(-)
New commits:
commit dd4d65a88e54c01cdaecb8176fefc533de776579
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Sep 12 08:14:27 2016 +0200
sw: prefix members of SwAttrIter
Change-Id: Ib9b18d71ba8a68dba6a4272908ed31fc78afcb94
Reviewed-on: https://gerrit.libreoffice.org/28823
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 1f0fa02..1c7e487 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1795,7 +1795,7 @@ SwFontSave::~SwFontSave()
if( pIter )
{
pIter->SetFnt( pFnt );
- pIter->nPos = COMPLETE_STRING;
+ pIter->m_nPosition = COMPLETE_STRING;
}
}
}
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 3a47265..2f272d6 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -61,29 +61,29 @@ using namespace ::com::sun::star;
void SwAttrIter::Chg( SwTextAttr *pHt )
{
- assert(pHt && pFnt && "No attribute of font available for change");
- if( pRedln && pRedln->IsOn() )
- pRedln->ChangeTextAttr( pFnt, *pHt, true );
+ assert(pHt && m_pFont && "No attribute of font available for change");
+ if( m_pRedline && m_pRedline->IsOn() )
+ m_pRedline->ChangeTextAttr( m_pFont, *pHt, true );
else
- aAttrHandler.PushAndChg( *pHt, *pFnt );
- nChgCnt++;
+ m_aAttrHandler.PushAndChg( *pHt, *m_pFont );
+ m_nChgCnt++;
}
void SwAttrIter::Rst( SwTextAttr *pHt )
{
- assert(pHt && pFnt && "No attribute of font available for reset");
+ assert(pHt && m_pFont && "No attribute of font available for reset");
// get top from stack after removing pHt
- if( pRedln && pRedln->IsOn() )
- pRedln->ChangeTextAttr( pFnt, *pHt, false );
+ if( m_pRedline && m_pRedline->IsOn() )
+ m_pRedline->ChangeTextAttr( m_pFont, *pHt, false );
else
- aAttrHandler.PopAndChg( *pHt, *pFnt );
- nChgCnt--;
+ m_aAttrHandler.PopAndChg( *pHt, *m_pFont );
+ m_nChgCnt--;
}
SwAttrIter::~SwAttrIter()
{
- delete pRedln;
- delete pFnt;
+ delete m_pRedline;
+ delete m_pFont;
}
/**
@@ -108,20 +108,20 @@ SwTextAttr *SwAttrIter::GetAttr( const sal_Int32 nPosition ) const
bool SwAttrIter::SeekAndChgAttrIter( const sal_Int32 nNewPos, OutputDevice* pOut )
{
- bool bChg = nStartIndex && nNewPos == nPos ? pFnt->IsFntChg() : Seek( nNewPos );
- if ( pLastOut.get() != pOut )
+ bool bChg = m_nStartIndex && nNewPos == m_nPosition ? m_pFont->IsFntChg() : Seek( nNewPos );
+ if ( m_pLastOut.get() != pOut )
{
- pLastOut = pOut;
- pFnt->SetFntChg( true );
+ m_pLastOut = pOut;
+ m_pFont->SetFntChg( true );
bChg = true;
}
if( bChg )
{
// if the change counter is zero, we know the MagicNo of the wanted font
- if ( !nChgCnt && !nPropFont )
- pFnt->SetMagic( aMagicNo[ pFnt->GetActual() ],
- aFntIdx[ pFnt->GetActual() ], pFnt->GetActual() );
- pFnt->ChgPhysFnt( pShell, *pOut );
+ if ( !m_nChgCnt && !m_nPropFont )
+ m_pFont->SetMagic( m_aMagicNo[ m_pFont->GetActual() ],
+ m_aFontIdx[ m_pFont->GetActual() ], m_pFont->GetActual() );
+ m_pFont->ChgPhysFnt( m_pViewShell, *pOut );
}
return bChg;
@@ -130,63 +130,63 @@ bool SwAttrIter::SeekAndChgAttrIter( const sal_Int32 nNewPos, OutputDevice* pOut
bool SwAttrIter::IsSymbol( const sal_Int32 nNewPos )
{
Seek( nNewPos );
- if ( !nChgCnt && !nPropFont )
- pFnt->SetMagic( aMagicNo[ pFnt->GetActual() ],
- aFntIdx[ pFnt->GetActual() ], pFnt->GetActual() );
- return pFnt->IsSymbol( pShell );
+ if ( !m_nChgCnt && !m_nPropFont )
+ m_pFont->SetMagic( m_aMagicNo[ m_pFont->GetActual() ],
+ m_aFontIdx[ m_pFont->GetActual() ], m_pFont->GetActual() );
+ return m_pFont->IsSymbol( m_pViewShell );
}
bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFont )
{
- if ( pRedln && pRedln->ExtOn() )
- pRedln->LeaveExtend( *pFnt, 0 );
+ if ( m_pRedline && m_pRedline->ExtOn() )
+ m_pRedline->LeaveExtend( *m_pFont, 0 );
// reset font to its original state
- aAttrHandler.Reset();
- aAttrHandler.ResetFont( *pFnt );
-
- nStartIndex = 0;
- nEndIndex = 0;
- nPos = 0;
- nChgCnt = 0;
- if( nPropFont )
- pFnt->SetProportion( nPropFont );
- if( pRedln )
+ m_aAttrHandler.Reset();
+ m_aAttrHandler.ResetFont( *m_pFont );
+
+ m_nStartIndex = 0;
+ m_nEndIndex = 0;
+ m_nPosition = 0;
+ m_nChgCnt = 0;
+ if( m_nPropFont )
+ m_pFont->SetProportion( m_nPropFont );
+ if( m_pRedline )
{
- pRedln->Clear( pFnt );
+ m_pRedline->Clear( m_pFont );
if( !bParaFont )
- nChgCnt = nChgCnt + pRedln->Seek( *pFnt, 0, USHRT_MAX );
+ m_nChgCnt = m_nChgCnt + m_pRedline->Seek( *m_pFont, 0, USHRT_MAX );
else
- pRedln->Reset();
+ m_pRedline->Reset();
}
- if ( pHints && !bParaFont )
+ if ( m_pHints && !bParaFont )
{
SwTextAttr *pTextAttr;
// While we've not reached the end of the StartArray && the TextAttribute starts at position 0...
- while ( ( nStartIndex < pHints->Count() ) &&
- !((pTextAttr = pHints->Get(nStartIndex))->GetStart()) )
+ while ( ( m_nStartIndex < m_pHints->Count() ) &&
+ !((pTextAttr = m_pHints->Get(m_nStartIndex))->GetStart()) )
{
// open the TextAttributes
Chg( pTextAttr );
- nStartIndex++;
+ m_nStartIndex++;
}
}
- bool bChg = pFnt->IsFntChg();
- if ( pLastOut.get() != pOut )
+ bool bChg = m_pFont->IsFntChg();
+ if ( m_pLastOut.get() != pOut )
{
- pLastOut = pOut;
- pFnt->SetFntChg( true );
+ m_pLastOut = pOut;
+ m_pFont->SetFntChg( true );
bChg = true;
}
if( bChg )
{
// if the application counter is zero, we know the MagicNo of the wanted font
- if ( !nChgCnt && !nPropFont )
- pFnt->SetMagic( aMagicNo[ pFnt->GetActual() ],
- aFntIdx[ pFnt->GetActual() ], pFnt->GetActual() );
- pFnt->ChgPhysFnt( pShell, *pOut );
+ if ( !m_nChgCnt && !m_nPropFont )
+ m_pFont->SetMagic( m_aMagicNo[ m_pFont->GetActual() ],
+ m_aFontIdx[ m_pFont->GetActual() ], m_pFont->GetActual() );
+ m_pFont->ChgPhysFnt( m_pViewShell, *pOut );
}
return bChg;
}
@@ -196,99 +196,99 @@ void SwAttrIter::SeekFwd( const sal_Int32 nNewPos )
{
SwTextAttr *pTextAttr;
- if ( nStartIndex ) // If attributes have been opened at all ...
+ if ( m_nStartIndex ) // If attributes have been opened at all ...
{
// Close attributes that are currently open, but stop at nNewPos+1
// As long as we've not yet reached the end of EndArray and the
// TextAttribute ends before or at the new position ...
- while ( ( nEndIndex < pHints->Count() ) &&
- (*(pTextAttr=pHints->GetSortedByEnd(nEndIndex))->GetAnyEnd()<=nNewPos))
+ while ( ( m_nEndIndex < m_pHints->Count() ) &&
+ (*(pTextAttr=m_pHints->GetSortedByEnd(m_nEndIndex))->GetAnyEnd()<=nNewPos))
{
// Close the TextAttributes, whose StartPos were before or at
// the old nPos and are currently open
- if (pTextAttr->GetStart() <= nPos) Rst( pTextAttr );
- nEndIndex++;
+ if (pTextAttr->GetStart() <= m_nPosition) Rst( pTextAttr );
+ m_nEndIndex++;
}
}
else // skip the not opended ends
{
- while ( (nEndIndex < pHints->Count()) &&
- (*pHints->GetSortedByEnd(nEndIndex)->GetAnyEnd() <= nNewPos) )
+ while ( (m_nEndIndex < m_pHints->Count()) &&
+ (*m_pHints->GetSortedByEnd(m_nEndIndex)->GetAnyEnd() <= nNewPos) )
{
- nEndIndex++;
+ m_nEndIndex++;
}
}
// As long as we've not yet reached the end of EndArray and the
// TextAttribute ends before or at the new position ...
- while ( ( nStartIndex < pHints->Count() ) &&
- ((pTextAttr=pHints->Get(nStartIndex))->GetStart()<=nNewPos) )
+ while ( ( m_nStartIndex < m_pHints->Count() ) &&
+ ((pTextAttr=m_pHints->Get(m_nStartIndex))->GetStart()<=nNewPos) )
{
// open the TextAttributes, whose ends lie behind the new position
if ( *pTextAttr->GetAnyEnd() > nNewPos ) Chg( pTextAttr );
- nStartIndex++;
+ m_nStartIndex++;
}
}
bool SwAttrIter::Seek( const sal_Int32 nNewPos )
{
- if ( pRedln && pRedln->ExtOn() )
- pRedln->LeaveExtend( *pFnt, nNewPos );
+ if ( m_pRedline && m_pRedline->ExtOn() )
+ m_pRedline->LeaveExtend( *m_pFont, nNewPos );
- if( pHints )
+ if( m_pHints )
{
- if( !nNewPos || nNewPos < nPos )
+ if( !nNewPos || nNewPos < m_nPosition )
{
- if( pRedln )
- pRedln->Clear( nullptr );
+ if( m_pRedline )
+ m_pRedline->Clear( nullptr );
// reset font to its original state
- aAttrHandler.Reset();
- aAttrHandler.ResetFont( *pFnt );
+ m_aAttrHandler.Reset();
+ m_aAttrHandler.ResetFont( *m_pFont );
- if( nPropFont )
- pFnt->SetProportion( nPropFont );
- nStartIndex = 0;
- nEndIndex = 0;
- nPos = 0;
- nChgCnt = 0;
+ if( m_nPropFont )
+ m_pFont->SetProportion( m_nPropFont );
+ m_nStartIndex = 0;
+ m_nEndIndex = 0;
+ m_nPosition = 0;
+ m_nChgCnt = 0;
// Attention!
// resetting the font here makes it necessary to apply any
// changes for extended input directly to the font
- if ( pRedln && pRedln->ExtOn() )
+ if ( m_pRedline && m_pRedline->ExtOn() )
{
- pRedln->UpdateExtFont( *pFnt );
- ++nChgCnt;
+ m_pRedline->UpdateExtFont( *m_pFont );
+ ++m_nChgCnt;
}
}
SeekFwd( nNewPos );
}
- pFnt->SetActual( SwScriptInfo::WhichFont( nNewPos, nullptr, pScriptInfo ) );
+ m_pFont->SetActual( SwScriptInfo::WhichFont( nNewPos, nullptr, m_pScriptInfo ) );
- if( pRedln )
- nChgCnt = nChgCnt + pRedln->Seek( *pFnt, nNewPos, nPos );
- nPos = nNewPos;
+ if( m_pRedline )
+ m_nChgCnt = m_nChgCnt + m_pRedline->Seek( *m_pFont, nNewPos, m_nPosition );
+ m_nPosition = nNewPos;
- if( nPropFont )
- pFnt->SetProportion( nPropFont );
+ if( m_nPropFont )
+ m_pFont->SetProportion( m_nPropFont );
- return pFnt->IsFntChg();
+ return m_pFont->IsFntChg();
}
sal_Int32 SwAttrIter::GetNextAttr( ) const
{
sal_Int32 nNext = COMPLETE_STRING;
- if( pHints )
+ if( m_pHints )
{
// are there attribute starts left?
- for (size_t i = nStartIndex; i < pHints->Count(); ++i)
+ for (size_t i = m_nStartIndex; i < m_pHints->Count(); ++i)
{
- SwTextAttr *const pAttr(pHints->Get(i));
+ SwTextAttr *const pAttr(m_pHints->Get(i));
if (!pAttr->IsFormatIgnoreStart())
{
nNext = pAttr->GetStart();
@@ -296,9 +296,9 @@ sal_Int32 SwAttrIter::GetNextAttr( ) const
}
}
// are there attribute ends left?
- for (size_t i = nEndIndex; i < pHints->Count(); ++i)
+ for (size_t i = m_nEndIndex; i < m_pHints->Count(); ++i)
{
- SwTextAttr *const pAttr(pHints->GetSortedByEnd(i));
+ SwTextAttr *const pAttr(m_pHints->GetSortedByEnd(i));
if (!pAttr->IsFormatIgnoreEnd())
{
sal_Int32 const nNextEnd = *pAttr->GetAnyEnd();
@@ -310,7 +310,7 @@ sal_Int32 SwAttrIter::GetNextAttr( ) const
if (m_pTextNode!=nullptr) {
// TODO: maybe use hints like FieldHints for this instead of looking at the text...
const sal_Int32 l = nNext<m_pTextNode->Len() ? nNext : m_pTextNode->Len();
- sal_Int32 p=nPos;
+ sal_Int32 p=m_nPosition;
const sal_Unicode* aStr = m_pTextNode->GetText().getStr();
while (p<l)
{
@@ -325,13 +325,13 @@ sal_Int32 SwAttrIter::GetNextAttr( ) const
break;
}
}
- if ((p<l && p>nPos) || nNext<=p)
+ if ((p<l && p>m_nPosition) || nNext<=p)
nNext=p;
else
nNext=p+1;
}
- if( pRedln )
- return pRedln->GetNextRedln( nNext );
+ if( m_pRedline )
+ return m_pRedline->GetNextRedln( nNext );
return nNext;
}
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 42febc6..c8bea5f 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -39,59 +39,59 @@ class SwAttrIter
friend class SwFontSave;
protected:
- SwAttrHandler aAttrHandler;
- SwViewShell *pShell;
- SwFont *pFnt;
- SwpHints *pHints;
- const SwAttrSet* pAttrSet; // The char attribute set
- SwScriptInfo* pScriptInfo;
+ SwAttrHandler m_aAttrHandler;
+ SwViewShell *m_pViewShell;
+ SwFont *m_pFont;
+ SwpHints *m_pHints;
+ const SwAttrSet* m_pAttrSet; // The char attribute set
+ SwScriptInfo* m_pScriptInfo;
private:
- VclPtr<OutputDevice> pLastOut;
- short nChgCnt;
- SwRedlineItr *pRedln;
- size_t nStartIndex;
- size_t nEndIndex;
- sal_Int32 nPos;
- sal_uInt8 nPropFont;
- o3tl::enumarray<SwFontScript, const void*> aMagicNo;
- o3tl::enumarray<SwFontScript, sal_uInt16> aFntIdx;
+ VclPtr<OutputDevice> m_pLastOut;
+ short m_nChgCnt;
+ SwRedlineItr *m_pRedline;
+ size_t m_nStartIndex;
+ size_t m_nEndIndex;
+ sal_Int32 m_nPosition;
+ sal_uInt8 m_nPropFont;
+ o3tl::enumarray<SwFontScript, const void*> m_aMagicNo;
+ o3tl::enumarray<SwFontScript, sal_uInt16> m_aFontIdx;
const SwTextNode* m_pTextNode;
void SeekFwd( const sal_Int32 nPos );
- void SetFnt( SwFont* pNew ) { pFnt = pNew; }
+ void SetFnt( SwFont* pNew ) { m_pFont = pNew; }
protected:
void Chg( SwTextAttr *pHt );
void Rst( SwTextAttr *pHt );
void CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrame* pFrame = nullptr );
explicit SwAttrIter(SwTextNode* pTextNode)
- : pShell(nullptr)
- , pFnt(nullptr)
- , pHints(nullptr)
- , pAttrSet(nullptr)
- , pScriptInfo(nullptr)
- , pLastOut(nullptr)
- , nChgCnt(0)
- , pRedln(nullptr)
- , nStartIndex(0)
- , nEndIndex(0)
- , nPos(0)
- , nPropFont(0)
+ : m_pViewShell(nullptr)
+ , m_pFont(nullptr)
+ , m_pHints(nullptr)
+ , m_pAttrSet(nullptr)
+ , m_pScriptInfo(nullptr)
+ , m_pLastOut(nullptr)
+ , m_nChgCnt(0)
+ , m_pRedline(nullptr)
+ , m_nStartIndex(0)
+ , m_nEndIndex(0)
+ , m_nPosition(0)
+ , m_nPropFont(0)
, m_pTextNode(pTextNode)
{
- aMagicNo[SwFontScript::Latin] = aMagicNo[SwFontScript::CJK] = aMagicNo[SwFontScript::CTL] = nullptr;
+ m_aMagicNo[SwFontScript::Latin] = m_aMagicNo[SwFontScript::CJK] = m_aMagicNo[SwFontScript::CTL] = nullptr;
}
public:
// Constructor, destructor
SwAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf )
- : pShell(nullptr), pFnt(nullptr), pHints(nullptr), pScriptInfo(nullptr), pLastOut(nullptr), nChgCnt(0), pRedln(nullptr),nPropFont(0), m_pTextNode(&rTextNode)
+ : m_pViewShell(nullptr), m_pFont(nullptr), m_pHints(nullptr), m_pScriptInfo(nullptr), m_pLastOut(nullptr), m_nChgCnt(0), m_pRedline(nullptr),m_nPropFont(0), m_pTextNode(&rTextNode)
{ CtorInitAttrIter( rTextNode, rScrInf ); }
virtual ~SwAttrIter();
- SwRedlineItr *GetRedln() { return pRedln; }
+ SwRedlineItr *GetRedln() { return m_pRedline; }
// The parameter returns the position of the next change before or at the
// char position.
sal_Int32 GetNextAttr( ) const;
@@ -108,20 +108,20 @@ public:
bool SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFont );
// Do we have an attribute change at all?
- bool HasHints() const { return nullptr != pHints; }
+ bool HasHints() const { return nullptr != m_pHints; }
// Returns the attribute for a position
SwTextAttr *GetAttr( const sal_Int32 nPos ) const;
- const SwpHints *GetHints() const { return pHints; }
+ const SwpHints *GetHints() const { return m_pHints; }
- SwFont *GetFnt() { return pFnt; }
- const SwFont *GetFnt() const { return pFnt; }
+ SwFont *GetFnt() { return m_pFont; }
+ const SwFont *GetFnt() const { return m_pFont; }
- sal_uInt8 GetPropFont() const { return nPropFont; }
- void SetPropFont( const sal_uInt8 nNew ) { nPropFont = nNew; }
+ sal_uInt8 GetPropFont() const { return m_nPropFont; }
+ void SetPropFont( const sal_uInt8 nNew ) { m_nPropFont = nNew; }
- SwAttrHandler& GetAttrHandler() { return aAttrHandler; }
+ SwAttrHandler& GetAttrHandler() { return m_aAttrHandler; }
};
#endif
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 194f3f4..e17920a 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -454,7 +454,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
bAllowBefore = rCC.isLetterNumeric( rInf.GetText(), rInf.GetIdx() - 1 );
// Note: ScriptType returns values in [1,4]
if ( bAllowBefore )
- nLstActual = SwFontScript(pScriptInfo->ScriptType( rInf.GetIdx() - 1 ) - 1);
+ nLstActual = SwFontScript(m_pScriptInfo->ScriptType( rInf.GetIdx() - 1 ) - 1);
}
nLstHeight /= 5;
@@ -532,7 +532,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
// if we are underlined, we store the beginning of this underlined
// segment for repaint optimization
- if ( LINESTYLE_NONE != pFnt->GetUnderline() && ! nUnderLineStart )
+ if ( LINESTYLE_NONE != m_pFont->GetUnderline() && ! nUnderLineStart )
nUnderLineStart = GetLeftMargin() + rInf.X();
if ( pPor->IsFlyPortion() )
@@ -551,12 +551,12 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
// reformat is at end of an underlined portion and next portion
// is not underlined
( ( rInf.GetReformatStart() == rInf.GetIdx() &&
- LINESTYLE_NONE == pFnt->GetUnderline()
+ LINESTYLE_NONE == m_pFont->GetUnderline()
) ||
// reformat is inside portion and portion is underlined
( rInf.GetReformatStart() >= rInf.GetIdx() &&
rInf.GetReformatStart() <= rInf.GetIdx() + pPor->GetLen() &&
- LINESTYLE_NONE != pFnt->GetUnderline() ) ) )
+ LINESTYLE_NONE != m_pFont->GetUnderline() ) ) )
rInf.SetPaintOfst( nUnderLineStart );
else if ( ! rInf.GetPaintOfst() &&
// 2. Right Tab
@@ -568,7 +568,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
rInf.GetReformatStart() >= rInf.GetIdx() &&
rInf.GetReformatStart() <= rInf.GetIdx() + pPor->GetLen() )
// 6. Grid Mode
- || ( bHasGrid && SwFontScript::CJK != pFnt->GetActual() )
+ || ( bHasGrid && SwFontScript::CJK != m_pFont->GetActual() )
)
)
// we store the beginning of the critical portion as our
@@ -577,7 +577,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
// under one of these conditions we are allowed to delete the
// start of the underline portion
- if ( IsUnderlineBreak( *pPor, *pFnt ) )
+ if ( IsUnderlineBreak( *pPor, *m_pFont ) )
nUnderLineStart = 0;
if( pPor->IsFlyCntPortion() || ( pPor->IsMultiPortion() &&
@@ -593,7 +593,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
// The distance between two different scripts is set
// to 20% of the fontheight.
sal_Int32 nTmp = rInf.GetIdx() + pPor->GetLen();
- if( nTmp == pScriptInfo->NextScriptChg( nTmp - 1 ) &&
+ if( nTmp == m_pScriptInfo->NextScriptChg( nTmp - 1 ) &&
nTmp != rInf.GetText().getLength() )
{
const sal_uInt16 nDist = (sal_uInt16)(rInf.GetFont()->GetHeight()/5);
@@ -622,10 +622,10 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
sal_Int32 nTmp = rInf.GetIdx() + pPor->GetLen();
const SwTwips nRestWidth = rInf.Width() - rInf.X() - pPor->Width();
- const SwFontScript nCurrScript = pFnt->GetActual(); // pScriptInfo->ScriptType( rInf.GetIdx() );
+ const SwFontScript nCurrScript = m_pFont->GetActual(); // pScriptInfo->ScriptType( rInf.GetIdx() );
const SwFontScript nNextScript = nTmp >= rInf.GetText().getLength() ?
SwFontScript::CJK :
- SwScriptInfo::WhichFont( nTmp, nullptr, pScriptInfo );
+ SwScriptInfo::WhichFont( nTmp, nullptr, m_pScriptInfo );
// snap non-asian text to grid if next portion is ASIAN or
// there are no more portions in this line
@@ -945,11 +945,11 @@ SwTextPortion *SwTextFormatter::NewTextPortion( SwTextFormatInfo &rInf )
sal_Int32 nNextChg = std::min( nNextAttr, rInf.GetText().getLength() );
// end of script type:
- const sal_Int32 nNextScript = pScriptInfo->NextScriptChg( rInf.GetIdx() );
+ const sal_Int32 nNextScript = m_pScriptInfo->NextScriptChg( rInf.GetIdx() );
nNextChg = std::min( nNextChg, nNextScript );
// end of direction:
- const sal_Int32 nNextDir = pScriptInfo->NextDirChg( rInf.GetIdx() );
+ const sal_Int32 nNextDir = m_pScriptInfo->NextDirChg( rInf.GetIdx() );
nNextChg = std::min( nNextChg, nNextDir );
// Turbo boost:
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index e91428a..637f44c 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -321,7 +321,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
sal_Int32 nOffset = GetInfo().GetIdx();
SeekStartAndChg( GetInfo(), true );
if( GetRedln() && m_pCurr->HasRedline() )
- GetRedln()->Seek( *pFnt, nOffset, 0 );
+ GetRedln()->Seek( *m_pFont, nOffset, 0 );
}
else if( pPor->InTextGrp() || pPor->InFieldGrp() || pPor->InTabGrp() )
SeekAndChg( GetInfo() );
@@ -485,7 +485,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
long nAdjustBaseLine )
{
// Check if common underline should not be continued
- if ( IsUnderlineBreak( *pPor, *pFnt ) )
+ if ( IsUnderlineBreak( *pPor, *m_pFont ) )
{
// delete underline font
delete GetInfo().GetUnderFnt();
@@ -511,9 +511,9 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
if( HasHints() )
{
- for ( size_t nTmp = 0; nTmp < pHints->Count(); ++nTmp )
+ for ( size_t nTmp = 0; nTmp < m_pHints->Count(); ++nTmp )
{
- SwTextAttr* const pTextAttr = pHints->Get( nTmp );
+ SwTextAttr* const pTextAttr = m_pHints->Get( nTmp );
const SvxUnderlineItem* pItem =
static_cast<const SvxUnderlineItem*>(CharFormat::GetItem( *pTextAttr, RES_CHRATR_UNDERLINE ));
@@ -524,7 +524,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
const sal_Int32 nEnd = *pTextAttr->GetEnd();
if( nEnd > nSt )
{
- const bool bUnderSelect = pFnt->GetUnderline() == pItem->GetLineStyle();
+ const bool bUnderSelect = m_pFont->GetUnderline() == pItem->GetLineStyle();
aUnderMulti.Select( Range( nSt, nEnd - 1 ), bUnderSelect );
}
}
@@ -581,8 +581,8 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
aIter.Seek( nTmpIdx );
- if ( aIter.GetFnt()->GetEscapement() < 0 || pFnt->IsWordLineMode() ||
- SVX_CASEMAP_KAPITAELCHEN == pFnt->GetCaseMap() )
+ if ( aIter.GetFnt()->GetEscapement() < 0 || m_pFont->IsWordLineMode() ||
+ SVX_CASEMAP_KAPITAELCHEN == m_pFont->GetCaseMap() )
break;
if ( !aIter.GetFnt()->GetEscapement() )
@@ -641,9 +641,9 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
}
// an escaped redlined portion should also have a special underlining
- if( ! pUnderlineFnt && pFnt->GetEscapement() > 0 && GetRedln() &&
+ if( ! pUnderlineFnt && m_pFont->GetEscapement() > 0 && GetRedln() &&
GetRedln()->ChkSpecialUnderline() )
- pUnderlineFnt = new SwFont( *pFnt );
+ pUnderlineFnt = new SwFont( *m_pFont );
delete GetInfo().GetUnderFnt();
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 64c04d3..874614d 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -47,19 +47,19 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
{
// during HTML-Import it can happen, that no layout exists
SwRootFrame* pRootFrame = rTextNode.getIDocumentLayoutAccess().GetCurrentLayout();
- pShell = pRootFrame ? pRootFrame->GetCurrShell() : nullptr;
+ m_pViewShell = pRootFrame ? pRootFrame->GetCurrShell() : nullptr;
- pScriptInfo = &rScrInf;
+ m_pScriptInfo = &rScrInf;
// attributes set at the whole paragraph
- pAttrSet = rTextNode.GetpSwAttrSet();
+ m_pAttrSet = rTextNode.GetpSwAttrSet();
// attribute array
- pHints = rTextNode.GetpSwpHints();
+ m_pHints = rTextNode.GetpSwpHints();
// Build a font matching the default paragraph style:
- SwFontAccess aFontAccess( &rTextNode.GetAnyFormatColl(), pShell );
- delete pFnt;
- pFnt = new SwFont( aFontAccess.Get()->GetFont() );
+ SwFontAccess aFontAccess( &rTextNode.GetAnyFormatColl(), m_pViewShell );
+ delete m_pFont;
+ m_pFont = new SwFont( aFontAccess.Get()->GetFont() );
// set font to vertical if frame layout is vertical
bool bVertLayout = false;
@@ -69,7 +69,7 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
if ( pFrame->IsVertical() )
{
bVertLayout = true;
- pFnt->SetVertical( pFnt->GetOrientation(), true );
+ m_pFont->SetVertical( m_pFont->GetOrientation(), true );
}
bRTL = pFrame->IsRightToLeft();
}
@@ -79,54 +79,54 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
// If any further attributes for the paragraph are given in pAttrSet
// consider them during construction of the default array, and apply
// them to the font
- aAttrHandler.Init( aFontAccess.Get()->GetDefault(), pAttrSet,
- *rTextNode.getIDocumentSettingAccess(), pShell, *pFnt, bVertLayout );
+ m_aAttrHandler.Init( aFontAccess.Get()->GetDefault(), m_pAttrSet,
+ *rTextNode.getIDocumentSettingAccess(), m_pViewShell, *m_pFont, bVertLayout );
- aMagicNo[SwFontScript::Latin] = aMagicNo[SwFontScript::CJK] = aMagicNo[SwFontScript::CTL] = nullptr;
+ m_aMagicNo[SwFontScript::Latin] = m_aMagicNo[SwFontScript::CJK] = m_aMagicNo[SwFontScript::CTL] = nullptr;
// determine script changes if not already done for current paragraph
- OSL_ENSURE( pScriptInfo, "No script info available");
- if ( pScriptInfo->GetInvalidityA() != COMPLETE_STRING )
- pScriptInfo->InitScriptInfo( rTextNode, bRTL );
+ OSL_ENSURE( m_pScriptInfo, "No script info available");
+ if ( m_pScriptInfo->GetInvalidityA() != COMPLETE_STRING )
+ m_pScriptInfo->InitScriptInfo( rTextNode, bRTL );
if ( g_pBreakIt->GetBreakIter().is() )
{
- pFnt->SetActual( SwScriptInfo::WhichFont( 0, nullptr, pScriptInfo ) );
+ m_pFont->SetActual( SwScriptInfo::WhichFont( 0, nullptr, m_pScriptInfo ) );
sal_Int32 nChg = 0;
size_t nCnt = 0;
do
{
- if ( nCnt >= pScriptInfo->CountScriptChg() )
+ if ( nCnt >= m_pScriptInfo->CountScriptChg() )
break;
- nChg = pScriptInfo->GetScriptChg( nCnt );
+ nChg = m_pScriptInfo->GetScriptChg( nCnt );
SwFontScript nTmp = SW_SCRIPTS;
- switch ( pScriptInfo->GetScriptType( nCnt++ ) ) {
+ switch ( m_pScriptInfo->GetScriptType( nCnt++ ) ) {
case i18n::ScriptType::ASIAN :
- if( !aMagicNo[SwFontScript::CJK] ) nTmp = SwFontScript::CJK;
+ if( !m_aMagicNo[SwFontScript::CJK] ) nTmp = SwFontScript::CJK;
break;
case i18n::ScriptType::COMPLEX :
- if( !aMagicNo[SwFontScript::CTL] ) nTmp = SwFontScript::CTL;
+ if( !m_aMagicNo[SwFontScript::CTL] ) nTmp = SwFontScript::CTL;
break;
default:
- if( !aMagicNo[SwFontScript::Latin ] ) nTmp = SwFontScript::Latin;
+ if( !m_aMagicNo[SwFontScript::Latin ] ) nTmp = SwFontScript::Latin;
}
if( nTmp < SW_SCRIPTS )
{
- pFnt->ChkMagic( pShell, nTmp );
- pFnt->GetMagic( aMagicNo[ nTmp ], aFntIdx[ nTmp ], nTmp );
+ m_pFont->ChkMagic( m_pViewShell, nTmp );
+ m_pFont->GetMagic( m_aMagicNo[ nTmp ], m_aFontIdx[ nTmp ], nTmp );
}
} while (nChg < rTextNode.GetText().getLength());
}
else
{
- pFnt->ChkMagic( pShell, SwFontScript::Latin );
- pFnt->GetMagic( aMagicNo[ SwFontScript::Latin ], aFntIdx[ SwFontScript::Latin ], SwFontScript::Latin );
+ m_pFont->ChkMagic( m_pViewShell, SwFontScript::Latin );
+ m_pFont->GetMagic( m_aMagicNo[ SwFontScript::Latin ], m_aFontIdx[ SwFontScript::Latin ], SwFontScript::Latin );
}
- nStartIndex = nEndIndex = nPos = nChgCnt = 0;
- nPropFont = 0;
+ m_nStartIndex = m_nEndIndex = m_nPosition = m_nChgCnt = 0;
+ m_nPropFont = 0;
SwDoc* pDoc = rTextNode.GetDoc();
const IDocumentRedlineAccess& rIDRA = rTextNode.getIDocumentRedlineAccess();
@@ -146,11 +146,11 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
Seek( 0 );
}
- pRedln = new SwRedlineItr( rTextNode, *pFnt, aAttrHandler, nRedlPos,
+ m_pRedline = new SwRedlineItr( rTextNode, *m_pFont, m_aAttrHandler, nRedlPos,
bShow, pArr, nInputStt );
- if( pRedln->IsOn() )
- ++nChgCnt;
+ if( m_pRedline->IsOn() )
+ ++m_nChgCnt;
}
}
}
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index c8969bf..5be3db8 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -570,7 +570,7 @@ SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf )
// find next attribute change / script change
const sal_Int32 nTmpIdx = nNextChg;
sal_Int32 nNextAttr = std::min( static_cast<sal_Int32>(GetNextAttr()), rInf.GetText().getLength() );
- nNextChg = pScriptInfo->NextScriptChg( nTmpIdx );
+ nNextChg = m_pScriptInfo->NextScriptChg( nTmpIdx );
if( nNextChg > nNextAttr )
nNextChg = nNextAttr;
if ( nNextChg > nPorLen )
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index d024e55..239e2a3 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -278,7 +278,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,
SwFont *pTmpFnt = nullptr;
if( !bName )
{
- pTmpFnt = new SwFont( *pFnt );
+ pTmpFnt = new SwFont( *m_pFont );
pTmpFnt->SetDiffFnt( &pChFormat->GetAttrSet(), m_pFrame->GetTextNode()->getIDocumentSettingAccess() );
}
{
@@ -316,12 +316,12 @@ static SwFieldPortion * lcl_NewMetaPortion(SwTextAttr & rHint, const bool bPrefi
*/
SwExpandPortion * SwTextFormatter::TryNewNoLengthPortion(SwTextFormatInfo & rInfo)
{
- if (pHints)
+ if (m_pHints)
{
const sal_Int32 nIdx(rInfo.GetIdx());
- while (m_nHintEndIndex < pHints->Count())
+ while (m_nHintEndIndex < m_pHints->Count())
{
- SwTextAttr & rHint( *pHints->GetSortedByEnd(m_nHintEndIndex) );
+ SwTextAttr & rHint( *m_pHints->GetSortedByEnd(m_nHintEndIndex) );
sal_Int32 const nEnd( *rHint.GetAnyEnd() );
if (nEnd > nIdx)
{
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 5e856dd..65668a8 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1054,7 +1054,7 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset )
FeedInf( rInf );
SeekStartAndChg( rInf, true );
if( GetRedln() && m_pCurr->HasRedline() )
- GetRedln()->Seek( *pFnt, nOffset, 0 );
+ GetRedln()->Seek( *m_pFont, nOffset, 0 );
// A tricky special case: Flyfrms extend into the Line and are at the
// position we want to insert the Quovadis text
More information about the Libreoffice-commits
mailing list