summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/EnhancedPDFExportHelper.hxx24
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx30
-rw-r--r--sw/source/core/text/frmcrsr.cxx12
-rw-r--r--sw/source/core/text/inftxt.cxx50
-rw-r--r--sw/source/core/text/inftxt.hxx56
-rw-r--r--sw/source/core/text/porfld.cxx82
-rw-r--r--sw/source/core/text/porfld.hxx12
7 files changed, 135 insertions, 131 deletions
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx
index bda578f8b17e..8273cf29ad85 100644
--- a/sw/inc/EnhancedPDFExportHelper.hxx
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -210,13 +210,13 @@ class SwEnhancedPDFExportHelper
const SwPrintData& mrPrintData;
- static TableColumnsMap aTableColumnsMap;
- static LinkIdMap aLinkIdMap;
- static NumListIdMap aNumListIdMap;
- static NumListBodyIdMap aNumListBodyIdMap;
- static FrameTagIdMap aFrameTagIdMap;
+ static TableColumnsMap s_aTableColumnsMap;
+ static LinkIdMap s_aLinkIdMap;
+ static NumListIdMap s_aNumListIdMap;
+ static NumListBodyIdMap s_aNumListBodyIdMap;
+ static FrameTagIdMap s_aFrameTagIdMap;
- static LanguageType eLanguageDefault;
+ static LanguageType s_eLanguageDefault;
void EnhancedPDFExport();
sal_Int32 CalcOutputPageNum( const SwRect& rRect ) const;
@@ -237,13 +237,13 @@ class SwEnhancedPDFExportHelper
~SwEnhancedPDFExportHelper();
- static TableColumnsMap& GetTableColumnsMap() {return aTableColumnsMap; }
- static LinkIdMap& GetLinkIdMap() { return aLinkIdMap; }
- static NumListIdMap& GetNumListIdMap() {return aNumListIdMap; }
- static NumListBodyIdMap& GetNumListBodyIdMap() {return aNumListBodyIdMap; }
- static FrameTagIdMap& GetFrameTagIdMap() { return aFrameTagIdMap; }
+ static TableColumnsMap& GetTableColumnsMap() {return s_aTableColumnsMap; }
+ static LinkIdMap& GetLinkIdMap() { return s_aLinkIdMap; }
+ static NumListIdMap& GetNumListIdMap() {return s_aNumListIdMap; }
+ static NumListBodyIdMap& GetNumListBodyIdMap() {return s_aNumListBodyIdMap; }
+ static FrameTagIdMap& GetFrameTagIdMap() { return s_aFrameTagIdMap; }
- static LanguageType GetDefaultLanguage() {return eLanguageDefault; }
+ static LanguageType GetDefaultLanguage() {return s_eLanguageDefault; }
//scale and position rRectangle if we're scaling due to notes in margins.
tools::Rectangle SwRectToPDFRect(const SwPageFrame* pCurrPage,
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index a908e63326d5..29719590dc4c 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -87,13 +87,13 @@ using namespace ::com::sun::star;
// Some static data structures
-TableColumnsMap SwEnhancedPDFExportHelper::aTableColumnsMap;
-LinkIdMap SwEnhancedPDFExportHelper::aLinkIdMap;
-NumListIdMap SwEnhancedPDFExportHelper::aNumListIdMap;
-NumListBodyIdMap SwEnhancedPDFExportHelper::aNumListBodyIdMap;
-FrameTagIdMap SwEnhancedPDFExportHelper::aFrameTagIdMap;
+TableColumnsMap SwEnhancedPDFExportHelper::s_aTableColumnsMap;
+LinkIdMap SwEnhancedPDFExportHelper::s_aLinkIdMap;
+NumListIdMap SwEnhancedPDFExportHelper::s_aNumListIdMap;
+NumListBodyIdMap SwEnhancedPDFExportHelper::s_aNumListBodyIdMap;
+FrameTagIdMap SwEnhancedPDFExportHelper::s_aFrameTagIdMap;
-LanguageType SwEnhancedPDFExportHelper::eLanguageDefault = LANGUAGE_SYSTEM;
+LanguageType SwEnhancedPDFExportHelper::s_eLanguageDefault = LANGUAGE_SYSTEM;
#if OSL_DEBUG_LEVEL > 1
@@ -1480,11 +1480,11 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh,
}
}
- aTableColumnsMap.clear();
- aLinkIdMap.clear();
- aNumListIdMap.clear();
- aNumListBodyIdMap.clear();
- aFrameTagIdMap.clear();
+ s_aTableColumnsMap.clear();
+ s_aLinkIdMap.clear();
+ s_aNumListIdMap.clear();
+ s_aNumListBodyIdMap.clear();
+ s_aFrameTagIdMap.clear();
#if OSL_DEBUG_LEVEL > 1
aStructStack.clear();
@@ -1498,7 +1498,7 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh,
else if ( i18n::ScriptType::COMPLEX == nScript )
nLangRes = RES_CHRATR_CTL_LANGUAGE;
- eLanguageDefault = static_cast<const SvxLanguageItem*>(&mrSh.GetDoc()->GetDefault( nLangRes ))->GetLanguage();
+ s_eLanguageDefault = static_cast<const SvxLanguageItem*>(&mrSh.GetDoc()->GetDefault( nLangRes ))->GetLanguage();
EnhancedPDFExport();
}
@@ -1702,7 +1702,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Store link info for tagged pdf output:
const IdMapEntry aLinkEntry( rLinkRect, nLinkId );
- aLinkIdMap.push_back( aLinkEntry );
+ s_aLinkIdMap.push_back( aLinkEntry );
// Connect Link and Destination:
if ( bIntern )
@@ -1906,7 +1906,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Store link info for tagged pdf output:
const IdMapEntry aLinkEntry( rLinkRect, nLinkId );
- aLinkIdMap.push_back( aLinkEntry );
+ s_aLinkIdMap.push_back( aLinkEntry );
// Connect Link and Destination:
pPDFExtOutDevData->SetLinkDest( nLinkId, nDestId );
@@ -1987,7 +1987,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Store link info for tagged pdf output:
const IdMapEntry aLinkEntry( aLinkRect, nLinkId );
- aLinkIdMap.push_back( aLinkEntry );
+ s_aLinkIdMap.push_back( aLinkEntry );
if ( -1 != nDestPageNum )
{
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 303a529e3484..a4cab82d92b1 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -744,11 +744,15 @@ namespace {
class SwSetToRightMargin
{
- bool bRight;
+ bool m_bRight;
+
public:
- SwSetToRightMargin() : bRight( false ) { }
- ~SwSetToRightMargin() { SwTextCursor::SetRightMargin( bRight ); }
- void SetRight( const bool bNew ) { bRight = bNew; }
+ SwSetToRightMargin()
+ : m_bRight(false)
+ {
+ }
+ ~SwSetToRightMargin() { SwTextCursor::SetRightMargin(m_bRight); }
+ void SetRight(const bool bNew) { m_bRight = bNew; }
};
}
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index b2d5bfa28728..33ff09ea339a 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -480,14 +480,14 @@ bool SwTextSizeInfo::HasHint(TextFrameIndex const nPos) const
void SwTextPaintInfo::CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint )
{
CtorInitTextSizeInfo( pRenderContext, pFrame, TextFrameIndex(0) );
- aTextFly.CtorInitTextFly( pFrame );
- aPaintRect = rPaint;
- nSpaceIdx = 0;
- pSpaceAdd = nullptr;
+ m_aTextFly.CtorInitTextFly( pFrame );
+ m_aPaintRect = rPaint;
+ m_nSpaceIdx = 0;
+ m_pSpaceAdd = nullptr;
m_pWrongList = nullptr;
m_pGrammarCheckList = nullptr;
m_pSmartTags = nullptr;
- pBrushItem = nullptr;
+ m_pBrushItem = nullptr;
}
SwTextPaintInfo::SwTextPaintInfo( const SwTextPaintInfo &rInf, const OUString* pText )
@@ -495,12 +495,12 @@ SwTextPaintInfo::SwTextPaintInfo( const SwTextPaintInfo &rInf, const OUString* p
, m_pWrongList( rInf.GetpWrongList() )
, m_pGrammarCheckList( rInf.GetGrammarCheckList() )
, m_pSmartTags( rInf.GetSmartTags() )
- , pSpaceAdd( rInf.GetpSpaceAdd() ),
- pBrushItem( rInf.GetBrushItem() ),
- aTextFly( rInf.GetTextFly() ),
- aPos( rInf.GetPos() ),
- aPaintRect( rInf.GetPaintRect() ),
- nSpaceIdx( rInf.GetSpaceIdx() )
+ , m_pSpaceAdd( rInf.GetpSpaceAdd() ),
+ m_pBrushItem( rInf.GetBrushItem() ),
+ m_aTextFly( rInf.GetTextFly() ),
+ m_aPos( rInf.GetPos() ),
+ m_aPaintRect( rInf.GetPaintRect() ),
+ m_nSpaceIdx( rInf.GetSpaceIdx() )
{ }
SwTextPaintInfo::SwTextPaintInfo( const SwTextPaintInfo &rInf )
@@ -508,12 +508,12 @@ SwTextPaintInfo::SwTextPaintInfo( const SwTextPaintInfo &rInf )
, m_pWrongList( rInf.GetpWrongList() )
, m_pGrammarCheckList( rInf.GetGrammarCheckList() )
, m_pSmartTags( rInf.GetSmartTags() )
- , pSpaceAdd( rInf.GetpSpaceAdd() ),
- pBrushItem( rInf.GetBrushItem() ),
- aTextFly( rInf.GetTextFly() ),
- aPos( rInf.GetPos() ),
- aPaintRect( rInf.GetPaintRect() ),
- nSpaceIdx( rInf.GetSpaceIdx() )
+ , m_pSpaceAdd( rInf.GetpSpaceAdd() ),
+ m_pBrushItem( rInf.GetBrushItem() ),
+ m_aTextFly( rInf.GetTextFly() ),
+ m_aPos( rInf.GetPos() ),
+ m_aPaintRect( rInf.GetPaintRect() ),
+ m_nSpaceIdx( rInf.GetSpaceIdx() )
{ }
SwTextPaintInfo::SwTextPaintInfo( SwTextFrame *pFrame, const SwRect &rPaint )
@@ -680,7 +680,7 @@ void SwTextPaintInfo::DrawText_( const OUString &rText, const SwLinePortion &rPo
rPor.GetNextPortion()->IsHolePortion() );
// Draw text next to the left border
- Point aFontPos(aPos);
+ Point aFontPos(m_aPos);
if( m_pFnt->GetLeftBorder() && !static_cast<const SwTextPortion&>(rPor).GetJoinBorderWithPrev() )
{
const sal_uInt16 nLeftBorderSpace = m_pFnt->GetLeftBorderSpace();
@@ -966,7 +966,7 @@ void SwTextPaintInfo::DrawRect( const SwRect &rRect, bool bRetouche ) const
{
if ( OnWin() || !bRetouche )
{
- if( aTextFly.IsOn() )
+ if( m_aTextFly.IsOn() )
const_cast<SwTextPaintInfo*>(this)->GetTextFly().
DrawFlyRect( m_pOut, rRect );
else
@@ -1063,21 +1063,21 @@ void SwTextPaintInfo::DrawPostIts( bool bScript ) const
case 0 :
aSize.setWidth( nPostItsWidth );
aSize.setHeight( nFontHeight );
- aTmp.setX( aPos.X() );
- aTmp.setY( aPos.Y() - nFontAscent );
+ aTmp.setX( m_aPos.X() );
+ aTmp.setY( m_aPos.Y() - nFontAscent );
break;
case 900 :
aSize.setHeight( nPostItsWidth );
aSize.setWidth( nFontHeight );
- aTmp.setX( aPos.X() - nFontAscent );
- aTmp.setY( aPos.Y() );
+ aTmp.setX( m_aPos.X() - nFontAscent );
+ aTmp.setY( m_aPos.Y() );
break;
case 2700 :
aSize.setHeight( nPostItsWidth );
aSize.setWidth( nFontHeight );
- aTmp.setX( aPos.X() - nFontHeight +
+ aTmp.setX( m_aPos.X() - nFontHeight +
nFontAscent );
- aTmp.setY( aPos.Y() );
+ aTmp.setY( m_aPos.Y() );
break;
}
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 74dae963eafd..bb245d5b031f 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -340,13 +340,13 @@ class SwTextPaintInfo : public SwTextSizeInfo
sw::WrongListIterator *m_pWrongList;
sw::WrongListIterator *m_pGrammarCheckList;
sw::WrongListIterator *m_pSmartTags;
- std::vector<tools::Long>* pSpaceAdd;
- const SvxBrushItem *pBrushItem; // For the background
- SwTextFly aTextFly; // Calculate the FlyFrame
- Point aPos; // Paint position
- SwRect aPaintRect; // Original paint rect (from Layout paint)
+ std::vector<tools::Long>* m_pSpaceAdd;
+ const SvxBrushItem *m_pBrushItem; // For the background
+ SwTextFly m_aTextFly; // Calculate the FlyFrame
+ Point m_aPos; // Paint position
+ SwRect m_aPaintRect; // Original paint rect (from Layout paint)
- sal_uInt16 nSpaceIdx;
+ sal_uInt16 m_nSpaceIdx;
void DrawText_(const OUString &rText, const SwLinePortion &rPor,
const TextFrameIndex nIdx, const TextFrameIndex nLen,
const bool bKern, const bool bWrong = false,
@@ -360,9 +360,9 @@ protected:
: m_pWrongList(nullptr)
, m_pGrammarCheckList(nullptr)
, m_pSmartTags(nullptr)
- , pSpaceAdd(nullptr)
- , pBrushItem(nullptr)
- , nSpaceIdx(0)
+ , m_pSpaceAdd(nullptr)
+ , m_pBrushItem(nullptr)
+ , m_nSpaceIdx(0)
{}
public:
@@ -371,17 +371,17 @@ public:
void CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint );
- const SvxBrushItem *GetBrushItem() const { return pBrushItem; }
+ const SvxBrushItem *GetBrushItem() const { return m_pBrushItem; }
SwTextPaintInfo( SwTextFrame *pFrame, const SwRect &rPaint );
- SwTwips X() const { return aPos.X(); }
- void X( const tools::Long nNew ) { aPos.setX(nNew); }
- SwTwips Y() const { return aPos.Y(); }
- void Y( const SwTwips nNew ) { aPos.setY(nNew); }
+ SwTwips X() const { return m_aPos.X(); }
+ void X( const tools::Long nNew ) { m_aPos.setX(nNew); }
+ SwTwips Y() const { return m_aPos.Y(); }
+ void Y( const SwTwips nNew ) { m_aPos.setY(nNew); }
- SwTextFly& GetTextFly() { return aTextFly; }
- const SwTextFly& GetTextFly() const { return aTextFly; }
+ SwTextFly& GetTextFly() { return m_aTextFly; }
+ const SwTextFly& GetTextFly() const { return m_aTextFly; }
inline void DrawText( const OUString &rText, const SwLinePortion &rPor,
TextFrameIndex nIdx = TextFrameIndex(0),
TextFrameIndex nLen = TextFrameIndex(COMPLETE_STRING),
@@ -425,24 +425,24 @@ public:
inline SwTwips GetPaintOfst() const;
inline void SetPaintOfst( const SwTwips nNew );
- const Point &GetPos() const { return aPos; }
- void SetPos( const Point &rNew ) { aPos = rNew; }
+ const Point &GetPos() const { return m_aPos; }
+ void SetPos( const Point &rNew ) { m_aPos = rNew; }
- const SwRect &GetPaintRect() const { return aPaintRect; }
+ const SwRect &GetPaintRect() const { return m_aPaintRect; }
// STUFF FOR JUSTIFIED ALIGNMENT
- sal_uInt16 GetSpaceIdx() const { return nSpaceIdx; }
- void ResetSpaceIdx(){nSpaceIdx = 0; }
- void SetSpaceIdx( sal_uInt16 nNew ) { nSpaceIdx = nNew; }
- void IncSpaceIdx() { ++nSpaceIdx; }
- void RemoveFirstSpaceAdd() { pSpaceAdd->erase( pSpaceAdd->begin() ); }
+ sal_uInt16 GetSpaceIdx() const { return m_nSpaceIdx; }
+ void ResetSpaceIdx(){m_nSpaceIdx = 0; }
+ void SetSpaceIdx( sal_uInt16 nNew ) { m_nSpaceIdx = nNew; }
+ void IncSpaceIdx() { ++m_nSpaceIdx; }
+ void RemoveFirstSpaceAdd() { m_pSpaceAdd->erase( m_pSpaceAdd->begin() ); }
tools::Long GetSpaceAdd() const
- { return ( pSpaceAdd && nSpaceIdx < pSpaceAdd->size() )
- ? (*pSpaceAdd)[nSpaceIdx] : 0; }
+ { return ( m_pSpaceAdd && m_nSpaceIdx < m_pSpaceAdd->size() )
+ ? (*m_pSpaceAdd)[m_nSpaceIdx] : 0; }
- void SetpSpaceAdd( std::vector<tools::Long>* pNew ){ pSpaceAdd = pNew; }
- std::vector<tools::Long>* GetpSpaceAdd() const { return pSpaceAdd; }
+ void SetpSpaceAdd( std::vector<tools::Long>* pNew ){ m_pSpaceAdd = pNew; }
+ std::vector<tools::Long>* GetpSpaceAdd() const { return m_pSpaceAdd; }
void SetWrongList(sw::WrongListIterator *const pNew) { m_pWrongList = pNew; }
sw::WrongListIterator* GetpWrongList() const { return m_pWrongList; }
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 1d793dac0d2f..37268cb6894d 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -1062,9 +1062,9 @@ void SwTextFrame::StopAnimation( const OutputDevice* pOut )
*/
SwCombinedPortion::SwCombinedPortion( const OUString &rText )
: SwFieldPortion( rText )
- , nUpPos(0)
- , nLowPos(0)
- , nProportion(55)
+ , m_nUpPos(0)
+ , m_nLowPos(0)
+ , m_nProportion(55)
{
SetLen(TextFrameIndex(1));
SetWhichPor( PortionType::Combined );
@@ -1083,7 +1083,7 @@ SwCombinedPortion::SwCombinedPortion( const OUString &rText )
case i18n::ScriptType::ASIAN : nScr = SwFontScript::CJK; break;
case i18n::ScriptType::COMPLEX : nScr = SwFontScript::CTL; break;
}
- aScrType[i] = nScr;
+ m_aScrType[i] = nScr;
}
}
@@ -1109,27 +1109,27 @@ void SwCombinedPortion::Paint( const SwTextPaintInfo &rInf ) const
const sal_Int32 nTop = ( nCount + 1 ) / 2;
SwFont aTmpFont( *rInf.GetFont() );
- aTmpFont.SetProportion( nProportion ); // a smaller font
+ aTmpFont.SetProportion( m_nProportion ); // a smaller font
SwFontSave aFontSave( rInf, &aTmpFont );
Point aOldPos = rInf.GetPos();
- Point aOutPos( aOldPos.X(), aOldPos.Y() - nUpPos );// Y of the first row
+ Point aOutPos( aOldPos.X(), aOldPos.Y() - m_nUpPos );// Y of the first row
for( sal_Int32 i = 0 ; i < nCount; ++i )
{
if( i == nTop ) // change the row
- aOutPos.setY( aOldPos.Y() + nLowPos ); // Y of the second row
- aOutPos.setX( aOldPos.X() + aPos[i] ); // X position
- const SwFontScript nAct = aScrType[i]; // script type
+ aOutPos.setY( aOldPos.Y() + m_nLowPos ); // Y of the second row
+ aOutPos.setX( aOldPos.X() + m_aPos[i] ); // X position
+ const SwFontScript nAct = m_aScrType[i]; // script type
aTmpFont.SetActual( nAct );
// if there're more than 4 characters to display, we choose fonts
// with 2/3 of the original font width.
- if( aWidth[ nAct ] )
+ if( m_aWidth[ nAct ] )
{
Size aTmpSz = aTmpFont.GetSize( nAct );
- if( aTmpSz.Width() != aWidth[ nAct ] )
+ if( aTmpSz.Width() != m_aWidth[ nAct ] )
{
- aTmpSz.setWidth( aWidth[ nAct ] );
+ aTmpSz.setWidth( m_aWidth[ nAct ] );
aTmpFont.SetSize( aTmpSz, nAct );
}
}
@@ -1154,18 +1154,18 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
// If there are leading "weak"-scripttyped characters in this portion,
// they get the actual scripttype.
- for( sal_Int32 i = 0; i < nCount && SW_SCRIPTS == aScrType[i]; ++i )
- aScrType[i] = rInf.GetFont()->GetActual();
+ for( sal_Int32 i = 0; i < nCount && SW_SCRIPTS == m_aScrType[i]; ++i )
+ m_aScrType[i] = rInf.GetFont()->GetActual();
if( nCount > 4 )
{
// more than four? Ok, then we need the 2/3 font width
for( sal_Int32 i = 0; i < m_aExpand.getLength(); ++i )
{
- OSL_ENSURE( aScrType[i] < SW_SCRIPTS, "Combined: Script fault" );
- if( !aWidth[ aScrType[i] ] )
+ OSL_ENSURE( m_aScrType[i] < SW_SCRIPTS, "Combined: Script fault" );
+ if( !m_aWidth[ m_aScrType[i] ] )
{
- rInf.GetOut()->SetFont( rInf.GetFont()->GetFnt( aScrType[i] ) );
- aWidth[ aScrType[i] ] =
+ rInf.GetOut()->SetFont( rInf.GetFont()->GetFnt( m_aScrType[i] ) );
+ m_aWidth[ m_aScrType[i] ] =
static_cast<sal_uInt16>(2 * rInf.GetOut()->GetFontMetric().GetFontSize().Width() / 3);
}
}
@@ -1175,7 +1175,7 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
SwViewShell *pSh = rInf.GetTextFrame()->getRootFrame()->GetCurrShell();
SwFont aTmpFont( *rInf.GetFont() );
SwFontSave aFontSave( rInf, &aTmpFont );
- nProportion = 55;
+ m_nProportion = 55;
// In nMainAscent/Descent we store the ascent and descent
// of the original surrounding font
sal_uInt16 nMaxDescent, nMaxAscent, nMaxWidth;
@@ -1186,13 +1186,13 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
// becomes bigger than the surrounding font, we check 45% and maybe 40%.
do
{
- nProportion -= 5;
- aTmpFont.SetProportion( nProportion );
- memset( &aPos, 0, sizeof(aPos) );
+ m_nProportion -= 5;
+ aTmpFont.SetProportion( m_nProportion );
+ memset( &m_aPos, 0, sizeof(m_aPos) );
nMaxDescent = 0;
nMaxAscent = 0;
nMaxWidth = 0;
- nUpPos = nLowPos = 0;
+ m_nUpPos = m_nLowPos = 0;
// Now we get the width of all characters.
// The ascent and the width of the first line are stored in the
@@ -1201,22 +1201,22 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
// local nMaxAscent, nMaxDescent and nMaxWidth variables.
for( sal_Int32 i = 0; i < nCount; ++i )
{
- SwFontScript nScrp = aScrType[i];
+ SwFontScript nScrp = m_aScrType[i];
aTmpFont.SetActual( nScrp );
- if( aWidth[ nScrp ] )
+ if( m_aWidth[ nScrp ] )
{
Size aFontSize( aTmpFont.GetSize( nScrp ) );
- aFontSize.setWidth( aWidth[ nScrp ] );
+ aFontSize.setWidth( m_aWidth[ nScrp ] );
aTmpFont.SetSize( aFontSize, nScrp );
}
SwDrawTextInfo aDrawInf(pSh, *rInf.GetOut(), m_aExpand, i, 1);
Size aSize = aTmpFont.GetTextSize_( aDrawInf );
const sal_uInt16 nAsc = aTmpFont.GetAscent( pSh, *rInf.GetOut() );
- aPos[ i ] = static_cast<sal_uInt16>(aSize.Width());
+ m_aPos[ i ] = static_cast<sal_uInt16>(aSize.Width());
if( i == nTop ) // enter the second line
{
- nLowPos = nMaxDescent;
+ m_nLowPos = nMaxDescent;
Height( nMaxDescent + nMaxAscent );
Width( nMaxWidth );
SetAscent( nMaxAscent );
@@ -1224,7 +1224,7 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
nMaxDescent = 0;
nMaxWidth = 0;
}
- nMaxWidth = nMaxWidth + aPos[ i ];
+ nMaxWidth = nMaxWidth + m_aPos[ i ];
if( nAsc > nMaxAscent )
nMaxAscent = nAsc;
if( aSize.Height() - nAsc > nMaxDescent )
@@ -1238,13 +1238,13 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
if( nCount < 2 )
{
Height( nMaxAscent + nMaxDescent );
- nLowPos = nMaxDescent;
+ m_nLowPos = nMaxDescent;
}
}
Height( Height() + nMaxDescent + nMaxAscent );
- nUpPos = nMaxAscent;
- SetAscent( Height() - nMaxDescent - nLowPos );
- } while( nProportion > 40 && ( GetAscent() > nMainAscent ||
+ m_nUpPos = nMaxAscent;
+ SetAscent( Height() - nMaxDescent - m_nLowPos );
+ } while( m_nProportion > 40 && ( GetAscent() > nMainAscent ||
Height() - GetAscent() > nMainDescent ) );
// if the combined portion is smaller than the surrounding text,
// the portion grows. This looks better, if there's a character background.
@@ -1268,21 +1268,21 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
nBotDiff = ( Width() - nMaxWidth ) / 2;
switch( nTop)
{
- case 3: aPos[1] = aPos[0] + nTopDiff;
+ case 3: m_aPos[1] = m_aPos[0] + nTopDiff;
[[fallthrough]];
- case 2: aPos[nTop-1] = Width() - aPos[nTop-1];
+ case 2: m_aPos[nTop-1] = Width() - m_aPos[nTop-1];
}
- aPos[0] = 0;
+ m_aPos[0] = 0;
switch( nCount )
{
- case 5: aPos[4] = aPos[3] + nBotDiff;
+ case 5: m_aPos[4] = m_aPos[3] + nBotDiff;
[[fallthrough]];
- case 3: aPos[nTop] = nBotDiff; break;
- case 6: aPos[4] = aPos[3] + nBotDiff;
+ case 3: m_aPos[nTop] = nBotDiff; break;
+ case 6: m_aPos[4] = m_aPos[3] + nBotDiff;
[[fallthrough]];
- case 4: aPos[nTop] = 0;
+ case 4: m_aPos[nTop] = 0;
[[fallthrough]];
- case 2: aPos[nCount-1] = Width() - aPos[nCount-1];
+ case 2: m_aPos[nCount-1] = Width() - m_aPos[nCount-1];
}
// Does the combined portion fit the line?
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index d9e18f1d772a..7519cd578e5b 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -206,12 +206,12 @@ public:
*/
class SwCombinedPortion : public SwFieldPortion
{
- sal_uInt16 aPos[6]; // up to six X positions
- o3tl::enumarray<SwFontScript,sal_uInt16> aWidth = {}; // one width for every scripttype
- SwFontScript aScrType[6]; // scripttype of every character
- sal_uInt16 nUpPos; // the Y position of the upper baseline
- sal_uInt16 nLowPos; // the Y position of the lower baseline
- sal_uInt8 nProportion; // relative font height
+ sal_uInt16 m_aPos[6]; // up to six X positions
+ o3tl::enumarray<SwFontScript,sal_uInt16> m_aWidth = {}; // one width for every scripttype
+ SwFontScript m_aScrType[6]; // scripttype of every character
+ sal_uInt16 m_nUpPos; // the Y position of the upper baseline
+ sal_uInt16 m_nLowPos; // the Y position of the lower baseline
+ sal_uInt8 m_nProportion; // relative font height
public:
explicit SwCombinedPortion( const OUString &rExpand );
virtual void Paint( const SwTextPaintInfo &rInf ) const override;