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 <vcl/button.hxx>
26 
27 #include <vcl/field.hxx>
28 
29 #include <vcl/fixed.hxx>
30 #include <vcl/edit.hxx>
31 
32 #include <vcl/lstbox.hxx>
33 #include <com/sun/star/uno/Sequence.h>
34 #include <com/sun/star/uno/Reference.h>
35 
36 #include <dbmgr.hxx>
37 
38 class SwWrtShell;
39 class SwModuleOptions;
41 struct SwMailMergeDlg_Impl;
42 namespace com{namespace sun{namespace star{
43  namespace frame{
44  class XFrame2;
45  }
46  namespace sdbc{
47  class XResultSet;
48  class XConnection;
49  }
50 }}}
51 
53 {
54  friend class SwXSelChgLstnr_Impl;
55 
57 
63 
67 
69 
73 
75 
83 
94 
96 
97  std::unique_ptr<SwMailMergeDlg_Impl> pImpl;
98 
101 
103  css::uno::Sequence< css::uno::Any > m_aSelection;
104  css::uno::Reference< css::frame::XFrame2 > m_xFrame;
105 
106  OUString m_sSaveFilter;
107  OUString m_sFilename;
108 
109  DECL_LINK( ButtonHdl, Button*, void );
110  DECL_LINK( InsertPathHdl, Button*, void );
111  DECL_LINK( OutputTypeHdl, Button*, void );
112  DECL_LINK( FilenameHdl, Button*, void );
113  DECL_LINK( ModifyHdl, Edit&, void );
114  DECL_LINK( SaveTypeHdl, Button*, void );
115 
116  bool ExecQryShell();
117  bool AskUserFilename() const;
118  OUString GetURLfromPath() const;
119 
120 public:
121  SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rSh,
122  const OUString& rSourceName,
123  const OUString& rTableName,
124  sal_Int32 nCommandType,
125  const css::uno::Reference< css::sdbc::XConnection>& xConnection,
126  css::uno::Sequence< css::uno::Any > const * pSelection);
127  virtual ~SwMailMergeDlg() override;
128  virtual void dispose() override;
129 
131 
132  bool IsSaveSingleDoc() const { return m_pSaveSingleDocRB->IsChecked(); }
133  bool IsGenerateFromDataBase() const { return m_pGenerateFromDataBaseCB->IsChecked(); }
134  OUString GetColumnName() const { return m_pColumnLB->GetSelectedEntry(); }
135  OUString GetTargetURL() const;
136 
137  const OUString& GetSaveFilter() const {return m_sSaveFilter;}
138  const css::uno::Sequence< css::uno::Any >& GetSelection() const { return m_aSelection; }
139  css::uno::Reference< css::sdbc::XResultSet> GetResultSet() const;
140 
141 };
142 
144 {
145  std::unique_ptr<weld::RadioButton> m_xThisDocRB;
146 public:
148  virtual ~SwMailMergeCreateFromDlg() override;
149  bool IsThisDocument() const
150  {
151  return m_xThisDocRB->get_active();
152  }
153 };
154 
156 {
157  std::unique_ptr<weld::RadioButton> m_xUseExistingRB;
158 public:
160  virtual ~SwMailMergeFieldConnectionsDlg() override;
161 
163  {
164  return m_xUseExistingRB->get_active();
165  }
166 };
167 
168 #endif
169 
170 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString GetSelectedEntry(sal_Int32 nSelIndex=0) const
SwMailMergeCreateFromDlg(weld::Window *pParent)
Definition: mailmrge.cxx:610
VclPtr< FixedText > m_pFilterFT
Definition: mailmrge.hxx:81
css::uno::Sequence< css::uno::Any > m_aSelection
Definition: mailmrge.hxx:103
VclPtr< CheckBox > m_pFormatHtmlCB
Definition: mailmrge.hxx:91
css::uno::Reference< css::sdbc::XResultSet > GetResultSet() const
Definition: mailmrge.cxx:598
bool IsGenerateFromDataBase() const
Definition: mailmrge.hxx:133
std::unique_ptr< SwMailMergeDlg_Impl > pImpl
Definition: mailmrge.hxx:97
VclPtr< CheckBox > m_pSingleJobsCB
Definition: mailmrge.hxx:68
VclPtr< FixedText > m_pPathFT
Definition: mailmrge.hxx:78
bool AskUserFilename() const
Definition: mailmrge.cxx:473
VclPtr< Edit > m_pPathED
Definition: mailmrge.hxx:79
OUString GetColumnName() const
Definition: mailmrge.hxx:134
bool IsThisDocument() const
Definition: mailmrge.hxx:149
Used by the UI to modify the document model.
Definition: wrtsh.hxx:88
SwMailMergeDlg(vcl::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:121
VclPtr< RadioButton > m_pMailingRB
Definition: mailmrge.hxx:65
std::unique_ptr< weld::RadioButton > m_xUseExistingRB
Definition: mailmrge.hxx:157
bool IsChecked() const
DBManagerOptions
Definition: dbmgr.hxx:85
virtual ~SwMailMergeCreateFromDlg() override
Definition: mailmrge.cxx:616
DBManagerOptions GetMergeType()
Definition: mailmrge.hxx:130
SwModuleOptions * pModOpt
Definition: mailmrge.hxx:100
VclPtr< NumericField > m_pFromNF
Definition: mailmrge.hxx:61
css::uno::Reference< css::frame::XFrame2 > m_xFrame
Definition: mailmrge.hxx:104
DECL_LINK(ButtonHdl, Button *, void)
bool IsUseExistingConnections() const
Definition: mailmrge.hxx:162
virtual ~SwMailMergeFieldConnectionsDlg() override
Definition: mailmrge.cxx:626
VclPtr< Edit > m_pSubjectED
Definition: mailmrge.hxx:86
VclPtr< FixedText > m_pFormatFT
Definition: mailmrge.hxx:87
SwWrtShell & rSh
Definition: mailmrge.hxx:99
VclPtr< FixedText > m_pSubjectFT
Definition: mailmrge.hxx:85
OUString GetURLfromPath() const
Definition: mailmrge.cxx:478
virtual ~SwMailMergeDlg() override
Definition: mailmrge.cxx:357
VclPtr< ListBox > m_pColumnLB
Definition: mailmrge.hxx:77
bool IsChecked() const
OUString m_sFilename
Definition: mailmrge.hxx:107
const css::uno::Sequence< css::uno::Any > & GetSelection() const
Definition: mailmrge.hxx:138
VclPtr< ListBox > m_pAddressFieldLB
Definition: mailmrge.hxx:84
VclPtr< NumericField > m_pToNF
Definition: mailmrge.hxx:62
std::unique_ptr< weld::RadioButton > m_xThisDocRB
Definition: mailmrge.hxx:145
virtual void dispose() override
Definition: mailmrge.cxx:362
VclPtr< CheckBox > m_pGenerateFromDataBaseCB
Definition: mailmrge.hxx:74
VclPtr< FixedText > m_pAttachFT
Definition: mailmrge.hxx:88
VclPtr< RadioButton > m_pFileRB
Definition: mailmrge.hxx:66
OUString GetTargetURL() const
Definition: mailmrge.cxx:570
VclPtr< RadioButton > m_pSaveIndividualRB
Definition: mailmrge.hxx:72
VclPtr< PushButton > m_pAttachPB
Definition: mailmrge.hxx:90
OUString m_sSaveFilter
Definition: mailmrge.hxx:106
bool ExecQryShell()
Definition: mailmrge.cxx:493
VclPtr< CheckBox > m_pFormatSwCB
Definition: mailmrge.hxx:93
VclPtr< FixedText > m_pColumnFT
Definition: mailmrge.hxx:76
VclPtr< OKButton > m_pOkBTN
Definition: mailmrge.hxx:95
VclPtr< FixedText > m_pSaveMergedDocumentFT
Definition: mailmrge.hxx:70
bool IsSaveSingleDoc() const
Definition: mailmrge.hxx:132
VclPtr< vcl::Window > m_pBeamerWin
Definition: mailmrge.hxx:56
VclPtr< CheckBox > m_pFormatRtfCB
Definition: mailmrge.hxx:92
VclPtr< PushButton > m_pPathPB
Definition: mailmrge.hxx:80
SwMailMergeFieldConnectionsDlg(weld::Window *pParent)
Definition: mailmrge.cxx:620
VclPtr< RadioButton > m_pSaveSingleDocRB
Definition: mailmrge.hxx:71
VclPtr< RadioButton > m_pMarkedRB
Definition: mailmrge.hxx:59
VclPtr< Edit > m_pAttachED
Definition: mailmrge.hxx:89
const OUString & GetSaveFilter() const
Definition: mailmrge.hxx:137
VclPtr< RadioButton > m_pFromRB
Definition: mailmrge.hxx:60
VclPtr< ListBox > m_pFilterLB
Definition: mailmrge.hxx:82
VclPtr< RadioButton > m_pPrinterRB
Definition: mailmrge.hxx:64
VclPtr< RadioButton > m_pAllRB
Definition: mailmrge.hxx:58
DBManagerOptions nMergeType
Definition: mailmrge.hxx:102