diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-28 09:05:24 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-28 09:06:13 +0100 |
commit | a827957f3f559738c221450e3e691361096ac9a4 (patch) | |
tree | c2f0b53d663d802b272747ccc1c6cb58d968f801 | |
parent | 495f4ca3119ed0a70338d454b2c8659501545d69 (diff) |
sw: prefix members of SwSubFont
Change-Id: Ifc4ec214ad7034ecf694c690c3a04e995c64fbe9
-rw-r--r-- | sw/source/core/inc/swfont.hxx | 112 | ||||
-rw-r--r-- | sw/source/core/txtnode/fntcap.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/swfont.cxx | 92 |
3 files changed, 103 insertions, 103 deletions
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 960f5bdcf78c..3607fb27e69c 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -49,15 +49,15 @@ sal_uInt16 UnMapDirection( sal_uInt16 nDir, const bool bVertFormat ); class SwSubFont : public SvxFont { friend class SwFont; - const void *pMagic; // "MagicNumber" within the font cache - Size aSize; // foreigners only see this size - sal_uInt16 nFntIndex; // index in the font cache - sal_uInt16 nOrgHeight; // height including escapement/proportion - sal_uInt16 nOrgAscent; // ascent including escapement/proportion - sal_uInt16 nPropWidth; // proportional width - bool smallCapsPercentage66; - inline SwSubFont() : aSize(0,0) - { pMagic = NULL; nFntIndex = nOrgHeight = nOrgAscent = 0; nPropWidth =100; smallCapsPercentage66 = false; } + const void *m_pMagic; // "MagicNumber" within the font cache + Size m_aSize; // foreigners only see this size + sal_uInt16 m_nFontIndex; // index in the font cache + sal_uInt16 m_nOrgHeight; // height including escapement/proportion + sal_uInt16 m_nOrgAscent; // ascent including escapement/proportion + sal_uInt16 m_nProportionalWidth; // proportional width + bool m_bSmallCapsPercentage66; + inline SwSubFont() : m_aSize(0,0) + { m_pMagic = NULL; m_nFontIndex = m_nOrgHeight = m_nOrgAscent = 0; m_nProportionalWidth =100; m_bSmallCapsPercentage66 = false; } sal_uInt16 CalcEscAscent( const sal_uInt16 nOldAscent ) const; sal_uInt16 CalcEscHeight( const sal_uInt16 nOldHeight, @@ -112,9 +112,9 @@ class SwSubFont : public SvxFont inline short CheckKerning() { return GetFixKerning() >= 0 ? GetFixKerning() : _CheckKerning( ); } inline void SetPropWidth( const sal_uInt16 nNew ) - { pMagic = 0; nPropWidth = nNew; } + { m_pMagic = 0; m_nProportionalWidth = nNew; } public: - sal_uInt16 GetPropWidth() const { return nPropWidth; } + sal_uInt16 GetPropWidth() const { return m_nProportionalWidth; } }; #define SW_LATIN 0 @@ -191,17 +191,17 @@ public: const Color& GetHighlightColor() const { return m_aHighlightColor; } inline void ChkMagic( SwViewShell *pSh, sal_uInt8 nWhich ) - { if( !m_aSub[ nWhich ].pMagic ) GoMagic( pSh, nWhich ); } + { if( !m_aSub[ nWhich ].m_pMagic ) GoMagic( pSh, nWhich ); } inline void GetMagic( const void* &rMagic, sal_uInt16 &rIdx, sal_uInt8 nWhich ) - { rMagic = m_aSub[nWhich].pMagic; rIdx = m_aSub[nWhich].nFntIndex; } + { rMagic = m_aSub[nWhich].m_pMagic; rIdx = m_aSub[nWhich].m_nFontIndex; } inline void SetMagic( const void* pNew, const sal_uInt16 nIdx, sal_uInt8 nWhich ) - { m_aSub[nWhich].pMagic = pNew; m_aSub[nWhich].nFntIndex = nIdx; } + { m_aSub[nWhich].m_pMagic = pNew; m_aSub[nWhich].m_nFontIndex = nIdx; } inline bool DifferentMagic( const SwFont* pFnt, sal_uInt8 nWhich ) - { return m_aSub[nWhich].pMagic != pFnt->m_aSub[nWhich].pMagic || - !m_aSub[nWhich].pMagic || !pFnt->m_aSub[nWhich].pMagic; } + { return m_aSub[nWhich].m_pMagic != pFnt->m_aSub[nWhich].m_pMagic || + !m_aSub[nWhich].m_pMagic || !pFnt->m_aSub[nWhich].m_pMagic; } inline const Size &GetSize( sal_uInt8 nWhich ) const - { return m_aSub[nWhich].aSize; } + { return m_aSub[nWhich].m_aSize; } inline bool IsFntChg() const { return m_bFontChg; } inline void SetFntChg( const bool bNew ) { m_bFontChg = bNew; } @@ -413,14 +413,14 @@ inline void SwFont::SetColor( const Color& rColor ) // encapsulated SV-Font-method inline void SwSubFont::SetColor( const Color& rColor ) { - pMagic = 0; + m_pMagic = 0; Font::SetColor( rColor ); } // encapsulated SV-Font-method inline void SwSubFont::SetFillColor( const Color& rColor ) { - pMagic = 0; + m_pMagic = 0; Font::SetFillColor( rColor ); } @@ -435,7 +435,7 @@ inline void SwFont::SetFillColor( const Color& rColor ) // encapsulated SV-Font-method inline void SwSubFont::SetFamily( const FontFamily eFamily ) { - pMagic = 0; + m_pMagic = 0; Font::SetFamily( eFamily ); } @@ -448,7 +448,7 @@ inline void SwFont::SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich // encapsulated SV-Font-method inline void SwSubFont::SetName( const OUString& rName ) { - pMagic = 0; + m_pMagic = 0; Font::SetName( rName ); } @@ -461,7 +461,7 @@ inline void SwFont::SetName( const OUString& rName, const sal_uInt8 nWhich ) // encapsulated SV-Font-method inline void SwSubFont::SetStyleName( const OUString& rStyleName ) { - pMagic = 0; + m_pMagic = 0; Font::SetStyleName( rStyleName ); } @@ -474,7 +474,7 @@ inline void SwFont::SetStyleName( const OUString& rStyle, const sal_uInt8 nWhich // encapsulated SV-Font-method inline void SwSubFont::SetCharSet( const rtl_TextEncoding eCharSet ) { - pMagic = 0; + m_pMagic = 0; Font::SetCharSet( eCharSet ); } @@ -487,7 +487,7 @@ inline void SwFont::SetCharSet( const rtl_TextEncoding eCharSet, const sal_uInt8 // encapsulated SV-Font-method inline void SwSubFont::SetPitch( const FontPitch ePitch ) { - pMagic = 0; + m_pMagic = 0; Font::SetPitch( ePitch ); } @@ -501,7 +501,7 @@ inline void SwFont::SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich ) // encapsulated SV-Font-method inline void SwSubFont::SetAlign( const FontAlign eAlign ) { - pMagic = 0; + m_pMagic = 0; Font::SetAlign( eAlign ); } @@ -516,7 +516,7 @@ inline void SwFont::SetAlign( const FontAlign eAlign ) // encapsulated SV-Font-method inline void SwSubFont::SetWeight( const FontWeight eWeight ) { - pMagic = 0; + m_pMagic = 0; Font::SetWeight( eWeight ); } @@ -529,7 +529,7 @@ inline void SwFont::SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich // encapsulated SV-Font-method inline void SwSubFont::SetUnderline( const FontUnderline eUnderline ) { - pMagic = 0; + m_pMagic = 0; Font::SetUnderline( eUnderline ); } @@ -544,7 +544,7 @@ inline void SwFont::SetUnderline( const FontUnderline eUnderline ) // encapsulated SV-Font-method inline void SwSubFont::SetOverline( const FontUnderline eOverline ) { - pMagic = 0; + m_pMagic = 0; Font::SetOverline( eOverline ); } @@ -559,7 +559,7 @@ inline void SwFont::SetOverline( const FontUnderline eOverline ) // encapsulated SV-Font-method inline void SwSubFont::SetStrikeout( const FontStrikeout eStrikeout ) { - pMagic = 0; + m_pMagic = 0; Font::SetStrikeout( eStrikeout ); } @@ -574,7 +574,7 @@ inline void SwFont::SetStrikeout( const FontStrikeout eStrikeout ) // encapsulated SV-Font-method inline void SwSubFont::SetItalic( const FontItalic eItalic ) { - pMagic = 0; + m_pMagic = 0; Font::SetItalic( eItalic ); } @@ -587,7 +587,7 @@ inline void SwFont::SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich // encapsulated SV-Font-method inline void SwSubFont::SetOutline( const bool bOutline ) { - pMagic = 0; + m_pMagic = 0; Font::SetOutline( bOutline ); } @@ -602,7 +602,7 @@ inline void SwFont::SetOutline( const bool bOutline ) // encapsulated SV-Font-method inline void SwSubFont::SetShadow( const bool bShadow ) { - pMagic = 0; + m_pMagic = 0; Font::SetShadow( bShadow ); } @@ -617,7 +617,7 @@ inline void SwFont::SetShadow( const bool bShadow ) // encapsulated SV-Font-method inline void SwSubFont::SetAutoKern( FontKerning nAutoKern ) { - pMagic = 0; + m_pMagic = 0; Font::SetKerning( nAutoKern ); } @@ -655,7 +655,7 @@ inline void SwFont::SetCaseMap( const SvxCaseMap eNew ) // encapsulated SV-Font-method inline void SwSubFont::SetWordLineMode( const bool bWordLineMode ) { - pMagic = 0; + m_pMagic = 0; Font::SetWordLineMode( bWordLineMode ); } @@ -669,7 +669,7 @@ inline void SwFont::SetWordLineMode( const bool bWordLineMode ) // encapsulated SV-Font-method inline void SwSubFont::SetEmphasisMark( const FontEmphasisMark eValue ) { - pMagic = 0; + m_pMagic = 0; Font::SetEmphasisMark( eValue ); } @@ -695,7 +695,7 @@ inline void SwFont::SetPropWidth( const sal_uInt16 nNew ) // encapsulated SV-Font-method inline void SwSubFont::SetRelief( const FontRelief eNew ) { - pMagic = 0; + m_pMagic = 0; Font::SetRelief( eNew ); } @@ -713,21 +713,21 @@ inline void SwFont::SetRelief( const FontRelief eNew ) // overloaded font-method inline void SwSubFont::SetSize( const Size& rSize ) { - aSize = rSize; + m_aSize = rSize; if ( GetPropr() == 100 ) - Font::SetSize( aSize ); + Font::SetSize( m_aSize ); else { Font::SetSize( Size( - (long) aSize.Width() * GetPropr() / 100L, - (long) aSize.Height() * GetPropr() / 100L ) ); + (long) m_aSize.Width() * GetPropr() / 100L, + (long) m_aSize.Height() * GetPropr() / 100L ) ); } - pMagic = 0; + m_pMagic = 0; } inline void SwFont::SetSize( const Size& rSize, const sal_uInt8 nWhich ) { - if( m_aSub[nWhich].aSize != rSize ) + if( m_aSub[nWhich].m_aSize != rSize ) { m_aSub[nWhich].SetSize( rSize ); m_bFontChg = true; @@ -747,9 +747,9 @@ inline void SwFont::SetActual( sal_uInt8 nNew ) inline void SwSubFont::SetProportion( const sal_uInt8 nNewPropr ) { - pMagic = 0; - Font::SetSize( Size( (long) aSize.Width() * nNewPropr / 100L, - (long) aSize.Height() * nNewPropr / 100L ) ); + m_pMagic = 0; + Font::SetSize( Size( (long) m_aSize.Width() * nNewPropr / 100L, + (long) m_aSize.Height() * nNewPropr / 100L ) ); SvxFont::SetPropr( nNewPropr ); } @@ -768,7 +768,7 @@ inline void SwFont::SetProportion( const sal_uInt8 nNewPropr ) inline void SwSubFont::SetEscapement( const short nNewEsc ) { - pMagic = 0; + m_pMagic = 0; SvxFont::SetEscapement( nNewEsc ); } @@ -789,7 +789,7 @@ inline void SwFont::SetEscapement( const short nNewEsc ) inline void SwSubFont::SetLanguage( LanguageType eNewLang ) { - pMagic = 0; + m_pMagic = 0; if( eNewLang == LANGUAGE_SYSTEM ) eNewLang = (LanguageType)GetAppLanguage(); SvxFont::SetLanguage( eNewLang ); @@ -828,7 +828,7 @@ inline void SwFont::SetNoCol( const bool bNew ) inline void SwSubFont::SetVertical( const sal_uInt16 nDir, const bool bVertFormat ) { - pMagic = 0; + m_pMagic = 0; Font::SetVertical( bVertFormat ); Font::SetOrientation( nDir ); } @@ -837,28 +837,28 @@ inline void SwFont::SetTopBorderDist( const sal_uInt16 nTopDist ) { m_nTopBorderDist = nTopDist; m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } inline void SwFont::SetBottomBorderDist( const sal_uInt16 nBottomDist ) { m_nBottomBorderDist = nBottomDist; m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } inline void SwFont::SetRightBorderDist( const sal_uInt16 nRightDist ) { m_nRightBorderDist = nRightDist; m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } inline void SwFont::SetLeftBorderDist( const sal_uInt16 nLeftDist ) { m_nLeftBorderDist = nLeftDist; m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } inline sal_uInt16 SwFont::GetTopBorderSpace() const @@ -930,28 +930,28 @@ inline void SwFont::SetShadowColor( const Color& rColor ) { m_aShadowColor = rColor; m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } inline void SwFont::SetShadowWidth( const sal_uInt16 nWidth ) { m_nShadowWidth = nWidth; m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } inline void SwFont::SetShadowLocation( const SvxShadowLocation aLocation ) { m_aShadowLocation = aLocation; m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } inline void SwFont::SetHighlightColor( const Color& aNewColor ) { m_aHighlightColor = aNewColor; m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } // Used for the "continuous underline" feature. diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index acc88ec5d69a..ab0c97b88ae7 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -536,7 +536,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) // NOTE: There are more uses of SMALL_CAPS_PERCENTAGE in editeng, but it seems they // do not matter for Writer (and if they did it'd be pretty ugly to propagate // the option there). - int smallCapsPercentage = smallCapsPercentage66 ? 66 : SMALL_CAPS_PERCENTAGE; + int smallCapsPercentage = m_bSmallCapsPercentage66 ? 66 : SMALL_CAPS_PERCENTAGE; aFont.SetProportion( (aFont.GetPropr() * smallCapsPercentage ) / 100 ); pMagic2 = NULL; nIndex2 = 0; diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 074dbfef833f..4a0c63f997a2 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -72,7 +72,7 @@ void SwFont::SetBackColor( Color* pNewColor ) 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; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder ) @@ -85,7 +85,7 @@ void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder ) m_nTopBorderDist = 0; } m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder ) @@ -98,7 +98,7 @@ void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder ) m_nBottomBorderDist = 0; } m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder ) @@ -111,7 +111,7 @@ void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder ) m_nRightBorderDist = 0; } m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder ) @@ -124,7 +124,7 @@ void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder ) m_nLeftBorderDist = 0; } m_bFontChg = true; - m_aSub[SW_LATIN].pMagic = m_aSub[SW_CJK].pMagic = m_aSub[SW_CTL].pMagic = 0; + m_aSub[SW_LATIN].m_pMagic = m_aSub[SW_CJK].m_pMagic = m_aSub[SW_CTL].m_pMagic = 0; } const boost::optional<editeng::SvxBorderLine>& @@ -471,11 +471,11 @@ sal_uInt16 SwSubFont::CalcEscAscent( const sal_uInt16 nOldAscent ) const DFLT_ESC_AUTO_SUB != GetEscapement() ) { const long nAscent = nOldAscent + - ( (long) nOrgHeight * GetEscapement() ) / 100L; + ( (long) m_nOrgHeight * GetEscapement() ) / 100L; if ( nAscent>0 ) - return std::max<sal_uInt16>( nAscent, nOrgAscent ); + return std::max<sal_uInt16>( nAscent, m_nOrgAscent ); } - return nOrgAscent; + return m_nOrgAscent; } void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, @@ -502,8 +502,8 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, { const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem); 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; + m_aSub[SW_LATIN].m_aSize = m_aSub[SW_LATIN].Font::GetSize(); + Size aTmpSize = m_aSub[SW_LATIN].m_aSize; aTmpSize.Height() = pHeight->GetHeight(); m_aSub[SW_LATIN].SetSize( aTmpSize ); } @@ -532,8 +532,8 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, { const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem); 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; + m_aSub[SW_CJK].m_aSize = m_aSub[SW_CJK].Font::GetSize(); + Size aTmpSize = m_aSub[SW_CJK].m_aSize; aTmpSize.Height() = pHeight->GetHeight(); m_aSub[SW_CJK].SetSize( aTmpSize ); } @@ -568,8 +568,8 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, { const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem); 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; + m_aSub[SW_CTL].m_aSize = m_aSub[SW_CTL].Font::GetSize(); + Size aTmpSize = m_aSub[SW_CTL].m_aSize; aTmpSize.Height() = pHeight->GetHeight(); m_aSub[SW_CTL].SetSize( aTmpSize ); } @@ -763,7 +763,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, 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; + Size aTmpSize = m_aSub[SW_LATIN].m_aSize; aTmpSize.Height() = pAttrSet->GetSize().GetHeight(); m_aSub[SW_LATIN].SetSize( aTmpSize ); m_aSub[SW_LATIN].SetItalic( pAttrSet->GetPosture().GetPosture() ); @@ -779,7 +779,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, 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; + Size aTmpSize = m_aSub[SW_CJK].m_aSize; aTmpSize.Height() = pAttrSet->GetCJKSize().GetHeight(); m_aSub[SW_CJK].SetSize( aTmpSize ); m_aSub[SW_CJK].SetItalic( pAttrSet->GetCJKPosture().GetPosture() ); @@ -799,7 +799,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, 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; + Size aTmpSize = m_aSub[SW_CTL].m_aSize; aTmpSize.Height() = pAttrSet->GetCTLSize().GetHeight(); m_aSub[SW_CTL].SetSize( aTmpSize ); m_aSub[SW_CTL].SetItalic( pAttrSet->GetCTLPosture().GetPosture() ); @@ -896,9 +896,9 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, SetVertical( 0 ); if( pIDocumentSettingAccess && pIDocumentSettingAccess->get( DocumentSettingId::SMALL_CAPS_PERCENTAGE_66 )) { - m_aSub[ SW_LATIN ].smallCapsPercentage66 = true; - m_aSub[ SW_CJK ].smallCapsPercentage66 = true; - m_aSub[ SW_CTL ].smallCapsPercentage66 = true; + m_aSub[ SW_LATIN ].m_bSmallCapsPercentage66 = true; + m_aSub[ SW_CJK ].m_bSmallCapsPercentage66 = true; + m_aSub[ SW_CTL ].m_bSmallCapsPercentage66 = true; } } @@ -910,13 +910,13 @@ SwFont::~SwFont() SwSubFont& SwSubFont::operator=( const SwSubFont &rFont ) { SvxFont::operator=( rFont ); - pMagic = rFont.pMagic; - nFntIndex = rFont.nFntIndex; - nOrgHeight = rFont.nOrgHeight; - nOrgAscent = rFont.nOrgAscent; - nPropWidth = rFont.nPropWidth; - aSize = rFont.aSize; - smallCapsPercentage66 = rFont.smallCapsPercentage66; + m_pMagic = rFont.m_pMagic; + m_nFontIndex = rFont.m_nFontIndex; + m_nOrgHeight = rFont.m_nOrgHeight; + m_nOrgAscent = rFont.m_nOrgAscent; + m_nProportionalWidth = rFont.m_nProportionalWidth; + m_aSize = rFont.m_aSize; + m_bSmallCapsPercentage66 = rFont.m_bSmallCapsPercentage66; return *this; } @@ -960,13 +960,13 @@ SwFont& SwFont::operator=( const SwFont &rFont ) void SwFont::GoMagic( SwViewShell *pSh, sal_uInt8 nWhich ) { - SwFntAccess aFntAccess( m_aSub[nWhich].pMagic, m_aSub[nWhich].nFntIndex, + SwFntAccess aFntAccess( m_aSub[nWhich].m_pMagic, m_aSub[nWhich].m_nFontIndex, &m_aSub[nWhich], pSh, true ); } bool SwSubFont::IsSymbol( SwViewShell *pSh ) { - SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, false ); + SwFntAccess aFntAccess( m_pMagic, m_nFontIndex, this, pSh, false ); return aFntAccess.Get()->IsSymbol(); } @@ -974,7 +974,7 @@ bool SwSubFont::ChgFnt( SwViewShell const *pSh, OutputDevice& rOut ) { if ( pLastFont ) pLastFont->Unlock(); - SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, true ); + SwFntAccess aFntAccess( m_pMagic, m_nFontIndex, this, pSh, true ); SV_STAT( nChangeFont ); pLastFont = aFntAccess.Get(); @@ -994,10 +994,10 @@ void SwFont::ChgPhysFnt( SwViewShell *pSh, OutputDevice& rOut ) const sal_uInt8 nOldProp = m_aSub[m_nActual].GetPropr(); SetProportion( 100 ); ChgFnt( pSh, rOut ); - SwFntAccess aFntAccess( m_aSub[m_nActual].pMagic, m_aSub[m_nActual].nFntIndex, + SwFntAccess aFntAccess( m_aSub[m_nActual].m_pMagic, m_aSub[m_nActual].m_nFontIndex, &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 ); + m_aSub[m_nActual].m_nOrgHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut ); + m_aSub[m_nActual].m_nOrgAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut ); SetProportion( nOldProp ); m_bOrgChg = false; } @@ -1024,13 +1024,13 @@ sal_uInt16 SwSubFont::CalcEscHeight( const sal_uInt16 nOldHeight, DFLT_ESC_AUTO_SUB != GetEscapement() ) { long nDescent = nOldHeight - nOldAscent - - ( (long) nOrgHeight * GetEscapement() ) / 100L; + ( (long) m_nOrgHeight * GetEscapement() ) / 100L; const sal_uInt16 nDesc = nDescent>0 - ? std::max<sal_uInt16>( nDescent, nOrgHeight - nOrgAscent) - : nOrgHeight - nOrgAscent; + ? std::max<sal_uInt16>( nDescent, m_nOrgHeight - m_nOrgAscent) + : m_nOrgHeight - m_nOrgAscent; return ( nDesc + CalcEscAscent( nOldAscent ) ); } - return nOrgHeight; + return m_nOrgHeight; } short SwSubFont::_CheckKerning( ) @@ -1044,7 +1044,7 @@ short SwSubFont::_CheckKerning( ) sal_uInt16 SwSubFont::GetAscent( SwViewShell *pSh, const OutputDevice& rOut ) { - SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh ); + SwFntAccess aFntAccess( m_pMagic, m_nFontIndex, this, pSh ); const sal_uInt16 nAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut ); return GetEscapement() ? CalcEscAscent( nAscent ) : nAscent; } @@ -1052,7 +1052,7 @@ sal_uInt16 SwSubFont::GetAscent( SwViewShell *pSh, const OutputDevice& rOut ) sal_uInt16 SwSubFont::GetHeight( SwViewShell *pSh, const OutputDevice& rOut ) { SV_STAT( nGetTextSize ); - SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh ); + SwFntAccess aFntAccess( m_pMagic, m_nFontIndex, this, pSh ); const sal_uInt16 nHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut ); if ( GetEscapement() ) { @@ -1066,7 +1066,7 @@ Size SwSubFont::_GetTextSize( SwDrawTextInfo& rInf ) { // Robust: Eigentlich sollte der Font bereits eingestellt sein, aber // sicher ist sicher ... - if ( !pLastFont || pLastFont->GetOwner()!=pMagic || + if ( !pLastFont || pLastFont->GetOwner()!=m_pMagic || !IsSameInstance( rInf.GetpOut()->GetFont() ) ) ChgFnt( rInf.GetShell(), rInf.GetOut() ); @@ -1179,7 +1179,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey ) pUnderFnt = rInf.GetUnderFnt(); } - if( !pLastFont || pLastFont->GetOwner()!=pMagic ) + if( !pLastFont || pLastFont->GetOwner()!=m_pMagic ) ChgFnt( rInf.GetShell(), rInf.GetOut() ); SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() ); @@ -1306,7 +1306,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf ) pUnderFnt = rInf.GetUnderFnt(); } - if ( !pLastFont || pLastFont->GetOwner() != pMagic ) + if ( !pLastFont || pLastFont->GetOwner() != m_pMagic ) ChgFnt( rInf.GetShell(), rInf.GetOut() ); SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() ); @@ -1375,7 +1375,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf ) sal_Int32 SwSubFont::_GetCrsrOfst( SwDrawTextInfo& rInf ) { - if ( !pLastFont || pLastFont->GetOwner()!=pMagic ) + if ( !pLastFont || pLastFont->GetOwner()!=m_pMagic ) ChgFnt( rInf.GetShell(), rInf.GetOut() ); SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() ); @@ -1416,7 +1416,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos ) switch ( GetEscapement() ) { case DFLT_ESC_AUTO_SUB : - nOfst = nOrgHeight - nOrgAscent - + nOfst = m_nOrgHeight - m_nOrgAscent - pLastFont->GetFontHeight( rInf.GetShell(), rInf.GetOut() ) + pLastFont->GetFontAscent( rInf.GetShell(), rInf.GetOut() ); @@ -1436,7 +1436,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos ) break; case DFLT_ESC_AUTO_SUPER : nOfst = pLastFont->GetFontAscent( rInf.GetShell(), rInf.GetOut() ) - - nOrgAscent; + m_nOrgAscent; switch ( nDir ) { @@ -1453,7 +1453,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos ) break; default : - nOfst = ((long)nOrgHeight * GetEscapement()) / 100L; + nOfst = ((long)m_nOrgHeight * GetEscapement()) / 100L; switch ( nDir ) { |