shell/source/win32/simplemail/senddoc.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 5874c76371562c3e2d8564b1fb04df1997091d27
Author: Mike Kaganski <mike.kagan...@collabora.com>
Date:   Wed Feb 28 03:00:19 2018 +0300

    tdf#116074: Use modeless dialogs with supporting mailers
    
    When sending mail using MS Outlook, our UI gets locked until user
    closes the Outlook's compose message window.
    
    This patch uses Outlook 2013+ option to show modeless window.
    
    Change-Id: Ib99b4440cd20a8bff0c7cd96838b31a2d14bd804
    Reviewed-on: https://gerrit.libreoffice.org/50476
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/shell/source/win32/simplemail/senddoc.cxx 
b/shell/source/win32/simplemail/senddoc.cxx
index f3fe6112b4eb..0e1d0859bcc2 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -119,6 +119,9 @@ void initAttachmentList(MapiAttachmentList_t* 
pMapiAttachmentList)
         MapiFileDescW mfd;
         ZeroMemory(&mfd, sizeof(mfd));
         mfd.lpszPathName = const_cast<wchar_t*>(attachment.c_str());
+        // This is required for Outlook 2013 - otherwise using 
MAPI_DIALOG_MODELESS results in MAPI_E_FAILURE
+        // See 
http://peach.ease.lsoft.com/scripts/wa-PEACH.exe?A2=MAPI-L;d2bf3060.1604
+        mfd.lpszFileName = L"";
         mfd.nPosition = sal::static_int_cast<ULONG>(-1);
         pMapiAttachmentList->push_back(mfd);
     }
@@ -190,7 +193,8 @@ void initParameter(int argc, wchar_t* argv[])
 
         if (_wcsicmp(argv[i], L"--mapi-dialog") == 0)
         {
-            gMapiFlags |= MAPI_DIALOG;
+            // Outlook 2013+; for earlier versions this equals to MAPI_DIALOG
+            gMapiFlags |= MAPI_DIALOG_MODELESS;
         }
         else if (_wcsicmp(argv[i], L"--mapi-logon-ui") == 0)
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to