diff options
Diffstat (limited to 'l10ntools/source/lngmerge.cxx')
-rw-r--r-- | l10ntools/source/lngmerge.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx index 570c295c9cf8..6e17c7f7534b 100644 --- a/l10ntools/source/lngmerge.cxx +++ b/l10ntools/source/lngmerge.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,15 +54,15 @@ LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat ) SvFileStream aStream( String( sSource, RTL_TEXTENCODING_ASCII_US ), STREAM_STD_READ ); if ( aStream.IsOpen()) { ByteString sLine; - bool bFirstLine = true; + bool bFirstLine = true; while ( !aStream.IsEof()) { aStream.ReadLine( sLine ); - + if( bFirstLine ){ // Always remove UTF8 BOM from the first line Export::RemoveUTF8ByteOrderMarker( sLine ); bFirstLine = false; } - + pLines->Insert( new ByteString( sLine ), LIST_APPEND ); } } @@ -89,7 +89,7 @@ void LngParser::FillInFallbacks( ByteStringHashMap Text ) ByteString sCur; for( unsigned int n = 0; n < aLanguages.size(); n++ ){ sCur = aLanguages[ n ]; - + if( Export::isAllowed( sCur ) ){ ByteString sFallbackLang = Export::GetFallbackLanguage( sCur ); if( sFallbackLang.Len() ){ @@ -113,7 +113,7 @@ BOOL LngParser::CreateSDF( if ( !aSDFStream.IsOpen()) { nError = SDF_COULD_NOT_OPEN; } - aSDFStream.SetStreamCharSet( RTL_TEXTENCODING_UTF8 ); + aSDFStream.SetStreamCharSet( RTL_TEXTENCODING_UTF8 ); nError = SDF_OK; DirEntry aEntry( String( sSource, RTL_TEXTENCODING_ASCII_US )); aEntry.ToAbs(); @@ -133,11 +133,11 @@ BOOL LngParser::CreateSDF( ByteString sLine; while( nPos < pLines->Count() ){ - sLine = *pLines->GetObject( nPos++ ); + sLine = *pLines->GetObject( nPos++ ); while( nPos < pLines->Count() && !isNextGroup( sGroup , sLine ) ){ ReadLine( sLine , Text ); sID = sGroup; - sLine = *pLines->GetObject( nPos++ ); + sLine = *pLines->GetObject( nPos++ ); }; if( bStart ){ bStart = false; @@ -145,18 +145,18 @@ BOOL LngParser::CreateSDF( } else { - WriteSDF( aSDFStream , Text , rPrj , rRoot , sActFileName , sID ); + WriteSDF( aSDFStream , Text , rPrj , rRoot , sActFileName , sID ); } } aSDFStream.Close(); return true; } - void LngParser::WriteSDF( SvFileStream &aSDFStream , ByteStringHashMap &rText_inout , + void LngParser::WriteSDF( SvFileStream &aSDFStream , ByteStringHashMap &rText_inout , const ByteString &rPrj , const ByteString &rRoot , const ByteString &sActFileName , const ByteString &sID ) { - + BOOL bExport = true; if ( bExport ) { ByteString sTimeStamp( Export::GetTimeStamp()); @@ -164,10 +164,10 @@ BOOL LngParser::CreateSDF( FillInFallbacks( rText_inout ); for( unsigned int n = 0; n < aLanguages.size(); n++ ){ sCur = aLanguages[ n ]; - ByteString sAct = rText_inout[ sCur ]; + ByteString sAct = rText_inout[ sCur ]; if ( !sAct.Len() && sCur.Len() ) sAct = rText_inout[ ByteString("en-US") ]; - + ByteString sOutput( rPrj ); sOutput += "\t"; if ( rRoot.Len()) sOutput += sActFileName; @@ -201,7 +201,7 @@ BOOL LngParser::CreateSDF( sLang.EraseTrailingChars( ' ' ); ByteString sText = sLine_in.GetToken( 1, '\"' ).GetToken( 0, '\"' ); if( sLang.Len() ) - rText_inout[ sLang ] = sText; + rText_inout[ sLang ] = sText; } /*****************************************************************************/ @@ -222,7 +222,7 @@ BOOL LngParser::Merge( MergeDataFile aMergeDataFile( rSDFFile, sSource , FALSE, RTL_TEXTENCODING_MS_1252);//, bDBIsUTF8 ); ByteString sTmp( Export::sLanguages ); - if( sTmp.ToUpperAscii().Equals("ALL") ) + if( sTmp.ToUpperAscii().Equals("ALL") ) Export::SetLanguages( aMergeDataFile.GetLanguages() ); aLanguages = Export::GetLanguages(); @@ -295,7 +295,7 @@ BOOL LngParser::Merge( if ( sNewText.Len()) { ByteString *pLine = pLines->GetObject( nPos ); - + ByteString sText1( sLang ); sText1 += " = \""; sText1 += sNewText; @@ -322,10 +322,10 @@ BOOL LngParser::Merge( if ( nLastLangPos ) { for( unsigned int n = 0; n < aLanguages.size(); n++ ){ sCur = aLanguages[ n ]; - if( //( !sCur.EqualsIgnoreCaseAscii("de") || - //( sCur.EqualsIgnoreCaseAscii("de") && Export::isMergingGermanAllowed( rPrj ) ) ) + if( //( !sCur.EqualsIgnoreCaseAscii("de") || + //( sCur.EqualsIgnoreCaseAscii("de") && Export::isMergingGermanAllowed( rPrj ) ) ) !sCur.EqualsIgnoreCaseAscii("en-US") && !Text[ sCur ].Len() && pEntrys ){ - + ByteString sNewText; pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur, TRUE ); if (( sNewText.Len()) && |