xref: /trunk/main/sw/source/ui/envelp/swuilabimp.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 _SWUILABIMP_HXX
24 #define _SWUILABIMP_HXX
25 #include "labimp.hxx"
26 
27 class SwLabPage : public SfxTabPage
28 {
29 	SwNewDBMgr*   pNewDBMgr;
30 	String        sActDBName;
31 	SwLabItem	  aItem;
32 
33 	FixedLine     aWritingFL;
34 	FixedText	  aWritingText;
35 	CheckBox	  aAddrBox;
36 	MultiLineEdit aWritingEdit;
37 	FixedText	  aDatabaseFT;
38 	ListBox 	  aDatabaseLB;
39 	FixedText	  aTableFT;
40 	ListBox 	  aTableLB;
41 	ImageButton   aInsertBT;
42 	FixedText	  aDBFieldFT;
43 	ListBox 	  aDBFieldLB;
44 //	PushButton	  aDatabaseButton;
45 
46 	FixedLine     aFormatFL;
47 	RadioButton   aContButton;
48 	RadioButton   aSheetButton;
49 	FixedText	  aMakeText;
50 	ListBox 	  aMakeBox;
51 	FixedText	  aTypeText;
52 	ListBox 	  aTypeBox;
53     ListBox       aHiddenSortTypeBox;
54     FixedInfo     aFormatInfo;
55 
56 	sal_Bool		m_bLabel;
57 
58 	 SwLabPage(Window* pParent, const SfxItemSet& rSet);
59 	~SwLabPage();
60 
61 	DECL_LINK( AddrHdl, Button * );
62 	DECL_LINK( DatabaseHdl, ListBox *pListBox );
63 //    DECL_LINK( DatabaseButtonHdl, Button * );
64 	DECL_LINK( FieldHdl, Button * );
65 	DECL_LINK( PageHdl, Button * );
66 	DECL_LINK( MakeHdl, ListBox * );
67 	DECL_LINK( TypeHdl, ListBox * );
68 
69 	void DisplayFormat	();
70 	SwLabRec* GetSelectedEntryPos();
71 
72     using TabPage::ActivatePage;
73     using TabPage::DeactivatePage;
74     using Window::GetParent;
75 
76 public:
77 
78     static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
79 
80 	virtual void ActivatePage(const SfxItemSet& rSet);
81 	virtual int  DeactivatePage(SfxItemSet* pSet = 0);
82 			void FillItem(SwLabItem& rItem);
83 	virtual sal_Bool FillItemSet(SfxItemSet& rSet);
84 	virtual void Reset(const SfxItemSet& rSet);
85 
GetParent()86 	SwLabDlg* GetParent() {return (SwLabDlg*) SfxTabPage::GetParent()->GetParent();}
87 
88 	void 	SetToBusinessCard();
89 
90 	void InitDatabaseBox();
SetNewDBMgr(SwNewDBMgr * pDBMgr)91 	inline void SetNewDBMgr(SwNewDBMgr* pDBMgr) { pNewDBMgr = pDBMgr; }
GetNewDBMgr() const92 	inline SwNewDBMgr* GetNewDBMgr() const { return pNewDBMgr; }
93 };
94 
95 /* -----------------08.07.99 13:48-------------------
96 
97  --------------------------------------------------*/
98 class SwOneExampleFrame;
99 class SwVisitingCardPage : public SfxTabPage
100 {
101 	FixedLine       aContentFL;
102 	SvTreeListBox 	aAutoTextLB;
103 	FixedText 		aAutoTextGroupFT;
104 	ListBox			aAutoTextGroupLB;
105 
106 	Window 			aExampleWIN;
107 
108 	String			sVisCardGroup;
109 	String			sTempURL;
110 
111 	SwLabItem	  	aLabItem;
112 
113 	SwOneExampleFrame*	pExampleFrame;
114 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >  	_xAutoText;
115 
116 
117 	DECL_LINK( AutoTextSelectHdl, void* );
118 	DECL_LINK( FrameControlInitializedHdl, void* );
119 
120 	void			InitFrameControl();
121 	void			UpdateFields();
122 
123 	void			ClearUserData();
124 
125     using SfxTabPage::SetUserData;
126 	void			SetUserData( sal_uInt32 nCnt,
127 									const rtl::OUString* pNames,
128 									const rtl::OUString* pValues );
129 
130 	SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet);
131 	~SwVisitingCardPage();
132 
133     using TabPage::ActivatePage;
134     using TabPage::DeactivatePage;
135 
136 public:
137 
138 	static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
139 
140 	virtual void ActivatePage(const SfxItemSet& rSet);
141 	virtual int  DeactivatePage(SfxItemSet* pSet = 0);
142 	virtual sal_Bool FillItemSet(SfxItemSet& rSet);
143 	virtual void Reset(const SfxItemSet& rSet);
144 };
145 /* -----------------29.09.99 08:51-------------------
146 
147  --------------------------------------------------*/
148 class SwPrivateDataPage : public SfxTabPage
149 {
150     FixedLine       aDataFL;
151 
152 	FixedText		aNameFT;
153 	Edit			aFirstNameED;
154 	Edit			aNameED;
155 	Edit			aShortCutED;
156 
157 	FixedText		aName2FT;
158 	Edit			aFirstName2ED;
159 	Edit			aName2ED;
160 	Edit			aShortCut2ED;
161 
162 	FixedText		aStreetFT;
163 	Edit			aStreetED;
164 	FixedText		aZipCityFT;
165 	Edit			aZipED;
166 	Edit			aCityED;
167 	FixedText		aCountryStateFT;
168 	Edit			aCountryED;
169 	Edit			aStateED;
170 	FixedText		aTitleProfessionFT;
171 	Edit			aTitleED;
172 	Edit			aProfessionED;
173 	FixedText		aPhoneFT;
174 	Edit			aPhoneED;
175 	Edit 			aMobilePhoneED;
176 	FixedText		aFaxFT;
177 	Edit			aFaxED;
178 	FixedText		aWWWMailFT;
179 	Edit			aHomePageED;
180 	Edit			aMailED;
181 
182 	SwPrivateDataPage(Window* pParent, const SfxItemSet& rSet);
183 	~SwPrivateDataPage();
184 
185     using TabPage::ActivatePage;
186     using TabPage::DeactivatePage;
187 
188 public:
189 
190 	static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
191 
192 	virtual void ActivatePage(const SfxItemSet& rSet);
193 	virtual int  DeactivatePage(SfxItemSet* pSet = 0);
194 	virtual sal_Bool FillItemSet(SfxItemSet& rSet);
195 	virtual void Reset(const SfxItemSet& rSet);
196 };
197 /* -----------------29.09.99 08:51-------------------
198 
199  --------------------------------------------------*/
200 class SwBusinessDataPage : public SfxTabPage
201 {
202     FixedLine       aDataFL;
203 	FixedText		aCompanyFT;
204 	Edit			aCompanyED;
205 	FixedText		aCompanyExtFT;
206 	Edit			aCompanyExtED;
207 	FixedText		aSloganFT;
208 	Edit			aSloganED;
209 
210 	FixedText		aStreetFT;
211 	Edit			aStreetED;
212 	FixedText		aZipCityFT;
213 	Edit			aZipED;
214 	Edit			aCityED;
215 	FixedText		aCountryStateFT;
216 	Edit			aCountryED;
217 	Edit			aStateED;
218 
219 	FixedText		aPositionFT;
220 	Edit			aPositionED;
221 
222 	FixedText		aPhoneFT;
223 	Edit			aPhoneED;
224 	Edit 			aMobilePhoneED;
225 	FixedText		aFaxFT;
226 	Edit			aFaxED;
227 
228 	FixedText		aWWWMailFT;
229 	Edit			aHomePageED;
230 	Edit			aMailED;
231 
232 	SwBusinessDataPage(Window* pParent, const SfxItemSet& rSet);
233 	~SwBusinessDataPage();
234 
235     using TabPage::ActivatePage;
236     using TabPage::DeactivatePage;
237 
238 public:
239 
240 	static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
241 
242 	virtual void ActivatePage(const SfxItemSet& rSet);
243 	virtual int  DeactivatePage(SfxItemSet* pSet = 0);
244 	virtual sal_Bool FillItemSet(SfxItemSet& rSet);
245 	virtual void Reset(const SfxItemSet& rSet);
246 };
247 
248 #endif
249 
250