diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-04-15 13:51:25 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-04-15 13:51:25 +0000 |
commit | 2d891370646495a9e7f5f310c207e296c08fb144 (patch) | |
tree | 84c085ac35762c5ec8bd50b164ef5036c21018b2 /shell | |
parent | b9f9032c06f325f3e8b59450cc69e2f92f3a8aa1 (diff) |
INTEGRATION: CWS obr08 (1.13.116); FILE MERGED
2008/04/09 07:05:51 obr 1.13.116.1: #i88057# senddoc no longer resides beside soffice.bin
Diffstat (limited to 'shell')
-rwxr-xr-x | shell/source/cmdmail/cmdmailsuppl.cxx | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 8cd59175340f..e3f5bbb3dc3f 100755 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: cmdmailsuppl.cxx,v $ - * $Revision: 1.14 $ + * $Revision: 1.15 $ * * This file is part of OpenOffice.org. * @@ -36,7 +36,9 @@ //------------------------------------------------------------------------ #include <osl/diagnose.h> #include <osl/thread.h> -#include <osl/process.h> + +#include <rtl/bootstrap.hxx> + #include <osl/file.hxx> #include <rtl/strbuf.hxx> #include "cmdmailsuppl.hxx" @@ -155,13 +157,8 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM OStringBuffer aBuffer; aBuffer.append("\""); - OUString aProgramURL; - if ( osl_Process_E_None != osl_getExecutableFile(&aProgramURL.pData) ) - { - throw ::com::sun::star::uno::Exception( - OUString(RTL_CONSTASCII_USTRINGPARAM("Cound not determine executable path")), - static_cast < XSimpleMailClient * > (this)); - } + OUString aProgramURL(RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/program/senddoc")); + rtl::Bootstrap::expandMacros(aProgramURL); OUString aProgram; if ( FileBase::E_None != FileBase::getSystemPathFromFileURL(aProgramURL, aProgram)) @@ -171,15 +168,8 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM static_cast < XSimpleMailClient * > (this)); } - // The mail client launchers are expected to be in the same directory as the main - // executable, so prefixing the launchers with the path of the executable including - // the last slash - OString aTmp = OUStringToOString(aProgram, osl_getThreadTextEncoding()); - sal_Int32 nIndex = aTmp.lastIndexOf('/'); - if (nIndex > 0) - aBuffer.append(aTmp.copy(0, nIndex+1)); - - aBuffer.append("senddoc\" "); + aBuffer.append(OUStringToOString(aProgram, osl_getThreadTextEncoding())); + aBuffer.append("\" "); try { |