LibreOffice Module sw (master)  1
mmoutputtypepage.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include "mmoutputtypepage.hxx"
21 #include <mailmergewizard.hxx>
22 #include <mmconfigitem.hxx>
23 #include <dbui.hrc>
24 #include <strings.hrc>
25 #include <bitmaps.hlst>
26 #include <swtypes.hxx>
27 
28 #include <rtl/ref.hxx>
29 #include <com/sun/star/mail/XSmtpService.hpp>
30 #include <vcl/fixed.hxx>
31 #include <vcl/idle.hxx>
32 #include <vcl/svapp.hxx>
33 #include <vcl/weld.hxx>
34 
35 #include <cmdid.h>
36 #include <swunohelper.hxx>
37 #include <mmresultdialogs.hxx>
38 #include <maildispatcher.hxx>
39 #include <imaildsplistener.hxx>
40 
41 using namespace ::com::sun::star;
42 
44  : vcl::OWizardPage(pParent, "modules/swriter/ui/mmoutputtypepage.ui", "MMOutputTypePage")
45  , m_pWizard(pWizard)
46  , m_xLetterRB(m_xBuilder->weld_radio_button("letter"))
47  , m_xMailRB(m_xBuilder->weld_radio_button("email"))
48  , m_xLetterHint(m_xBuilder->weld_label("letterft"))
49  , m_xMailHint(m_xBuilder->weld_label("emailft"))
50 {
52  m_xLetterRB->connect_toggled(aLink);
53  m_xMailRB->connect_toggled(aLink);
54 
56  if(rConfigItem.IsOutputToLetter())
57  m_xLetterRB->set_active(true);
58  else
59  m_xMailRB->set_active(true);
60  TypeHdl_Impl(*m_xLetterRB);
61 }
62 
64 {
65 }
66 
68 {
69  bool bLetter = m_xLetterRB->get_active();
70  m_xLetterHint->set_visible(bLetter);
71  m_xMailHint->set_visible(!bLetter);
72  m_pWizard->GetConfigItem().SetOutputToLetter(bLetter);
73  m_pWizard->UpdateRoadmap();
74 }
75 
77 {
78  friend class SwSendMailDialog;
79  ::osl::Mutex aDescriptorMutex;
80 
81  std::vector< SwMailDescriptor > aDescriptors;
82  sal_uInt32 nCurrentDescriptor;
85  uno::Reference< mail::XMailService > xConnectedInMailService;
87 
89  nCurrentDescriptor(0)
90  {
91  aRemoveIdle.SetPriority(TaskPriority::LOWEST);
92  }
93 
95  {
96  // Shutdown must be called when the last reference to the
97  // mail dispatcher will be released in order to force a
98  // shutdown of the mail dispatcher thread.
99  // 'join' with the mail dispatcher thread leads to a
100  // deadlock (SolarMutex).
101  if( xMailDispatcher.is() && !xMailDispatcher->isShutdownRequested() )
102  xMailDispatcher->shutdown();
103  }
105 };
106 
108 {
109  ::osl::MutexGuard aGuard(aDescriptorMutex);
110  if(nCurrentDescriptor < aDescriptors.size())
111  {
113  return &aDescriptors[nCurrentDescriptor - 1];
114  }
115  return nullptr;
116 }
117 
119 {
121 
122 public:
123  explicit SwMailDispatcherListener_Impl(SwSendMailDialog& rParentDlg);
124 
125  virtual void started(::rtl::Reference<MailDispatcher> xMailDispatcher) override;
126  virtual void stopped(::rtl::Reference<MailDispatcher> xMailDispatcher) override;
127  virtual void idle(::rtl::Reference<MailDispatcher> xMailDispatcher) override;
128  virtual void mailDelivered(::rtl::Reference<MailDispatcher> xMailDispatcher,
129  uno::Reference< mail::XMailMessage> xMailMessage) override;
130  virtual void mailDeliveryError(::rtl::Reference<MailDispatcher> xMailDispatcher,
131  uno::Reference< mail::XMailMessage> xMailMessage, const OUString& sErrorMessage) override;
132 
133  static void DeleteAttachments( uno::Reference< mail::XMailMessage > const & xMessage );
134 };
135 
137  m_pSendMailDialog(&rParentDlg)
138 {
139 }
140 
142 {
143 }
144 
146  ::rtl::Reference<MailDispatcher> /*xMailDispatcher*/)
147 {
148 }
149 
151 {
152  SolarMutexGuard aGuard;
155 }
156 
158  ::rtl::Reference<MailDispatcher> /*xMailDispatcher*/,
159  uno::Reference< mail::XMailMessage> xMailMessage)
160 {
161  SolarMutexGuard aGuard;
163  m_pSendMailDialog->DocumentSent( xMailMessage, true, nullptr );
164  DeleteAttachments( xMailMessage );
165 }
166 
168  ::rtl::Reference<MailDispatcher> /*xMailDispatcher*/,
169  uno::Reference< mail::XMailMessage> xMailMessage,
170  const OUString& sErrorMessage)
171 {
172  SolarMutexGuard aGuard;
174  m_pSendMailDialog->DocumentSent( xMailMessage, false, &sErrorMessage );
175  DeleteAttachments( xMailMessage );
176 }
177 
178 void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMailMessage > const & xMessage )
179 {
180  const uno::Sequence< mail::MailAttachment > aAttachments = xMessage->getAttachments();
181 
182  for(const auto& rAttachment : aAttachments)
183  {
184  try
185  {
186  uno::Reference< beans::XPropertySet > xTransferableProperties( rAttachment.Data, uno::UNO_QUERY_THROW);
187  OUString sURL;
188  xTransferableProperties->getPropertyValue("URL") >>= sURL;
189  if(!sURL.isEmpty())
191  }
192  catch (const uno::Exception&)
193  {
194  }
195  }
196 }
197 
199 {
200  std::unique_ptr<weld::TextView> m_xDetailED;
201 public:
202  SwSendWarningBox_Impl(weld::Window* pParent, const OUString& rDetails)
203  : MessageDialogController(pParent, "modules/swriter/ui/warnemaildialog.ui", "WarnEmailDialog", "grid")
204  , m_xDetailED(m_xBuilder->weld_text_view("errors"))
205  {
206  m_xDetailED->set_size_request(80 * m_xDetailED->get_approximate_digit_width(),
207  8 * m_xDetailED->get_text_height());
208  m_xDetailED->set_text(rDetails);
209  }
210 };
211 
212 #define ITEMID_TASK 1
213 #define ITEMID_STATUS 2
214 
216  Dialog(pParent, "SendMailsDialog", "modules/swriter/ui/mmsendmails.ui"),
217  m_pTransferStatus(get<FixedText>("transferstatus")),
218  m_pPaused(get<FixedText>("paused")),
219  m_pProgressBar(get<ProgressBar>("progress")),
220  m_pErrorStatus(get<FixedText>("errorstatus")),
221  m_pContainer(get<SvSimpleTableContainer>("container")),
222  m_pStop(get<PushButton>("stop")),
223  m_pClose(get<PushButton>("cancel")),
224  m_sContinue(SwResId( ST_CONTINUE )),
225  m_sStop(m_pStop->GetText()),
226  m_sTransferStatus(m_pTransferStatus->GetText()),
227  m_sErrorStatus( m_pErrorStatus->GetText()),
228  m_sSendingTo( SwResId(ST_SENDINGTO )),
229  m_sCompleted( SwResId(ST_COMPLETED )),
230  m_sFailed( SwResId(ST_FAILED )),
231  m_bCancel(false),
232  m_bDestructionEnabled(false),
233  m_pImpl(new SwSendMailDialog_Impl),
234  m_pConfigItem(&rConfigItem),
235  m_nExpectedCount(0),
236  m_nSendCount(0),
237  m_nErrorCount(0)
238 {
239  Size aSize = m_pContainer->LogicToPixel(Size(226, 80), MapMode(MapUnit::MapAppFont));
240  m_pContainer->set_width_request(aSize.Width());
241  m_pContainer->set_height_request(aSize.Height());
244 
245  OUString sTask(SwResId(ST_TASK));
246  OUString sStatus(SwResId(ST_STATUS));
247 
248  m_pStop->SetClickHdl(LINK( this, SwSendMailDialog, StopHdl_Impl));
249  m_pClose->SetClickHdl(LINK( this, SwSendMailDialog, CloseHdl_Impl));
250 
251  long nPos1 = aSize.Width()/3 * 2;
252  long nPos2 = aSize.Width()/3;
254  nPos1,
255  HeaderBarItemBits::LEFT );
257  nPos2,
258  HeaderBarItemBits::LEFT );
259 
260  static long nTabs[] = {0, nPos1};
261  m_pStatus->SetStyle( m_pStatus->GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
262  m_pStatus->SetSelectionMode( SelectionMode::Single );
263  m_pStatus->SetTabs(SAL_N_ELEMENTS(nTabs), nTabs, MapUnit::MapPixel);
264  m_pStatus->SetSpaceBetweenEntries(3);
265 
266  m_pPaused->Show(false);
268 }
269 
271 {
272  disposeOnce();
273 }
274 
276 {
277  if(m_pImpl->xMailDispatcher.is())
278  {
279  try
280  {
281  if(m_pImpl->xMailDispatcher->isStarted())
282  m_pImpl->xMailDispatcher->stop();
283  if(m_pImpl->xConnectedInMailService.is() && m_pImpl->xConnectedInMailService->isConnected())
284  m_pImpl->xConnectedInMailService->disconnect();
285 
286  uno::Reference<mail::XMailMessage> xMessage =
287  m_pImpl->xMailDispatcher->dequeueMailMessage();
288  while(xMessage.is())
289  {
291  xMessage = m_pImpl->xMailDispatcher->dequeueMailMessage();
292  }
293  }
294  catch (const uno::Exception&)
295  {
296  }
297  }
298  m_pImpl.reset();
301  m_pPaused.clear();
305  m_pStatusHB.clear();
306  m_pStop.clear();
307  m_pClose.clear();
308 
309  Dialog::dispose();
310 }
311 
313 {
314  ::osl::MutexGuard aGuard(m_pImpl->aDescriptorMutex);
315  m_pImpl->aDescriptors.push_back(rDesc);
316  // if the dialog is already running then continue sending of documents
317  if(m_pImpl->xMailDispatcher.is())
318  {
319  IterateMails();
320  }
321 }
322 
323 IMPL_LINK( SwSendMailDialog, StopHdl_Impl, Button*, pButton, void )
324 {
325  m_bCancel = true;
326  if(m_pImpl->xMailDispatcher.is())
327  {
328  if(m_pImpl->xMailDispatcher->isStarted())
329  {
330  m_pImpl->xMailDispatcher->stop();
331  pButton->SetText(m_sContinue);
332  m_pPaused->Show();
333  }
334  else
335  {
336  m_pImpl->xMailDispatcher->start();
337  pButton->SetText(m_sStop);
338  m_pPaused->Show(false);
339  }
340  }
341 }
342 
343 IMPL_LINK_NOARG(SwSendMailDialog, CloseHdl_Impl, Button*, void)
344 {
345  Dialog::Show( false );
346 
347  if ( m_bDestructionEnabled )
348  disposeOnce();
349  else
350  {
351  m_pImpl->aRemoveIdle.SetInvokeHandler( LINK( this, SwSendMailDialog, RemoveThis ) );
352  m_pImpl->aRemoveIdle.Start();
353  }
354 }
355 
356 IMPL_STATIC_LINK( SwSendMailDialog, StartSendMails, void*, pDialog, void )
357 {
358  static_cast<SwSendMailDialog*>(pDialog)->SendMails();
359 }
360 
361 IMPL_LINK( SwSendMailDialog, RemoveThis, Timer*, pTimer, void )
362 {
363  if( m_pImpl->xMailDispatcher.is() )
364  {
365  if(m_pImpl->xMailDispatcher->isStarted())
366  m_pImpl->xMailDispatcher->stop();
367  if(!m_pImpl->xMailDispatcher->isShutdownRequested())
368  m_pImpl->xMailDispatcher->shutdown();
369  }
370 
371  if( m_bDestructionEnabled &&
372  (!m_pImpl->xMailDispatcher.is() ||
373  !m_pImpl->xMailDispatcher->isRunning()))
374  {
375  disposeOnce();
376  }
377  else
378  {
379  pTimer->Start();
380  }
381 }
382 
383 IMPL_STATIC_LINK( SwSendMailDialog, StopSendMails, void*, p, void )
384 {
385  SwSendMailDialog* pDialog = static_cast<SwSendMailDialog*>(p);
386  if(pDialog->m_pImpl->xMailDispatcher.is() &&
387  pDialog->m_pImpl->xMailDispatcher->isStarted())
388  {
389  pDialog->m_pImpl->xMailDispatcher->stop();
390  pDialog->m_pStop->SetText(pDialog->m_sContinue);
391  pDialog->m_pPaused->Show();
392  }
393 }
394 
396 {
397  if(!m_pConfigItem)
398  {
399  OSL_FAIL("config item not set");
400  return;
401  }
402  EnterWait();
403  //get a mail server connection
404  uno::Reference< mail::XSmtpService > xSmtpServer =
406  m_pImpl->xConnectedInMailService,
407  OUString(), OUString(), GetFrameWeld());
408  bool bIsLoggedIn = xSmtpServer.is() && xSmtpServer->isConnected();
409  LeaveWait();
410  if(!bIsLoggedIn)
411  {
412  OSL_FAIL("create error message");
413  return;
414  }
415  m_pImpl->xMailDispatcher.set( new MailDispatcher(xSmtpServer));
416  IterateMails();
417  m_pImpl->xMailListener = new SwMailDispatcherListener_Impl(*this);
418  m_pImpl->xMailDispatcher->addListener(m_pImpl->xMailListener);
419  if(!m_bCancel)
420  {
421  m_pImpl->xMailDispatcher->start();
422  }
423 }
424 
426 {
427  const SwMailDescriptor* pCurrentMailDescriptor = m_pImpl->GetNextDescriptor();
428  while( pCurrentMailDescriptor )
429  {
430  if(!SwMailMergeHelper::CheckMailAddress( pCurrentMailDescriptor->sEMail ))
431  {
432  Image aInsertImg(StockImage::Yes, RID_BMP_FORMULA_CANCEL);
433 
434  OUString sMessage = m_sSendingTo;
435  OUString sTmp(pCurrentMailDescriptor->sEMail);
436  sTmp += "\t";
437  sTmp += m_sFailed;
438  m_pStatus->InsertEntry( sMessage.replaceFirst("%1", sTmp), aInsertImg, aInsertImg);
439  ++m_nSendCount;
440  ++m_nErrorCount;
442  pCurrentMailDescriptor = m_pImpl->GetNextDescriptor();
443  continue;
444  }
445  SwMailMessage* pMessage = new SwMailMessage;
446  uno::Reference< mail::XMailMessage > xMessage = pMessage;
449  pMessage->addRecipient( pCurrentMailDescriptor->sEMail );
452  if(!pCurrentMailDescriptor->sAttachmentURL.isEmpty())
453  {
454  mail::MailAttachment aAttach;
455  aAttach.Data =
456  new SwMailTransferable(
457  pCurrentMailDescriptor->sAttachmentURL,
458  pCurrentMailDescriptor->sAttachmentName,
459  pCurrentMailDescriptor->sMimeType );
460  aAttach.ReadableName = pCurrentMailDescriptor->sAttachmentName;
461  pMessage->addAttachment( aAttach );
462  }
463  pMessage->setSubject( pCurrentMailDescriptor->sSubject );
464  uno::Reference< datatransfer::XTransferable> xBody =
465  new SwMailTransferable(
466  pCurrentMailDescriptor->sBodyContent,
467  pCurrentMailDescriptor->sBodyMimeType);
468  pMessage->setBody( xBody );
469 
470  //CC and BCC are tokenized by ';'
471  if(!pCurrentMailDescriptor->sCC.isEmpty())
472  {
473  sal_Int32 nPos = 0;
474  do
475  {
476  OUString sTmp = pCurrentMailDescriptor->sCC.getToken( 0, ';', nPos );
477  if( !sTmp.isEmpty() )
478  pMessage->addCcRecipient( sTmp );
479  }
480  while (nPos >= 0);
481  }
482  if(!pCurrentMailDescriptor->sBCC.isEmpty())
483  {
484  sal_Int32 nPos = 0;
485  do
486  {
487  OUString sTmp = pCurrentMailDescriptor->sBCC.getToken( 0, ';', nPos );
488  if( !sTmp.isEmpty() )
489  pMessage->addBccRecipient( sTmp );
490  }
491  while (nPos >= 0);
492  }
493  m_pImpl->xMailDispatcher->enqueueMailMessage( xMessage );
494  pCurrentMailDescriptor = m_pImpl->GetNextDescriptor();
495  }
497 }
498 
499 void SwSendMailDialog::ShowDialog(sal_Int32 nExpectedCount)
500 {
502  StartSendMails ), this, true );
503  m_nExpectedCount = nExpectedCount > 0 ? nExpectedCount : 1;
504  Dialog::Show();
505 }
506 
507 void SwSendMailDialog::DocumentSent( uno::Reference< mail::XMailMessage> const & xMessage,
508  bool bResult,
509  const OUString* pError )
510 {
511  //sending should stop on send errors
512  if(pError &&
513  m_pImpl->xMailDispatcher.is() && m_pImpl->xMailDispatcher->isStarted())
514  {
516  StopSendMails ), this, true );
517  }
518  Image aInsertImg(StockImage::Yes, bResult ? OUString(RID_BMP_FORMULA_APPLY) : OUString(RID_BMP_FORMULA_CANCEL));
519 
520  OUString sMessage = m_sSendingTo;
521  OUString sTmp(xMessage->getRecipients()[0]);
522  sTmp += "\t";
523  sTmp += bResult ? m_sCompleted : m_sFailed;
524  m_pStatus->InsertEntry( sMessage.replaceFirst("%1", sTmp), aInsertImg, aInsertImg);
525  ++m_nSendCount;
526  if(!bResult)
527  ++m_nErrorCount;
528 
530 
531  if (pError)
532  {
533  SwSendWarningBox_Impl aDlg(GetFrameWeld(), *pError);
534  (void)aDlg.run();
535  }
536 }
537 
539 {
540  OUString sStatus( m_sTransferStatus );
541  sStatus = sStatus.replaceFirst("%1", OUString::number(m_nSendCount) );
542  sStatus = sStatus.replaceFirst("%2", OUString::number(m_nExpectedCount));
543  m_pTransferStatus->SetText(sStatus);
544 
545  sStatus = m_sErrorStatus.replaceFirst("%1", OUString::number(m_nErrorCount) );
546  m_pErrorStatus->SetText(sStatus);
547 
548  if (!m_pImpl->aDescriptors.empty())
549  {
550  assert(m_nExpectedCount && "div-by-zero");
551  m_pProgressBar->SetValue(static_cast<sal_uInt16>(m_nSendCount * 100 / m_nExpectedCount));
552  }
553  else
555 }
556 
558 {
559  // Leave open if some kind of error occurred
561  {
562  m_pStop->Enable( false );
563  Dialog::Show( false );
564  }
565 }
566 
567 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
OUString const m_sTransferStatus
long Width() const
SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem &)
virtual void SAL_CALL setBody(const css::uno::Reference< css::datatransfer::XTransferable > &_body) override
OUString sMessage
void SetValue(sal_uInt16 nNewPercent)
void ShowDialog(sal_Int32 nExpectedCount)
uno::Reference< mail::XSmtpService > ConnectToSmtpServer(SwMailMergeConfigItem const &rConfigItem, uno::Reference< mail::XMailService > &rxInMailService, const OUString &rInMailServerPassword, const OUString &rOutMailServerPassword, weld::Window *pDialogParentWindow)
SwMailMergeConfigItem & GetConfigItem()
virtual void SetTabs() override
void SetClickHdl(const Link< Button *, void > &rLink)
OUString const m_sContinue
OUString const & GetMailAddress() const
long Height() const
IMPL_LINK(SwSendMailDialog, StopHdl_Impl, Button *, pButton, void)
OUString const m_sFailed
std::unique_ptr< SwSendMailDialog_Impl > m_pImpl
void EnterWait()
void disposeAndClear()
MailDispatcher listener interface.
std::unique_ptr< weld::Builder > m_xBuilder
VclPtr< SvSimpleTableContainer > m_pContainer
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
virtual void idle(::rtl::Reference< MailDispatcher > xMailDispatcher) override
Called when there are no more mail messages to deliver.
sal_Int32 m_nExpectedCount
bool UCB_DeleteFile(const OUString &rURL)
Definition: swunohelper.cxx:59
::rtl::Reference< IMailDispatcherListener > xMailListener
weld::Window * GetFrameWeld() const
VclPtr< FixedText > m_pPaused
virtual void dispose() override
void Enable(bool bEnable=true, bool bChild=true)
WinBits const WB_HSCROLL
VclPtr< SvSimpleTable > m_pStatus
VclPtr< HeaderBar > m_pStatusHB
void InsertItem(sal_uInt16 nItemId, const OUString &rText, long nSize, HeaderBarItemBits nBits=HeaderBarItemBits::STDSTYLE, sal_uInt16 nPos=HEADERBAR_APPEND)
virtual ~SwMailMergeOutputTypePage() override
void SetSenderName(const OUString &rSenderName)
#define SAL_N_ELEMENTS(arr)
HeaderBar & GetTheHeaderBar()
OUString const m_sErrorStatus
std::vector< SwMailDescriptor > aDescriptors
void AddDocument(SwMailDescriptor const &rDesc)
SwMailMergeOutputTypePage(SwMailMergeWizard *pWizard, TabPageParent pParent)
VclPtr< SwSendMailDialog > m_pSendMailDialog
void DocumentSent(css::uno::Reference< css::mail::XMailMessage > const &xMessage, bool bResult, const OUString *pError)
virtual void SetText(const OUString &rStr) override
VclPtr< FixedText > m_pTransferStatus
VclPtr< PushButton > m_pClose
virtual void SAL_CALL addCcRecipient(const OUString &sRecipientAddress) override
OUString const m_sCompleted
OUString const & GetMailReplyTo() const
std::unique_ptr< weld::RadioButton > m_xMailRB
OUString SwResId(const char *pId)
Definition: swmodule.cxx:191
VclPtr< ProgressBar > m_pProgressBar
VclPtr< PushButton > m_pStop
WinBits const WB_SORT
SwSendWarningBox_Impl(weld::Window *pParent, const OUString &rDetails)
const SwMailDescriptor * GetNextDescriptor()
IMPL_STATIC_LINK(SwSendMailDialog, StartSendMails, void *, pDialog, void)
std::unique_ptr< weld::TextView > m_xDetailED
SwMailMergeWizard * m_pWizard
virtual void SAL_CALL addRecipient(const OUString &sRecipientAddress) override
OUString const & GetMailDisplayName() const
virtual void started(::rtl::Reference< MailDispatcher > xMailDispatcher) override
Called when the MailDispatcher is started.
virtual void stopped(::rtl::Reference< MailDispatcher > xMailDispatcher) override
Called when the MailDispatcher is stopped.
virtual void dispose() override
virtual void mailDeliveryError(::rtl::Reference< MailDispatcher > xMailDispatcher, uno::Reference< mail::XMailMessage > xMailMessage, const OUString &sErrorMessage) override
OUString const m_sSendingTo
virtual void mailDelivered(::rtl::Reference< MailDispatcher > xMailDispatcher, uno::Reference< mail::XMailMessage > xMailMessage) override
static void DeleteAttachments(uno::Reference< mail::XMailMessage > const &xMessage)
#define ITEMID_STATUS
virtual void SAL_CALL addBccRecipient(const OUString &sRecipientAddress) override
virtual void SAL_CALL setReplyToAddress(const OUString &_replytoaddress) override
static VclPtr< reference_type > Create(Arg &&...arg)
#define ITEMID_TASK
virtual short run()
SwMailMergeConfigItem *const m_pConfigItem
SwMailDispatcherListener_Impl(SwSendMailDialog &rParentDlg)
VclPtr< FixedText > m_pErrorStatus
WinBits const WB_TABSTOP
virtual void SAL_CALL addAttachment(const css::mail::MailAttachment &aMailAttachment) override
bool CheckMailAddress(const OUString &rMailAddress)
void SetPriority(TaskPriority ePriority)
std::unique_ptr< weld::RadioButton > m_xLetterRB
IMPL_LINK_NOARG(SwMailMergeOutputTypePage, TypeHdl_Impl, weld::ToggleButton &, void)
A MailDispatcher should be used for sending a bunch a mail messages asynchronously.
void LeaveWait()
virtual void SAL_CALL setSubject(const OUString &_subject) override
bool IsMailReplyTo() const
sal_Int32 nPos
::rtl::Reference< MailDispatcher > xMailDispatcher
WinBits const WB_CLIPCHILDREN
virtual ~SwSendMailDialog() override
bool isDisposed() const
uno::Reference< mail::XMailService > xConnectedInMailService
void SetSenderAddress(const OUString &rSenderAddress)
bool IsOutputToLetter() const
MessageDialogController(weld::Widget *pParent, const OUString &rUIFile, const OString &rDialogId, const OString &rRelocateId=OString())
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo