summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-12 22:09:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-13 10:15:20 +0100
commit13caa83dca4e1507a6e0213bd122d13af570d132 (patch)
treebab051d3eea4eddfa30d3fd0d5ce21cb294a2969 /l10ntools
parentc216006f0a35c812ca999d8f68eaeb8e453c58fa (diff)
no route left to set encoding, only RTL_TEXTENCODING_MS_1252 is possible
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/inc/export.hxx4
-rw-r--r--l10ntools/source/cfgmerge.cxx2
-rw-r--r--l10ntools/source/export.cxx10
-rw-r--r--l10ntools/source/merge.cxx7
-rw-r--r--l10ntools/source/xrmmerge.cxx2
5 files changed, 10 insertions, 15 deletions
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index c33960fa8468..8c42647d4bbc 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -294,8 +294,6 @@ class Export
private:
WordTransformer *pWordTransformer;
- CharSet aCharSet; // used charset in src
-
SvFileStream aOutput;
ResStack aResStack; // stack for parsing recursive
@@ -515,7 +513,7 @@ class MergeDataFile
);
ByteString Dump();
public:
- MergeDataFile( const ByteString &rFileName, const ByteString& rFile , sal_Bool bErrLog, CharSet aCharSet, bool bCaseSensitive = false );
+ explicit MergeDataFile( const ByteString &rFileName, const ByteString& rFile, bool bErrLog, bool bCaseSensitive = false );
~MergeDataFile();
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index cf4fe7fef8c6..047839c4b8d5 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -719,7 +719,7 @@ CfgMerge::CfgMerge(
{
if ( rMergeSource.Len()){
pMergeDataFile = new MergeDataFile(
- rMergeSource, sInputFileName , bErrorLog, RTL_TEXTENCODING_MS_1252, true );
+ rMergeSource, sInputFileName, bErrorLog, true );
if( Export::sLanguages.EqualsIgnoreCaseAscii("ALL") ){
Export::SetLanguages( pMergeDataFile->GetLanguages() );
aLanguages = pMergeDataFile->GetLanguages();
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 6df2b660e7f7..e3031671f6f7 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -418,7 +418,6 @@ Export::Export( const ByteString &rOutput, sal_Bool bWrite,
/*****************************************************************************/
:
pWordTransformer( NULL ),
- aCharSet( RTL_TEXTENCODING_MS_1252 ),
bDefine( sal_False ),
bNextMustBeDefineEOL( sal_False ),
nLevel( 0 ),
@@ -463,7 +462,6 @@ Export::Export( const ByteString &rOutput, sal_Bool bWrite,
/*****************************************************************************/
:
pWordTransformer( NULL ),
- aCharSet( RTL_TEXTENCODING_MS_1252 ),
bDefine( sal_False ),
bNextMustBeDefineEOL( sal_False ),
nLevel( 0 ),
@@ -529,7 +527,7 @@ Export::~Export()
if ( bMergeMode && !bUnmerge ) {
if ( !pMergeDataFile )
- pMergeDataFile = new MergeDataFile( sMergeSrc,sFile , bErrorLog, aCharSet);//, bUTF8 );
+ pMergeDataFile = new MergeDataFile( sMergeSrc, sFile, bErrorLog);//, bUTF8 );
delete pMergeDataFile;
}
@@ -928,7 +926,7 @@ int Export::Execute( int nToken, const char * pToken )
sKey.EraseAllChars( '\t' );
ByteString sText( GetText( sToken, nToken ));
if ( !bMergeMode )
- sText = sText.Convert( aCharSet, RTL_TEXTENCODING_MS_1252 );
+ sText = sText.Convert( RTL_TEXTENCODING_MS_1252, RTL_TEXTENCODING_MS_1252 );
ByteString sLang;
if ( getToken(sToken, 0, '=').indexOf('[') != -1 )
{
@@ -1885,7 +1883,7 @@ sal_Bool Export::PrepareTextToMerge(ByteString &rText, sal_uInt16 nTyp,
// search for merge data
if ( !pMergeDataFile ){
- pMergeDataFile = new MergeDataFile( sMergeSrc, sFile , bErrorLog, aCharSet);//, bUTF8 );
+ pMergeDataFile = new MergeDataFile( sMergeSrc, sFile, bErrorLog );//, bUTF8 );
// Init Languages
ByteString sTmp = Export::sLanguages;
@@ -1935,7 +1933,7 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
/*****************************************************************************/
{
if ( !pMergeDataFile ){
- pMergeDataFile = new MergeDataFile( sMergeSrc, sFile ,bErrorLog, aCharSet);//, bUTF8 );
+ pMergeDataFile = new MergeDataFile( sMergeSrc, sFile, bErrorLog );//, bUTF8 );
// Init Languages
ByteString sTmp = Export::sLanguages;
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index f196f27e288e..36a46f225c3e 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -182,13 +182,12 @@ sal_Bool MergeData::operator==( ResData *pData )
MergeDataFile::MergeDataFile(
const ByteString &rFileName,
const ByteString& sFile,
- sal_Bool bErrLog,
- CharSet aCharSet,
+ bool bErrLog,
bool bCaseSensitive)
: bErrorLog( bErrLog )
{
SvFileStream aInputStream( String( rFileName, RTL_TEXTENCODING_ASCII_US ), STREAM_STD_READ );
- aInputStream.SetStreamCharSet( aCharSet );
+ aInputStream.SetStreamCharSet( RTL_TEXTENCODING_MS_1252 );
ByteString sLine;
const ByteString sHACK("HACK");
const ::rtl::OString sFileNormalized(lcl_NormalizeFilename(sFile));
@@ -203,7 +202,7 @@ MergeDataFile::MergeDataFile(
{
xub_StrLen nToks;
aInputStream.ReadLine( sLine );
- sLine = sLine.Convert( RTL_TEXTENCODING_MS_1252, aCharSet );
+ sLine = sLine.Convert( RTL_TEXTENCODING_MS_1252, RTL_TEXTENCODING_MS_1252 );
nToks = sLine.GetTokenCount( '\t' );
if ( nToks == 15 )
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 064d908ae04f..4043e6f0e857 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -605,7 +605,7 @@ XRMResMerge::XRMResMerge(
{
if ( rMergeSource.Len())
pMergeDataFile = new MergeDataFile(
- rMergeSource, sInputFileName , bErrorLog, RTL_TEXTENCODING_MS_1252);//, bUTF8 );
+ rMergeSource, sInputFileName, bErrorLog);//, bUTF8 );
if( Export::sLanguages.EqualsIgnoreCaseAscii("ALL") ){
Export::SetLanguages( pMergeDataFile->GetLanguages() );
aLanguages = pMergeDataFile->GetLanguages();