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 <sfx2/basedlgs.hxx>
25 #include <mailmergehelper.hxx>
26 
27 class SwMailMergeWizard;
28 class SfxPrinter;
29 class SwSendMailDialog;
30 
31 namespace com{ namespace sun{ namespace star{
32  namespace mail{
33  class XMailMessage;
34  }
35 }}}
36 
39 {
41 
42  std::unique_ptr<weld::RadioButton> m_xSaveAsOneRB;
43  std::unique_ptr<weld::RadioButton> m_xSaveIndividualRB;
44  std::unique_ptr<weld::RadioButton> m_xFromRB;
45  std::unique_ptr<weld::SpinButton> m_xFromNF;
46  std::unique_ptr<weld::Label> m_xToFT;
47  std::unique_ptr<weld::SpinButton> m_xToNF;
48  std::unique_ptr<weld::Button> m_xOKButton;
49 
50  DECL_LINK(SaveOutputHdl_Impl, weld::Button& , void);
51  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
52 
53 public:
55  virtual ~SwMMResultSaveDialog() override;
56 };
57 
60 {
62 
63  std::unique_ptr<weld::Label> m_xPrinterFT;
64  std::unique_ptr<weld::ComboBox> m_xPrinterLB;
65  std::unique_ptr<weld::Button> m_xPrinterSettingsPB;
66  std::unique_ptr<weld::RadioButton> m_xPrintAllRB;
67  std::unique_ptr<weld::RadioButton> m_xFromRB;
68  std::unique_ptr<weld::SpinButton> m_xFromNF;
69  std::unique_ptr<weld::Label> m_xToFT;
70  std::unique_ptr<weld::SpinButton> m_xToNF;
71  std::unique_ptr<weld::Button> m_xOKButton;
72 
73  DECL_LINK(PrinterChangeHdl_Impl, weld::ComboBox&, void );
74  DECL_LINK(PrintHdl_Impl, weld::Button&, void);
75  DECL_LINK(PrinterSetupHdl_Impl, weld::Button&, void );
76  DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
77 
78  void FillInPrinterSettings();
79 
80 public:
82  virtual ~SwMMResultPrintDialog() override;
83 };
84 
87 {
88  OUString const m_sConfigureMail;
89  OUString m_sCC;
90  OUString m_sBCC;
91  OUString m_sBody;
92 
93  std::unique_ptr<weld::Label> m_xMailToFT;
94  std::unique_ptr<weld::ComboBox> m_xMailToLB;
95  std::unique_ptr<weld::Button> m_xCopyToPB;
96  std::unique_ptr<weld::Label> m_xSubjectFT;
97  std::unique_ptr<weld::Entry> m_xSubjectED;
98  std::unique_ptr<weld::Label> m_xSendAsFT;
99  std::unique_ptr<weld::ComboBox> m_xSendAsLB;
100  std::unique_ptr<weld::Button> m_xSendAsPB;
101  std::unique_ptr<weld::Widget> m_xAttachmentGroup;
102  std::unique_ptr<weld::Entry> m_xAttachmentED;
103  std::unique_ptr<weld::RadioButton> m_xSendAllRB;
104  std::unique_ptr<weld::RadioButton> m_xFromRB;
105  std::unique_ptr<weld::SpinButton> m_xFromNF;
106  std::unique_ptr<weld::Label> m_xToFT;
107  std::unique_ptr<weld::SpinButton> m_xToNF;
108  std::unique_ptr<weld::Button> m_xOKButton;
109 
110  DECL_LINK(CopyToHdl_Impl, weld::Button&, void);
111  DECL_LINK(SendTypeHdl_Impl, weld::ComboBox&, void);
112  DECL_LINK(SendAsHdl_Impl, weld::Button&, void);
113  DECL_LINK(SendDocumentsHdl_Impl, weld::Button&, void);
114  DECL_LINK(DocumentSelectionHdl_Impl, 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_xClose;
164  std::unique_ptr<weld::Expander> m_xExpander;
165 
166  DECL_LINK( StopHdl_Impl, weld::Button&, void );
167  DECL_LINK( CloseHdl_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< 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
OUString const m_sConfigureMail
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
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
SwMailMergeConfigItem *const m_pConfigItem
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