summaryrefslogtreecommitdiff
path: root/sw/source/ui/inc
diff options
context:
space:
mode:
authorAlex McMurchy1917 <mcmurchy1917-libreoffice@yahoo.co.uk>2017-08-24 14:34:13 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-02-13 14:58:53 +0100
commitbfaa6e35ff09a0426d2c3c9c36f069fabc0c9489 (patch)
treed886a6b2836d0a4165f33185caa38e3b4c98fa7a /sw/source/ui/inc
parent8da3121ac36e7bdc3297bf9aa4786d672a869c9d (diff)
tdf#103919 mailmerge: prevent premature end of emailing
...by changing the parent of SwSendMailDialog. The destruction of the main dialog (SwMMResultEmailDialog) also closes the progress dlg (SwSendMailDialog), which shuts down the dispatcher stopping anymore messages from being sent. Have changed the parent of progress dlg such that it will not close when the main dialog is closed. This has allowed the main dialog to be closed immediately after the progress dialog had been created making for a cleaner ui. There were problems with the timer causing LO to consistently crash during the dispose of OutputDevice, but I could find no logical reason for the crashes. (It didn't crash if smtp authentication failed. It also didn't crash when run in gdb...) Moving the exit code from StateChanged to CloseHdl magically fixed the crashing problem. I think it makes it a bit clearer to end in closeHdl anyway, and start the timer only in case of an early cancellation (before all the mail messages have been queued up). This eliminates MOST of the use of the timer - since the typical exit occurs after the email process has finished. Change-Id: Icd3af372772fab3e78eb0702b120d7a811baa6bd Reviewed-on: https://gerrit.libreoffice.org/41519 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source/ui/inc')
-rw-r--r--sw/source/ui/inc/mmresultdialogs.hxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/ui/inc/mmresultdialogs.hxx b/sw/source/ui/inc/mmresultdialogs.hxx
index d892c8a9244a..01e89826372c 100644
--- a/sw/source/ui/inc/mmresultdialogs.hxx
+++ b/sw/source/ui/inc/mmresultdialogs.hxx
@@ -162,7 +162,7 @@ struct SwMailDescriptor
};
struct SwSendMailDialog_Impl;
class SwMailMergeConfigItem;
-class SwSendMailDialog : public ModelessDialog //SfxModalDialog
+class SwSendMailDialog : public Dialog
{
VclPtr<FixedText> m_pTransferStatus;
VclPtr<FixedText> m_pPaused;
@@ -189,6 +189,7 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
SwSendMailDialog_Impl* m_pImpl;
SwMailMergeConfigItem* m_pConfigItem;
+ sal_Int32 m_nExpectedCount;
sal_Int32 m_nSendCount;
sal_Int32 m_nErrorCount;
@@ -202,8 +203,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
void SendMails();
void UpdateTransferStatus();
- virtual void StateChanged( StateChangedType nStateChange ) override;
-
public:
SwSendMailDialog( vcl::Window* pParent, SwMailMergeConfigItem& );
virtual ~SwSendMailDialog() override;
@@ -211,7 +210,7 @@ public:
void AddDocument( SwMailDescriptor const & rDesc );
void EnableDestruction() {m_bDestructionEnabled = true;}
- void ShowDialog();
+ void ShowDialog(sal_Int32 nExpectedCount);
void DocumentSent( css::uno::Reference< css::mail::XMailMessage> const & xMessage,
bool bResult,