Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello,

I reproduced the problem of fdo#49324 (Does not recognize VBA macro in
JAPANESE of LibreOffice 3.5.2) on master with Debian pc x86-64.
I noticed this line appeared twice in the log of the file which failed (see
https://bugs.freedesktop.org/show_bug.cgi?id=49324#c3) 
warn:legacy.osl:17148:1:/home/julien/compile-libreoffice/libo/oox/source/helper/textinputstream.cxx:203:
TextInputStream::createXTextInputStream - unsupported text encoding

By "gdbing" this, I found that the problem appeared on the file
sal/textenc/tencinfo.cxx :
    820 char const * SAL_CALL
rtl_getMimeCharsetFromTextEncoding(rtl_TextEncoding
    821                                                             
nEncoding)
    822 {
    823     ImplTextEncodingData const * p =
Impl_getTextEncodingData(nEncoding);
    824     return p && (p->mnInfoFlags & RTL_TEXTENCODING_INFO_MIME) != 0 ?
    825                p->mpBestMimeCharset : NULL;
    826 }

"p" isn't null but RTL_TEXTENCODING_INFO_MIME = 80 whereas p->mnInfoFlags =
8 only
since p uses aImplMS932TextEncodingData. I thought about putting this :
RTL_TEXTENCODING_INFO_MULTIBYTE | RTL_TEXTENCODING_INFO_MIME
instead of this :
RTL_TEXTENCODING_INFO_MULTIBYTE in sal/textenc/tcvtjp6.tab

So I tested this patch : 
http://nabble.documentfoundation.org/file/n3952784/patch_49324.txt
patch_49324.txt  and it worked.

But since there are other cases where the " | RTL_TEXTENCODING_INFO_MIME"
seem to lack in this file, I think that perhaps it's on purpose and so I
would be completely wrong about the real cause of the problem.

Any idea ?

Julien.
PS : if it's ok, I can commit and push on master. (what about 3.5 ?)

--
View this message in context: 
http://nabble.documentfoundation.org/PATCH-fix-proposed-for-fdo-49324-tp3952784.html
Sent from the Dev mailing list archive at Nabble.com.

Context


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.