Kaydet (Commit) 9277dc75 authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS cov2src (1.49.36); FILE MERGED

2005/10/18 08:36:08 rt 1.49.36.1: #126234# Join MWS COV680 m4 into SRC680
üst 8a9d865b
......@@ -4,9 +4,9 @@
*
* $RCSfile: officeipcthread.cxx,v $
*
* $Revision: 1.49 $
* $Revision: 1.50 $
*
* last change: $Author: rt $ $Date: 2005-09-08 17:11:52 $
* last change: $Author: rt $ $Date: 2005-10-19 12:20:26 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
......@@ -72,6 +72,9 @@
#ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
#include <svtools/moduleoptions.hxx>
#endif
#ifndef _RTL_BOOTSTRAP_HXX_
#include <rtl/bootstrap.hxx>
#endif
#include <comphelper/processfactory.hxx>
#include <com/sun/star/uri/XExternalUriReferenceTranslator.hpp>
......@@ -325,7 +328,41 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
// First we try to create our pipe if this fails we try to connect. We have to do this
// in a loop because the the other office can crash or shutdown between createPipe
// and connectPipe!!
OUString aUserInstallPathHashCode = CreateMD5FromString( aDummy );
OUString aIniName;
aInfo.getExecutableFile( aIniName );
sal_uInt32 lastIndex = aIniName.lastIndexOf('/');
if ( lastIndex > 0 )
{
aIniName = aIniName.copy( 0, lastIndex+1 );
aIniName += OUString( RTL_CONSTASCII_USTRINGPARAM( "perftune" ));
#ifdef WNT
aIniName += OUString( RTL_CONSTASCII_USTRINGPARAM( ".ini" ));
#else
aIniName += OUString( RTL_CONSTASCII_USTRINGPARAM( "rc" ));
#endif
}
::rtl::Bootstrap aPerfTuneIniFile( aIniName );
OUString aDefault( RTL_CONSTASCII_USTRINGPARAM( "0" ));
OUString aPreloadData;
aPerfTuneIniFile.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "FastPipeCommunication" )), aPreloadData, aDefault );
OUString aUserInstallPathHashCode;
if ( aPreloadData.equalsAscii( "1" ))
{
sal_Char szBuffer[32];
sprintf( szBuffer, "%d", SUPD );
aUserInstallPathHashCode = OUString( szBuffer, strlen(szBuffer), osl_getThreadTextEncoding() );
}
else
aUserInstallPathHashCode = CreateMD5FromString( aDummy );
// Check result to create a hash code from the user install path
if ( aUserInstallPathHashCode.getLength() == 0 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment