diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-28 11:06:58 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-28 11:06:58 +0000 |
commit | d3dd7087dee2d2df2bc2f001c92217be1fd5f195 (patch) | |
tree | fe74be1492a313ac67fb982193818a7d9efd37c9 /transex3 | |
parent | 3e8d1a814f294dee0d329e59844e918c347c6b2c (diff) |
INTEGRATION: CWS ause037 (1.6.32); FILE MERGED
2005/09/02 11:46:20 ihi 1.6.32.1: #i125412# merge hc2 in common tree
Diffstat (limited to 'transex3')
-rw-r--r-- | transex3/source/helpmerge.cxx | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/transex3/source/helpmerge.cxx b/transex3/source/helpmerge.cxx index a84dbd744eab..2d28705238dd 100644 --- a/transex3/source/helpmerge.cxx +++ b/transex3/source/helpmerge.cxx @@ -4,9 +4,9 @@ * * $RCSfile: helpmerge.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: hr $ $Date: 2005-09-23 14:30:24 $ + * last change: $Author: hr $ $Date: 2005-09-28 12:06:58 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,7 +40,7 @@ #include <algorithm> #include <sys/types.h> #include <sys/stat.h> - +#include <bootstrp/appdef.hxx> /*****************************************************************************/ void HelpParser::FillInFallbacks( LangHashMap& rElem_out, //int nLangIdx_in ){ ByteString sLangIdx_in ){ @@ -381,8 +381,29 @@ bool HelpParser::Merge( ProcessHelp( aLangHM , sCur , pResData , aMergeDataFile ); } - String test( testpath , RTL_TEXTENCODING_ASCII_US ); // check and remove '\\' - file->Write(test); // Always write! + String merged_file( testpath , RTL_TEXTENCODING_ASCII_US ); // check and remove '\\' + + String aTempFile2 = Export::GetTempFile().GetFull(); + DirEntry( aTempFile2 ).Kill(); + aTempFile2.SearchAndReplaceAll( '\\' , '/' ) ; + aTempFile2 = aTempFile2.Copy( aTempFile2.SearchBackward( '/' )+1 , aTempFile2.Len() ); + String merged_file_tmp( testpath , RTL_TEXTENCODING_ASCII_US ); + merged_file_tmp.Append( aTempFile2 ); + merged_file_tmp.Append( String( GetEnv( "INPATH" ) , RTL_TEXTENCODING_ASCII_US ) ); + //String s_merged_file_tmp( merged_file_tmp , RTL_TEXTENCODING_ASCII_US ) ; + + file->Write( merged_file_tmp ); // Always write! + DirEntry present_file( merged_file ); + if( present_file.Exists() ) + { + present_file.Kill(); + } +// printf("DBG: Copy %s to %s\n", ByteString( merged_file_tmp , RTL_TEXTENCODING_ASCII_US ).GetBuffer() , +// ByteString( merged_file , RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); + + DirEntry aSourceFile( merged_file_tmp ); + aSourceFile.MoveTo( merged_file ); + } if( !sUsedTempFile.EqualsIgnoreCaseAscii( "" ) ){ DirEntry aTempFile( sUsedTempFile ); |