diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-13 10:53:15 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-14 12:00:40 +0200 |
commit | 19a32ddfd2b9c1beb17641e99f139ac0d3dcaf96 (patch) | |
tree | e2895b10ec66bae2ec47da748cf2848dea0bffa9 /sw | |
parent | 3c0805e1f4f4d14e92c7e655d59c87de5c207e48 (diff) |
convert KERNING_ constants to scoped enum
Change-Id: I58031485aaa9ebdeb986a3ee0376f36a9f667947
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/swfont.hxx | 12 | ||||
-rw-r--r-- | sw/source/core/text/atrstck.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/txtnode/swfont.cxx | 12 |
4 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 14cb4c8169fd..266c5c5ffd37 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -98,7 +98,7 @@ class SwSubFont : public SvxFont inline void SetOutline( const bool bOutline ); inline void SetVertical( const sal_uInt16 nDir, const bool bVertFormat ); inline void SetShadow( const bool bShadow ); - inline void SetAutoKern( const sal_uInt8 nAutoKern ); + inline void SetAutoKern( FontKerning nAutoKern ); inline void SetWordLineMode( const bool bWordLineMode ); inline void SetEmphasisMark( const FontEmphasisMark eValue ); inline void SetRelief( const FontRelief eNew ); @@ -224,7 +224,7 @@ public: inline void SetOutline( const bool bOutline ); void SetVertical( sal_uInt16 nDir, const bool nVertLayout = false ); inline void SetShadow( const bool bShadow ); - inline void SetAutoKern( sal_uInt8 nAutoKern ); + inline void SetAutoKern( FontKerning nAutoKern ); inline void SetTransparent( const bool bTrans ); inline void SetWordLineMode( const bool bWordLineMode ); inline void SetFixKerning( const short nNewKern ); @@ -668,18 +668,18 @@ inline void SwFont::SetShadow( const bool bShadow ) } // encapsulated SV-Font-method -inline void SwSubFont::SetAutoKern( const sal_uInt8 nAutoKern ) +inline void SwSubFont::SetAutoKern( FontKerning nAutoKern ) { pMagic = 0; Font::SetKerning( nAutoKern ); } -inline void SwFont::SetAutoKern( sal_uInt8 nAutoKern ) +inline void SwFont::SetAutoKern( FontKerning nAutoKern ) { bFntChg = true; aSub[1].SetAutoKern( nAutoKern ); - if( nAutoKern ) - nAutoKern = KERNING_FONTSPECIFIC; + if( nAutoKern != FontKerning::NONE ) + nAutoKern = FontKerning::FontSpecific; aSub[0].SetAutoKern( nAutoKern ); aSub[2].SetAutoKern( nAutoKern ); } diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index 80f2dee123f4..e3cbe00f99be 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -727,11 +727,11 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush ) { rFnt.SetAutoKern( ( !mpIDocumentSettingAccess || !mpIDocumentSettingAccess->get(DocumentSettingId::KERN_ASIAN_PUNCTUATION) ) ? - KERNING_FONTSPECIFIC : - KERNING_ASIAN ); + FontKerning::FontSpecific : + FontKerning::Asian ); } else - rFnt.SetAutoKern( 0 ); + rFnt.SetAutoKern( FontKerning::NONE ); break; case RES_CHRATR_BLINK : rFnt.SetBlink( static_cast<const SvxBlinkItem&>(rItem).GetValue() ); diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index a344a7e956da..0bf13ebfaeab 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -1574,7 +1574,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) // In case of Pair Kerning the printer influence on the positioning // grows - const int nMul = pPrtFont->GetKerning() ? 1 : 3; + const int nMul = pPrtFont->GetKerning() != FontKerning::NONE ? 1 : 3; const int nDiv = nMul+1; // nSpaceSum contains the sum of the intermediate space distributed @@ -1927,7 +1927,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) // In case of Pair Kerning the printer influence on the positioning // grows - const int nMul = pPrtFont->GetKerning() ? 1 : 3; + const int nMul = pPrtFont->GetKerning() != FontKerning::NONE ? 1 : 3; const int nDiv = nMul+1; for( sal_Int32 i = 1; i<nCnt; i++ ) { diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 4849954ba3c8..c79495621574 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -626,11 +626,11 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, { SetAutoKern( ( !pIDocumentSettingAccess || !pIDocumentSettingAccess->get(DocumentSettingId::KERN_ASIAN_PUNCTUATION) ) ? - KERNING_FONTSPECIFIC : - KERNING_ASIAN ); + FontKerning::FontSpecific : + FontKerning::Asian ); } else - SetAutoKern( 0 ); + SetAutoKern( FontKerning::NONE ); } if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_WORDLINEMODE, true, &pItem )) @@ -826,11 +826,11 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, { SetAutoKern( ( !pIDocumentSettingAccess || !pIDocumentSettingAccess->get(DocumentSettingId::KERN_ASIAN_PUNCTUATION) ) ? - KERNING_FONTSPECIFIC : - KERNING_ASIAN ); + FontKerning::FontSpecific : + FontKerning::Asian ); } else - SetAutoKern( 0 ); + SetAutoKern( FontKerning::NONE ); SetWordLineMode( pAttrSet->GetWordLineMode().GetValue() ); const SvxEscapementItem &rEsc = pAttrSet->GetEscapement(); SetEscapement( rEsc.GetEsc() ); |