tdf#148384: Really leave mail merge results dialog open upon errors
commit2d9f12be1530f2532276a2447102ed2f1f0ecb5b
authorMike Kaganski <mike.kaganski@collabora.com>
Tue, 5 Apr 2022 07:06:51 +0000 (5 10:06 +0300)
committerMike Kaganski <mike.kaganski@collabora.com>
Tue, 5 Apr 2022 15:01:16 +0000 (5 17:01 +0200)
tree82b44f1f1d9625c38451d96ee308d9fd5a804fc9
parent304be70b5b082ac4854dadc9e6a7c15075dd28b2
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>
sw/source/ui/dbui/mmoutputtypepage.cxx