[Libreoffice-commits] core.git: shell/source

Aron Budea baron at caesar.elte.hu
Fri Feb 6 15:59:35 PST 2015


 shell/source/win32/simplemail/senddoc.cxx |   49 +++++++++++++-----------------
 1 file changed, 22 insertions(+), 27 deletions(-)

New commits:
commit 7ce1e0e1ecbb1b3ec5e3cc15306a9df7e786c564
Author: Aron Budea <baron at caesar.elte.hu>
Date:   Mon Dec 22 06:23:46 2014 +0100

    fdo#43368 Remove MapiLogon/Logoff calls so simplemail works with WLM
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>
    
    Conflicts:
    	shell/source/win32/simplemail/senddoc.cxx
    
    Change-Id: I31cac063ffb4afbfde068558ebcf5f66ea34d1a8

diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index 37c5377..10a0775 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -263,40 +263,35 @@ int main(int argc, char* argv[])
         // is installed as Exchange and Mail Client a Profile
         // selection dialog must appear because we specify no
         // profile name, so the user has to specify a profile
-        FLAGS flFlag = MAPI_NEW_SESSION | MAPI_LOGON_UI;
-        LHANDLE hSession;
-        ulRet = mapi.MAPILogon(0, NULL, NULL, flFlag, 0L, &hSession);
 
-        if (ulRet == SUCCESS_SUCCESS)
-        {
-            MapiRecipDesc mapiOriginator;
-            MapiRecipientList_t mapiRecipientList;
-            MapiAttachmentList_t mapiAttachmentList;
-            MapiMessage mapiMsg;
+        LHANDLE hSession = 0;
 
-            initMapiOriginator(&mapiOriginator);
-            initRecipientList(&mapiRecipientList);
-            initAttachmentList(&mapiAttachmentList);
-            initMapiMessage((gFrom.length() ? &mapiOriginator : NULL), mapiRecipientList, mapiAttachmentList, &mapiMsg);
+        MapiRecipDesc mapiOriginator;
+        MapiRecipientList_t mapiRecipientList;
+        MapiAttachmentList_t mapiAttachmentList;
+        MapiMessage mapiMsg;
 
-            ulRet = mapi.MAPISendMail(hSession, 0, &mapiMsg, gMapiFlags, 0);
+        initMapiOriginator(&mapiOriginator);
+        initRecipientList(&mapiRecipientList);
+        initAttachmentList(&mapiAttachmentList);
+        initMapiMessage((gFrom.length() ? &mapiOriginator : NULL), mapiRecipientList, mapiAttachmentList, &mapiMsg);
 
-            // There is no point in treating an aborted mail sending
-            // dialog as an error to be returned as our exit
-            // status. If the user decided to abort sending a document
-            // as mail, OK, that is not an error.
+        ulRet = mapi.MAPISendMail(hSession, 0, &mapiMsg, gMapiFlags, 0);
 
-            // Also, it seems that GroupWise makes MAPISendMail()
-            // return MAPI_E_USER_ABORT even if the mail sending
-            // dialog was not aborted by the user, and the mail was
-            // actually sent just fine. See bnc#660241 (visible to
-            // Novell people only, sorry).
+        // There is no point in treating an aborted mail sending
+        // dialog as an error to be returned as our exit
+        // status. If the user decided to abort sending a document
+        // as mail, OK, that is not an error.
 
-            if (ulRet == MAPI_E_USER_ABORT)
-                ulRet = SUCCESS_SUCCESS;
+        // Also, it seems that GroupWise makes MAPISendMail()
+        // return MAPI_E_USER_ABORT even if the mail sending
+        // dialog was not aborted by the user, and the mail was
+        // actually sent just fine. See bnc#660241 (visible to
+        // Novell people only, sorry).
+
+        if (ulRet == MAPI_E_USER_ABORT)
+            ulRet = SUCCESS_SUCCESS;
 
-            mapi.MAPILogoff(hSession, 0, 0, 0);
-        }
     }
     catch (const std::runtime_error&
     #if OSL_DEBUG_LEVEL > 0


More information about the Libreoffice-commits mailing list