diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-12 21:53:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-13 10:15:20 +0100 |
commit | f64dc2c9fbc81d68315ee3a2dbc69411b9087ddb (patch) | |
tree | 41504a66edc8d325561386aa1f920b64a6eb6364 /l10ntools | |
parent | 3a17760c69cb8cfe84fe68baf8b51cfb63084415 (diff) |
I believe the src charset pragma is archaic and unused
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/export.cxx | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index e75550d7acf9..6df2b660e7f7 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -447,7 +447,7 @@ Export::Export( const ByteString &rOutput, sal_Bool bWrite, if ( bEnableExport ) { aOutput.Open( String( rOutput, RTL_TEXTENCODING_ASCII_US ), STREAM_STD_WRITE | STREAM_TRUNC ); if( !aOutput.IsOpen() ) { - printf("ERROR : Can't open file %s\n",rOutput.GetBuffer()); + fprintf(stderr, "ERROR : Can't open file %s\n",rOutput.GetBuffer()); exit ( -1 ); } aOutput.SetStreamCharSet( RTL_TEXTENCODING_UTF8 ); @@ -1111,25 +1111,8 @@ int Export::Execute( int nToken, const char * pToken ) break; case PRAGMA : { bDontWriteOutput = sal_False; - while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {}; - while( sToken.SearchAndReplace( " ", " " ) != STRING_NOTFOUND ) {}; - sToken.EraseLeadingChars( ' ' ); - sToken.EraseTrailingChars( ' ' ); - - ByteString sCharset = getToken(sToken, 1, ' '); - ByteString sSet = getToken(sToken, 2, ' '); - if (( sCharset.ToUpperAscii() == "CHARSET_IBMPC" ) || - ( sCharset == "RTL_TEXTENCODING_IBM_850" ) || - (( sCharset == "CHARSET" ) && ( sSet.ToUpperAscii() == "IBMPC" ))) - { - aCharSet = RTL_TEXTENCODING_IBM_850; - } - else if (( sCharset == "CHARSET_ANSI" ) || - ( sCharset == "RTL_TEXTENCODING_MS_1252" ) || - (( sCharset == "CHARSET" ) && ( sSet.ToUpperAscii() == "ANSI" ))) - { - aCharSet = RTL_TEXTENCODING_MS_1252; - } + fprintf(stderr, "ERROR: archaic PRAGMA %s\n", sToken.GetBuffer()); + exit(-1); } break; case TEXTREFID : { |