xref: /aoo41x/main/sw/source/ui/inc/mailmrge.hxx (revision 1d2dbeb0)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*1d2dbeb0SAndrew Rist  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1d2dbeb0SAndrew Rist  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19*1d2dbeb0SAndrew Rist  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _MAILMRGE_HXX
24cdf0e10cSrcweir #define _MAILMRGE_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <svx/stddlg.hxx>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen
29cdf0e10cSrcweir #include <vcl/button.hxx>
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #ifndef _FIELD_HXX //autogen
33cdf0e10cSrcweir #include <vcl/field.hxx>
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
37cdf0e10cSrcweir #include <vcl/fixed.hxx>
38cdf0e10cSrcweir #endif
39cdf0e10cSrcweir #ifndef _EDIT_HXX //autogen
40cdf0e10cSrcweir #include <vcl/edit.hxx>
41cdf0e10cSrcweir #endif
42cdf0e10cSrcweir #include <svtools/stdctrl.hxx>
43cdf0e10cSrcweir 
44cdf0e10cSrcweir #ifndef _LSTBOX_HXX //autogen
45cdf0e10cSrcweir #include <vcl/lstbox.hxx>
46cdf0e10cSrcweir #endif
47cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.h>
48cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h>
49cdf0e10cSrcweir 
50cdf0e10cSrcweir class SwWrtShell;
51cdf0e10cSrcweir class SwModuleOptions;
52cdf0e10cSrcweir class SwXSelChgLstnr_Impl;
53cdf0e10cSrcweir struct SwMailMergeDlg_Impl;
54cdf0e10cSrcweir namespace com{namespace sun{namespace star{
55cdf0e10cSrcweir     namespace frame{
56cdf0e10cSrcweir         class XFrame;
57cdf0e10cSrcweir     }
58cdf0e10cSrcweir     namespace sdbc{
59cdf0e10cSrcweir         class XResultSet;
60cdf0e10cSrcweir         class XConnection;
61cdf0e10cSrcweir     }
62cdf0e10cSrcweir }}}
63cdf0e10cSrcweir 
64cdf0e10cSrcweir class SwMailMergeDlg : public SvxStandardDialog
65cdf0e10cSrcweir {
66cdf0e10cSrcweir     friend class SwXSelChgLstnr_Impl;
67cdf0e10cSrcweir 
68cdf0e10cSrcweir     Window*         pBeamerWin;
69cdf0e10cSrcweir 
70cdf0e10cSrcweir     RadioButton     aAllRB;
71cdf0e10cSrcweir 	RadioButton		aMarkedRB;
72cdf0e10cSrcweir 	RadioButton		aFromRB;
73cdf0e10cSrcweir 	NumericField	aFromNF;
74cdf0e10cSrcweir 	FixedText		aBisFT;
75cdf0e10cSrcweir 	NumericField	aToNF;
76cdf0e10cSrcweir     FixedLine       aRecordFL;
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     FixedLine       aSeparatorFL;
79cdf0e10cSrcweir 
80cdf0e10cSrcweir     RadioButton     aPrinterRB;
81cdf0e10cSrcweir 	RadioButton		aMailingRB;
82cdf0e10cSrcweir 	RadioButton		aFileRB;
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 	CheckBox		aSingleJobsCB;
85cdf0e10cSrcweir 
86cdf0e10cSrcweir     FixedLine       aSaveMergedDocumentFL;
87cdf0e10cSrcweir     RadioButton     aSaveSingleDocRB;
88cdf0e10cSrcweir     RadioButton     aSaveIndividualRB;
89cdf0e10cSrcweir 
90cdf0e10cSrcweir     CheckBox        aGenerateFromDataBaseCB;
91cdf0e10cSrcweir 
92cdf0e10cSrcweir     FixedText       aColumnFT;
93cdf0e10cSrcweir     ListBox         aColumnLB;
94cdf0e10cSrcweir     FixedText       aPathFT;
95cdf0e10cSrcweir 	Edit			aPathED;
96cdf0e10cSrcweir 	PushButton		aPathPB;
97cdf0e10cSrcweir     FixedText       aFilterFT;
98cdf0e10cSrcweir     ListBox         aFilterLB;
99cdf0e10cSrcweir 
100cdf0e10cSrcweir 	ListBox			aAddressFldLB;
101cdf0e10cSrcweir 	FixedText		aSubjectFT;
102cdf0e10cSrcweir 	Edit			aSubjectED;
103cdf0e10cSrcweir 	FixedText		aFormatFT;
104cdf0e10cSrcweir 	FixedText		aAttachFT;
105cdf0e10cSrcweir 	Edit			aAttachED;
106cdf0e10cSrcweir 	PushButton		aAttachPB;
107cdf0e10cSrcweir 	CheckBox		aFormatHtmlCB;
108cdf0e10cSrcweir 	CheckBox		aFormatRtfCB;
109cdf0e10cSrcweir 	CheckBox		aFormatSwCB;
110cdf0e10cSrcweir     FixedLine       aDestFL;
111cdf0e10cSrcweir 
112cdf0e10cSrcweir     FixedLine       aBottomSeparatorFL;
113cdf0e10cSrcweir 
114cdf0e10cSrcweir     OKButton        aOkBTN;
115cdf0e10cSrcweir 	CancelButton	aCancelBTN;
116cdf0e10cSrcweir 	HelpButton		aHelpBTN;
117cdf0e10cSrcweir 
118cdf0e10cSrcweir     SwMailMergeDlg_Impl* pImpl;
119cdf0e10cSrcweir 
120cdf0e10cSrcweir     SwWrtShell&     rSh;
121cdf0e10cSrcweir 	SwModuleOptions* pModOpt;
122cdf0e10cSrcweir 	const String&	rDBName;
123cdf0e10cSrcweir 	const String&	rTableName;
124cdf0e10cSrcweir 
125cdf0e10cSrcweir 	sal_uInt16			nMergeType;
126cdf0e10cSrcweir 	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >		m_aSelection;
127cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
128cdf0e10cSrcweir 
129cdf0e10cSrcweir     Size            m_aDialogSize;
130cdf0e10cSrcweir     ::rtl::OUString m_sSaveFilter;
131cdf0e10cSrcweir 
132cdf0e10cSrcweir 
133cdf0e10cSrcweir 	DECL_LINK( ButtonHdl, Button* pBtn );
134cdf0e10cSrcweir 	DECL_LINK( InsertPathHdl, PushButton * );
135cdf0e10cSrcweir 	DECL_LINK( AttachFileHdl, PushButton * );
136cdf0e10cSrcweir     DECL_LINK( OutputTypeHdl, RadioButton* pBtn );
137cdf0e10cSrcweir     DECL_LINK( FilenameHdl, CheckBox* pBtn );
138cdf0e10cSrcweir 	DECL_LINK( ModifyHdl, NumericField* pLB );
139cdf0e10cSrcweir     DECL_LINK( SaveTypeHdl, RadioButton* pBtn );
140cdf0e10cSrcweir 
141cdf0e10cSrcweir 	virtual void 	Apply();
142cdf0e10cSrcweir     virtual void    Resize();
143cdf0e10cSrcweir     bool            ExecQryShell();
144cdf0e10cSrcweir 
145cdf0e10cSrcweir public:
146cdf0e10cSrcweir 	 SwMailMergeDlg(Window* pParent, SwWrtShell& rSh,
147cdf0e10cSrcweir 	 	const String& rSourceName,
148cdf0e10cSrcweir 		const String& rTblName,
149cdf0e10cSrcweir         sal_Int32 nCommandType,
150cdf0e10cSrcweir         const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& xConnection,
151cdf0e10cSrcweir         ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0);
152cdf0e10cSrcweir 	~SwMailMergeDlg();
153cdf0e10cSrcweir 
GetMergeType()154cdf0e10cSrcweir 	inline sal_uInt16	GetMergeType() { return nMergeType; }
155cdf0e10cSrcweir 
IsSaveIndividualDocs() const156cdf0e10cSrcweir     bool IsSaveIndividualDocs() const { return aSaveIndividualRB.IsChecked(); }
IsGenerateFromDataBase() const157cdf0e10cSrcweir     bool IsGenerateFromDataBase() const { return aGenerateFromDataBaseCB.IsChecked(); }
GetColumnName() const158cdf0e10cSrcweir     String GetColumnName() const { return aColumnLB.GetSelectEntry();}
GetPath() const159cdf0e10cSrcweir     String GetPath() const { return aPathED.GetText();}
160cdf0e10cSrcweir 
GetSaveFilter() const161cdf0e10cSrcweir     const ::rtl::OUString& GetSaveFilter() const {return m_sSaveFilter;}
GetSelection() const162cdf0e10cSrcweir 	inline const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const { return m_aSelection; }
163cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
164cdf0e10cSrcweir 
165cdf0e10cSrcweir };
166cdf0e10cSrcweir /* -----------------27.11.2002 12:05-----------------
167cdf0e10cSrcweir  *
168cdf0e10cSrcweir  * --------------------------------------------------*/
169cdf0e10cSrcweir class SwMailMergeCreateFromDlg : public ModalDialog
170cdf0e10cSrcweir {
171cdf0e10cSrcweir     FixedLine       aCreateFromFL;
172cdf0e10cSrcweir     RadioButton     aThisDocRB;
173cdf0e10cSrcweir     RadioButton     aUseTemplateRB;
174cdf0e10cSrcweir 
175cdf0e10cSrcweir     OKButton        aOK;
176cdf0e10cSrcweir     CancelButton    aCancel;
177cdf0e10cSrcweir     HelpButton      aHelp;
178cdf0e10cSrcweir public:
179cdf0e10cSrcweir     SwMailMergeCreateFromDlg(Window* pParent);
180cdf0e10cSrcweir     ~SwMailMergeCreateFromDlg();
181cdf0e10cSrcweir 
IsThisDocument() const182cdf0e10cSrcweir     sal_Bool    IsThisDocument() const {return aThisDocRB.IsChecked();}
183cdf0e10cSrcweir };
184cdf0e10cSrcweir /* -----------------04.02.2003 13:41-----------------
185cdf0e10cSrcweir  *
186cdf0e10cSrcweir  * --------------------------------------------------*/
187cdf0e10cSrcweir class SwMailMergeFieldConnectionsDlg : public ModalDialog
188cdf0e10cSrcweir {
189cdf0e10cSrcweir     FixedLine       aConnectionsFL;
190cdf0e10cSrcweir     RadioButton     aUseExistingRB;
191cdf0e10cSrcweir     RadioButton     aCreateNewRB;
192cdf0e10cSrcweir 
193cdf0e10cSrcweir     FixedInfo       aInfoFI;
194cdf0e10cSrcweir 
195cdf0e10cSrcweir     OKButton        aOK;
196cdf0e10cSrcweir     CancelButton    aCancel;
197cdf0e10cSrcweir     HelpButton      aHelp;
198cdf0e10cSrcweir public:
199cdf0e10cSrcweir     SwMailMergeFieldConnectionsDlg(Window* pParent);
200cdf0e10cSrcweir     ~SwMailMergeFieldConnectionsDlg();
201cdf0e10cSrcweir 
IsUseExistingConnections() const202cdf0e10cSrcweir     sal_Bool    IsUseExistingConnections() const {return aUseExistingRB.IsChecked();}
203cdf0e10cSrcweir };
204cdf0e10cSrcweir 
205cdf0e10cSrcweir #endif
206cdf0e10cSrcweir 
207