diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-04-15 17:58:24 +0200 |
---|---|---|
committer | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-04-15 18:02:02 +0200 |
commit | 10e3c7c428a7d231055d643e12f454c4267deab2 (patch) | |
tree | 8b8e1e0de9e9e5bc915cef659451555d8a971b12 /l10ntools/source | |
parent | e8e65884b0add7efce8ed95a673be63d68451a57 (diff) |
Delete remaind code of an obsolote parameter
Past: Use "-l en-US, af, hu..." parameter for transex
and to work with this string use InitLanguages() function.
Now: Use "-l all" parameter and get langauges from po files.
So InitLanguages is unneeded.
Change-Id: Ide6b3d24fb8b483c0c31034b1ffd6aba31c5e4c9
Diffstat (limited to 'l10ntools/source')
-rw-r--r-- | l10ntools/source/export.cxx | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index 6a93531ed50c..bf1fbce7d452 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -189,12 +189,10 @@ Export::Export(const OString &rOutput) bError( sal_False ), bReadOver( sal_False ), bDontWriteOutput( sal_False ), - isInitialized( false ), sFilename( global::inputPathname ), sLanguages( OString() ), pParseQueue( new ParserQueue( *this ) ) { - // open output stream aOutput.mPo = new PoOfstream( rOutput, PoOfstream::APP ); if (!aOutput.mPo->isOpen()) { fprintf(stderr, "ERROR : Can't open file %s\n", rOutput.getStr()); @@ -218,15 +216,10 @@ Export::Export( bError( sal_False ), bReadOver( sal_False ), bDontWriteOutput( sal_False ), - isInitialized( false ), sFilename( global::inputPathname ), sLanguages( rLanguage ), pParseQueue( new ParserQueue( *this ) ) { - InitLanguages( bMergeMode ); - // used when merge is enabled - - // open output stream aOutput.mSimple = new std::ofstream(); aOutput.mSimple->open(rOutput.getStr(), std::ios_base::out | std::ios_base::trunc); } @@ -1442,15 +1435,7 @@ sal_Bool Export::PrepareTextToMerge(OString &rText, sal_uInt16 nTyp, // search for merge data if ( !pMergeDataFile ){ pMergeDataFile = new MergeDataFile( sMergeSrc, global::inputPathname, false ); - - // Init Languages - if( Export::sLanguages.equalsIgnoreAsciiCase("ALL") ) - { - aLanguages = pMergeDataFile->GetLanguages(); - isInitialized = true; - } - else if( !isInitialized )InitLanguages(); - + aLanguages = pMergeDataFile->GetLanguages(); } MergeEntrys *pEntrys = pMergeDataFile->GetMergeEntrys( pResData ); @@ -1546,14 +1531,7 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 nMode ) { if ( !pMergeDataFile ){ pMergeDataFile = new MergeDataFile( sMergeSrc, global::inputPathname, false ); - - // Init Languages - if (Export::sLanguages.equalsIgnoreAsciiCase("ALL")) - { - aLanguages = pMergeDataFile->GetLanguages(); - isInitialized = true; - } - else if( !isInitialized )InitLanguages(); + aLanguages = pMergeDataFile->GetLanguages(); } switch ( nMode ) { @@ -1848,29 +1826,6 @@ void Export::SetChildWithText() } } -void Export::InitLanguages( bool bMerge ){ - - if( !isInitialized ) - { - OString sTmp; - OStringBoolHashMap aEnvLangs; - - sal_Int32 nIndex = 0; - do - { - OString aToken = sLanguages.getToken(0, ',', nIndex); - sTmp = aToken.getToken(0, '=').trim(); - if( bMerge && sTmp.equalsIgnoreAsciiCase("en-US") ){} - else if( !( (sTmp[0]=='x' || sTmp[0]=='X') && sTmp[1]=='-' ) ){ - aLanguages.push_back( sTmp ); - } - } - while ( nIndex >= 0 ); - - isInitialized = true; - } -} - void ParserQueue::Push( const QueueEntry& aEntry ) { sal_Int32 nLen = aEntry.sLine.getLength(); |