sw/source/ui/dbui/mmoutputtypepage.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
New commits: commit 2d9f12be1530f2532276a2447102ed2f1f0ecb5b Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Tue Apr 5 10:06:51 2022 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Tue Apr 5 17:01:16 2022 +0200 tdf#148384: Really leave mail merge results dialog open upon errors Restructuring mail merge in 5.2 cycle had broken the dialog keeping open when errors happened during sending. Later, in 2017, in commit bfaa6e35ff09a0426d2c3c9c36f069fabc0c9489 Author Alex McMurchy1917 <mcmurchy1917-libreoff...@yahoo.co.uk> Date Thu Aug 24 14:34:13 2017 +0100 tdf#103919 mailmerge: prevent premature end of emailing SwSendMailDialog::AllMailsSent was changed in attempt to restore that expected behavior, but the condition was incorrect: m_nSendCount == m_nExpectedCount means "all mails processed", not "everything went without errors". So fix this by considering the error count when deciding to close the dialog. Change-Id: I98d61165803deaf0da985167ba0152e6f50f9246 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132563 Tested-by: Mike Kaganski <mike.kagan...@collabora.com> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index 449f1575e253..b14586e58246 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -514,12 +514,15 @@ void SwSendMailDialog::UpdateTransferStatus() void SwSendMailDialog::AllMailsSent() { - // Leave open if some kind of error occurred if (m_nSendCount == m_nExpectedCount) { m_xStop->set_sensitive(false); - m_xDialog->hide(); - m_xDialog->response(RET_CANCEL); + // Leave open if some kind of error occurred + if (m_nErrorCount == 0) + { + m_xDialog->hide(); + m_xDialog->response(RET_CANCEL); + } } }