LibreOffice Module sw (master) 1
mailmrge.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_UIBASE_INC_MAILMRGE_HXX
20#define INCLUDED_SW_SOURCE_UIBASE_INC_MAILMRGE_HXX
21
22#include <memory>
23#include <sfx2/basedlgs.hxx>
24
25#include <com/sun/star/uno/Sequence.h>
26#include <com/sun/star/uno/Reference.h>
27
28#include <dbmgr.hxx>
29
30class SwWrtShell;
31class SwModuleOptions;
34namespace com::sun::star{
35 namespace frame{
36 class XFrame2;
37 }
38 namespace sdbc{
39 class XResultSet;
40 class XConnection;
41 }
42}
43
45{
46 friend class SwXSelChgLstnr_Impl;
47
48 std::unique_ptr<SwMailMergeDlg_Impl> m_pImpl;
49
52
54 css::uno::Sequence< css::uno::Any > m_aSelection;
55 css::uno::Reference< css::frame::XFrame2 > m_xFrame;
56
57 OUString m_sSaveFilter;
58 OUString m_sFilename;
59
60 std::unique_ptr<weld::Container> m_xBeamerWin;
61
62 std::unique_ptr<weld::RadioButton> m_xAllRB;
63 std::unique_ptr<weld::RadioButton> m_xMarkedRB;
64 std::unique_ptr<weld::RadioButton> m_xFromRB;
65 std::unique_ptr<weld::SpinButton> m_xFromNF;
66 std::unique_ptr<weld::SpinButton> m_xToNF;
67
68 std::unique_ptr<weld::RadioButton> m_xPrinterRB;
69 std::unique_ptr<weld::RadioButton> m_xMailingRB;
70 std::unique_ptr<weld::RadioButton> m_xFileRB;
71
72 std::unique_ptr<weld::CheckButton> m_xSingleJobsCB;
73 std::unique_ptr<weld::CheckButton> m_xPasswordCB;
74
75 std::unique_ptr<weld::Label> m_xSaveMergedDocumentFT;
76 std::unique_ptr<weld::RadioButton> m_xSaveSingleDocRB;
77 std::unique_ptr<weld::RadioButton> m_xSaveIndividualRB;
78
79 std::unique_ptr<weld::CheckButton> m_xGenerateFromDataBaseCB;
80
81 std::unique_ptr<weld::Label> m_xColumnFT;
82 std::unique_ptr<weld::ComboBox> m_xColumnLB;
83 std::unique_ptr<weld::Label> m_xPasswordFT;
84 std::unique_ptr<weld::ComboBox> m_xPasswordLB;
85 std::unique_ptr<weld::Label> m_xPathFT;
86 std::unique_ptr<weld::Entry> m_xPathED;
87 std::unique_ptr<weld::Button> m_xPathPB;
88 std::unique_ptr<weld::Label> m_xFilterFT;
89 std::unique_ptr<weld::ComboBox> m_xFilterLB;
90
91 std::unique_ptr<weld::ComboBox> m_xAddressFieldLB;
92 std::unique_ptr<weld::Label> m_xSubjectFT;
93 std::unique_ptr<weld::Entry> m_xSubjectED;
94 std::unique_ptr<weld::Label> m_xFormatFT;
95 std::unique_ptr<weld::Label> m_xAttachFT;
96 std::unique_ptr<weld::Entry> m_xAttachED;
97 std::unique_ptr<weld::Button> m_xAttachPB;
98 std::unique_ptr<weld::CheckButton> m_xFormatHtmlCB;
99 std::unique_ptr<weld::CheckButton> m_xFormatRtfCB;
100 std::unique_ptr<weld::CheckButton> m_xFormatSwCB;
101
102 std::unique_ptr<weld::Button> m_xOkBTN;
103
104 DECL_LINK( ButtonHdl, weld::Button&, void );
105 DECL_LINK( InsertPathHdl, weld::Button&, void );
106 DECL_LINK( OutputTypeHdl, weld::Toggleable&, void );
107 DECL_LINK( FilenameHdl, weld::Toggleable&, void );
108 DECL_LINK( ModifyHdl, weld::SpinButton&, void );
109 DECL_LINK( SaveTypeHdl, weld::Toggleable&, void );
110 DECL_LINK( FileFormatHdl, weld::ComboBox&, void );
111
112 bool ExecQryShell();
113 bool AskUserFilename() const;
114 OUString GetURLfromPath() const;
115
116public:
118 const OUString& rSourceName,
119 const OUString& rTableName,
120 sal_Int32 nCommandType,
121 const css::uno::Reference< css::sdbc::XConnection>& xConnection,
122 css::uno::Sequence< css::uno::Any > const * pSelection);
123 virtual ~SwMailMergeDlg() override;
124
126
127 bool IsSaveSingleDoc() const { return m_xSaveSingleDocRB->get_active(); }
128 bool IsGenerateFromDataBase() const { return m_xGenerateFromDataBaseCB->get_active(); }
129 bool IsFileEncryptedFromDataBase() const { return m_xPasswordCB->get_active(); }
130 OUString GetColumnName() const { return m_xColumnLB->get_active_text(); }
131 OUString GetPasswordColumnName() const { return m_xPasswordLB->get_active_text(); }
132 OUString GetTargetURL() const;
133
134 const OUString& GetSaveFilter() const {return m_sSaveFilter;}
135 const css::uno::Sequence< css::uno::Any >& GetSelection() const { return m_aSelection; }
136 css::uno::Reference< css::sdbc::XResultSet> GetResultSet() const;
137
138};
139
141{
142 std::unique_ptr<weld::RadioButton> m_xThisDocRB;
143public:
145 virtual ~SwMailMergeCreateFromDlg() override;
146 bool IsThisDocument() const
147 {
148 return m_xThisDocRB->get_active();
149 }
150};
151
153{
154 std::unique_ptr<weld::RadioButton> m_xUseExistingRB;
155public:
157 virtual ~SwMailMergeFieldConnectionsDlg() override;
158
160 {
161 return m_xUseExistingRB->get_active();
162 }
163};
164
165#endif
166
167/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsThisDocument() const
Definition: mailmrge.hxx:146
virtual ~SwMailMergeCreateFromDlg() override
Definition: mailmrge.cxx:602
std::unique_ptr< weld::RadioButton > m_xThisDocRB
Definition: mailmrge.hxx:142
SwMailMergeCreateFromDlg(weld::Window *pParent)
Definition: mailmrge.cxx:596
SwMailMergeDlg(weld::Window *pParent, SwWrtShell &rSh, const OUString &rSourceName, const OUString &rTableName, sal_Int32 nCommandType, const css::uno::Reference< css::sdbc::XConnection > &xConnection, css::uno::Sequence< css::uno::Any > const *pSelection)
Definition: mailmrge.cxx:114
std::unique_ptr< weld::CheckButton > m_xFormatRtfCB
Definition: mailmrge.hxx:99
std::unique_ptr< weld::SpinButton > m_xFromNF
Definition: mailmrge.hxx:65
std::unique_ptr< weld::RadioButton > m_xFileRB
Definition: mailmrge.hxx:70
std::unique_ptr< weld::RadioButton > m_xFromRB
Definition: mailmrge.hxx:64
std::unique_ptr< weld::CheckButton > m_xFormatSwCB
Definition: mailmrge.hxx:100
css::uno::Sequence< css::uno::Any > m_aSelection
Definition: mailmrge.hxx:54
std::unique_ptr< weld::CheckButton > m_xGenerateFromDataBaseCB
Definition: mailmrge.hxx:79
std::unique_ptr< weld::Label > m_xFormatFT
Definition: mailmrge.hxx:94
std::unique_ptr< weld::Entry > m_xSubjectED
Definition: mailmrge.hxx:93
DECL_LINK(FilenameHdl, weld::Toggleable &, void)
std::unique_ptr< SwMailMergeDlg_Impl > m_pImpl
Definition: mailmrge.hxx:48
DECL_LINK(SaveTypeHdl, weld::Toggleable &, void)
virtual ~SwMailMergeDlg() override
Definition: mailmrge.cxx:343
std::unique_ptr< weld::CheckButton > m_xSingleJobsCB
Definition: mailmrge.hxx:72
const OUString & GetSaveFilter() const
Definition: mailmrge.hxx:134
std::unique_ptr< weld::RadioButton > m_xAllRB
Definition: mailmrge.hxx:62
DECL_LINK(FileFormatHdl, weld::ComboBox &, void)
std::unique_ptr< weld::Label > m_xPathFT
Definition: mailmrge.hxx:85
css::uno::Reference< css::frame::XFrame2 > m_xFrame
Definition: mailmrge.hxx:55
std::unique_ptr< weld::Label > m_xSubjectFT
Definition: mailmrge.hxx:92
std::unique_ptr< weld::Button > m_xAttachPB
Definition: mailmrge.hxx:97
bool IsFileEncryptedFromDataBase() const
Definition: mailmrge.hxx:129
DECL_LINK(ModifyHdl, weld::SpinButton &, void)
std::unique_ptr< weld::RadioButton > m_xPrinterRB
Definition: mailmrge.hxx:68
std::unique_ptr< weld::Button > m_xOkBTN
Definition: mailmrge.hxx:102
std::unique_ptr< weld::Label > m_xColumnFT
Definition: mailmrge.hxx:81
std::unique_ptr< weld::ComboBox > m_xAddressFieldLB
Definition: mailmrge.hxx:91
std::unique_ptr< weld::ComboBox > m_xFilterLB
Definition: mailmrge.hxx:89
std::unique_ptr< weld::ComboBox > m_xColumnLB
Definition: mailmrge.hxx:82
OUString GetURLfromPath() const
Definition: mailmrge.cxx:460
OUString m_sFilename
Definition: mailmrge.hxx:58
DBManagerOptions GetMergeType() const
Definition: mailmrge.hxx:125
bool AskUserFilename() const
Definition: mailmrge.cxx:455
OUString GetTargetURL() const
Definition: mailmrge.cxx:556
std::unique_ptr< weld::Entry > m_xAttachED
Definition: mailmrge.hxx:96
bool ExecQryShell()
Definition: mailmrge.cxx:475
std::unique_ptr< weld::Container > m_xBeamerWin
Definition: mailmrge.hxx:60
DECL_LINK(InsertPathHdl, weld::Button &, void)
DBManagerOptions m_nMergeType
Definition: mailmrge.hxx:53
OUString GetPasswordColumnName() const
Definition: mailmrge.hxx:131
std::unique_ptr< weld::Label > m_xSaveMergedDocumentFT
Definition: mailmrge.hxx:75
bool IsSaveSingleDoc() const
Definition: mailmrge.hxx:127
OUString m_sSaveFilter
Definition: mailmrge.hxx:57
std::unique_ptr< weld::RadioButton > m_xSaveSingleDocRB
Definition: mailmrge.hxx:76
std::unique_ptr< weld::ComboBox > m_xPasswordLB
Definition: mailmrge.hxx:84
std::unique_ptr< weld::Button > m_xPathPB
Definition: mailmrge.hxx:87
std::unique_ptr< weld::CheckButton > m_xFormatHtmlCB
Definition: mailmrge.hxx:98
std::unique_ptr< weld::SpinButton > m_xToNF
Definition: mailmrge.hxx:66
std::unique_ptr< weld::Label > m_xPasswordFT
Definition: mailmrge.hxx:83
SwModuleOptions * m_pModOpt
Definition: mailmrge.hxx:51
std::unique_ptr< weld::CheckButton > m_xPasswordCB
Definition: mailmrge.hxx:73
std::unique_ptr< weld::Label > m_xAttachFT
Definition: mailmrge.hxx:95
css::uno::Reference< css::sdbc::XResultSet > GetResultSet() const
Definition: mailmrge.cxx:584
DECL_LINK(OutputTypeHdl, weld::Toggleable &, void)
DECL_LINK(ButtonHdl, weld::Button &, void)
std::unique_ptr< weld::Entry > m_xPathED
Definition: mailmrge.hxx:86
const css::uno::Sequence< css::uno::Any > & GetSelection() const
Definition: mailmrge.hxx:135
OUString GetColumnName() const
Definition: mailmrge.hxx:130
std::unique_ptr< weld::RadioButton > m_xMarkedRB
Definition: mailmrge.hxx:63
bool IsGenerateFromDataBase() const
Definition: mailmrge.hxx:128
std::unique_ptr< weld::RadioButton > m_xMailingRB
Definition: mailmrge.hxx:69
SwWrtShell & m_rSh
Definition: mailmrge.hxx:50
std::unique_ptr< weld::RadioButton > m_xSaveIndividualRB
Definition: mailmrge.hxx:77
std::unique_ptr< weld::Label > m_xFilterFT
Definition: mailmrge.hxx:88
virtual ~SwMailMergeFieldConnectionsDlg() override
Definition: mailmrge.cxx:612
bool IsUseExistingConnections() const
Definition: mailmrge.hxx:159
std::unique_ptr< weld::RadioButton > m_xUseExistingRB
Definition: mailmrge.hxx:154
SwMailMergeFieldConnectionsDlg(weld::Window *pParent)
Definition: mailmrge.cxx:606
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
DBManagerOptions
Definition: dbmgr.hxx:88