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