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