summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-13 10:53:15 +0200
committerNoel Grandin <noel@peralex.com>2015-05-14 12:00:40 +0200
commit19a32ddfd2b9c1beb17641e99f139ac0d3dcaf96 (patch)
treee2895b10ec66bae2ec47da748cf2848dea0bffa9 /editeng
parent3c0805e1f4f4d14e92c7e655d59c87de5c207e48 (diff)
convert KERNING_ constants to scoped enum
Change-Id: I58031485aaa9ebdeb986a3ee0376f36a9f667947
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editattr.cxx2
-rw-r--r--editeng/source/editeng/editdoc.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx4
-rw-r--r--editeng/source/uno/unofdesc.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 3076eade5aad..dcb9fa014b87 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -411,7 +411,7 @@ EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAt
void EditCharAttribPairKerning::SetFont( SvxFont& rFont, OutputDevice* )
{
- rFont.SetKerning( static_cast<const SvxAutoKernItem*>(GetItem())->GetValue() ? KERNING_FONTSPECIFIC : 0 );
+ rFont.SetKerning( static_cast<const SvxAutoKernItem*>(GetItem())->GetValue() ? FontKerning::FontSpecific : FontKerning::NONE );
}
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 33ea25b6e134..c9fe9755005f 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -2083,7 +2083,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, S
rFont.SetEscapement( nEsc );
}
if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_PAIRKERNING ) == SfxItemState::SET ) )
- rFont.SetKerning( static_cast<const SvxAutoKernItem&>(rSet.Get( EE_CHAR_PAIRKERNING )).GetValue() ? KERNING_FONTSPECIFIC : 0 );
+ rFont.SetKerning( static_cast<const SvxAutoKernItem&>(rSet.Get( EE_CHAR_PAIRKERNING )).GetValue() ? FontKerning::FontSpecific : FontKerning::NONE );
if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_KERNING ) == SfxItemState::SET ) )
rFont.SetFixKerning( static_cast<const SvxKerningItem&>(rSet.Get( EE_CHAR_KERNING )).GetValue() );
if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_WLM ) == SfxItemState::SET ) )
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 7685e316d084..1a8ac4d5918b 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2646,8 +2646,8 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
rFont.SetCJKContextLanguage( pCJKLanguageItem->GetLanguage() );
- if ( rFont.GetKerning() && IsKernAsianPunctuation() && ( nScriptTypeI18N == i18n::ScriptType::ASIAN ) )
- rFont.SetKerning( rFont.GetKerning() | KERNING_ASIAN );
+ if ( (rFont.GetKerning() != FontKerning::NONE) && IsKernAsianPunctuation() && ( nScriptTypeI18N == i18n::ScriptType::ASIAN ) )
+ rFont.SetKerning( rFont.GetKerning() | FontKerning::Asian );
if ( aStatus.DoNotUseColors() )
{
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index c9555ccbe72c..c5d85a19a8a8 100644
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -47,7 +47,7 @@ void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, vcl:
rFont.SetCharSet( (rtl_TextEncoding)rDesc.CharSet );
rFont.SetPitch( (FontPitch)rDesc.Pitch );
rFont.SetOrientation( (short)(rDesc.Orientation*10) );
- rFont.SetKerning( rDesc.Kerning );
+ rFont.SetKerning( rDesc.Kerning ? FontKerning::FontSpecific : FontKerning::NONE );
rFont.SetWeight( VCLUnoHelper::ConvertFontWeight(rDesc.Weight) );
rFont.SetItalic( (FontItalic)rDesc.Slant );
rFont.SetUnderline( (FontUnderline)rDesc.Underline );