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
20#pragma once
21
22#include <vcl/weld.hxx>
23#include <vcl/print.hxx>
24#include <sfx2/basedlgs.hxx>
25#include <mailmergehelper.hxx>
26
28class SfxPrinter;
30class Timer;
31namespace com::sun::star::mail { class XMailMessage; }
32
33
36{
38
39 std::unique_ptr<weld::RadioButton> m_xSaveAsOneRB;
40 std::unique_ptr<weld::RadioButton> m_xSaveIndividualRB;
41 std::unique_ptr<weld::CheckButton> m_xFromRB;
42 std::unique_ptr<weld::SpinButton> m_xFromNF;
43 std::unique_ptr<weld::Label> m_xToFT;
44 std::unique_ptr<weld::SpinButton> m_xToNF;
45 std::unique_ptr<weld::Button> m_xOKButton;
46
47 DECL_LINK(SaveOutputHdl_Impl, weld::Button& , void);
48 DECL_LINK(DocumentSelectionHdl_Impl, weld::Toggleable&, void);
49
50public:
52 virtual ~SwMMResultSaveDialog() override;
53};
54
57{
59
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::Toggleable&, void);
73
75
76public:
78 virtual ~SwMMResultPrintDialog() override;
79};
80
83{
85 OUString m_sCC;
86 OUString m_sBCC;
87 OUString m_sBody;
88
89 std::unique_ptr<weld::ComboBox> m_xMailToLB;
90 std::unique_ptr<weld::Button> m_xCopyToPB;
91 std::unique_ptr<weld::Entry> m_xSubjectED;
92 std::unique_ptr<weld::ComboBox> m_xSendAsLB;
93 std::unique_ptr<weld::Button> m_xSendAsPB;
94 std::unique_ptr<weld::Widget> m_xAttachmentGroup;
95 std::unique_ptr<weld::Entry> m_xAttachmentED;
96 std::unique_ptr<weld::Label> m_xPasswordFT;
97 std::unique_ptr<weld::ComboBox> m_xPasswordLB;
98 std::unique_ptr<weld::CheckButton> m_xPasswordCB;
99 std::unique_ptr<weld::RadioButton> m_xSendAllRB;
100 std::unique_ptr<weld::RadioButton> m_xFromRB;
101 std::unique_ptr<weld::SpinButton> m_xFromNF;
102 std::unique_ptr<weld::Label> m_xToFT;
103 std::unique_ptr<weld::SpinButton> m_xToNF;
104 std::unique_ptr<weld::Button> m_xOKButton;
105
106 DECL_LINK(CopyToHdl_Impl, weld::Button&, void);
107 DECL_LINK(SendTypeHdl_Impl, weld::ComboBox&, void);
108 DECL_LINK(SendAsHdl_Impl, weld::Button&, void);
109 DECL_LINK(SendDocumentsHdl_Impl, weld::Button&, void);
110 DECL_LINK(DocumentSelectionHdl_Impl, weld::Toggleable&, void);
111 DECL_LINK(CheckHdl, weld::Toggleable&, void );
112
113 void FillInEmailSettings();
114
115public:
117 virtual ~SwMMResultEmailDialog() override;
118};
119
121{
122 OUString sEMail;
125 OUString sMimeType;
126 OUString sSubject;
128 OUString sBodyContent;
129
130 OUString sCC;
131 OUString sBCC;
132};
136{
137 OUString m_sContinue;
138 OUString m_sStop;
139 OUString m_sClose;
142 OUString m_sSendingTo;
143 OUString m_sCompleted;
144 OUString m_sFailed;
146
149
150 std::unique_ptr<SwSendMailDialog_Impl> m_pImpl;
154 sal_Int32 m_nErrorCount;
155
156 std::unique_ptr<weld::Label> m_xTransferStatus;
157 std::unique_ptr<weld::Label> m_xPaused;
158 std::unique_ptr<weld::ProgressBar> m_xProgressBar;
159 std::unique_ptr<weld::Label> m_xErrorStatus;
160 std::unique_ptr<weld::TreeView> m_xStatus;
161 std::unique_ptr<weld::Button> m_xStop;
162 std::unique_ptr<weld::Button> m_xCancel;
163
164 DECL_LINK( StopHdl_Impl, weld::Button&, void );
165 DECL_LINK( CancelHdl_Impl, weld::Button& , void);
166 DECL_STATIC_LINK( SwSendMailDialog, StartSendMails, void*, void );
167 DECL_STATIC_LINK( SwSendMailDialog, StopSendMails, void*, void );
168 DECL_LINK( RemoveThis, Timer*, void );
169
170 void IterateMails();
171 void SendMails();
173
174public:
176 virtual ~SwSendMailDialog() override;
177
178 void AddDocument( SwMailDescriptor const & rDesc );
180 void StartSend(sal_Int32 nExpectedCount);
181
182 void DocumentSent( css::uno::Reference< css::mail::XMailMessage> const & xMessage,
183 bool bResult,
184 const OUString* pError );
185 void AllMailsSent();
186
187};
188
189/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Dialog implementing the sending as email of the result document.
std::unique_ptr< weld::Entry > m_xAttachmentED
std::unique_ptr< weld::SpinButton > m_xFromNF
std::unique_ptr< weld::RadioButton > m_xFromRB
DECL_LINK(SendAsHdl_Impl, weld::Button &, void)
DECL_LINK(SendTypeHdl_Impl, weld::ComboBox &, void)
DECL_LINK(CopyToHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Label > m_xPasswordFT
std::unique_ptr< weld::Button > m_xSendAsPB
std::unique_ptr< weld::CheckButton > m_xPasswordCB
std::unique_ptr< weld::Button > m_xCopyToPB
DECL_LINK(DocumentSelectionHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::RadioButton > m_xSendAllRB
std::unique_ptr< weld::Widget > m_xAttachmentGroup
std::unique_ptr< weld::Entry > m_xSubjectED
DECL_LINK(SendDocumentsHdl_Impl, weld::Button &, void)
SwMMResultEmailDialog(weld::Window *pParent)
std::unique_ptr< weld::ComboBox > m_xSendAsLB
virtual ~SwMMResultEmailDialog() override
std::unique_ptr< weld::SpinButton > m_xToNF
std::unique_ptr< weld::Button > m_xOKButton
std::unique_ptr< weld::ComboBox > m_xPasswordLB
DECL_LINK(CheckHdl, weld::Toggleable &, void)
std::unique_ptr< weld::ComboBox > m_xMailToLB
std::unique_ptr< weld::Label > m_xToFT
Dialog implementing the printing of the result document.
std::unique_ptr< weld::Button > m_xPrinterSettingsPB
DECL_LINK(PrintHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Label > m_xToFT
DECL_LINK(PrinterChangeHdl_Impl, weld::ComboBox &, void)
virtual ~SwMMResultPrintDialog() override
DECL_LINK(DocumentSelectionHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::SpinButton > m_xFromNF
std::unique_ptr< weld::ComboBox > m_xPrinterLB
SwMMResultPrintDialog(weld::Window *pParent)
DECL_LINK(PrinterSetupHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::RadioButton > m_xFromRB
std::unique_ptr< weld::RadioButton > m_xPrintAllRB
std::unique_ptr< weld::SpinButton > m_xToNF
std::unique_ptr< weld::Button > m_xOKButton
VclPtr< Printer > m_pTempPrinter
Dialog implementing the saving as of the result document.
std::unique_ptr< weld::SpinButton > m_xToNF
DECL_LINK(DocumentSelectionHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::CheckButton > m_xFromRB
std::unique_ptr< weld::SpinButton > m_xFromNF
std::unique_ptr< weld::RadioButton > m_xSaveIndividualRB
SwMMResultSaveDialog(weld::Window *pParent)
std::unique_ptr< weld::RadioButton > m_xSaveAsOneRB
virtual ~SwMMResultSaveDialog() override
std::unique_ptr< weld::Button > m_xOKButton
DECL_LINK(SaveOutputHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Label > m_xToFT
void StartSend(sal_Int32 nExpectedCount)
DECL_STATIC_LINK(SwSendMailDialog, StopSendMails, void *, void)
DECL_LINK(RemoveThis, Timer *, void)
SwMailMergeConfigItem * m_pConfigItem
DECL_STATIC_LINK(SwSendMailDialog, StartSendMails, void *, void)
std::unique_ptr< weld::Label > m_xPaused
std::unique_ptr< weld::Label > m_xTransferStatus
std::unique_ptr< SwSendMailDialog_Impl > m_pImpl
void AddDocument(SwMailDescriptor const &rDesc)
DECL_LINK(CancelHdl_Impl, weld::Button &, void)
SwSendMailDialog(weld::Window *pParent, SwMailMergeConfigItem &)
std::unique_ptr< weld::TreeView > m_xStatus
std::unique_ptr< weld::ProgressBar > m_xProgressBar
sal_Int32 m_nProcessedCount
void DocumentSent(css::uno::Reference< css::mail::XMailMessage > const &xMessage, bool bResult, const OUString *pError)
std::unique_ptr< weld::Button > m_xCancel
DECL_LINK(StopHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Label > m_xErrorStatus
virtual ~SwSendMailDialog() override
std::unique_ptr< weld::Button > m_xStop
sal_Int32 m_nExpectedCount