summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorSamphan Raruenrom <samphan@osdev.co.th>2011-03-24 15:28:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-03-24 15:28:33 +0000
commite7f7c836d753da21ada4586aab996a43dbea5139 (patch)
treeac62e8d590a2e8114f67f99af38166a78e5eb197 /vcl
parent3256422d4fa7b4181079f33e9ec8cf77bbf9226a (diff)
fix bug that prevents glyph-fallback for char at end of string
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 355cae79377b..b6fb1ab26bd2 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -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: