While working on other bugs, we found this bug in
vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx . When
there is only one character at the end of the string that require
glyph-fallback, the bug prevent glyph-fallbacking. Because the code will
not detect that the last character need glyph-fallback. It is an obvious
bug because of wrong loop's terminating condition checking.
Please take a look.
Samphan.
--
_/|\_ /Samphan Raruenrom./ Osdev - Open Source Development Co., Ltd.
/สัมพันธ์ ระรื่นรมย์./ โอเอสเด็บ - บริษัท โอเพนซอร์สดิเวลอปเมนต์ จำกัด
tel: +66 2 269 9889 web: osdev.co.th <http://www.osdev.co.th/>
twitter: @osdev <http://twitter.com/osdev> facebook: facebook.com/osdev
<http://www.facebook.com/osdev>
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index ae62c6e..343f39f 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:
Context
- [Libreoffice] [PATCH] fix obvious bug in VCL that prevent glyph-fallback for one glyph-missing character at the end of string · Samphan Raruenrom
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.