xref: /aoo42x/main/sw/source/ui/fldui/flddb.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SWFLDDB_HXX
24 #define _SWFLDDB_HXX
25 
26 #include <vcl/fixed.hxx>
27 #include <vcl/lstbox.hxx>
28 #ifndef _SV_BUTTON_HXX //autogen
29 #include <vcl/button.hxx>
30 #endif
31 #include <vcl/group.hxx>
32 
33 #include "condedit.hxx"
34 #include "dbtree.hxx"
35 #include "numfmtlb.hxx"
36 
37 #include "fldpage.hxx"
38 
39 /*--------------------------------------------------------------------
40    Beschreibung:
41  --------------------------------------------------------------------*/
42 
43 class SwFldDBPage : public SwFldPage
44 {
45 	FixedText 			aTypeFT;
46 	ListBox 			aTypeLB;
47 	FixedText 			aSelectionFT;
48 	SwDBTreeList		aDatabaseTLB;
49 
50     FixedText           aAddDBFT;
51     PushButton          aAddDBPB;
52 
53 	FixedText 			aConditionFT;
54 	ConditionEdit		aConditionED;
55 	FixedText 			aValueFT;
56 	Edit 				aValueED;
57 	RadioButton			aDBFormatRB;
58 	RadioButton			aNewFormatRB;
59 	NumFormatListBox	aNumFormatLB;
60 	ListBox				aFormatLB;
61     FixedLine           aFormatFL;
62     FixedLine           aFormatVertFL;
63 
64 	String				sOldDBName;
65 	String				sOldTableName;
66 	String				sOldColumnName;
67 	sal_uLong				nOldFormat;
68 	sal_uInt16				nOldSubType;
69 	Link				aOldNumSelectHdl;
70 
71 	DECL_LINK( TypeHdl, ListBox* );
72 	DECL_LINK( NumSelectHdl, NumFormatListBox* pLB = 0);
73 	DECL_LINK( TreeSelectHdl, SvTreeListBox* pBox );
74 	DECL_LINK( ModifyHdl, Edit *pED = 0 );
75     DECL_LINK( AddDBHdl, PushButton* );
76 
77 	void				CheckInsert();
78 
79     using SwFldPage::SetWrtShell;
80 
81 protected:
82 	virtual sal_uInt16		GetGroup();
83 
84 public:
85 						SwFldDBPage(Window* pParent, const SfxItemSet& rSet);
86 
87 						~SwFldDBPage();
88 
89 	static SfxTabPage*  Create(Window* pParent, const SfxItemSet& rAttrSet);
90 
91 	virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
92 	virtual void        Reset( const SfxItemSet& rSet );
93 
94 	virtual void		FillUserData();
95     void                ActivateMailMergeAddress();
96 
97     void                SetWrtShell(SwWrtShell& rSh);
98 };
99 
100 
101 #endif
102 
103