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
21 
22 #include <vcl/wizardmachine.hxx>
23 #include <vcl/button.hxx>
24 #include <vcl/prgsbar.hxx>
25 #include <vcl/weld.hxx>
26 #include <sfx2/basedlgs.hxx>
27 #include <svtools/simptabl.hxx>
28 #include <vcl/headbar.hxx>
29 #include <mailmergehelper.hxx>
30 
31 class SwMailMergeWizard;
32 class SfxPrinter;
33 class SwSendMailDialog;
34 
35 namespace com{ namespace sun{ namespace star{
36  namespace mail{
37  class XMailMessage;
38  }
39 }}}
40 
43 {
45 
46  std::unique_ptr<weld::RadioButton> m_xSaveAsOneRB;
47  std::unique_ptr<weld::RadioButton> m_xSaveIndividualRB;
48  std::unique_ptr<weld::RadioButton> m_xFromRB;
49  std::unique_ptr<weld::SpinButton> m_xFromNF;
50  std::unique_ptr<weld::Label> m_xToFT;
51  std::unique_ptr<weld::SpinButton> m_xToNF;
52  std::unique_ptr<weld::Button> m_xOKButton;
53 
54  DECL_LINK(SaveOutputHdl_Impl, weld::Button& , void);
55  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
56 
57 public:
59  virtual ~SwMMResultSaveDialog() override;
60 };
61 
64 {
66 
67  std::unique_ptr<weld::Label> m_xPrinterFT;
68  std::unique_ptr<weld::ComboBox> m_xPrinterLB;
69  std::unique_ptr<weld::Button> m_xPrinterSettingsPB;
70  std::unique_ptr<weld::RadioButton> m_xPrintAllRB;
71  std::unique_ptr<weld::RadioButton> m_xFromRB;
72  std::unique_ptr<weld::SpinButton> m_xFromNF;
73  std::unique_ptr<weld::Label> m_xToFT;
74  std::unique_ptr<weld::SpinButton> m_xToNF;
75  std::unique_ptr<weld::Button> m_xOKButton;
76 
77  DECL_LINK(PrinterChangeHdl_Impl, weld::ComboBox&, void );
78  DECL_LINK(PrintHdl_Impl, weld::Button&, void);
79  DECL_LINK(PrinterSetupHdl_Impl, weld::Button&, void );
80  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
81 
82  void FillInPrinterSettings();
83 
84 public:
86  virtual ~SwMMResultPrintDialog() override;
87 };
88 
91 {
92  OUString const m_sConfigureMail;
93  OUString m_sCC;
94  OUString m_sBCC;
95  OUString m_sBody;
96 
97  std::unique_ptr<weld::Label> m_xMailToFT;
98  std::unique_ptr<weld::ComboBox> m_xMailToLB;
99  std::unique_ptr<weld::Button> m_xCopyToPB;
100  std::unique_ptr<weld::Label> m_xSubjectFT;
101  std::unique_ptr<weld::Entry> m_xSubjectED;
102  std::unique_ptr<weld::Label> m_xSendAsFT;
103  std::unique_ptr<weld::ComboBox> m_xSendAsLB;
104  std::unique_ptr<weld::Button> m_xSendAsPB;
105  std::unique_ptr<weld::Widget> m_xAttachmentGroup;
106  std::unique_ptr<weld::Entry> m_xAttachmentED;
107  std::unique_ptr<weld::RadioButton> m_xSendAllRB;
108  std::unique_ptr<weld::RadioButton> m_xFromRB;
109  std::unique_ptr<weld::SpinButton> m_xFromNF;
110  std::unique_ptr<weld::Label> m_xToFT;
111  std::unique_ptr<weld::SpinButton> m_xToNF;
112  std::unique_ptr<weld::Button> m_xOKButton;
113 
114  DECL_LINK(CopyToHdl_Impl, weld::Button&, void);
115  DECL_LINK(SendTypeHdl_Impl, weld::ComboBox&, void);
116  DECL_LINK(SendAsHdl_Impl, weld::Button&, void);
117  DECL_LINK(SendDocumentsHdl_Impl, weld::Button&, void);
118  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
119 
120  void FillInEmailSettings();
121 
122 public:
124  virtual ~SwMMResultEmailDialog() override;
125 };
126 
128 {
129  OUString sEMail;
130  OUString sAttachmentURL;
131  OUString sAttachmentName;
132  OUString sMimeType;
133  OUString sSubject;
134  OUString sBodyMimeType;
135  OUString sBodyContent;
136 
137  OUString sCC;
138  OUString sBCC;
139 };
140 struct SwSendMailDialog_Impl;
142 class SwSendMailDialog : public Dialog
143 {
148 
152 
155 
156  OUString const m_sContinue;
157  OUString const m_sStop;
158  OUString const m_sTransferStatus;
159  OUString const m_sErrorStatus;
160  OUString const m_sSendingTo;
161  OUString const m_sCompleted;
162  OUString const m_sFailed;
163 
164  bool m_bCancel;
166 
167  std::unique_ptr<SwSendMailDialog_Impl> m_pImpl;
169  sal_Int32 m_nExpectedCount;
170  sal_Int32 m_nSendCount;
171  sal_Int32 m_nErrorCount;
172 
173  DECL_LINK( StopHdl_Impl, Button*, void );
174  DECL_LINK( CloseHdl_Impl, Button* , void);
175  DECL_STATIC_LINK( SwSendMailDialog, StartSendMails, void*, void );
176  DECL_STATIC_LINK( SwSendMailDialog, StopSendMails, void*, void );
177  DECL_LINK( RemoveThis, Timer*, void );
178 
179  void IterateMails();
180  void SendMails();
181  void UpdateTransferStatus();
182 
183 public:
185  virtual ~SwSendMailDialog() override;
186  virtual void dispose() override;
187 
188  void AddDocument( SwMailDescriptor const & rDesc );
189  void EnableDestruction() {m_bDestructionEnabled = true;}
190  void ShowDialog(sal_Int32 nExpectedCount);
191 
192  void DocumentSent( css::uno::Reference< css::mail::XMailMessage> const & xMessage,
193  bool bResult,
194  const OUString* pError );
195  void AllMailsSent();
196 
197 };
198 #endif
199 
200 /* 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