Kaydet (Commit) e7f7c836 authored tarafından Samphan Raruenrom's avatar Samphan Raruenrom Kaydeden (comit) Caolán McNamara

fix bug that prevents glyph-fallback for char at end of string

üst 3256422d
......@@ -555,13 +555,14 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFo
{
// guess a locale matching to the missing chars
com::sun::star::lang::Locale aLocale;
LanguageType eLang = LANGUAGE_DONTKNOW;
sal_Int32 nStrIdx = 0;
const sal_Int32 nStrLen = rMissingChars.getLength();
while( nStrIdx < nStrLen )
{
const sal_UCS4 uChar = rMissingChars.iterateCodePoints( &nStrIdx );
const LanguageType eLang = MapCharToLanguage( uChar );
eLang = MapCharToLanguage( uChar );
if( eLang == LANGUAGE_DONTKNOW )
continue;
MsLangId::convertLanguageToLocale( eLang, aLocale );
......@@ -569,7 +570,7 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFo
}
// fall back to default UI locale if the missing characters are inconclusive
if( nStrIdx >= nStrLen )
if( eLang == LANGUAGE_DONTKNOW )
aLocale = Application::GetSettings().GetUILocale();
// first level fallback:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment