xref: /aoo41x/main/cui/source/options/optinet2.hxx (revision a552f513)
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 _SVX_OPTINET_HXX
24 #define _SVX_OPTINET_HXX
25 
26 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
27 #include <vcl/lstbox.hxx>
28 #include <vcl/group.hxx>
29 #include <vcl/field.hxx>
30 #include <svl/svarray.hxx>
31 #include <svtools/stdctrl.hxx>
32 #include <svtools/svtabbx.hxx>
33 #include <sfx2/tabdlg.hxx>
34 #include <svl/srchcfg.hxx>
35 
36 #ifdef _SVX_OPTINET2_CXX
37 #include <svtools/headbar.hxx>
38 #else
39 class HeaderBar;
40 #endif
41 #include <readonlyimage.hxx>
42 
43 class SfxFilter;
44 class SvtInetOptions;
45 
46 #ifndef SV_NODIALOG
47 #define PROXY_CONTROLS 	23
48 #define CACHE_CONTROLS 	20
49 #define INET_SEARCH 	19
50 
51 #if defined(OS2)
52 #define TYPE_CONTROLS  20
53 #else
54 #define TYPE_CONTROLS  18
55 #endif
56 
57 namespace svx {
58     class SecurityOptionsDialog;
59 }
60 
61 namespace lang = ::com::sun::star::lang;
62 namespace uno = ::com::sun::star::uno;
63 
64 // class SvxNoSpaceEdit --------------------------------------------------
65 
66 class SvxNoSpaceEdit : public Edit
67 {
68 private:
69 	sal_Bool			bOnlyNumeric;
70 
71 public:
SvxNoSpaceEdit(Window * pParent,ResId rResId,sal_Bool bNum=sal_False)72 	SvxNoSpaceEdit(Window* pParent, ResId rResId, sal_Bool bNum = sal_False ) :
73 		Edit( pParent, rResId ), bOnlyNumeric( bNum ) {}
74 
75 	virtual void	KeyInput( const KeyEvent& rKEvent );
76 	virtual void	Modify();
77 };
78 
79 typedef SfxFilter* SfxFilterPtr;
80 SV_DECL_PTRARR( SfxFilterPtrArr, SfxFilterPtr, 0, 4 )
81 
82 // class SvxProxyTabPage -------------------------------------------------
83 
84 class SvxProxyTabPage : public SfxTabPage
85 {
86 private:
87     FixedLine       aOptionGB;
88 
89 	FixedText 		aProxyModeFT;
90 	ListBox			aProxyModeLB;
91 
92 	FixedText		aHttpProxyFT;
93 	SvxNoSpaceEdit	aHttpProxyED;
94 	FixedText		aHttpPortFT;
95 	SvxNoSpaceEdit 	aHttpPortED;
96 
97 	FixedText		aHttpsProxyFT;
98 	SvxNoSpaceEdit	aHttpsProxyED;
99 	FixedText		aHttpsPortFT;
100 	SvxNoSpaceEdit 	aHttpsPortED;
101 
102 
103 	FixedText		aFtpProxyFT;
104 	SvxNoSpaceEdit	aFtpProxyED;
105 	FixedText		aFtpPortFT;
106 	SvxNoSpaceEdit 	aFtpPortED;
107 
108 	FixedText		aNoProxyForFT;
109 	Edit			aNoProxyForED;
110 	FixedText		aNoProxyDescFT;
111 
112     String          sFromBrowser;
113 
114     const rtl::OUString aProxyModePN;
115     const rtl::OUString aHttpProxyPN;
116     const rtl::OUString aHttpPortPN;
117     const rtl::OUString aHttpsProxyPN;
118     const rtl::OUString aHttpsPortPN;
119     const rtl::OUString aFtpProxyPN;
120     const rtl::OUString aFtpPortPN;
121     const rtl::OUString aNoProxyDescPN;
122 
123     uno::Reference< uno::XInterface > m_xConfigurationUpdateAccess;
124 
125 #ifdef _SVX_OPTINET2_CXX
126     void ArrangeControls_Impl();
127     void EnableControls_Impl(sal_Bool bEnable);
128     void ReadConfigData_Impl();
129     void ReadConfigDefaults_Impl();
130     void RestoreConfigDefaults_Impl();
131 
132 	DECL_LINK( ProxyHdl_Impl, ListBox * );
133 	DECL_LINK( LoseFocusHdl_Impl, Edit * );
134 #endif
135 
136 	SvxProxyTabPage( Window* pParent, const SfxItemSet& rSet );
137 	virtual ~SvxProxyTabPage();
138 
139 public:
140 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet );
141 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
142 	virtual	void 		Reset( const SfxItemSet& rSet );
143 };
144 
145 // class SvxSearchTabPage ------------------------------------------------
146 class SvxSearchConfig;
147 class SvxSearchTabPage : public SfxTabPage
148 {
149 	using TabPage::ActivatePage;
150 	using TabPage::DeactivatePage;
151 
152 private:
153     FixedLine       aSearchGB;
154 	ListBox			aSearchLB;
155 	FixedText		aSearchNameFT;
156 	SvxNoSpaceEdit	aSearchNameED;
157 
158 	FixedText		aSearchFT;
159 	RadioButton		aAndRB;
160 	RadioButton		aOrRB;
161 	RadioButton		aExactRB;
162 
163 	FixedText		aURLFT;
164 	SvxNoSpaceEdit	aURLED;
165 
166 	FixedText		aPostFixFT;
167 	SvxNoSpaceEdit	aPostFixED;
168 	FixedText		aSeparatorFT;
169 	SvxNoSpaceEdit	aSeparatorED;
170 	FixedText		aCaseFT;
171 	ListBox	 		aCaseED;
172 
173 	PushButton		aNewPB;
174 	PushButton		aAddPB;
175 	PushButton		aChangePB;
176 	PushButton		aDeletePB;
177 
178 	String 			sLastSelectedEntry;
179     String          sModifyMsg;
180 
181     SvxSearchConfig     aSearchConfig;
182     SvxSearchEngineData aCurrentSrchData;
183 
184 #ifdef _SVX_OPTINET2_CXX
185     void        InitControls_Impl();
186 
187     DECL_LINK(  NewSearchHdl_Impl, PushButton * );
188     DECL_LINK(  AddSearchHdl_Impl, PushButton * );
189     DECL_LINK(  ChangeSearchHdl_Impl, PushButton * );
190     DECL_LINK(  DeleteSearchHdl_Impl, PushButton * );
191     DECL_LINK(  SearchEntryHdl_Impl, ListBox * );
192     DECL_LINK(  SearchModifyHdl_Impl, SvxNoSpaceEdit * );
193     DECL_LINK(  SearchPartHdl_Impl, RadioButton * );
194 #endif
195 
196     virtual void        ActivatePage( const SfxItemSet& rSet );
197 	virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
198 	sal_Bool				ConfirmLeave( const String& rStringSelection );   //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00)
199 
200 	SvxSearchTabPage( Window* pParent, const SfxItemSet& rSet );
201 	virtual ~SvxSearchTabPage();
202 
203 public:
204 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet );
205 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
206 	virtual	void 		Reset( const SfxItemSet& rSet );
207 };
208 
209 // #98647# class SvxScriptExecListBox ------------------------------------
210 class SvxScriptExecListBox : public ListBox
211 { // for adding tooltips to ListBox
212 public:
SvxScriptExecListBox(Window * pParent,WinBits nStyle=WB_BORDER)213 	SvxScriptExecListBox( Window* pParent, WinBits nStyle = WB_BORDER )
214 			:ListBox(pParent, nStyle) {}
SvxScriptExecListBox(Window * pParent,const ResId & rResId)215 	SvxScriptExecListBox( Window* pParent, const ResId& rResId )
216 			:ListBox(pParent, rResId) {}
217 
218 protected:
219 	virtual void RequestHelp( const HelpEvent& rHEvt );
220 };
221 
222 // class SvxSecurityTabPage ---------------------------------------------
223 
224 class SvtJavaOptions;
225 class SvtSecurityOptions;
226 
227 class SvxSecurityTabPage : public SfxTabPage
228 {
229 	using TabPage::ActivatePage;
230 	using TabPage::DeactivatePage;
231 
232 private:
233     FixedLine           maSecurityOptionsFL;
234     FixedInfo           maSecurityOptionsFI;
235     PushButton          maSecurityOptionsPB;
236 
237     FixedLine           maPasswordsFL;
238     CheckBox            maSavePasswordsCB;
239     PushButton          maShowConnectionsPB;
240     CheckBox            maMasterPasswordCB;
241     FixedInfo           maMasterPasswordFI;
242     PushButton          maMasterPasswordPB;
243 
244     FixedLine           maMacroSecFL;
245     FixedInfo           maMacroSecFI;
246     PushButton          maMacroSecPB;
247 
248 
249     SvtSecurityOptions*         mpSecOptions;
250     svx::SecurityOptionsDialog* mpSecOptDlg;
251 
252     String              msPasswordStoringDeactivateStr;
253 
254     DECL_LINK(          SecurityOptionsHdl, PushButton* );
255     DECL_LINK(          SavePasswordHdl, void* );
256     DECL_LINK(          MasterPasswordHdl, PushButton* );
257     DECL_LINK(          MasterPasswordCBHdl, void* );
258     DECL_LINK(          ShowPasswordsHdl, PushButton* );
259     DECL_LINK(          MacroSecPBHdl, void* );
260 
261     void                InitControls();
262 
263 				SvxSecurityTabPage( Window* pParent, const SfxItemSet& rSet );
264 	virtual 	~SvxSecurityTabPage();
265 
266 protected:
267 	virtual void        ActivatePage( const SfxItemSet& rSet );
268 	virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
269 
270 public:
271 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet );
272 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
273 	virtual	void 		Reset( const SfxItemSet& rSet );
274 };
275 
276 #endif
277 
278 /* -----------------------------20.06.01 16:32--------------------------------
279 
280  ---------------------------------------------------------------------------*/
281 #ifdef WNT
282 #else
283 #define HELPER_PAGE_COMPLETE
284 #endif
285 
286 struct SvxEMailTabPage_Impl;
287 class SvxEMailTabPage : public SfxTabPage
288 {
289     FixedLine       aMailFL;
290     ReadOnlyImage   aMailerURLFI;
291     FixedText       aMailerURLFT;
292     Edit            aMailerURLED;
293     PushButton      aMailerURLPB;
294 
295     String          m_sDefaultFilterName;
296 
297     SvxEMailTabPage_Impl* pImpl;
298 
299     DECL_LINK(  FileDialogHdl_Impl, PushButton* ) ;
300 
301 public:
302     SvxEMailTabPage( Window* pParent, const SfxItemSet& rSet );
303     ~SvxEMailTabPage();
304 
305 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet );
306 
307 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
308 	virtual	void 		Reset( const SfxItemSet& rSet );
309 };
310 
311 #endif // #ifndef _SVX_OPTINET_HXX
312 
313 
314