diff options
author | Tino Rachui <tra@openoffice.org> | 2001-03-22 13:16:09 +0000 |
---|---|---|
committer | Tino Rachui <tra@openoffice.org> | 2001-03-22 13:16:09 +0000 |
commit | 710e1bf0bf38efec224089cf93132e502353ed75 (patch) | |
tree | ce0b26a4382790fb880d3db283a04d500434f373 /dtrans/source/win32/misc | |
parent | 5fdd95a0641b94dac09b919bcfaa5ff49604163d (diff) |
*** empty log message ***
Diffstat (limited to 'dtrans/source/win32/misc')
-rw-r--r-- | dtrans/source/win32/misc/ImplHelper.cxx | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx index 0d7888cb6984..8b9df47c12a4 100644 --- a/dtrans/source/win32/misc/ImplHelper.cxx +++ b/dtrans/source/win32/misc/ImplHelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ImplHelper.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: tra $ $Date: 2001-03-19 13:03:00 $ + * last change: $Author: tra $ $Date: 2001-03-22 14:14:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -143,6 +143,25 @@ OUString SAL_CALL getWinCPFromLocaleId( LCID lcid, LCTYPE lctype ) { OSL_ASSERT( IsValidLocale( lcid, LCID_SUPPORTED ) ); + // we set an default value + OUString winCP; + + // set an default value + sal_Unicode wcstr[10]; + + if ( LOCALE_IDEFAULTCODEPAGE == lctype ) + { + _itow( GetOEMCP( ), wcstr, 10 ); + winCP = OUString( wcstr, wcslen( wcstr ) ); + } + else if ( LOCALE_IDEFAULTANSICODEPAGE == lctype ) + { + _itow( GetACP( ), wcstr, 10 ); + winCP = OUString( wcstr, wcslen( wcstr ) ); + } + else + OSL_ASSERT( sal_False ); + // we use the GetLocaleInfoA because don't want to provide // a unicode wrapper function for Win9x in sal/systools char buff[6]; @@ -151,9 +170,6 @@ OUString SAL_CALL getWinCPFromLocaleId( LCID lcid, LCTYPE lctype ) OSL_ASSERT( nResult ); - // we set an default value - OUString winCP = OUString::createFromAscii( "1252" ); - if ( nResult ) { sal_Int32 len = MultiByteToWideChar( |