vcl/source/filter/wmf/winmtf.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit c6bc9b33d5cac1ea40a829754004fde6ae16d8b1 Author: Mike Kaganski <mikekagan...@hotmail.com> Date: Wed May 6 19:10:05 2015 +1000 tdf#74301: WMF: use LibreOffice locale on OEM_CHARSET/DEFAULT_CHARSET [MS-WMF] 2.1.1.5 CharacterSet Enumeration defines DEFAULT_CHARSET "Specifies a character set based on the current system locale; for example, when the system locale is United States English, the default character set is ANSI_CHARSET" OEM_CHARSET is defined as follows: "Specifies a mapping to one of the OEM code pages, according to the current system locale setting" Currently, LO WMF import treats these values as synonim for RTL_TEXTENCODING_MS_1252. This patch fixes this to use LibreOffice locale setting instead. Strictly speaking, this is not quite correct for OEM. E.g., for Russian, DEFAULT_CHARSET is equal to codepage 1251, while OEM_CHARSET is codepage 866. But I don't know how to distinguish these two. Change-Id: Id5eaf070cde040bd6eb1db28f1a498d647ba227e Reviewed-on: https://gerrit.libreoffice.org/15641 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index d6423ea..f14f934 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -145,7 +145,7 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont ) { rtl_TextEncoding eCharSet; if ( ( rFont.lfCharSet == OEM_CHARSET ) || ( rFont.lfCharSet == DEFAULT_CHARSET ) ) - eCharSet = RTL_TEXTENCODING_MS_1252; + eCharSet = osl_getThreadTextEncoding(); else eCharSet = rtl_getTextEncodingFromWindowsCharset( rFont.lfCharSet ); if ( eCharSet == RTL_TEXTENCODING_DONTKNOW )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits