diff options
author | Joachim Lingner <jl@openoffice.org> | 2010-06-22 09:36:55 +0200 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2010-06-22 09:36:55 +0200 |
commit | 02db8f758ee7b9e8f4538312ffdc2f79f4df3c12 (patch) | |
tree | fcd4fe719b9c12244d52d01a1c0140dfbaae0c0e /l10ntools/source | |
parent | 79dc6b2d075493f49875ea0a1308849fdc7a43d9 (diff) | |
parent | 7f0993d43019a0ccb7f89c11fc23704c063b902f (diff) |
jl152 merge with DEV300_m83
Diffstat (limited to 'l10ntools/source')
-rw-r--r-- | l10ntools/source/export.cxx | 12 | ||||
-rw-r--r-- | l10ntools/source/help/HelpLinker.cxx | 2 | ||||
-rw-r--r-- | l10ntools/source/localize.cxx | 15 | ||||
-rw-r--r-- | l10ntools/source/merge.cxx | 16 |
4 files changed, 35 insertions, 10 deletions
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index a3df11c2920b..59f29525eda4 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -2096,7 +2096,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp, } ByteString sContent; - pEntrys->GetText( sContent, nTyp, nLangIndex ); + pEntrys->GetTransex3Text( sContent, nTyp, nLangIndex ); //if ( !sContent.Len() && ( ! nLangIndex.EqualsIgnoreCaseAscii("en-US") )) { if ( !sContent.Len() && ( ! Export::isSourceLanguage( nLangIndex ) )) { rText = sOrigText; @@ -2158,7 +2158,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) sCur = aLanguages[ n ]; ByteString sText; - BOOL bText = pEntry->GetText( sText, STRING_TYP_TEXT, sCur , TRUE ); + BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , TRUE ); if ( bText && sText.Len() && sText != "-" ) { ByteString sOutput; if ( bNextMustBeDefineEOL) { @@ -2211,7 +2211,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) sCur = aLanguages[ n ]; ByteString sText; - BOOL bText = pEntry->GetText( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE ); + BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE ); if ( bText && sText.Len() && sText != "-" ) { ByteString sOutput; if ( bNextMustBeDefineEOL) { @@ -2258,7 +2258,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) sCur = aLanguages[ n ]; ByteString sText; - BOOL bText = pEntry->GetText( sText, STRING_TYP_TITLE, sCur, TRUE ); + BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, TRUE ); if ( bText && sText.Len() && sText != "-" ) { ByteString sOutput; if ( bNextMustBeDefineEOL) { @@ -2343,9 +2343,9 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) //printf("Lang %s, List Index %d\n",sCur.GetBuffer(),(int)nLIndex); ByteString sText; BOOL bText; - bText = pEntrys->GetText( sText, STRING_TYP_TEXT, sCur, TRUE ); + bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, TRUE ); if( !bText ) - bText = pEntrys->GetText( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE ); + bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE ); // Use fallback, if data is missing in sdf file //if( !bText && pResData->sResTyp.Equals( "pairedlist" ) ){ diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx index e270a525393d..94139f89de1e 100644 --- a/l10ntools/source/help/HelpLinker.cxx +++ b/l10ntools/source/help/HelpLinker.cxx @@ -1104,7 +1104,7 @@ HELPLINKER_DLLPUBLIC bool compileExtensionHelp args.push_back(std::string( argv[i]) ); for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp ) - delete argv[iXhp + 3]; + delete[] argv[iXhp + 3]; delete[] argv; rtl::OString aOExtensionLanguageRoot = rtl::OUStringToOString( aExtensionLanguageRoot, fs::getThreadTextEncoding() ); diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index b869098faed7..1d1428ff2dc0 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -66,6 +66,7 @@ const char *ExeTable[][5] = { { "xcs", "cfgex", "-UTF8 -e -f", "negative", "iso" }, { "xrm", "xrmex", "-UTF8 -e", "negative", "iso" }, { "xhp", "helpex", " -e", "negative", "noiso" }, + //{ "properties", "jpropex", " -e", "negative", "noiso" }, { "NULL", "NULL", "NULL", "NULL", "NULL" } }; @@ -959,8 +960,16 @@ int _cdecl main( int argc, char *argv[] ) aIter.SetLanguageRestriction( sLanguages ); if ( bExport ){ if( bQuiet2 ){ /*printf("");*/fflush( stdout );} - aIter.Extract( sFileName ); - if( bQuiet2 ){ printf("\n %d files found!\n",aIter.GetFileCnt());} + if( *iter == "ooo" ) + aIter.Extract( sFileName ); + else + { + ByteString sFileNameWithExt( sFileName ); + sFileNameWithExt += ByteString( "." ); + sFileNameWithExt += ByteString( (*iter).c_str() ); + aIter.Extract( sFileNameWithExt ); + } + if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());} } } if( hasPwd ) @@ -973,7 +982,7 @@ int _cdecl main( int argc, char *argv[] ) if ( bExport ){ if( bQuiet2 ){ /*printf("");*/fflush( stdout );} aIter.Extract( sFileName ); - if( bQuiet2 ){ printf("\n %d files found!\n",aIter.GetFileCnt());} + if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());} } } diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index 3284b7026107..e15a5c8a28fa 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -50,6 +50,22 @@ ByteString PFormEntrys::Dump(){ return sRet; } +BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn, + USHORT nTyp, const ByteString &nLangIndex, BOOL bDel ) +{ + BOOL rc = GetText( rReturn , nTyp , nLangIndex , bDel ); + ByteString test( rReturn ); + for( USHORT idx = 0; idx < rReturn.Len(); idx++ ) + { + if( rReturn.GetChar( idx ) == '\"' && ( idx >= 1 ) && rReturn.GetChar( idx-1 ) == '\\' ) + { + rReturn.Erase( idx-1 , 1 ); + } + } + //if( !rReturn.Equals( test ) ) + // printf("*CHANGED******************\n%s\n%s\n",test.GetBuffer(),rReturn.GetBuffer()); + return rc; +} /*****************************************************************************/ BOOL PFormEntrys::GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel ) |