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