INTEGRATION: CWS mergebuild (1.1.36); FILE MERGED

2004/04/20 16:37:01 hjs 1.1.36.2: RESYNC: (1.1-1.2); FILE MERGED
2003/10/29 17:19:38 hjs 1.1.36.1: #i8252# telnr. to iso code; switch to ulf
This commit is contained in:
Hans-Joachim Lankenau 2004-06-26 02:10:37 +00:00
parent 2f0055984c
commit 6df75172fe

View file

@ -2,9 +2,9 @@
* *
* $RCSfile: unxcrashres.cxx,v $ * $RCSfile: unxcrashres.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: vg $ $Date: 2003-12-17 19:29:00 $ * last change: $Author: hjs $ $Date: 2004-06-26 03:10:37 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@ -44,7 +44,6 @@
************************************************************************/#include <tools/config.hxx> ************************************************************************/#include <tools/config.hxx>
#include <rtl/string.hxx> #include <rtl/string.hxx>
#include <osl/thread.h> #include <osl/thread.h>
#include <tools/l2txtenc.hxx>
#include <hash_map> #include <hash_map>
#include <string> #include <string>
@ -79,7 +78,7 @@ int main( int argc, char** argv )
ByteString tmp_argv1( argv[1] ); ByteString tmp_argv1( argv[1] );
Config aConfig( String( tmp_argv1, osl_getThreadTextEncoding() ) ); Config aConfig( String( tmp_argv1, osl_getThreadTextEncoding() ) );
hash_map< int, hash_map< OString, OString, OStringHash > > aFiles; hash_map< ByteString, hash_map< OString, OString, OStringHash >, OStringHash > aFiles;
for( USHORT i = 0; i < aConfig.GetGroupCount(); i++ ) for( USHORT i = 0; i < aConfig.GetGroupCount(); i++ )
{ {
@ -90,21 +89,18 @@ int main( int argc, char** argv )
{ {
ByteString aKey = aConfig.GetKeyName( n ); ByteString aKey = aConfig.GetKeyName( n );
ByteString aValue = aConfig.ReadKey( aKey ); ByteString aValue = aConfig.ReadKey( aKey );
int nRes = aKey.ToInt32();
// tailor key // tailor key
filterValue( aValue, aGroup, aKey ); filterValue( aValue, aGroup, aKey );
aFiles[nRes][aGroup] = ByteString( String( aValue, Langcode2TextEncoding( (USHORT)nRes ) ), RTL_TEXTENCODING_UTF8 ); aFiles[aKey][aGroup] = ByteString( aValue );
} }
} }
for( hash_map< int, hash_map< OString, OString, OStringHash > >::const_iterator lang_it = aFiles.begin(); lang_it != aFiles.end(); ++lang_it ) for( hash_map< ByteString, hash_map< OString, OString, OStringHash >, OStringHash >::const_iterator lang_it = aFiles.begin(); lang_it != aFiles.end(); ++lang_it )
{ {
ByteString aFile( argv[2] ); ByteString aFile( argv[2] );
aFile.Append( '.' ); aFile.Append( '.' );
if( lang_it->first < 10 ) aFile.Append( lang_it->first );
aFile.Append( '0' );
aFile.Append( ByteString::CreateFromInt32( lang_it->first ) );
FILE* fp = fopen( aFile.GetBuffer(), "w" ); FILE* fp = fopen( aFile.GetBuffer(), "w" );
if( ! fp ) if( ! fp )
{ {