summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-26 08:55:17 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-26 08:55:49 +0100
commitb4e2a13f46a247002b239d04ff3bf1d1a98d08c2 (patch)
tree5332965679bdd573dfa20dfe3fdee1d6c73ace0e /sw/source/core/txtnode
parent607544c14e1a8c7906c494273cd145cd6ddfdd73 (diff)
sw: prefix members of SwFont
Also de-obfuscate a few variable names: - nToxCnt,m_nToxCount (one would wonder if content or count) - nRefCnt,m_nRefCount - bFntChg,m_bFontChg - bNoColReplace,m_bNoColorReplace (one would wonder if color or column) Change-Id: Ief67fe66e26a42d2156b815ed6f81f1e8b74175e
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r--sw/source/core/txtnode/fntcache.cxx14
-rw-r--r--sw/source/core/txtnode/swfont.cxx344
2 files changed, 179 insertions, 179 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index e7a37702bbb9..2f09296b023b 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2377,7 +2377,7 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth )
}
}
- if( aSub[nActual].IsCapital() && nLn )
+ if( m_aSub[m_nActual].IsCapital() && nLn )
{
nTextBreak = GetCapitalBreak( rInf.GetShell(), rInf.GetpOut(),
rInf.GetScriptInfo(), rInf.GetText(), nTextWidth, rInf.GetIdx(),
@@ -2393,7 +2393,7 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth )
sal_Int32 nTmpLen;
bool bTextReplaced = false;
- if ( !aSub[nActual].IsCaseMap() )
+ if ( !m_aSub[m_nActual].IsCaseMap() )
{
pTmpText = &rInf.GetText();
nTmpIdx = rInf.GetIdx();
@@ -2402,8 +2402,8 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth )
else
{
const OUString aSnippet(rInf.GetText().copy(rInf.GetIdx(), nLn));
- aTmpText = aSub[nActual].CalcCaseMap( aSnippet );
- const bool bTitle = SVX_CASEMAP_TITEL == aSub[nActual].GetCaseMap() &&
+ aTmpText = m_aSub[m_nActual].CalcCaseMap( aSnippet );
+ const bool bTitle = SVX_CASEMAP_TITEL == m_aSub[m_nActual].GetCaseMap() &&
g_pBreakIt->GetBreakIter().is();
// Uaaaaahhhh!!! In title case mode, we would get wrong results
@@ -2412,12 +2412,12 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth )
// check if rInf.GetIdx() is begin of word
if ( !g_pBreakIt->GetBreakIter()->isBeginWord(
rInf.GetText(), rInf.GetIdx(),
- g_pBreakIt->GetLocale( aSub[nActual].GetLanguage() ),
+ g_pBreakIt->GetLocale( m_aSub[m_nActual].GetLanguage() ),
i18n::WordType::ANYWORD_IGNOREWHITESPACES ) )
{
// In this case, the beginning of aTmpText is wrong.
OUString aSnippetTmp(aSnippet.copy(0, 1));
- aSnippetTmp = aSub[nActual].CalcCaseMap( aSnippetTmp );
+ aSnippetTmp = m_aSub[m_nActual].CalcCaseMap( aSnippetTmp );
aTmpText = aTmpText.replaceAt( 0, aSnippetTmp.getLength(), OUString(aSnippet[0]) );
}
}
@@ -2466,7 +2466,7 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth )
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), nLn );
if( rInf.GetScriptInfo()->Compress( pKernArray, rInf.GetIdx(), nLn,
- rInf.GetKanaComp(), (sal_uInt16)GetHeight( nActual ) ) )
+ rInf.GetKanaComp(), (sal_uInt16)GetHeight( m_nActual ) ) )
{
long nKernAdd = nKern;
sal_Int32 nTmpBreak = nTextBreak2;
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 639aab732e21..074dbfef833f 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -69,10 +69,10 @@ using namespace ::com::sun::star;
// Hintergrundbrush setzen, z.B. bei Zeichenvorlagen
void SwFont::SetBackColor( Color* pNewColor )
{
- delete pBackColor;
- pBackColor = pNewColor;
- bFntChg = true;
- aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
+ delete m_pBackColor;
+ m_pBackColor = pNewColor;
+ m_bFontChg = true;
+ m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0;
}
void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
@@ -84,8 +84,8 @@ void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
m_aTopBorder = boost::none;
m_nTopBorderDist = 0;
}
- bFntChg = true;
- aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
+ m_bFontChg = true;
+ m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0;
}
void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
@@ -97,8 +97,8 @@ void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
m_aBottomBorder = boost::none;
m_nBottomBorderDist = 0;
}
- bFntChg = true;
- aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
+ m_bFontChg = true;
+ m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0;
}
void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
@@ -110,8 +110,8 @@ void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
m_aRightBorder = boost::none;
m_nRightBorderDist = 0;
}
- bFntChg = true;
- aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
+ m_bFontChg = true;
+ m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0;
}
void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
@@ -123,8 +123,8 @@ void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
m_aLeftBorder = boost::none;
m_nLeftBorderDist = 0;
}
- bFntChg = true;
- aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
+ m_bFontChg = true;
+ m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0;
}
const boost::optional<editeng::SvxBorderLine>&
@@ -420,7 +420,7 @@ sal_uInt16 UnMapDirection( sal_uInt16 nDir, const bool bVertFormat )
sal_uInt16 SwFont::GetOrientation( const bool bVertFormat ) const
{
- return UnMapDirection( aSub[nActual].GetOrientation(), bVertFormat );
+ return UnMapDirection( m_aSub[m_nActual].GetOrientation(), bVertFormat );
}
void SwFont::SetVertical( sal_uInt16 nDir, const bool bVertFormat )
@@ -428,12 +428,12 @@ void SwFont::SetVertical( sal_uInt16 nDir, const bool bVertFormat )
// map direction if frame has vertical layout
nDir = MapDirection( nDir, bVertFormat );
- if( nDir != aSub[0].GetOrientation() )
+ if( nDir != m_aSub[0].GetOrientation() )
{
- bFntChg = true;
- aSub[0].SetVertical( nDir, bVertFormat );
- aSub[1].SetVertical( nDir, bVertFormat );
- aSub[2].SetVertical( nDir, bVertFormat );
+ m_bFontChg = true;
+ m_aSub[0].SetVertical( nDir, bVertFormat );
+ m_aSub[1].SetVertical( nDir, bVertFormat );
+ m_aSub[2].SetVertical( nDir, bVertFormat );
}
}
@@ -481,8 +481,8 @@ sal_uInt16 SwSubFont::CalcEscAscent( const sal_uInt16 nOldAscent ) const
void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
const IDocumentSettingAccess *pIDocumentSettingAccess )
{
- delete pBackColor;
- pBackColor = NULL;
+ delete m_pBackColor;
+ m_pBackColor = NULL;
if( pAttrSet )
{
@@ -491,97 +491,97 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
true, &pItem ))
{
const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem);
- aSub[SW_LATIN].SetFamily( pFont->GetFamily() );
- aSub[SW_LATIN].Font::SetName( pFont->GetFamilyName() );
- aSub[SW_LATIN].Font::SetStyleName( pFont->GetStyleName() );
- aSub[SW_LATIN].Font::SetPitch( pFont->GetPitch() );
- aSub[SW_LATIN].Font::SetCharSet( pFont->GetCharSet() );
+ m_aSub[SW_LATIN].SetFamily( pFont->GetFamily() );
+ m_aSub[SW_LATIN].Font::SetName( pFont->GetFamilyName() );
+ m_aSub[SW_LATIN].Font::SetStyleName( pFont->GetStyleName() );
+ m_aSub[SW_LATIN].Font::SetPitch( pFont->GetPitch() );
+ m_aSub[SW_LATIN].Font::SetCharSet( pFont->GetCharSet() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_FONTSIZE,
true, &pItem ))
{
const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem);
- aSub[SW_LATIN].SvxFont::SetPropr( 100 );
- aSub[SW_LATIN].aSize = aSub[SW_LATIN].Font::GetSize();
- Size aTmpSize = aSub[SW_LATIN].aSize;
+ m_aSub[SW_LATIN].SvxFont::SetPropr( 100 );
+ m_aSub[SW_LATIN].aSize = m_aSub[SW_LATIN].Font::GetSize();
+ Size aTmpSize = m_aSub[SW_LATIN].aSize;
aTmpSize.Height() = pHeight->GetHeight();
- aSub[SW_LATIN].SetSize( aTmpSize );
+ m_aSub[SW_LATIN].SetSize( aTmpSize );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_POSTURE,
true, &pItem ))
- aSub[SW_LATIN].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
+ m_aSub[SW_LATIN].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_WEIGHT,
true, &pItem ))
- aSub[SW_LATIN].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
+ m_aSub[SW_LATIN].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_LANGUAGE,
true, &pItem ))
- aSub[SW_LATIN].SetLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() );
+ m_aSub[SW_LATIN].SetLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONT,
true, &pItem ))
{
const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem);
- aSub[SW_CJK].SetFamily( pFont->GetFamily() );
- aSub[SW_CJK].Font::SetName( pFont->GetFamilyName() );
- aSub[SW_CJK].Font::SetStyleName( pFont->GetStyleName() );
- aSub[SW_CJK].Font::SetPitch( pFont->GetPitch() );
- aSub[SW_CJK].Font::SetCharSet( pFont->GetCharSet() );
+ m_aSub[SW_CJK].SetFamily( pFont->GetFamily() );
+ m_aSub[SW_CJK].Font::SetName( pFont->GetFamilyName() );
+ m_aSub[SW_CJK].Font::SetStyleName( pFont->GetStyleName() );
+ m_aSub[SW_CJK].Font::SetPitch( pFont->GetPitch() );
+ m_aSub[SW_CJK].Font::SetCharSet( pFont->GetCharSet() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONTSIZE,
true, &pItem ))
{
const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem);
- aSub[SW_CJK].SvxFont::SetPropr( 100 );
- aSub[SW_CJK].aSize = aSub[SW_CJK].Font::GetSize();
- Size aTmpSize = aSub[SW_CJK].aSize;
+ m_aSub[SW_CJK].SvxFont::SetPropr( 100 );
+ m_aSub[SW_CJK].aSize = m_aSub[SW_CJK].Font::GetSize();
+ Size aTmpSize = m_aSub[SW_CJK].aSize;
aTmpSize.Height() = pHeight->GetHeight();
- aSub[SW_CJK].SetSize( aTmpSize );
+ m_aSub[SW_CJK].SetSize( aTmpSize );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_POSTURE,
true, &pItem ))
- aSub[SW_CJK].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
+ m_aSub[SW_CJK].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_WEIGHT,
true, &pItem ))
- aSub[SW_CJK].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
+ m_aSub[SW_CJK].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_LANGUAGE,
true, &pItem ))
{
LanguageType eNewLang = static_cast<const SvxLanguageItem*>(pItem)->GetLanguage();
- aSub[SW_CJK].SetLanguage( eNewLang );
- aSub[SW_LATIN].SetCJKContextLanguage( eNewLang );
- aSub[SW_CJK].SetCJKContextLanguage( eNewLang );
- aSub[SW_CTL].SetCJKContextLanguage( eNewLang );
+ m_aSub[SW_CJK].SetLanguage( eNewLang );
+ m_aSub[SW_LATIN].SetCJKContextLanguage( eNewLang );
+ m_aSub[SW_CJK].SetCJKContextLanguage( eNewLang );
+ m_aSub[SW_CTL].SetCJKContextLanguage( eNewLang );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONT,
true, &pItem ))
{
const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem);
- aSub[SW_CTL].SetFamily( pFont->GetFamily() );
- aSub[SW_CTL].Font::SetName( pFont->GetFamilyName() );
- aSub[SW_CTL].Font::SetStyleName( pFont->GetStyleName() );
- aSub[SW_CTL].Font::SetPitch( pFont->GetPitch() );
- aSub[SW_CTL].Font::SetCharSet( pFont->GetCharSet() );
+ m_aSub[SW_CTL].SetFamily( pFont->GetFamily() );
+ m_aSub[SW_CTL].Font::SetName( pFont->GetFamilyName() );
+ m_aSub[SW_CTL].Font::SetStyleName( pFont->GetStyleName() );
+ m_aSub[SW_CTL].Font::SetPitch( pFont->GetPitch() );
+ m_aSub[SW_CTL].Font::SetCharSet( pFont->GetCharSet() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONTSIZE,
true, &pItem ))
{
const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem);
- aSub[SW_CTL].SvxFont::SetPropr( 100 );
- aSub[SW_CTL].aSize = aSub[SW_CTL].Font::GetSize();
- Size aTmpSize = aSub[SW_CTL].aSize;
+ m_aSub[SW_CTL].SvxFont::SetPropr( 100 );
+ m_aSub[SW_CTL].aSize = m_aSub[SW_CTL].Font::GetSize();
+ Size aTmpSize = m_aSub[SW_CTL].aSize;
aTmpSize.Height() = pHeight->GetHeight();
- aSub[SW_CTL].SetSize( aTmpSize );
+ m_aSub[SW_CTL].SetSize( aTmpSize );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_POSTURE,
true, &pItem ))
- aSub[SW_CTL].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
+ m_aSub[SW_CTL].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_WEIGHT,
true, &pItem ))
- aSub[SW_CTL].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
+ m_aSub[SW_CTL].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_LANGUAGE,
true, &pItem ))
- aSub[SW_CTL].SetLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() );
+ m_aSub[SW_CTL].SetLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_UNDERLINE,
true, &pItem ))
@@ -641,7 +641,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{
const SvxEscapementItem *pEsc = static_cast<const SvxEscapementItem *>(pItem);
SetEscapement( pEsc->GetEsc() );
- if( aSub[SW_LATIN].IsEsc() )
+ if( m_aSub[SW_LATIN].IsEsc() )
SetProportion( pEsc->GetProp() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CASEMAP,
@@ -661,7 +661,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
SetVertical( static_cast<const SvxCharRotateItem*>(pItem)->GetValue() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
true, &pItem ))
- pBackColor = new Color( static_cast<const SvxBrushItem*>(pItem)->GetColor() );
+ m_pBackColor = new Color( static_cast<const SvxBrushItem*>(pItem)->GetColor() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
true, &pItem ))
SetHighlightColor(static_cast<const SvxBrushItem*>(pItem)->GetColor());
@@ -695,21 +695,21 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
else
{
Invalidate();
- bNoHyph = false;
- bBlink = false;
+ m_bNoHyph = false;
+ m_bBlink = false;
}
- bPaintBlank = false;
- bPaintWrong = false;
- OSL_ENSURE( aSub[SW_LATIN].IsTransparent(), "SwFont: Transparent revolution" );
+ m_bPaintBlank = false;
+ m_bPaintWrong = false;
+ OSL_ENSURE( m_aSub[SW_LATIN].IsTransparent(), "SwFont: Transparent revolution" );
}
SwFont::SwFont( const SwFont &rFont )
{
- aSub[SW_LATIN] = rFont.aSub[SW_LATIN];
- aSub[SW_CJK] = rFont.aSub[SW_CJK];
- aSub[SW_CTL] = rFont.aSub[SW_CTL];
- nActual = rFont.nActual;
- pBackColor = rFont.pBackColor ? new Color( *rFont.pBackColor ) : NULL;
+ m_aSub[SW_LATIN] = rFont.m_aSub[SW_LATIN];
+ m_aSub[SW_CJK] = rFont.m_aSub[SW_CJK];
+ m_aSub[SW_CTL] = rFont.m_aSub[SW_CTL];
+ m_nActual = rFont.m_nActual;
+ m_pBackColor = rFont.m_pBackColor ? new Color( *rFont.m_pBackColor ) : NULL;
m_aHighlightColor = rFont.m_aHighlightColor;
m_aTopBorder = rFont.m_aTopBorder;
m_aBottomBorder = rFont.m_aBottomBorder;
@@ -722,89 +722,89 @@ SwFont::SwFont( const SwFont &rFont )
m_aShadowColor = rFont.m_aShadowColor;
m_nShadowWidth = rFont.m_nShadowWidth;
m_aShadowLocation = rFont.m_aShadowLocation;
- aUnderColor = rFont.GetUnderColor();
- aOverColor = rFont.GetOverColor();
- nToxCnt = 0;
- nRefCnt = 0;
+ m_aUnderColor = rFont.GetUnderColor();
+ m_aOverColor = rFont.GetOverColor();
+ m_nToxCount = 0;
+ m_nRefCount = 0;
m_nMetaCount = 0;
m_nInputFieldCount = 0;
- bFntChg = rFont.bFntChg;
- bOrgChg = rFont.bOrgChg;
- bPaintBlank = rFont.bPaintBlank;
- bPaintWrong = false;
- bURL = rFont.bURL;
- bGreyWave = rFont.bGreyWave;
- bNoColReplace = rFont.bNoColReplace;
- bNoHyph = rFont.bNoHyph;
- bBlink = rFont.bBlink;
+ m_bFontChg = rFont.m_bFontChg;
+ m_bOrgChg = rFont.m_bOrgChg;
+ m_bPaintBlank = rFont.m_bPaintBlank;
+ m_bPaintWrong = false;
+ m_bURL = rFont.m_bURL;
+ m_bGreyWave = rFont.m_bGreyWave;
+ m_bNoColorReplace = rFont.m_bNoColorReplace;
+ m_bNoHyph = rFont.m_bNoHyph;
+ m_bBlink = rFont.m_bBlink;
}
SwFont::SwFont( const SwAttrSet* pAttrSet,
const IDocumentSettingAccess* pIDocumentSettingAccess )
{
- nActual = SW_LATIN;
- nToxCnt = 0;
- nRefCnt = 0;
+ m_nActual = SW_LATIN;
+ m_nToxCount = 0;
+ m_nRefCount = 0;
m_nMetaCount = 0;
m_nInputFieldCount = 0;
- bPaintBlank = false;
- bPaintWrong = false;
- bURL = false;
- bGreyWave = false;
- bNoColReplace = false;
- bNoHyph = pAttrSet->GetNoHyphenHere().GetValue();
- bBlink = pAttrSet->GetBlink().GetValue();
- bOrgChg = true;
+ m_bPaintBlank = false;
+ m_bPaintWrong = false;
+ m_bURL = false;
+ m_bGreyWave = false;
+ m_bNoColorReplace = false;
+ m_bNoHyph = pAttrSet->GetNoHyphenHere().GetValue();
+ m_bBlink = pAttrSet->GetBlink().GetValue();
+ m_bOrgChg = true;
{
const SvxFontItem& rFont = pAttrSet->GetFont();
- aSub[SW_LATIN].SetFamily( rFont.GetFamily() );
- aSub[SW_LATIN].SetName( rFont.GetFamilyName() );
- aSub[SW_LATIN].SetStyleName( rFont.GetStyleName() );
- aSub[SW_LATIN].SetPitch( rFont.GetPitch() );
- aSub[SW_LATIN].SetCharSet( rFont.GetCharSet() );
- aSub[SW_LATIN].SvxFont::SetPropr( 100 ); // 100% der FontSize
- Size aTmpSize = aSub[SW_LATIN].aSize;
+ m_aSub[SW_LATIN].SetFamily( rFont.GetFamily() );
+ m_aSub[SW_LATIN].SetName( rFont.GetFamilyName() );
+ m_aSub[SW_LATIN].SetStyleName( rFont.GetStyleName() );
+ m_aSub[SW_LATIN].SetPitch( rFont.GetPitch() );
+ m_aSub[SW_LATIN].SetCharSet( rFont.GetCharSet() );
+ m_aSub[SW_LATIN].SvxFont::SetPropr( 100 ); // 100% der FontSize
+ Size aTmpSize = m_aSub[SW_LATIN].aSize;
aTmpSize.Height() = pAttrSet->GetSize().GetHeight();
- aSub[SW_LATIN].SetSize( aTmpSize );
- aSub[SW_LATIN].SetItalic( pAttrSet->GetPosture().GetPosture() );
- aSub[SW_LATIN].SetWeight( pAttrSet->GetWeight().GetWeight() );
- aSub[SW_LATIN].SetLanguage( pAttrSet->GetLanguage().GetLanguage() );
+ m_aSub[SW_LATIN].SetSize( aTmpSize );
+ m_aSub[SW_LATIN].SetItalic( pAttrSet->GetPosture().GetPosture() );
+ m_aSub[SW_LATIN].SetWeight( pAttrSet->GetWeight().GetWeight() );
+ m_aSub[SW_LATIN].SetLanguage( pAttrSet->GetLanguage().GetLanguage() );
}
{
const SvxFontItem& rFont = pAttrSet->GetCJKFont();
- aSub[SW_CJK].SetFamily( rFont.GetFamily() );
- aSub[SW_CJK].SetName( rFont.GetFamilyName() );
- aSub[SW_CJK].SetStyleName( rFont.GetStyleName() );
- aSub[SW_CJK].SetPitch( rFont.GetPitch() );
- aSub[SW_CJK].SetCharSet( rFont.GetCharSet() );
- aSub[SW_CJK].SvxFont::SetPropr( 100 ); // 100% der FontSize
- Size aTmpSize = aSub[SW_CJK].aSize;
+ m_aSub[SW_CJK].SetFamily( rFont.GetFamily() );
+ m_aSub[SW_CJK].SetName( rFont.GetFamilyName() );
+ m_aSub[SW_CJK].SetStyleName( rFont.GetStyleName() );
+ m_aSub[SW_CJK].SetPitch( rFont.GetPitch() );
+ m_aSub[SW_CJK].SetCharSet( rFont.GetCharSet() );
+ m_aSub[SW_CJK].SvxFont::SetPropr( 100 ); // 100% der FontSize
+ Size aTmpSize = m_aSub[SW_CJK].aSize;
aTmpSize.Height() = pAttrSet->GetCJKSize().GetHeight();
- aSub[SW_CJK].SetSize( aTmpSize );
- aSub[SW_CJK].SetItalic( pAttrSet->GetCJKPosture().GetPosture() );
- aSub[SW_CJK].SetWeight( pAttrSet->GetCJKWeight().GetWeight() );
+ m_aSub[SW_CJK].SetSize( aTmpSize );
+ m_aSub[SW_CJK].SetItalic( pAttrSet->GetCJKPosture().GetPosture() );
+ m_aSub[SW_CJK].SetWeight( pAttrSet->GetCJKWeight().GetWeight() );
LanguageType eNewLang = pAttrSet->GetCJKLanguage().GetLanguage();
- aSub[SW_CJK].SetLanguage( eNewLang );
- aSub[SW_LATIN].SetCJKContextLanguage( eNewLang );
- aSub[SW_CJK].SetCJKContextLanguage( eNewLang );
- aSub[SW_CTL].SetCJKContextLanguage( eNewLang );
+ m_aSub[SW_CJK].SetLanguage( eNewLang );
+ m_aSub[SW_LATIN].SetCJKContextLanguage( eNewLang );
+ m_aSub[SW_CJK].SetCJKContextLanguage( eNewLang );
+ m_aSub[SW_CTL].SetCJKContextLanguage( eNewLang );
}
{
const SvxFontItem& rFont = pAttrSet->GetCTLFont();
- aSub[SW_CTL].SetFamily( rFont.GetFamily() );
- aSub[SW_CTL].SetName( rFont.GetFamilyName() );
- aSub[SW_CTL].SetStyleName( rFont.GetStyleName() );
- aSub[SW_CTL].SetPitch( rFont.GetPitch() );
- aSub[SW_CTL].SetCharSet( rFont.GetCharSet() );
- aSub[SW_CTL].SvxFont::SetPropr( 100 ); // 100% der FontSize
- Size aTmpSize = aSub[SW_CTL].aSize;
+ m_aSub[SW_CTL].SetFamily( rFont.GetFamily() );
+ m_aSub[SW_CTL].SetName( rFont.GetFamilyName() );
+ m_aSub[SW_CTL].SetStyleName( rFont.GetStyleName() );
+ m_aSub[SW_CTL].SetPitch( rFont.GetPitch() );
+ m_aSub[SW_CTL].SetCharSet( rFont.GetCharSet() );
+ m_aSub[SW_CTL].SvxFont::SetPropr( 100 ); // 100% der FontSize
+ Size aTmpSize = m_aSub[SW_CTL].aSize;
aTmpSize.Height() = pAttrSet->GetCTLSize().GetHeight();
- aSub[SW_CTL].SetSize( aTmpSize );
- aSub[SW_CTL].SetItalic( pAttrSet->GetCTLPosture().GetPosture() );
- aSub[SW_CTL].SetWeight( pAttrSet->GetCTLWeight().GetWeight() );
- aSub[SW_CTL].SetLanguage( pAttrSet->GetCTLLanguage().GetLanguage() );
+ m_aSub[SW_CTL].SetSize( aTmpSize );
+ m_aSub[SW_CTL].SetItalic( pAttrSet->GetCTLPosture().GetPosture() );
+ m_aSub[SW_CTL].SetWeight( pAttrSet->GetCTLWeight().GetWeight() );
+ m_aSub[SW_CTL].SetLanguage( pAttrSet->GetCTLLanguage().GetLanguage() );
}
if ( pAttrSet->GetCharHidden().GetValue() )
SetUnderline( UNDERLINE_DOTTED );
@@ -834,16 +834,16 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
SetWordLineMode( pAttrSet->GetWordLineMode().GetValue() );
const SvxEscapementItem &rEsc = pAttrSet->GetEscapement();
SetEscapement( rEsc.GetEsc() );
- if( aSub[SW_LATIN].IsEsc() )
+ if( m_aSub[SW_LATIN].IsEsc() )
SetProportion( rEsc.GetProp() );
SetCaseMap( pAttrSet->GetCaseMap().GetCaseMap() );
SetFixKerning( pAttrSet->GetKerning().GetValue() );
const SfxPoolItem* pItem;
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
true, &pItem ))
- pBackColor = new Color( static_cast<const SvxBrushItem*>(pItem)->GetColor() );
+ m_pBackColor = new Color( static_cast<const SvxBrushItem*>(pItem)->GetColor() );
else
- pBackColor = NULL;
+ m_pBackColor = NULL;
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
true, &pItem ))
SetHighlightColor(static_cast<const SvxBrushItem*>(pItem)->GetColor());
@@ -896,15 +896,15 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
SetVertical( 0 );
if( pIDocumentSettingAccess && pIDocumentSettingAccess->get( DocumentSettingId::SMALL_CAPS_PERCENTAGE_66 ))
{
- aSub[ SW_LATIN ].smallCapsPercentage66 = true;
- aSub[ SW_CJK ].smallCapsPercentage66 = true;
- aSub[ SW_CTL ].smallCapsPercentage66 = true;
+ m_aSub[ SW_LATIN ].smallCapsPercentage66 = true;
+ m_aSub[ SW_CJK ].smallCapsPercentage66 = true;
+ m_aSub[ SW_CTL ].smallCapsPercentage66 = true;
}
}
SwFont::~SwFont()
{
- delete pBackColor;
+ delete m_pBackColor;
}
SwSubFont& SwSubFont::operator=( const SwSubFont &rFont )
@@ -922,12 +922,12 @@ SwSubFont& SwSubFont::operator=( const SwSubFont &rFont )
SwFont& SwFont::operator=( const SwFont &rFont )
{
- aSub[SW_LATIN] = rFont.aSub[SW_LATIN];
- aSub[SW_CJK] = rFont.aSub[SW_CJK];
- aSub[SW_CTL] = rFont.aSub[SW_CTL];
- nActual = rFont.nActual;
- delete pBackColor;
- pBackColor = rFont.pBackColor ? new Color( *rFont.pBackColor ) : NULL;
+ m_aSub[SW_LATIN] = rFont.m_aSub[SW_LATIN];
+ m_aSub[SW_CJK] = rFont.m_aSub[SW_CJK];
+ m_aSub[SW_CTL] = rFont.m_aSub[SW_CTL];
+ m_nActual = rFont.m_nActual;
+ delete m_pBackColor;
+ m_pBackColor = rFont.m_pBackColor ? new Color( *rFont.m_pBackColor ) : NULL;
m_aHighlightColor = rFont.m_aHighlightColor;
m_aTopBorder = rFont.m_aTopBorder;
m_aBottomBorder = rFont.m_aBottomBorder;
@@ -940,28 +940,28 @@ SwFont& SwFont::operator=( const SwFont &rFont )
m_aShadowColor = rFont.m_aShadowColor;
m_nShadowWidth = rFont.m_nShadowWidth;
m_aShadowLocation = rFont.m_aShadowLocation;
- aUnderColor = rFont.GetUnderColor();
- aOverColor = rFont.GetOverColor();
- nToxCnt = 0;
- nRefCnt = 0;
+ m_aUnderColor = rFont.GetUnderColor();
+ m_aOverColor = rFont.GetOverColor();
+ m_nToxCount = 0;
+ m_nRefCount = 0;
m_nMetaCount = 0;
m_nInputFieldCount = 0;
- bFntChg = rFont.bFntChg;
- bOrgChg = rFont.bOrgChg;
- bPaintBlank = rFont.bPaintBlank;
- bPaintWrong = false;
- bURL = rFont.bURL;
- bGreyWave = rFont.bGreyWave;
- bNoColReplace = rFont.bNoColReplace;
- bNoHyph = rFont.bNoHyph;
- bBlink = rFont.bBlink;
+ m_bFontChg = rFont.m_bFontChg;
+ m_bOrgChg = rFont.m_bOrgChg;
+ m_bPaintBlank = rFont.m_bPaintBlank;
+ m_bPaintWrong = false;
+ m_bURL = rFont.m_bURL;
+ m_bGreyWave = rFont.m_bGreyWave;
+ m_bNoColorReplace = rFont.m_bNoColorReplace;
+ m_bNoHyph = rFont.m_bNoHyph;
+ m_bBlink = rFont.m_bBlink;
return *this;
}
void SwFont::GoMagic( SwViewShell *pSh, sal_uInt8 nWhich )
{
- SwFntAccess aFntAccess( aSub[nWhich].pMagic, aSub[nWhich].nFntIndex,
- &aSub[nWhich], pSh, true );
+ SwFntAccess aFntAccess( m_aSub[nWhich].pMagic, m_aSub[nWhich].nFntIndex,
+ &m_aSub[nWhich], pSh, true );
}
bool SwSubFont::IsSymbol( SwViewShell *pSh )
@@ -989,28 +989,28 @@ bool SwSubFont::ChgFnt( SwViewShell const *pSh, OutputDevice& rOut )
void SwFont::ChgPhysFnt( SwViewShell *pSh, OutputDevice& rOut )
{
- if( bOrgChg && aSub[nActual].IsEsc() )
+ if( m_bOrgChg && m_aSub[m_nActual].IsEsc() )
{
- const sal_uInt8 nOldProp = aSub[nActual].GetPropr();
+ const sal_uInt8 nOldProp = m_aSub[m_nActual].GetPropr();
SetProportion( 100 );
ChgFnt( pSh, rOut );
- SwFntAccess aFntAccess( aSub[nActual].pMagic, aSub[nActual].nFntIndex,
- &aSub[nActual], pSh );
- aSub[nActual].nOrgHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
- aSub[nActual].nOrgAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
+ SwFntAccess aFntAccess( m_aSub[m_nActual].pMagic, m_aSub[m_nActual].nFntIndex,
+ &m_aSub[m_nActual], pSh );
+ m_aSub[m_nActual].nOrgHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
+ m_aSub[m_nActual].nOrgAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
SetProportion( nOldProp );
- bOrgChg = false;
+ m_bOrgChg = false;
}
- if( bFntChg )
+ if( m_bFontChg )
{
ChgFnt( pSh, rOut );
- bFntChg = bOrgChg;
+ m_bFontChg = m_bOrgChg;
}
- if( rOut.GetTextLineColor() != aUnderColor )
- rOut.SetTextLineColor( aUnderColor );
- if( rOut.GetOverlineColor() != aOverColor )
- rOut.SetOverlineColor( aOverColor );
+ if( rOut.GetTextLineColor() != m_aUnderColor )
+ rOut.SetTextLineColor( m_aUnderColor );
+ if( rOut.GetOverlineColor() != m_aOverColor )
+ rOut.SetOverlineColor( m_aOverColor );
}
// Height = MaxAscent + MaxDescent