tdf#148384: Really leave mail merge results dialog open upon errors
commitac165ad008d820dc102f98569f8bb9b6653b852d
authorMike Kaganski <mike.kaganski@collabora.com>
Tue, 5 Apr 2022 07:06:51 +0000 (5 10:06 +0300)
committerMichael Stahl <michael.stahl@allotropia.de>
Wed, 6 Apr 2022 08:33:14 +0000 (6 10:33 +0200)
tree3092f9b8ecc9510ddeea5850eadba65f2ae88dc8
parent2d1bd913d9f896d55c03dd509eb11c81667c5436
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-libreoffice@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.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 2d9f12be1530f2532276a2447102ed2f1f0ecb5b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132598
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
sw/source/ui/dbui/mmoutputtypepage.cxx