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 | 820d0e54dddbba2f83a04be247c8098872684630 (patch) | |
tree | 3852b1393016d3498a17b2934eadfd6af875ea5d /shell | |
parent | 6fc3733720699be23fab72eed1cb7599a6e5b6f4 (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 | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 57782071cf..dc31693138 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,14 +157,9 @@ 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 { |