2f061dad7f
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>
28 lines
737 B
Makefile
28 lines
737 B
Makefile
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
|
|
$(eval $(call gb_Executable_Executable,senddoc))
|
|
|
|
$(eval $(call gb_Executable_use_system_win32_libs,senddoc,\
|
|
kernel32 \
|
|
))
|
|
|
|
$(eval $(call gb_Executable_use_sdk_api,senddoc))
|
|
|
|
$(eval $(call gb_Executable_use_libraries,senddoc,\
|
|
i18nlangtag \
|
|
sal \
|
|
utl \
|
|
))
|
|
|
|
$(eval $(call gb_Executable_add_exception_objects,senddoc,\
|
|
shell/source/win32/simplemail/senddoc \
|
|
))
|
|
|
|
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
|