merge the formfield patch from ooo-build
[ooovba.git] / sw / source / ui / envelp / swuilabimp.hxx
blob3aa32ebfe139bf09be2a05e2ed4327cb26a59536
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: swuilabimp.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SWUILABIMP_HXX
31 #define _SWUILABIMP_HXX
32 #include "labimp.hxx"
34 class SwLabPage : public SfxTabPage
36 SwNewDBMgr* pNewDBMgr;
37 String sActDBName;
38 SwLabItem aItem;
40 FixedText aWritingText;
41 CheckBox aAddrBox;
42 MultiLineEdit aWritingEdit;
43 FixedText aDatabaseFT;
44 ListBox aDatabaseLB;
45 FixedText aTableFT;
46 ListBox aTableLB;
47 ImageButton aInsertBT;
48 FixedText aDBFieldFT;
49 ListBox aDBFieldLB;
50 // PushButton aDatabaseButton;
51 FixedLine aWritingFL;
53 RadioButton aContButton;
54 RadioButton aSheetButton;
55 FixedText aMakeText;
56 ListBox aMakeBox;
57 FixedText aTypeText;
58 ListBox aTypeBox;
59 ListBox aHiddenSortTypeBox;
60 FixedInfo aFormatInfo;
61 FixedLine aFormatFL;
63 sal_Bool m_bLabel;
65 SwLabPage(Window* pParent, const SfxItemSet& rSet);
66 ~SwLabPage();
68 DECL_LINK( AddrHdl, Button * );
69 DECL_LINK( DatabaseHdl, ListBox *pListBox );
70 // DECL_LINK( DatabaseButtonHdl, Button * );
71 DECL_LINK( FieldHdl, Button * );
72 DECL_LINK( PageHdl, Button * );
73 DECL_LINK( MakeHdl, ListBox * );
74 DECL_LINK( TypeHdl, ListBox * );
76 void DisplayFormat ();
77 SwLabRec* GetSelectedEntryPos();
79 using TabPage::ActivatePage;
80 using TabPage::DeactivatePage;
81 using Window::GetParent;
83 public:
85 static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
87 virtual void ActivatePage(const SfxItemSet& rSet);
88 virtual int DeactivatePage(SfxItemSet* pSet = 0);
89 void FillItem(SwLabItem& rItem);
90 virtual sal_Bool FillItemSet(SfxItemSet& rSet);
91 virtual void Reset(const SfxItemSet& rSet);
93 SwLabDlg* GetParent() {return (SwLabDlg*) SfxTabPage::GetParent()->GetParent();}
95 void SetToBusinessCard();
97 void InitDatabaseBox();
98 inline void SetNewDBMgr(SwNewDBMgr* pDBMgr) { pNewDBMgr = pDBMgr; }
99 inline SwNewDBMgr* GetNewDBMgr() const { return pNewDBMgr; }
102 /* -----------------08.07.99 13:48-------------------
104 --------------------------------------------------*/
105 class SwOneExampleFrame;
106 class SwVisitingCardPage : public SfxTabPage
108 SvTreeListBox aAutoTextLB;
109 FixedText aAutoTextGroupFT;
110 ListBox aAutoTextGroupLB;
112 FixedLine aContentFL;
114 Window aExampleWIN;
116 String sVisCardGroup;
117 String sTempURL;
119 SwLabItem aLabItem;
121 SwOneExampleFrame* pExampleFrame;
122 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > _xAutoText;
125 DECL_LINK( AutoTextSelectHdl, void* );
126 DECL_LINK( FrameControlInitializedHdl, void* );
128 void InitFrameControl();
129 void UpdateFields();
131 void ClearUserData();
133 using SfxTabPage::SetUserData;
134 void SetUserData( sal_uInt32 nCnt,
135 const rtl::OUString* pNames,
136 const rtl::OUString* pValues );
138 SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet);
139 ~SwVisitingCardPage();
141 using TabPage::ActivatePage;
142 using TabPage::DeactivatePage;
144 public:
146 static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
148 virtual void ActivatePage(const SfxItemSet& rSet);
149 virtual int DeactivatePage(SfxItemSet* pSet = 0);
150 virtual sal_Bool FillItemSet(SfxItemSet& rSet);
151 virtual void Reset(const SfxItemSet& rSet);
153 /* -----------------29.09.99 08:51-------------------
155 --------------------------------------------------*/
156 class SwPrivateDataPage : public SfxTabPage
158 FixedLine aDataFL;
160 FixedText aNameFT;
161 Edit aFirstNameED;
162 Edit aNameED;
163 Edit aShortCutED;
165 FixedText aName2FT;
166 Edit aFirstName2ED;
167 Edit aName2ED;
168 Edit aShortCut2ED;
170 FixedText aStreetFT;
171 Edit aStreetED;
172 FixedText aZipCityFT;
173 Edit aZipED;
174 Edit aCityED;
175 FixedText aCountryStateFT;
176 Edit aCountryED;
177 Edit aStateED;
178 FixedText aTitleProfessionFT;
179 Edit aTitleED;
180 Edit aProfessionED;
181 FixedText aPhoneFT;
182 Edit aPhoneED;
183 Edit aMobilePhoneED;
184 FixedText aFaxFT;
185 Edit aFaxED;
186 FixedText aWWWMailFT;
187 Edit aHomePageED;
188 Edit aMailED;
190 SwPrivateDataPage(Window* pParent, const SfxItemSet& rSet);
191 ~SwPrivateDataPage();
193 using TabPage::ActivatePage;
194 using TabPage::DeactivatePage;
196 public:
198 static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
200 virtual void ActivatePage(const SfxItemSet& rSet);
201 virtual int DeactivatePage(SfxItemSet* pSet = 0);
202 virtual sal_Bool FillItemSet(SfxItemSet& rSet);
203 virtual void Reset(const SfxItemSet& rSet);
205 /* -----------------29.09.99 08:51-------------------
207 --------------------------------------------------*/
208 class SwBusinessDataPage : public SfxTabPage
210 FixedLine aDataFL;
211 FixedText aCompanyFT;
212 Edit aCompanyED;
213 FixedText aCompanyExtFT;
214 Edit aCompanyExtED;
215 FixedText aSloganFT;
216 Edit aSloganED;
218 FixedText aStreetFT;
219 Edit aStreetED;
220 FixedText aZipCityFT;
221 Edit aZipED;
222 Edit aCityED;
223 FixedText aCountryStateFT;
224 Edit aCountryED;
225 Edit aStateED;
227 FixedText aPositionFT;
228 Edit aPositionED;
230 FixedText aPhoneFT;
231 Edit aPhoneED;
232 Edit aMobilePhoneED;
233 FixedText aFaxFT;
234 Edit aFaxED;
236 FixedText aWWWMailFT;
237 Edit aHomePageED;
238 Edit aMailED;
240 SwBusinessDataPage(Window* pParent, const SfxItemSet& rSet);
241 ~SwBusinessDataPage();
243 using TabPage::ActivatePage;
244 using TabPage::DeactivatePage;
246 public:
248 static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
250 virtual void ActivatePage(const SfxItemSet& rSet);
251 virtual int DeactivatePage(SfxItemSet* pSet = 0);
252 virtual sal_Bool FillItemSet(SfxItemSet& rSet);
253 virtual void Reset(const SfxItemSet& rSet);
256 #endif