diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-05 09:58:47 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-06 09:01:29 +0200 |
commit | bfcb2a1a75ae0ff780bff0747ea90c1e79a56fc3 (patch) | |
tree | 27c331cb0cfd7fd4717b61bfe7ec493e9c512fc1 /vcl | |
parent | 9b37c2176e4da7575398c15921e3466208f19847 (diff) |
convert DEFAULTFONT_ constants to scoped enum
Change-Id: Ia33e957f6cf530e2639b3c86d9482f642652cb46
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/complextext.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/dbggui.cxx | 2 | ||||
-rw-r--r-- | vcl/source/font/PhysicalFontCollection.cxx | 10 | ||||
-rw-r--r-- | vcl/source/outdev/font.cxx | 96 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 6 |
5 files changed, 58 insertions, 58 deletions
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index 0c666c356a93..126a5fb84ebd 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -49,7 +49,7 @@ void VclComplexTextTest::testArabic() OutputDevice *pOutDev = static_cast< OutputDevice * >( pWin.get() ); vcl::Font aFont = OutputDevice::GetDefaultFont( - DEFAULTFONT_CTL_SPREADSHEET, + DefaultFontType::CTL_SPREADSHEET, LANGUAGE_ARABIC_SAUDI_ARABIA, DEFAULTFONT_FLAGS_ONLYONE, 0 ); pOutDev->SetFont( aFont ); diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index e8d27ae769eb..078baf113186 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -404,7 +404,7 @@ DbgInfoDialog::DbgInfoDialog( vcl::Window* pParent, bool bHelpText ) : if ( !bHelpText ) { - vcl::Font aFont = GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_ENGLISH_US, 0 ); + vcl::Font aFont = GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_ENGLISH_US, 0 ); aFont.SetHeight( 8 ); aFont.SetPitch( PITCH_FIXED ); maListBox->SetControlFont( aFont ); diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index eed3367e3c9d..6266591695b9 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -900,23 +900,23 @@ PhysicalFontFamily* PhysicalFontCollection::FindDefaultFont() const // UNICODE, SANSSERIF, SERIF or FIXED default font lists const utl::DefaultFontConfiguration& rDefaults = utl::DefaultFontConfiguration::get(); LanguageTag aLanguageTag( OUString( "en")); - OUString aFontname = rDefaults.getDefaultFont( aLanguageTag, DEFAULTFONT_SANS_UNICODE ); + OUString aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SANS_UNICODE ); PhysicalFontFamily* pFoundData = ImplFindByTokenNames( aFontname ); if( pFoundData ) return pFoundData; - aFontname = rDefaults.getDefaultFont( aLanguageTag, DEFAULTFONT_SANS ); + aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SANS ); pFoundData = ImplFindByTokenNames( aFontname ); if( pFoundData ) return pFoundData; - aFontname = rDefaults.getDefaultFont( aLanguageTag, DEFAULTFONT_SERIF ); + aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SERIF ); pFoundData = ImplFindByTokenNames( aFontname ); if( pFoundData ) return pFoundData; - aFontname = rDefaults.getDefaultFont( aLanguageTag, DEFAULTFONT_FIXED ); + aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::FIXED ); pFoundData = ImplFindByTokenNames( aFontname ); if( pFoundData ) return pFoundData; @@ -1199,7 +1199,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByFont( FontSelectPattern& r if( rFSD.IsSymbolFont() ) { LanguageTag aDefaultLanguageTag( OUString( "en")); - aSearchName = utl::DefaultFontConfiguration::get().getDefaultFont( aDefaultLanguageTag, DEFAULTFONT_SYMBOL ); + aSearchName = utl::DefaultFontConfiguration::get().getDefaultFont( aDefaultLanguageTag, DefaultFontType::SYMBOL ); PhysicalFontFamily* pFoundData = ImplFindByTokenNames( aSearchName ); if( pFoundData ) return pFoundData; diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 61dadc4e52dc..2d9dd97cde74 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -772,7 +772,7 @@ void ImplFontSubstitute( OUString& rFontName ) } //hidpi TODO: This routine has hard-coded font-sizes that break places such as DialControl -vcl::Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang, +vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLang, sal_uLong nFlags, const OutputDevice* pOutDev ) { if (!pOutDev) // default is NULL @@ -797,48 +797,48 @@ vcl::Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang, switch ( nType ) { - case DEFAULTFONT_SANS_UNICODE: - case DEFAULTFONT_UI_SANS: + case DefaultFontType::SANS_UNICODE: + case DefaultFontType::UI_SANS: aFont.SetFamily( FAMILY_SWISS ); break; - case DEFAULTFONT_SANS: - case DEFAULTFONT_LATIN_HEADING: - case DEFAULTFONT_LATIN_SPREADSHEET: - case DEFAULTFONT_LATIN_DISPLAY: + case DefaultFontType::SANS: + case DefaultFontType::LATIN_HEADING: + case DefaultFontType::LATIN_SPREADSHEET: + case DefaultFontType::LATIN_DISPLAY: aFont.SetFamily( FAMILY_SWISS ); break; - case DEFAULTFONT_SERIF: - case DEFAULTFONT_LATIN_TEXT: - case DEFAULTFONT_LATIN_PRESENTATION: + case DefaultFontType::SERIF: + case DefaultFontType::LATIN_TEXT: + case DefaultFontType::LATIN_PRESENTATION: aFont.SetFamily( FAMILY_ROMAN ); break; - case DEFAULTFONT_FIXED: - case DEFAULTFONT_LATIN_FIXED: - case DEFAULTFONT_UI_FIXED: + case DefaultFontType::FIXED: + case DefaultFontType::LATIN_FIXED: + case DefaultFontType::UI_FIXED: aFont.SetPitch( PITCH_FIXED ); aFont.SetFamily( FAMILY_MODERN ); break; - case DEFAULTFONT_SYMBOL: + case DefaultFontType::SYMBOL: aFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); break; - case DEFAULTFONT_CJK_TEXT: - case DEFAULTFONT_CJK_PRESENTATION: - case DEFAULTFONT_CJK_SPREADSHEET: - case DEFAULTFONT_CJK_HEADING: - case DEFAULTFONT_CJK_DISPLAY: + case DefaultFontType::CJK_TEXT: + case DefaultFontType::CJK_PRESENTATION: + case DefaultFontType::CJK_SPREADSHEET: + case DefaultFontType::CJK_HEADING: + case DefaultFontType::CJK_DISPLAY: aFont.SetFamily( FAMILY_SYSTEM ); // don't care, but don't use font subst config later... break; - case DEFAULTFONT_CTL_TEXT: - case DEFAULTFONT_CTL_PRESENTATION: - case DEFAULTFONT_CTL_SPREADSHEET: - case DEFAULTFONT_CTL_HEADING: - case DEFAULTFONT_CTL_DISPLAY: + case DefaultFontType::CTL_TEXT: + case DefaultFontType::CTL_PRESENTATION: + case DefaultFontType::CTL_SPREADSHEET: + case DefaultFontType::CTL_HEADING: + case DefaultFontType::CTL_DISPLAY: aFont.SetFamily( FAMILY_SYSTEM ); // don't care, but don't use font subst config later... break; } @@ -927,38 +927,38 @@ vcl::Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang, } #if OSL_DEBUG_LEVEL > 2 - const char* s = "DEFAULTFONT_SANS_UNKNOWN"; + const char* s = "DefaultFontType::SANS_UNKNOWN"; switch ( nType ) { - case DEFAULTFONT_SANS_UNICODE: s = "DEFAULTFONT_SANS_UNICODE"; break; - case DEFAULTFONT_UI_SANS: s = "DEFAULTFONT_UI_SANS"; break; + case DefaultFontType::SANS_UNICODE: s = "DefaultFontType::SANS_UNICODE"; break; + case DefaultFontType::UI_SANS: s = "DefaultFontType::UI_SANS"; break; - case DEFAULTFONT_SANS: s = "DEFAULTFONT_SANS"; break; - case DEFAULTFONT_LATIN_HEADING: s = "DEFAULTFONT_LATIN_HEADING"; break; - case DEFAULTFONT_LATIN_SPREADSHEET: s = "DEFAULTFONT_LATIN_SPREADSHEET"; break; - case DEFAULTFONT_LATIN_DISPLAY: s = "DEFAULTFONT_LATIN_DISPLAY"; break; + case DefaultFontType::SANS: s = "DefaultFontType::SANS"; break; + case DefaultFontType::LATIN_HEADING: s = "DefaultFontType::LATIN_HEADING"; break; + case DefaultFontType::LATIN_SPREADSHEET: s = "DefaultFontType::LATIN_SPREADSHEET"; break; + case DefaultFontType::LATIN_DISPLAY: s = "DefaultFontType::LATIN_DISPLAY"; break; - case DEFAULTFONT_SERIF: s = "DEFAULTFONT_SERIF"; break; - case DEFAULTFONT_LATIN_TEXT: s = "DEFAULTFONT_LATIN_TEXT"; break; - case DEFAULTFONT_LATIN_PRESENTATION: s = "DEFAULTFONT_LATIN_PRESENTATION"; break; + case DefaultFontType::SERIF: s = "DefaultFontType::SERIF"; break; + case DefaultFontType::LATIN_TEXT: s = "DefaultFontType::LATIN_TEXT"; break; + case DefaultFontType::LATIN_PRESENTATION: s = "DefaultFontType::LATIN_PRESENTATION"; break; - case DEFAULTFONT_FIXED: s = "DEFAULTFONT_FIXED"; break; - case DEFAULTFONT_LATIN_FIXED: s = "DEFAULTFONT_LATIN_FIXED"; break; - case DEFAULTFONT_UI_FIXED: s = "DEFAULTFONT_UI_FIXED"; break; + case DefaultFontType::FIXED: s = "DefaultFontType::FIXED"; break; + case DefaultFontType::LATIN_FIXED: s = "DefaultFontType::LATIN_FIXED"; break; + case DefaultFontType::UI_FIXED: s = "DefaultFontType::UI_FIXED"; break; - case DEFAULTFONT_SYMBOL: s = "DEFAULTFONT_SYMBOL"; break; + case DefaultFontType::SYMBOL: s = "DefaultFontType::SYMBOL"; break; - case DEFAULTFONT_CJK_TEXT: s = "DEFAULTFONT_CJK_TEXT"; break; - case DEFAULTFONT_CJK_PRESENTATION: s = "DEFAULTFONT_CJK_PRESENTATION"; break; - case DEFAULTFONT_CJK_SPREADSHEET: s = "DEFAULTFONT_CJK_SPREADSHEET"; break; - case DEFAULTFONT_CJK_HEADING: s = "DEFAULTFONT_CJK_HEADING"; break; - case DEFAULTFONT_CJK_DISPLAY: s = "DEFAULTFONT_CJK_DISPLAY"; break; + case DefaultFontType::CJK_TEXT: s = "DefaultFontType::CJK_TEXT"; break; + case DefaultFontType::CJK_PRESENTATION: s = "DefaultFontType::CJK_PRESENTATION"; break; + case DefaultFontType::CJK_SPREADSHEET: s = "DefaultFontType::CJK_SPREADSHEET"; break; + case DefaultFontType::CJK_HEADING: s = "DefaultFontType::CJK_HEADING"; break; + case DefaultFontType::CJK_DISPLAY: s = "DefaultFontType::CJK_DISPLAY"; break; - case DEFAULTFONT_CTL_TEXT: s = "DEFAULTFONT_CTL_TEXT"; break; - case DEFAULTFONT_CTL_PRESENTATION: s = "DEFAULTFONT_CTL_PRESENTATION"; break; - case DEFAULTFONT_CTL_SPREADSHEET: s = "DEFAULTFONT_CTL_SPREADSHEET"; break; - case DEFAULTFONT_CTL_HEADING: s = "DEFAULTFONT_CTL_HEADING"; break; - case DEFAULTFONT_CTL_DISPLAY: s = "DEFAULTFONT_CTL_DISPLAY"; break; + case DefaultFontType::CTL_TEXT: s = "DefaultFontType::CTL_TEXT"; break; + case DefaultFontType::CTL_PRESENTATION: s = "DefaultFontType::CTL_PRESENTATION"; break; + case DefaultFontType::CTL_SPREADSHEET: s = "DefaultFontType::CTL_SPREADSHEET"; break; + case DefaultFontType::CTL_HEADING: s = "DefaultFontType::CTL_HEADING"; break; + case DefaultFontType::CTL_DISPLAY: s = "DefaultFontType::CTL_DISPLAY"; break; } fprintf( stderr, " OutputDevice::GetDefaultFont() Type=\"%s\" lang=%d flags=%ld FontName=\"%s\"\n", s, eLang, nFlags, diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index fa7cee61135e..c928516d767b 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -545,11 +545,11 @@ void Window::SetZoomedPointFont( const vcl::Font& rFont ) long nFontDiff = std::abs( GetFont().GetSize().Height()-aMetric.GetSize().Height() ); if ( (aMetric.GetType() == TYPE_RASTER) && (nFontDiff >= 2) ) { - sal_uInt16 nType; + DefaultFontType nType; if ( aMetric.GetPitch() == PITCH_FIXED ) - nType = DEFAULTFONT_FIXED; + nType = DefaultFontType::FIXED; else - nType = DEFAULTFONT_UI_SANS; + nType = DefaultFontType::UI_SANS; vcl::Font aTempFont = GetDefaultFont( nType, GetSettings().GetLanguageTag().getLanguageType(), 0 ); aFont.SetName( aTempFont.GetName() ); SetPointFont( aFont ); |