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