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 <svx/stddlg.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  virtual void Apply() override;
115  bool ExecQryShell();
116  bool AskUserFilename() const;
117  OUString GetURLfromPath() const;
118 
119 public:
120  SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rSh,
121  const OUString& rSourceName,
122  const OUString& rTableName,
123  sal_Int32 nCommandType,
124  const css::uno::Reference< css::sdbc::XConnection>& xConnection,
125  css::uno::Sequence< css::uno::Any > const * pSelection);
126  virtual ~SwMailMergeDlg() override;
127  virtual void dispose() override;
128 
130 
131  bool IsSaveSingleDoc() const { return m_pSaveSingleDocRB->IsChecked(); }
132  bool IsGenerateFromDataBase() const { return m_pGenerateFromDataBaseCB->IsChecked(); }
133  OUString GetColumnName() const { return m_pColumnLB->GetSelectedEntry(); }
134  OUString GetTargetURL() const;
135 
136  const OUString& GetSaveFilter() const {return m_sSaveFilter;}
137  const css::uno::Sequence< css::uno::Any >& GetSelection() const { return m_aSelection; }
138  css::uno::Reference< css::sdbc::XResultSet> GetResultSet() const;
139 
140 };
141 
143 {
144  std::unique_ptr<weld::RadioButton> m_xThisDocRB;
145 public:
147  virtual ~SwMailMergeCreateFromDlg() override;
148  bool IsThisDocument() const
149  {
150  return m_xThisDocRB->get_active();
151  }
152 };
153 
155 {
156  std::unique_ptr<weld::RadioButton> m_xUseExistingRB;
157 public:
159  virtual ~SwMailMergeFieldConnectionsDlg() override;
160 
162  {
163  return m_xUseExistingRB->get_active();
164  }
165 };
166 
167 #endif
168 
169 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString GetSelectedEntry(sal_Int32 nSelIndex=0) const
SwMailMergeCreateFromDlg(weld::Window *pParent)
Definition: mailmrge.cxx:619
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:607
bool IsGenerateFromDataBase() const
Definition: mailmrge.hxx:132
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:480
VclPtr< Edit > m_pPathED
Definition: mailmrge.hxx:77
OUString GetColumnName() const
Definition: mailmrge.hxx:133
bool IsThisDocument() const
Definition: mailmrge.hxx:148
Used by the UI to modify the document model.
Definition: wrtsh.hxx:86
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:156
bool IsChecked() const
DBManagerOptions
Definition: dbmgr.hxx:85
virtual ~SwMailMergeCreateFromDlg() override
Definition: mailmrge.cxx:625
DBManagerOptions GetMergeType()
Definition: mailmrge.hxx:129
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:161
virtual ~SwMailMergeFieldConnectionsDlg() override
Definition: mailmrge.cxx:635
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:485
virtual ~SwMailMergeDlg() override
Definition: mailmrge.cxx:360
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:137
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:144
virtual void dispose() override
Definition: mailmrge.cxx:365
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:579
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:500
VclPtr< CheckBox > m_pFormatSwCB
Definition: mailmrge.hxx:91
VclPtr< FixedText > m_pColumnFT
Definition: mailmrge.hxx:74
VclPtr< OKButton > m_pOkBTN
Definition: mailmrge.hxx:93
virtual void Apply() override
Definition: mailmrge.cxx:412
VclPtr< FixedText > m_pSaveMergedDocumentFT
Definition: mailmrge.hxx:68
bool IsSaveSingleDoc() const
Definition: mailmrge.hxx:131
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:629
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:136
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