summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-02-27 23:40:15 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-03-07 04:30:15 +0100
commit2f061dad7f875f704e3744fc5780c1d145b22e9f (patch)
treedb50657571c682aaa520a87d522fce158c567ea3 /include
parentbec51fdb04bf25b9d670982dccab728c55c83fdf (diff)
tdf#116074: Don't block on sending email interactively
When sending e-mail using a MAPI mail client that doesn't recognize MAPI_DIALOG_MODELESS flag, and doesn't return from MAPISendMail until message compose dialog is closed (like MS Outlook 2010 and older), waiting for the senddoc process blocks UI, which is unexpected and prevents users from copying stuff from documents to the mail body. Waiting for senddoc process completion is used for two things: 1. To serialize sending multiple mails (e.g., using mailmerge); 2. To show error in case when it failed. This patch allows to avoid blocking the UI in case when compose UI is requested - i.e., user interaction with the mail client is expected, and serialization is not required. In this case, the senddoc process will show the error message itself -> no need for main application to wait for its return. The error message now includes actual error code. To avoid cases when closing main program would remove temporary attachment files before they were used by mail client, they are copied to base temporary directory (instead of default session temporary directory that gets deleted upon program shutdown). senddoc cleans up its temporaries itself. The temporary attachment files are copied to files with ASCII-only filenames, and their original filenames are passed to mail clients using MAPI. This allows to avoid cases when the filenames contain characters outside of current Windows codepage, and the mail client does not support Unicode MAPI, thus receiving wrong filename and erroring out from the send. Change-Id: I4a517bd7a797e76e4c0b7ea48bb1a7b652741a81 Reviewed-on: https://gerrit.libreoffice.org/50826 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/strings.hrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 4e8346b209a5..e5532815f63e 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -234,6 +234,9 @@
#define STR_PRINT_NEWORISIZE NC_("STR_PRINT_NEWORISIZE", "The page size and orientation have been modified.\nWould you like to save the new settings in the\nactive document?")
#define STR_CANT_CLOSE NC_("STR_CANT_CLOSE", "The document cannot be closed because a\n print job is being carried out.")
#define STR_ERROR_SEND_MAIL NC_("STR_ERROR_SEND_MAIL", "An error occurred in sending the message. Possible errors could be a missing user account or a defective setup.\nPlease check the %PRODUCTNAME settings or your e-mail program settings.")
+// Error codes look like "MAPI_E_FAILURE" or "1234"
+#define STR_ERROR_SEND_MAIL_CODE NC_("STR_ERROR_SEND_MAIL_CODE", "An error occurred in sending the message. Possible errors could be a missing user account or a defective setup.\n\nError code is $1")
+#define STR_ERROR_SEND_MAIL_HEADER NC_("STR_ERROR_SEND_MAIL_HEADER", "Error sending mail")
#define STR_QUERY_OPENASTEMPLATE NC_("STR_QUERY_OPENASTEMPLATE", "This document cannot be edited, possibly due to missing access rights. Do you want to edit a copy of the document?")
#define STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE NC_("STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE", "This document cannot be edited, because it is locked in another session. Do you want to edit a copy of the document?\n\nYou can also try to ignore the lock and open the file for editing.")
#define STR_QUERY_OPENASTEMPLATE_OPENCOPY_BTN NC_("STR_QUERY_OPENASTEMPLATE_OPENCOPY_BTN", "Open ~Copy")