[Libreoffice-commits] .: vcl/win

Caolán McNamara caolan at kemper.freedesktop.org
Thu Mar 24 08:28:41 PDT 2011


 vcl/win/source/gdi/salgdi3.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 47e43576c8ec80f6e5d744e4b46e2d9e0f01a73a
Author: Samphan Raruenrom <samphan at osdev.co.th>
Date:   Thu Mar 24 15:28:33 2011 +0000

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

diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 30c60bd..7f8214f 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:


More information about the Libreoffice-commits mailing list