diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-02-28 03:00:19 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-25 23:04:39 +0200 |
commit | ec5604a76b46176f553bcc12f42c3bdcc825d6cf (patch) | |
tree | 605b60f55fd0b1392dde0679e31d352163b81fc8 /shell | |
parent | 1e09d7274c80165e4af21f8ba26676065aadd369 (diff) |
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.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 5874c76371562c3e2d8564b1fb04df1997091d27)
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/win32/simplemail/senddoc.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |