summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mikekaganski@hotmail.com>2015-05-06 19:10:05 +1000
committerCaolán McNamara <caolanm@redhat.com>2015-05-10 20:02:49 +0000
commitc6bc9b33d5cac1ea40a829754004fde6ae16d8b1 (patch)
tree1fdcefdb5564f5b01808c5cf12ad6533ccf9f81f
parent4f864949a9484bbf21911859398743bfe2b1430f (diff)
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 <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index d6423eac5ac6..f14f9345ffc7 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 )