[Libreoffice-commits] .: shell/source

Tor Lillqvist tml at kemper.freedesktop.org
Tue Jan 11 08:52:31 PST 2011


 shell/source/win32/simplemail/senddoc.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit ac7c887941632f51f7260e945aa04239a3599919
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Tue Jan 11 18:50:54 2011 +0200

    Treat MAPI_E_USER_ABORT as success (bnc#660241)

diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index 76aa7cc..93e6d36 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -301,6 +301,20 @@ int main(int argc, char* argv[])
             
             ulRet = mapi.MAPISendMail(hSession, 0, &mapiMsg, gMapiFlags, 0);  
                   
+            // 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.
+
+            // 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);
         }            
     }


More information about the Libreoffice-commits mailing list