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/weld.hxx>
23 #include <vcl/print.hxx>
24 #include <sfx2/basedlgs.hxx>
25 #include <mailmergehelper.hxx>
26 
27 class SwMailMergeWizard;
28 class SfxPrinter;
29 class SwSendMailDialog;
30 namespace com::sun::star::mail { class XMailMessage; }
31 
32 
35 {
37 
38  std::unique_ptr<weld::RadioButton> m_xSaveAsOneRB;
39  std::unique_ptr<weld::RadioButton> m_xSaveIndividualRB;
40  std::unique_ptr<weld::RadioButton> m_xFromRB;
41  std::unique_ptr<weld::SpinButton> m_xFromNF;
42  std::unique_ptr<weld::Label> m_xToFT;
43  std::unique_ptr<weld::SpinButton> m_xToNF;
44  std::unique_ptr<weld::Button> m_xOKButton;
45 
46  DECL_LINK(SaveOutputHdl_Impl, weld::Button& , void);
47  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
48 
49 public:
51  virtual ~SwMMResultSaveDialog() override;
52 };
53 
56 {
58 
59  std::unique_ptr<weld::Label> m_xPrinterFT;
60  std::unique_ptr<weld::ComboBox> m_xPrinterLB;
61  std::unique_ptr<weld::Button> m_xPrinterSettingsPB;
62  std::unique_ptr<weld::RadioButton> m_xPrintAllRB;
63  std::unique_ptr<weld::RadioButton> m_xFromRB;
64  std::unique_ptr<weld::SpinButton> m_xFromNF;
65  std::unique_ptr<weld::Label> m_xToFT;
66  std::unique_ptr<weld::SpinButton> m_xToNF;
67  std::unique_ptr<weld::Button> m_xOKButton;
68 
69  DECL_LINK(PrinterChangeHdl_Impl, weld::ComboBox&, void );
70  DECL_LINK(PrintHdl_Impl, weld::Button&, void);
71  DECL_LINK(PrinterSetupHdl_Impl, weld::Button&, void );
72  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
73 
74  void FillInPrinterSettings();
75 
76 public:
78  virtual ~SwMMResultPrintDialog() override;
79 };
80 
83 {
84  OUString m_sConfigureMail;
85  OUString m_sCC;
86  OUString m_sBCC;
87  OUString m_sBody;
88 
89  std::unique_ptr<weld::Label> m_xMailToFT;
90  std::unique_ptr<weld::ComboBox> m_xMailToLB;
91  std::unique_ptr<weld::Button> m_xCopyToPB;
92  std::unique_ptr<weld::Label> m_xSubjectFT;
93  std::unique_ptr<weld::Entry> m_xSubjectED;
94  std::unique_ptr<weld::Label> m_xSendAsFT;
95  std::unique_ptr<weld::ComboBox> m_xSendAsLB;
96  std::unique_ptr<weld::Button> m_xSendAsPB;
97  std::unique_ptr<weld::Widget> m_xAttachmentGroup;
98  std::unique_ptr<weld::Entry> m_xAttachmentED;
99  std::unique_ptr<weld::Label> m_xPasswordFT;
100  std::unique_ptr<weld::ComboBox> m_xPasswordLB;
101  std::unique_ptr<weld::CheckButton> m_xPasswordCB;
102  std::unique_ptr<weld::RadioButton> m_xSendAllRB;
103  std::unique_ptr<weld::RadioButton> m_xFromRB;
104  std::unique_ptr<weld::SpinButton> m_xFromNF;
105  std::unique_ptr<weld::Label> m_xToFT;
106  std::unique_ptr<weld::SpinButton> m_xToNF;
107  std::unique_ptr<weld::Button> m_xOKButton;
108 
109  DECL_LINK(CopyToHdl_Impl, weld::Button&, void);
110  DECL_LINK(SendTypeHdl_Impl, weld::ComboBox&, void);
111  DECL_LINK(SendAsHdl_Impl, weld::Button&, void);
112  DECL_LINK(SendDocumentsHdl_Impl, weld::Button&, void);
113  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
114  DECL_LINK(CheckHdl, weld::ToggleButton&, void );
115 
116  void FillInEmailSettings();
117 
118 public:
120  virtual ~SwMMResultEmailDialog() override;
121 };
122 
124 {
125  OUString sEMail;
126  OUString sAttachmentURL;
127  OUString sAttachmentName;
128  OUString sMimeType;
129  OUString sSubject;
130  OUString sBodyMimeType;
131  OUString sBodyContent;
132 
133  OUString sCC;
134  OUString sBCC;
135 };
136 struct SwSendMailDialog_Impl;
139 {
140  OUString m_sContinue;
141  OUString m_sStop;
143  OUString m_sErrorStatus;
144  OUString m_sSendingTo;
145  OUString m_sCompleted;
146  OUString m_sFailed;
147 
148  bool m_bCancel;
150 
151  std::unique_ptr<SwSendMailDialog_Impl> m_pImpl;
153  sal_Int32 m_nExpectedCount;
154  sal_Int32 m_nSendCount;
155  sal_Int32 m_nErrorCount;
156 
157  std::unique_ptr<weld::Label> m_xTransferStatus;
158  std::unique_ptr<weld::Label> m_xPaused;
159  std::unique_ptr<weld::ProgressBar> m_xProgressBar;
160  std::unique_ptr<weld::Label> m_xErrorStatus;
161  std::unique_ptr<weld::TreeView> m_xStatus;
162  std::unique_ptr<weld::Button> m_xStop;
163  std::unique_ptr<weld::Button> m_xCancel;
164  std::unique_ptr<weld::Expander> m_xExpander;
165 
166  DECL_LINK( StopHdl_Impl, weld::Button&, void );
167  DECL_LINK( CancelHdl_Impl, weld::Button& , void);
168  DECL_STATIC_LINK( SwSendMailDialog, StartSendMails, void*, void );
169  DECL_STATIC_LINK( SwSendMailDialog, StopSendMails, void*, void );
170  DECL_LINK( RemoveThis, Timer*, void );
171 
172  void IterateMails();
173  void SendMails();
174  void UpdateTransferStatus();
175 
176 public:
178  virtual ~SwSendMailDialog() override;
179 
180  void AddDocument( SwMailDescriptor const & rDesc );
181  void EnableDestruction() {m_bDestructionEnabled = true;}
182  void StartSend(sal_Int32 nExpectedCount);
183 
184  void DocumentSent( css::uno::Reference< css::mail::XMailMessage> const & xMessage,
185  bool bResult,
186  const OUString* pError );
187  void AllMailsSent();
188 
189 };
190 #endif
191 
192 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
VclPtr< Printer > m_pTempPrinter
DECL_LINK(StopHdl_Impl, weld::Button &, void)
SwMMResultPrintDialog(weld::Window *pParent)
std::unique_ptr< weld::RadioButton > m_xFromRB
std::unique_ptr< weld::Expander > m_xExpander
SwMMResultSaveDialog(weld::Window *pParent)
std::unique_ptr< weld::SpinButton > m_xToNF
std::unique_ptr< weld::TreeView > m_xStatus
std::unique_ptr< weld::Button > m_xStop
std::unique_ptr< weld::ComboBox > m_xPasswordLB
std::unique_ptr< SwSendMailDialog_Impl > m_pImpl
std::unique_ptr< weld::SpinButton > m_xToNF
std::unique_ptr< weld::SpinButton > m_xFromNF
sal_Int32 m_nExpectedCount
std::unique_ptr< weld::Button > m_xOKButton
std::unique_ptr< weld::Button > m_xCopyToPB
SwSendMailDialog(weld::Window *pParent, SwMailMergeConfigItem &)
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)
DECL_LINK(PrinterChangeHdl_Impl, weld::ComboBox &, void)
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::Button > m_xCancel
std::unique_ptr< weld::Widget > m_xAttachmentGroup
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)
void StartSend(sal_Int32 nExpectedCount)
std::unique_ptr< weld::Entry > m_xAttachmentED
SwMailMergeConfigItem * m_pConfigItem
Dialog implementing the sending as email of the result document.
std::unique_ptr< weld::Label > m_xPasswordFT
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::CheckButton > m_xPasswordCB
std::unique_ptr< weld::Label > m_xToFT
std::unique_ptr< weld::ComboBox > m_xSendAsLB
std::unique_ptr< weld::Label > m_xToFT
std::unique_ptr< weld::Label > m_xTransferStatus
std::unique_ptr< weld::Label > m_xPaused
std::unique_ptr< weld::Label > m_xToFT
Dialog implementing the saving as of the result document.
std::unique_ptr< weld::Label > m_xPrinterFT
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
std::unique_ptr< weld::ProgressBar > m_xProgressBar
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::Label > m_xErrorStatus
std::unique_ptr< weld::RadioButton > m_xFromRB
DECL_STATIC_LINK(SwSendMailDialog, StartSendMails, void *, void)
std::unique_ptr< weld::RadioButton > m_xSaveAsOneRB