LibreOffice Module sw (master)  1
mmresultdialogs.hxx
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 #ifndef INCLUDED_SW_SOURCE_UI_DBUI_MMOUTPUTPAGE_HXX
20 #define INCLUDED_SW_SOURCE_UI_DBUI_MMOUTPUTPAGE_HXX
22 #include <vcl/button.hxx>
23 #include <vcl/layout.hxx>
24 #include <vcl/field.hxx>
25 #include <vcl/prgsbar.hxx>
26 #include <vcl/weld.hxx>
27 #include <sfx2/objsh.hxx>
28 #include <sfx2/basedlgs.hxx>
29 #include <svtools/simptabl.hxx>
30 #include <vcl/svtabbx.hxx>
31 #include <vcl/headbar.hxx>
32 #include <mailmergehelper.hxx>
33 
34 class SwMailMergeWizard;
35 class SfxPrinter;
36 class SwSendMailDialog;
37 
38 namespace com{ namespace sun{ namespace star{
39  namespace mail{
40  class XMailMessage;
41  }
42 }}}
43 
46 {
48 
49  std::unique_ptr<weld::RadioButton> m_xSaveAsOneRB;
50  std::unique_ptr<weld::RadioButton> m_xSaveIndividualRB;
51  std::unique_ptr<weld::RadioButton> m_xFromRB;
52  std::unique_ptr<weld::SpinButton> m_xFromNF;
53  std::unique_ptr<weld::Label> m_xToFT;
54  std::unique_ptr<weld::SpinButton> m_xToNF;
55  std::unique_ptr<weld::Button> m_xOKButton;
56 
57  DECL_LINK(SaveOutputHdl_Impl, weld::Button& , void);
58  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
59 
60 public:
62  virtual ~SwMMResultSaveDialog() override;
63 };
64 
67 {
69 
70  std::unique_ptr<weld::Label> m_xPrinterFT;
71  std::unique_ptr<weld::ComboBox> m_xPrinterLB;
72  std::unique_ptr<weld::Button> m_xPrinterSettingsPB;
73  std::unique_ptr<weld::RadioButton> m_xPrintAllRB;
74  std::unique_ptr<weld::RadioButton> m_xFromRB;
75  std::unique_ptr<weld::SpinButton> m_xFromNF;
76  std::unique_ptr<weld::Label> m_xToFT;
77  std::unique_ptr<weld::SpinButton> m_xToNF;
78  std::unique_ptr<weld::Button> m_xOKButton;
79 
80  DECL_LINK(PrinterChangeHdl_Impl, weld::ComboBox&, void );
81  DECL_LINK(PrintHdl_Impl, weld::Button&, void);
82  DECL_LINK(PrinterSetupHdl_Impl, weld::Button&, void );
83  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
84 
85  void FillInPrinterSettings();
86 
87 public:
89  virtual ~SwMMResultPrintDialog() override;
90 };
91 
94 {
95  OUString const m_sConfigureMail;
96  OUString m_sCC;
97  OUString m_sBCC;
98  OUString m_sBody;
99 
100  std::unique_ptr<weld::Label> m_xMailToFT;
101  std::unique_ptr<weld::ComboBox> m_xMailToLB;
102  std::unique_ptr<weld::Button> m_xCopyToPB;
103  std::unique_ptr<weld::Label> m_xSubjectFT;
104  std::unique_ptr<weld::Entry> m_xSubjectED;
105  std::unique_ptr<weld::Label> m_xSendAsFT;
106  std::unique_ptr<weld::ComboBox> m_xSendAsLB;
107  std::unique_ptr<weld::Button> m_xSendAsPB;
108  std::unique_ptr<weld::Widget> m_xAttachmentGroup;
109  std::unique_ptr<weld::Entry> m_xAttachmentED;
110  std::unique_ptr<weld::RadioButton> m_xSendAllRB;
111  std::unique_ptr<weld::RadioButton> m_xFromRB;
112  std::unique_ptr<weld::SpinButton> m_xFromNF;
113  std::unique_ptr<weld::Label> m_xToFT;
114  std::unique_ptr<weld::SpinButton> m_xToNF;
115  std::unique_ptr<weld::Button> m_xOKButton;
116 
117  DECL_LINK(CopyToHdl_Impl, weld::Button&, void);
118  DECL_LINK(SendTypeHdl_Impl, weld::ComboBox&, void);
119  DECL_LINK(SendAsHdl_Impl, weld::Button&, void);
120  DECL_LINK(SendDocumentsHdl_Impl, weld::Button&, void);
121  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
122 
123  void FillInEmailSettings();
124 
125 public:
127  virtual ~SwMMResultEmailDialog() override;
128 };
129 
131 {
132  OUString sEMail;
133  OUString sAttachmentURL;
134  OUString sAttachmentName;
135  OUString sMimeType;
136  OUString sSubject;
137  OUString sBodyMimeType;
138  OUString sBodyContent;
139 
140  OUString sCC;
141  OUString sBCC;
142 };
143 struct SwSendMailDialog_Impl;
145 class SwSendMailDialog : public Dialog
146 {
151 
155 
158 
159  OUString const m_sContinue;
160  OUString const m_sStop;
161  OUString const m_sTransferStatus;
162  OUString const m_sErrorStatus;
163  OUString const m_sSendingTo;
164  OUString const m_sCompleted;
165  OUString const m_sFailed;
166 
167  bool m_bCancel;
169 
170  std::unique_ptr<SwSendMailDialog_Impl> m_pImpl;
172  sal_Int32 m_nExpectedCount;
173  sal_Int32 m_nSendCount;
174  sal_Int32 m_nErrorCount;
175 
176  DECL_LINK( StopHdl_Impl, Button*, void );
177  DECL_LINK( CloseHdl_Impl, Button* , void);
178  DECL_STATIC_LINK( SwSendMailDialog, StartSendMails, void*, void );
179  DECL_STATIC_LINK( SwSendMailDialog, StopSendMails, void*, void );
180  DECL_LINK( RemoveThis, Timer*, void );
181 
182  void IterateMails();
183  void SendMails();
184  void UpdateTransferStatus();
185 
186 public:
188  virtual ~SwSendMailDialog() override;
189  virtual void dispose() override;
190 
191  void AddDocument( SwMailDescriptor const & rDesc );
192  void EnableDestruction() {m_bDestructionEnabled = true;}
193  void ShowDialog(sal_Int32 nExpectedCount);
194 
195  void DocumentSent( css::uno::Reference< css::mail::XMailMessage> const & xMessage,
196  bool bResult,
197  const OUString* pError );
198  void AllMailsSent();
199 
200 };
201 #endif
202 
203 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
VclPtr< Printer > m_pTempPrinter
OUString const m_sTransferStatus
SwMMResultPrintDialog(weld::Window *pParent)
std::unique_ptr< weld::RadioButton > m_xFromRB
SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem &)
SwMMResultSaveDialog(weld::Window *pParent)
std::unique_ptr< weld::SpinButton > m_xToNF
void ShowDialog(sal_Int32 nExpectedCount)
OUString const m_sContinue
OUString const m_sFailed
std::unique_ptr< SwSendMailDialog_Impl > m_pImpl
std::unique_ptr< weld::SpinButton > m_xToNF
std::unique_ptr< weld::SpinButton > m_xFromNF
VclPtr< SvSimpleTableContainer > m_pContainer
sal_Int32 m_nExpectedCount
std::unique_ptr< weld::Button > m_xOKButton
OUString const m_sConfigureMail
std::unique_ptr< weld::Button > m_xCopyToPB
VclPtr< FixedText > m_pPaused
SwMMResultEmailDialog(weld::Window *pParent)
std::unique_ptr< weld::RadioButton > m_xSendAllRB
std::unique_ptr< weld::Entry > m_xSubjectED
DECL_LINK(SaveOutputHdl_Impl, weld::Button &, void)
VclPtr< SvSimpleTable > m_pStatus
DECL_LINK(PrinterChangeHdl_Impl, weld::ComboBox &, void)
VclPtr< HeaderBar > m_pStatusHB
std::unique_ptr< weld::Button > m_xOKButton
DECL_LINK(CopyToHdl_Impl, weld::Button &, void)
virtual ~SwMMResultEmailDialog() override
std::unique_ptr< weld::Label > m_xSubjectFT
std::unique_ptr< weld::Widget > m_xAttachmentGroup
OUString const m_sErrorStatus
std::unique_ptr< weld::RadioButton > m_xFromRB
Dialog implementing the printing of the result document.
std::unique_ptr< weld::ComboBox > m_xPrinterLB
void AddDocument(SwMailDescriptor const &rDesc)
void DocumentSent(css::uno::Reference< css::mail::XMailMessage > const &xMessage, bool bResult, const OUString *pError)
VclPtr< FixedText > m_pTransferStatus
OUString const m_sStop
VclPtr< PushButton > m_pClose
OUString const m_sCompleted
std::unique_ptr< weld::Entry > m_xAttachmentED
VclPtr< ProgressBar > m_pProgressBar
Dialog implementing the sending as email of the result document.
VclPtr< PushButton > m_pStop
std::unique_ptr< weld::Button > m_xOKButton
std::unique_ptr< weld::Label > m_xSendAsFT
std::unique_ptr< weld::Button > m_xSendAsPB
std::unique_ptr< weld::Label > m_xToFT
std::unique_ptr< weld::ComboBox > m_xSendAsLB
std::unique_ptr< weld::Label > m_xToFT
DECL_LINK(StopHdl_Impl, Button *, void)
virtual void dispose() override
std::unique_ptr< weld::Label > m_xToFT
Dialog implementing the saving as of the result document.
OUString const m_sSendingTo
std::unique_ptr< weld::Label > m_xPrinterFT
SwMailMergeConfigItem *const m_pConfigItem
VclPtr< FixedText > m_pErrorStatus
std::unique_ptr< weld::ComboBox > m_xMailToLB
std::unique_ptr< weld::Button > m_xPrinterSettingsPB
std::unique_ptr< weld::SpinButton > m_xFromNF
std::unique_ptr< weld::SpinButton > m_xToNF
std::unique_ptr< weld::Label > m_xMailToFT
virtual ~SwMMResultSaveDialog() override
std::unique_ptr< weld::SpinButton > m_xFromNF
std::unique_ptr< weld::RadioButton > m_xSaveIndividualRB
std::unique_ptr< weld::RadioButton > m_xPrintAllRB
virtual ~SwSendMailDialog() override
virtual ~SwMMResultPrintDialog() override
std::unique_ptr< weld::RadioButton > m_xFromRB
DECL_STATIC_LINK(SwSendMailDialog, StartSendMails, void *, void)
std::unique_ptr< weld::RadioButton > m_xSaveAsOneRB