[PATCH] fix proposed for fdo#49324
julien2412
serval2412 at yahoo.fr
Tue May 1 04:25:39 PDT 2012
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.
More information about the LibreOffice
mailing list