diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-08-30 16:30:15 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-08-30 16:30:15 +0000 |
commit | b31c911daf362f6fdc4da205c8d5242f8bea5914 (patch) | |
tree | d0f9233e7fe3bc664e24a70b4a8e1cc9a91b3d3c /transex3/source/export.cxx | |
parent | 88269a256653d22750c466f0d7ad4a0f35c85822 (diff) |
INTEGRATION: CWS help2 (1.37.6); FILE MERGED
2004/08/16 22:10:26 ihi 1.37.6.4: RESYNC: (1.38-1.40); FILE MERGED
2004/07/13 16:49:09 ihi 1.37.6.3: #104752# Forced Language switch
2004/07/07 17:23:37 ihi 1.37.6.2: RESYNC: (1.37-1.38); FILE MERGED
2004/05/18 16:32:32 ihi 1.37.6.1: Assertion log fix / mergebuild join
Diffstat (limited to 'transex3/source/export.cxx')
-rw-r--r-- | transex3/source/export.cxx | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/transex3/source/export.cxx b/transex3/source/export.cxx index cb5ad7772cc7..acce0798e254 100644 --- a/transex3/source/export.cxx +++ b/transex3/source/export.cxx @@ -2,9 +2,9 @@ * * $RCSfile: export.cxx,v $ * - * $Revision: 1.40 $ + * $Revision: 1.41 $ * - * last change: $Author: hr $ $Date: 2004-08-02 16:24:59 $ + * last change: $Author: kz $ $Date: 2004-08-30 17:30:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -132,6 +132,7 @@ extern char *GetOutputFile( int argc, char* argv[]) sPrjRoot = ""; sActFileName = ""; Export::sLanguages = ""; + Export::sForcedLanguages = ""; sTempFile = ""; pTempFile = NULL; bQuiet = false; @@ -678,7 +679,6 @@ int Export::Execute( int nToken, char * pToken ) if ( nOpen < nClose ) bExecuteDown = TRUE; } -// printf("sTOKEN = '%s'\n",sToken.GetBuffer()); switch ( nToken ) { case NORMDEFINE: @@ -1267,6 +1267,17 @@ void Export::CutComment( ByteString &rText ) } } +void Export::UnmergeUTF8( ByteString& sOrig ){ + int nPos1 = sOrig.Search('\"'); + int nPos2 = sOrig.SearchBackward('\"'); + if( nPos1 > 0 && nPos2 > 0 && nPos1 < nPos2){ + ByteString sPart = sOrig.Copy(nPos1+1 , nPos2-1); + ByteString sPartUTF8 = sPart; + sPartUTF8.Convert( RTL_TEXTENCODING_MS_1252 , RTL_TEXTENCODING_UTF8 ); + sOrig.SearchAndReplace( sPart , sPartUTF8 ); + } +} + /*****************************************************************************/ BOOL Export::ListExists( ResData *pResData, USHORT nLst ) /*****************************************************************************/ @@ -1302,6 +1313,12 @@ BOOL Export::WriteData( ResData *pResData, BOOL bCreateNew ) if ( bUnmerge ) return TRUE; +/* ByteStringHashMap::iterator pos3 = pResData->sText.begin(); + ByteStringHashMap::iterator end3 = pResData->sText.end(); + for(;pos3!=end3;++pos3){ + + printf("[%s]=%s\n", pos3->first.GetBuffer(), pos3->second.GetBuffer() ); + }*/ // mandatory to export: german and eng. and/or enus if (( pResData->sText[ ByteString("de") ].Len() && @@ -1718,6 +1735,9 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent ) if ( !bDontWriteOutput || !bUnmerge ) { ByteString sText( rText ); + // Ivo + //sText.SearchAndReplace( "[ ENGLISH ] =" , "[ en ] ="); + //sText.SearchAndReplace( "[ English ] =" , "[ en ] ="); while ( sText.SearchAndReplace( " \n", "\n" ) != STRING_NOTFOUND ) {}; if( pParseQueue->bNextIsM && bSDFContent && sText.Len() > 2 ){ for( int n = 0 ; n < sText.Len() ; n++ ){ |