xref: /aoo42x/main/cui/source/options/optinet2.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _SVX_OPTINET_HXX
28*cdf0e10cSrcweir #define _SVX_OPTINET_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
31*cdf0e10cSrcweir #include <vcl/lstbox.hxx>
32*cdf0e10cSrcweir #include <vcl/group.hxx>
33*cdf0e10cSrcweir #include <vcl/field.hxx>
34*cdf0e10cSrcweir #include <svl/svarray.hxx>
35*cdf0e10cSrcweir #include <svtools/stdctrl.hxx>
36*cdf0e10cSrcweir #include <svtools/svtabbx.hxx>
37*cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
38*cdf0e10cSrcweir #include <svl/srchcfg.hxx>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir #ifdef _SVX_OPTINET2_CXX
41*cdf0e10cSrcweir #include <svtools/headbar.hxx>
42*cdf0e10cSrcweir #else
43*cdf0e10cSrcweir class HeaderBar;
44*cdf0e10cSrcweir #endif
45*cdf0e10cSrcweir #include <readonlyimage.hxx>
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir class SfxFilter;
48*cdf0e10cSrcweir class SvtInetOptions;
49*cdf0e10cSrcweir 
50*cdf0e10cSrcweir #ifndef SV_NODIALOG
51*cdf0e10cSrcweir #define PROXY_CONTROLS 	23
52*cdf0e10cSrcweir #define CACHE_CONTROLS 	20
53*cdf0e10cSrcweir #define INET_SEARCH 	19
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir #if defined(OS2)
56*cdf0e10cSrcweir #define TYPE_CONTROLS  20
57*cdf0e10cSrcweir #else
58*cdf0e10cSrcweir #define TYPE_CONTROLS  18
59*cdf0e10cSrcweir #endif
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir namespace svx {
62*cdf0e10cSrcweir     class SecurityOptionsDialog;
63*cdf0e10cSrcweir }
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir namespace lang = ::com::sun::star::lang;
66*cdf0e10cSrcweir namespace uno = ::com::sun::star::uno;
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir // class SvxNoSpaceEdit --------------------------------------------------
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir class SvxNoSpaceEdit : public Edit
71*cdf0e10cSrcweir {
72*cdf0e10cSrcweir private:
73*cdf0e10cSrcweir 	sal_Bool			bOnlyNumeric;
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir public:
76*cdf0e10cSrcweir 	SvxNoSpaceEdit(Window* pParent, ResId rResId, sal_Bool bNum = sal_False ) :
77*cdf0e10cSrcweir 		Edit( pParent, rResId ), bOnlyNumeric( bNum ) {}
78*cdf0e10cSrcweir 
79*cdf0e10cSrcweir 	virtual void	KeyInput( const KeyEvent& rKEvent );
80*cdf0e10cSrcweir 	virtual void	Modify();
81*cdf0e10cSrcweir };
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir typedef SfxFilter* SfxFilterPtr;
84*cdf0e10cSrcweir SV_DECL_PTRARR( SfxFilterPtrArr, SfxFilterPtr, 0, 4 )
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir // class SvxProxyTabPage -------------------------------------------------
87*cdf0e10cSrcweir 
88*cdf0e10cSrcweir class SvxProxyTabPage : public SfxTabPage
89*cdf0e10cSrcweir {
90*cdf0e10cSrcweir private:
91*cdf0e10cSrcweir     FixedLine       aOptionGB;
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir 	FixedText 		aProxyModeFT;
94*cdf0e10cSrcweir 	ListBox			aProxyModeLB;
95*cdf0e10cSrcweir 
96*cdf0e10cSrcweir 	FixedText		aHttpProxyFT;
97*cdf0e10cSrcweir 	SvxNoSpaceEdit	aHttpProxyED;
98*cdf0e10cSrcweir 	FixedText		aHttpPortFT;
99*cdf0e10cSrcweir 	SvxNoSpaceEdit 	aHttpPortED;
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir 	FixedText		aHttpsProxyFT;
102*cdf0e10cSrcweir 	SvxNoSpaceEdit	aHttpsProxyED;
103*cdf0e10cSrcweir 	FixedText		aHttpsPortFT;
104*cdf0e10cSrcweir 	SvxNoSpaceEdit 	aHttpsPortED;
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir 
107*cdf0e10cSrcweir 	FixedText		aFtpProxyFT;
108*cdf0e10cSrcweir 	SvxNoSpaceEdit	aFtpProxyED;
109*cdf0e10cSrcweir 	FixedText		aFtpPortFT;
110*cdf0e10cSrcweir 	SvxNoSpaceEdit 	aFtpPortED;
111*cdf0e10cSrcweir 
112*cdf0e10cSrcweir 	FixedText		aNoProxyForFT;
113*cdf0e10cSrcweir 	Edit			aNoProxyForED;
114*cdf0e10cSrcweir 	FixedText		aNoProxyDescFT;
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir     String          sFromBrowser;
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir     const rtl::OUString aProxyModePN;
119*cdf0e10cSrcweir     const rtl::OUString aHttpProxyPN;
120*cdf0e10cSrcweir     const rtl::OUString aHttpPortPN;
121*cdf0e10cSrcweir     const rtl::OUString aHttpsProxyPN;
122*cdf0e10cSrcweir     const rtl::OUString aHttpsPortPN;
123*cdf0e10cSrcweir     const rtl::OUString aFtpProxyPN;
124*cdf0e10cSrcweir     const rtl::OUString aFtpPortPN;
125*cdf0e10cSrcweir     const rtl::OUString aNoProxyDescPN;
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir     uno::Reference< uno::XInterface > m_xConfigurationUpdateAccess;
128*cdf0e10cSrcweir 
129*cdf0e10cSrcweir #ifdef _SVX_OPTINET2_CXX
130*cdf0e10cSrcweir     void ArrangeControls_Impl();
131*cdf0e10cSrcweir     void EnableControls_Impl(sal_Bool bEnable);
132*cdf0e10cSrcweir     void ReadConfigData_Impl();
133*cdf0e10cSrcweir     void ReadConfigDefaults_Impl();
134*cdf0e10cSrcweir     void RestoreConfigDefaults_Impl();
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir 	DECL_LINK( ProxyHdl_Impl, ListBox * );
137*cdf0e10cSrcweir 	DECL_LINK( LoseFocusHdl_Impl, Edit * );
138*cdf0e10cSrcweir #endif
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir 	SvxProxyTabPage( Window* pParent, const SfxItemSet& rSet );
141*cdf0e10cSrcweir 	virtual ~SvxProxyTabPage();
142*cdf0e10cSrcweir 
143*cdf0e10cSrcweir public:
144*cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet );
145*cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
146*cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
147*cdf0e10cSrcweir };
148*cdf0e10cSrcweir 
149*cdf0e10cSrcweir // class SvxSearchTabPage ------------------------------------------------
150*cdf0e10cSrcweir class SvxSearchConfig;
151*cdf0e10cSrcweir class SvxSearchTabPage : public SfxTabPage
152*cdf0e10cSrcweir {
153*cdf0e10cSrcweir 	using TabPage::ActivatePage;
154*cdf0e10cSrcweir 	using TabPage::DeactivatePage;
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir private:
157*cdf0e10cSrcweir     FixedLine       aSearchGB;
158*cdf0e10cSrcweir 	ListBox			aSearchLB;
159*cdf0e10cSrcweir 	FixedText		aSearchNameFT;
160*cdf0e10cSrcweir 	SvxNoSpaceEdit	aSearchNameED;
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir 	FixedText		aSearchFT;
163*cdf0e10cSrcweir 	RadioButton		aAndRB;
164*cdf0e10cSrcweir 	RadioButton		aOrRB;
165*cdf0e10cSrcweir 	RadioButton		aExactRB;
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir 	FixedText		aURLFT;
168*cdf0e10cSrcweir 	SvxNoSpaceEdit	aURLED;
169*cdf0e10cSrcweir 
170*cdf0e10cSrcweir 	FixedText		aPostFixFT;
171*cdf0e10cSrcweir 	SvxNoSpaceEdit	aPostFixED;
172*cdf0e10cSrcweir 	FixedText		aSeparatorFT;
173*cdf0e10cSrcweir 	SvxNoSpaceEdit	aSeparatorED;
174*cdf0e10cSrcweir 	FixedText		aCaseFT;
175*cdf0e10cSrcweir 	ListBox	 		aCaseED;
176*cdf0e10cSrcweir 
177*cdf0e10cSrcweir 	PushButton		aNewPB;
178*cdf0e10cSrcweir 	PushButton		aAddPB;
179*cdf0e10cSrcweir 	PushButton		aChangePB;
180*cdf0e10cSrcweir 	PushButton		aDeletePB;
181*cdf0e10cSrcweir 
182*cdf0e10cSrcweir 	String 			sLastSelectedEntry;
183*cdf0e10cSrcweir     String          sModifyMsg;
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir     SvxSearchConfig     aSearchConfig;
186*cdf0e10cSrcweir     SvxSearchEngineData aCurrentSrchData;
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir #ifdef _SVX_OPTINET2_CXX
189*cdf0e10cSrcweir     void        InitControls_Impl();
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir     DECL_LINK(  NewSearchHdl_Impl, PushButton * );
192*cdf0e10cSrcweir     DECL_LINK(  AddSearchHdl_Impl, PushButton * );
193*cdf0e10cSrcweir     DECL_LINK(  ChangeSearchHdl_Impl, PushButton * );
194*cdf0e10cSrcweir     DECL_LINK(  DeleteSearchHdl_Impl, PushButton * );
195*cdf0e10cSrcweir     DECL_LINK(  SearchEntryHdl_Impl, ListBox * );
196*cdf0e10cSrcweir     DECL_LINK(  SearchModifyHdl_Impl, SvxNoSpaceEdit * );
197*cdf0e10cSrcweir     DECL_LINK(  SearchPartHdl_Impl, RadioButton * );
198*cdf0e10cSrcweir #endif
199*cdf0e10cSrcweir 
200*cdf0e10cSrcweir     virtual void        ActivatePage( const SfxItemSet& rSet );
201*cdf0e10cSrcweir 	virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
202*cdf0e10cSrcweir 	sal_Bool				ConfirmLeave( const String& rStringSelection );   //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00)
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir 	SvxSearchTabPage( Window* pParent, const SfxItemSet& rSet );
205*cdf0e10cSrcweir 	virtual ~SvxSearchTabPage();
206*cdf0e10cSrcweir 
207*cdf0e10cSrcweir public:
208*cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet );
209*cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
210*cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
211*cdf0e10cSrcweir };
212*cdf0e10cSrcweir 
213*cdf0e10cSrcweir // #98647# class SvxScriptExecListBox ------------------------------------
214*cdf0e10cSrcweir class SvxScriptExecListBox : public ListBox
215*cdf0e10cSrcweir { // for adding tooltips to ListBox
216*cdf0e10cSrcweir public:
217*cdf0e10cSrcweir 	SvxScriptExecListBox( Window* pParent, WinBits nStyle = WB_BORDER )
218*cdf0e10cSrcweir 			:ListBox(pParent, nStyle) {}
219*cdf0e10cSrcweir 	SvxScriptExecListBox( Window* pParent, const ResId& rResId )
220*cdf0e10cSrcweir 			:ListBox(pParent, rResId) {}
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir protected:
223*cdf0e10cSrcweir 	virtual void RequestHelp( const HelpEvent& rHEvt );
224*cdf0e10cSrcweir };
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir // class SvxSecurityTabPage ---------------------------------------------
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir class SvtJavaOptions;
229*cdf0e10cSrcweir class SvtSecurityOptions;
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir class SvxSecurityTabPage : public SfxTabPage
232*cdf0e10cSrcweir {
233*cdf0e10cSrcweir 	using TabPage::ActivatePage;
234*cdf0e10cSrcweir 	using TabPage::DeactivatePage;
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir private:
237*cdf0e10cSrcweir     FixedLine           maSecurityOptionsFL;
238*cdf0e10cSrcweir     FixedInfo           maSecurityOptionsFI;
239*cdf0e10cSrcweir     PushButton          maSecurityOptionsPB;
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir     FixedLine           maPasswordsFL;
242*cdf0e10cSrcweir     CheckBox            maSavePasswordsCB;
243*cdf0e10cSrcweir     PushButton          maShowConnectionsPB;
244*cdf0e10cSrcweir     CheckBox            maMasterPasswordCB;
245*cdf0e10cSrcweir     FixedInfo           maMasterPasswordFI;
246*cdf0e10cSrcweir     PushButton          maMasterPasswordPB;
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir     FixedLine           maMacroSecFL;
249*cdf0e10cSrcweir     FixedInfo           maMacroSecFI;
250*cdf0e10cSrcweir     PushButton          maMacroSecPB;
251*cdf0e10cSrcweir 
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir     SvtSecurityOptions*         mpSecOptions;
254*cdf0e10cSrcweir     svx::SecurityOptionsDialog* mpSecOptDlg;
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir     String              msPasswordStoringDeactivateStr;
257*cdf0e10cSrcweir 
258*cdf0e10cSrcweir     DECL_LINK(          SecurityOptionsHdl, PushButton* );
259*cdf0e10cSrcweir     DECL_LINK(          SavePasswordHdl, void* );
260*cdf0e10cSrcweir     DECL_LINK(          MasterPasswordHdl, PushButton* );
261*cdf0e10cSrcweir     DECL_LINK(          MasterPasswordCBHdl, void* );
262*cdf0e10cSrcweir     DECL_LINK(          ShowPasswordsHdl, PushButton* );
263*cdf0e10cSrcweir     DECL_LINK(          MacroSecPBHdl, void* );
264*cdf0e10cSrcweir 
265*cdf0e10cSrcweir     void                InitControls();
266*cdf0e10cSrcweir 
267*cdf0e10cSrcweir 				SvxSecurityTabPage( Window* pParent, const SfxItemSet& rSet );
268*cdf0e10cSrcweir 	virtual 	~SvxSecurityTabPage();
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir protected:
271*cdf0e10cSrcweir 	virtual void        ActivatePage( const SfxItemSet& rSet );
272*cdf0e10cSrcweir 	virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
273*cdf0e10cSrcweir 
274*cdf0e10cSrcweir public:
275*cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet );
276*cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
277*cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
278*cdf0e10cSrcweir };
279*cdf0e10cSrcweir 
280*cdf0e10cSrcweir //added by jmeng begin
281*cdf0e10cSrcweir class MozPluginTabPage : public SfxTabPage
282*cdf0e10cSrcweir {
283*cdf0e10cSrcweir     FixedLine       aMSWordGB;
284*cdf0e10cSrcweir 	CheckBox		aWBasicCodeCB;
285*cdf0e10cSrcweir 
286*cdf0e10cSrcweir 	sal_Bool isInstalled(void);
287*cdf0e10cSrcweir 	sal_Bool installPlugin(void);
288*cdf0e10cSrcweir 	sal_Bool uninstallPlugin(void);
289*cdf0e10cSrcweir 
290*cdf0e10cSrcweir 	MozPluginTabPage( Window* pParent, const SfxItemSet& rSet );
291*cdf0e10cSrcweir 	virtual ~MozPluginTabPage();
292*cdf0e10cSrcweir 
293*cdf0e10cSrcweir public:
294*cdf0e10cSrcweir 
295*cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent,
296*cdf0e10cSrcweir 								const SfxItemSet& rAttrSet );
297*cdf0e10cSrcweir 
298*cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
299*cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
300*cdf0e10cSrcweir 
301*cdf0e10cSrcweir };
302*cdf0e10cSrcweir //added by jmeng end
303*cdf0e10cSrcweir #endif
304*cdf0e10cSrcweir 
305*cdf0e10cSrcweir /* -----------------------------20.06.01 16:32--------------------------------
306*cdf0e10cSrcweir 
307*cdf0e10cSrcweir  ---------------------------------------------------------------------------*/
308*cdf0e10cSrcweir #ifdef WNT
309*cdf0e10cSrcweir #else
310*cdf0e10cSrcweir #define HELPER_PAGE_COMPLETE
311*cdf0e10cSrcweir #endif
312*cdf0e10cSrcweir 
313*cdf0e10cSrcweir struct SvxEMailTabPage_Impl;
314*cdf0e10cSrcweir class SvxEMailTabPage : public SfxTabPage
315*cdf0e10cSrcweir {
316*cdf0e10cSrcweir     FixedLine       aMailFL;
317*cdf0e10cSrcweir     ReadOnlyImage   aMailerURLFI;
318*cdf0e10cSrcweir     FixedText       aMailerURLFT;
319*cdf0e10cSrcweir     Edit            aMailerURLED;
320*cdf0e10cSrcweir     PushButton      aMailerURLPB;
321*cdf0e10cSrcweir 
322*cdf0e10cSrcweir     String          m_sDefaultFilterName;
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir     SvxEMailTabPage_Impl* pImpl;
325*cdf0e10cSrcweir 
326*cdf0e10cSrcweir     DECL_LINK(  FileDialogHdl_Impl, PushButton* ) ;
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir public:
329*cdf0e10cSrcweir     SvxEMailTabPage( Window* pParent, const SfxItemSet& rSet );
330*cdf0e10cSrcweir     ~SvxEMailTabPage();
331*cdf0e10cSrcweir 
332*cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet );
333*cdf0e10cSrcweir 
334*cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
335*cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
336*cdf0e10cSrcweir };
337*cdf0e10cSrcweir 
338*cdf0e10cSrcweir #endif // #ifndef _SVX_OPTINET_HXX
339*cdf0e10cSrcweir 
340*cdf0e10cSrcweir 
341