diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-06-26 10:13:08 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-06-26 10:13:08 +0000 |
commit | 3f6531f14ad8d85f19a2c4a50b1f2a75695de83d (patch) | |
tree | cfd068a9b100643613e5b8f73eea87f0130ea6e2 /svtools/source | |
parent | 040975f62886b901cc15284cc299596ade044a37 (diff) |
INTEGRATION: CWS draw19 (1.33.48); FILE MERGED
2003/06/24 12:15:41 sj 1.33.48.1: #i15561# fixed charset mapping problem, now supporting enhanced windows charsets
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/filter.vcl/wmf/winmtf.cxx | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx index e1b4502932ce..7fe1f9ea1406 100644 --- a/svtools/source/filter.vcl/wmf/winmtf.cxx +++ b/svtools/source/filter.vcl/wmf/winmtf.cxx @@ -2,9 +2,9 @@ * * $RCSfile: winmtf.cxx,v $ * - * $Revision: 1.34 $ + * $Revision: 1.35 $ * - * last change: $Author: vg $ $Date: 2003-06-24 07:42:20 $ + * last change: $Author: hr $ $Date: 2003-06-26 11:13:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,6 +65,9 @@ #ifndef _SV_METRIC_HXX #include <vcl/metric.hxx> #endif +#ifndef _RTL_TENCINFO_H +#include <rtl/tencinfo.h> +#endif // ------------------------------------------------------------------------ @@ -190,34 +193,12 @@ void WinMtfPathObj::ClosePath() WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont ) { CharSet eCharSet; - switch ( rFont.lfCharSet ) - { - case ANSI_CHARSET: - eCharSet = RTL_TEXTENCODING_MS_1252; - break; - - case SYMBOL_CHARSET: - eCharSet = RTL_TEXTENCODING_SYMBOL; - break; - - case SHIFTJIS_CHARSET: - eCharSet = RTL_TEXTENCODING_SHIFT_JIS; - break; - - case CHINESEBIG5_CHARSET: - eCharSet = RTL_TEXTENCODING_BIG5; - break; - - case HANGEUL_CHARSET : - eCharSet = RTL_TEXTENCODING_MS_949; - break; - - case OEM_CHARSET: - case DEFAULT_CHARSET: - default: - eCharSet = gsl_getSystemTextEncoding(); - break; - } + if ( ( rFont.lfCharSet == OEM_CHARSET ) || ( rFont.lfCharSet == DEFAULT_CHARSET ) ) + eCharSet = gsl_getSystemTextEncoding(); + else + eCharSet = rtl_getTextEncodingFromWindowsCharset( rFont.lfCharSet ); + if ( eCharSet == RTL_TEXTENCODING_DONTKNOW ) + eCharSet = gsl_getSystemTextEncoding(); aFont.SetCharSet( eCharSet ); CharSet eFontNameEncoding = eCharSet == RTL_TEXTENCODING_SYMBOL ? RTL_TEXTENCODING_MS_1252 : eCharSet; |