[Libreoffice] [REVIEW] 3-5, 3-5-0, 3-4 corrupted Indic characters and crash under Windows fdo#44208, fdo#45107

Caolán McNamara caolanm at redhat.com
Wed Jan 25 06:08:20 PST 2012


On Wed, 2012-01-25 at 12:03 +0000, Caolán McNamara wrote:
> Anyway, best would be to find the bit of locale matching code and see
> why it doesn't do the right thing

The default fonts get selected via OutputDevice::GetDefaultFont in
vcl/source/gdi/outdev3.cxx which calls
DefaultFontConfiguration::getDefaultFont
in unotools/source/config/fontcfg.cxx which calls tryLocale with the
full locale string, then with variant cleared and then with Country
cleared if the earlier attempts fail

so...

if in master if I set my locale via export LANG=ta_IN.UTF-8 I get with
the attached debugging patch...

searching for a node for "ta" "IN" "" for type CTL_TEXT
result is ""
searching for a node for "ta" "" "" for type CTL_TEXT
result is "Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS"

so it does the right thing.

if I revert all the changes to officecfg I get..

searching for a node for "ta" "IN" "" for type CTL_TEXT
result is "Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS"

so it does the right thing there too for me.

So it seems to have been working correctly under Linux anyway. Can
you find out what the value of aLocale is in
OutputDevice::GetDefaultFont under windows for your failing case, i.e. a
trace with the attached patch in place.

C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug.patch
Type: text/x-patch
Size: 3404 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120125/2c2dc1db/attachment-0001.bin>


More information about the LibreOffice mailing list