diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-03-25 17:19:23 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-03-25 17:19:23 +0100 |
commit | 2f528025b20854cf918d95f6781b5e2052ddf929 (patch) | |
tree | 59cc51c7af6b3f5aa274f11f619d9bee3870d577 /l10ntools | |
parent | f099cd4586bf41f30dea8190dbd2bd7b4234cf60 (diff) |
cws l10ntooling18: #i109622# try to auto fix bad quote
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/inc/export.hxx | 2 | ||||
-rw-r--r-- | l10ntools/source/export.cxx | 12 | ||||
-rw-r--r-- | l10ntools/source/merge.cxx | 16 |
3 files changed, 24 insertions, 6 deletions
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index 13fad506b54d..d1474503882f 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -461,6 +461,8 @@ public: bTitleFirst[ nId ] = true; } BOOL GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE ); + BOOL GetTransex3Text( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE ); + }; // 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/merge.cxx b/l10ntools/source/merge.cxx index 3284b7026107..ace119da106c 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( int idx = 0; idx < rReturn.Len(); idx++ ) + { + if( rReturn.GetChar( idx ) == '\"' && ( idx-1 > 0 ) && 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 ) |