Kaydet (Commit) 10e3c7c4 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

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
üst e8e65884
......@@ -206,7 +206,6 @@ private:
sal_Bool bReadOver;
sal_Bool bDontWriteOutput;
OString sLastTextTyp;
bool isInitialized;
OString sFilename;
OString sLanguages;
......@@ -238,8 +237,6 @@ private:
void WriteToMerged(const OString &rText , bool bSDFContent);
void SetChildWithText();
void InitLanguages( bool bMergeMode = false );
void CutComment( OString &rText );
public:
......
......@@ -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();
}
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();
}
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment