summaryrefslogtreecommitdiff
path: root/shell/source/win32/simplemail/smplmailclient.cxx
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2012-10-16 20:28:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-07 13:40:25 +0100
commita47a153a7f75edfe3bce33f0d34b723cbd2d5195 (patch)
treec13f6f5bafbb11026a193e0bfff07a371764598e /shell/source/win32/simplemail/smplmailclient.cxx
parentd371248b8eab5cbdc22221603c0587066240223a (diff)
Resolves: #i93995# Allow setting Body of a simple mail message
(cherry picked from commit 093977b1171fae4eaef13a6d32929451fc64ae66) Conflicts: offapi/com/sun/star/system/makefile.mk shell/source/cmdmail/cmdmailmsg.cxx shell/source/cmdmail/cmdmailmsg.hxx shell/source/win32/simplemail/smplmailclient.cxx shell/source/win32/simplemail/smplmailclient.hxx shell/source/win32/simplemail/smplmailmsg.hxx shell/source/win32/simplemail/smplmailsuppl.hxx Change-Id: Ief1aefee32a6750dfed96476d2968ce76b038440
Diffstat (limited to 'shell/source/win32/simplemail/smplmailclient.cxx')
-rw-r--r--shell/source/win32/simplemail/smplmailclient.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx
index 9db17ce8347c..5a9b30de840f 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -23,6 +23,7 @@
#include "smplmailclient.hxx"
#include "smplmailmsg.hxx"
#include <com/sun/star/system/SimpleMailClientFlags.hpp>
+#include <com/sun/star/system/XSimpleMailMessage2.hpp>
#include <osl/file.hxx>
#define WIN32_LEAN_AND_MEAN
@@ -38,6 +39,7 @@
#include <process.h>
#include <vector>
+using css::uno::UNO_QUERY;
using css::uno::Reference;
using css::uno::Exception;
using css::uno::RuntimeException;
@@ -46,6 +48,7 @@ using css::lang::IllegalArgumentException;
using css::system::XSimpleMailClient;
using css::system::XSimpleMailMessage;
+using css::system::XSimpleMailMessage2;
using css::system::SimpleMailClientFlags::NO_USER_INTERFACE;
using css::system::SimpleMailClientFlags::NO_LOGON_DIALOG;
@@ -56,6 +59,7 @@ const OUString CC("--cc");
const OUString BCC("--bcc");
const OUString FROM("--from");
const OUString SUBJECT("--subject");
+const OUString BODY("--body");
const OUString ATTACH("--attach");
const OUString FLAG_MAPI_DIALOG("--mapi-dialog");
const OUString FLAG_MAPI_LOGON_UI("--mapi-logon-ui");
@@ -175,6 +179,17 @@ void CSmplMailClient::assembleCommandLine(
{
OSL_ENSURE(rCommandArgs.empty(), "Provided command argument buffer not empty");
+ Reference<XSimpleMailMessage2> xMessage( xSimpleMailMessage, UNO_QUERY );
+ if (xMessage.is())
+ {
+ OUString body = xMessage->getBody();
+ if (body.getLength()>0)
+ {
+ rCommandArgs.push_back(BODY);
+ rCommandArgs.push_back(body);
+ }
+ }
+
OUString to = xSimpleMailMessage->getRecipient();
if (to.getLength() > 0)
{