merge the formfield patch from ooo-build
[ooovba.git] / svx / source / cui / optinet2.hxx
blob53f9cc695cb5e9970668ebdd701e9d244e501f30
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: optinet2.hxx,v $
10 * $Revision: 1.16 $
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 _SVX_OPTINET_HXX
31 #define _SVX_OPTINET_HXX
33 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
34 #include <vcl/lstbox.hxx>
35 #include <vcl/group.hxx>
36 #include <vcl/field.hxx>
37 #include <svtools/svarray.hxx>
38 #include <svtools/stdctrl.hxx>
39 #include <svtools/svtabbx.hxx>
40 #include <sfx2/tabdlg.hxx>
41 #ifndef _SVX_SRCHNCFG_HXX
42 #include "srchcfg.hxx"
43 #endif
45 #ifdef _SVX_OPTINET2_CXX
46 #include <svtools/headbar.hxx>
47 #else
48 class HeaderBar;
49 #endif
50 #include <readonlyimage.hxx>
52 class SfxFilter;
53 class SvtInetOptions;
55 #ifndef SV_NODIALOG
56 #define PROXY_CONTROLS 23
57 #define CACHE_CONTROLS 20
58 #define INET_SEARCH 19
60 #if defined(OS2)
61 #define TYPE_CONTROLS 20
62 #else
63 #define TYPE_CONTROLS 18
64 #endif
66 namespace svx {
67 class SecurityOptionsDialog;
70 namespace lang = ::com::sun::star::lang;
71 namespace uno = ::com::sun::star::uno;
73 // class SvxNoSpaceEdit --------------------------------------------------
75 class SvxNoSpaceEdit : public Edit
77 private:
78 BOOL bOnlyNumeric;
80 public:
81 SvxNoSpaceEdit(Window* pParent, ResId rResId, BOOL bNum = FALSE ) :
82 Edit( pParent, rResId ), bOnlyNumeric( bNum ) {}
84 virtual void KeyInput( const KeyEvent& rKEvent );
85 virtual void Modify();
88 typedef SfxFilter* SfxFilterPtr;
89 SV_DECL_PTRARR( SfxFilterPtrArr, SfxFilterPtr, 0, 4 )
91 // class SvxProxyTabPage -------------------------------------------------
93 class SvxProxyTabPage : public SfxTabPage
95 private:
96 FixedLine aOptionGB;
98 FixedText aProxyModeFT;
99 ListBox aProxyModeLB;
101 FixedText aHttpProxyFT;
102 SvxNoSpaceEdit aHttpProxyED;
103 FixedText aHttpPortFT;
104 SvxNoSpaceEdit aHttpPortED;
106 FixedText aHttpsProxyFT;
107 SvxNoSpaceEdit aHttpsProxyED;
108 FixedText aHttpsPortFT;
109 SvxNoSpaceEdit aHttpsPortED;
112 FixedText aFtpProxyFT;
113 SvxNoSpaceEdit aFtpProxyED;
114 FixedText aFtpPortFT;
115 SvxNoSpaceEdit aFtpPortED;
117 FixedText aNoProxyForFT;
118 Edit aNoProxyForED;
119 FixedText aNoProxyDescFT;
121 String sFromBrowser;
123 const rtl::OUString aProxyModePN;
124 const rtl::OUString aHttpProxyPN;
125 const rtl::OUString aHttpPortPN;
126 const rtl::OUString aHttpsProxyPN;
127 const rtl::OUString aHttpsPortPN;
128 const rtl::OUString aFtpProxyPN;
129 const rtl::OUString aFtpPortPN;
130 const rtl::OUString aNoProxyDescPN;
132 uno::Reference< uno::XInterface > m_xConfigurationUpdateAccess;
134 #ifdef _SVX_OPTINET2_CXX
135 void ArrangeControls_Impl();
136 void EnableControls_Impl(BOOL bEnable);
137 void ReadConfigData_Impl();
138 void ReadConfigDefaults_Impl();
139 void RestoreConfigDefaults_Impl();
141 DECL_LINK( ProxyHdl_Impl, ListBox * );
142 DECL_LINK( LoseFocusHdl_Impl, Edit * );
143 #endif
145 SvxProxyTabPage( Window* pParent, const SfxItemSet& rSet );
146 virtual ~SvxProxyTabPage();
148 public:
149 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
150 virtual BOOL FillItemSet( SfxItemSet& rSet );
151 virtual void Reset( const SfxItemSet& rSet );
154 // class SvxSearchTabPage ------------------------------------------------
155 class SvxSearchConfig;
156 class SvxSearchTabPage : public SfxTabPage
158 using TabPage::ActivatePage;
159 using TabPage::DeactivatePage;
161 private:
162 FixedLine aSearchGB;
163 ListBox aSearchLB;
164 FixedText aSearchNameFT;
165 SvxNoSpaceEdit aSearchNameED;
167 FixedText aSearchFT;
168 RadioButton aAndRB;
169 RadioButton aOrRB;
170 RadioButton aExactRB;
172 FixedText aURLFT;
173 SvxNoSpaceEdit aURLED;
175 FixedText aPostFixFT;
176 SvxNoSpaceEdit aPostFixED;
177 FixedText aSeparatorFT;
178 SvxNoSpaceEdit aSeparatorED;
179 FixedText aCaseFT;
180 ListBox aCaseED;
182 PushButton aNewPB;
183 PushButton aAddPB;
184 PushButton aChangePB;
185 PushButton aDeletePB;
187 String sLastSelectedEntry;
188 String sModifyMsg;
190 SvxSearchConfig aSearchConfig;
191 SvxSearchEngineData aCurrentSrchData;
193 #ifdef _SVX_OPTINET2_CXX
194 void InitControls_Impl();
196 DECL_LINK( NewSearchHdl_Impl, PushButton * );
197 DECL_LINK( AddSearchHdl_Impl, PushButton * );
198 DECL_LINK( ChangeSearchHdl_Impl, PushButton * );
199 DECL_LINK( DeleteSearchHdl_Impl, PushButton * );
200 DECL_LINK( SearchEntryHdl_Impl, ListBox * );
201 DECL_LINK( SearchModifyHdl_Impl, SvxNoSpaceEdit * );
202 DECL_LINK( SearchPartHdl_Impl, RadioButton * );
203 #endif
205 virtual void ActivatePage( const SfxItemSet& rSet );
206 virtual int DeactivatePage( SfxItemSet* pSet = 0 );
207 BOOL ConfirmLeave( const String& rStringSelection ); //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00)
209 SvxSearchTabPage( Window* pParent, const SfxItemSet& rSet );
210 virtual ~SvxSearchTabPage();
212 public:
213 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
214 virtual BOOL FillItemSet( SfxItemSet& rSet );
215 virtual void Reset( const SfxItemSet& rSet );
218 // #98647# class SvxScriptExecListBox ------------------------------------
219 class SvxScriptExecListBox : public ListBox
220 { // for adding tooltips to ListBox
221 public:
222 SvxScriptExecListBox( Window* pParent, WinBits nStyle = WB_BORDER )
223 :ListBox(pParent, nStyle) {}
224 SvxScriptExecListBox( Window* pParent, const ResId& rResId )
225 :ListBox(pParent, rResId) {}
227 protected:
228 virtual void RequestHelp( const HelpEvent& rHEvt );
231 // class SvxSecurityTabPage ---------------------------------------------
233 class SvtJavaOptions;
234 class SvtSecurityOptions;
236 class SvxSecurityTabPage : public SfxTabPage
238 using TabPage::ActivatePage;
239 using TabPage::DeactivatePage;
240 public:
241 enum RedliningMode { RL_NONE, RL_WRITER, RL_CALC };
243 private:
244 FixedLine maSecurityOptionsFL;
245 FixedInfo maSecurityOptionsFI;
246 PushButton maSecurityOptionsPB;
248 FixedLine maPasswordsFL;
249 CheckBox maSavePasswordsCB;
250 PushButton maShowConnectionsPB;
251 CheckBox maMasterPasswordCB;
252 FixedInfo maMasterPasswordFI;
253 PushButton maMasterPasswordPB;
255 FixedLine maMacroSecFL;
256 FixedInfo maMacroSecFI;
257 PushButton maMacroSecPB;
259 FixedLine maFilesharingFL;
260 CheckBox maRecommReadOnlyCB;
261 CheckBox maRecordChangesCB;
262 PushButton maProtectRecordsPB;
264 SvtSecurityOptions* mpSecOptions;
265 svx::SecurityOptionsDialog* mpSecOptDlg;
267 RedliningMode meRedlingMode;
268 String msProtectRecordsStr;
269 String msUnprotectRecordsStr;
270 String msPasswordStoringDeactivateStr;
272 DECL_LINK( SecurityOptionsHdl, PushButton* );
273 DECL_LINK( SavePasswordHdl, void* );
274 DECL_LINK( MasterPasswordHdl, PushButton* );
275 DECL_LINK( MasterPasswordCBHdl, void* );
276 DECL_LINK( ShowPasswordsHdl, PushButton* );
277 DECL_LINK( MacroSecPBHdl, void* );
278 DECL_LINK( RecordChangesCBHdl, void* );
279 DECL_LINK( ProtectRecordsPBHdl, void* );
281 void CheckRecordChangesState( void );
282 void InitControls();
284 SvxSecurityTabPage( Window* pParent, const SfxItemSet& rSet );
285 virtual ~SvxSecurityTabPage();
287 protected:
288 virtual void ActivatePage( const SfxItemSet& rSet );
289 virtual int DeactivatePage( SfxItemSet* pSet = 0 );
291 public:
292 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
293 virtual BOOL FillItemSet( SfxItemSet& rSet );
294 virtual void Reset( const SfxItemSet& rSet );
297 //added by jmeng begin
298 class MozPluginTabPage : public SfxTabPage
300 FixedLine aMSWordGB;
301 CheckBox aWBasicCodeCB;
303 BOOL isInstalled(void);
304 BOOL installPlugin(void);
305 BOOL uninstallPlugin(void);
307 MozPluginTabPage( Window* pParent, const SfxItemSet& rSet );
308 virtual ~MozPluginTabPage();
310 public:
312 static SfxTabPage* Create( Window* pParent,
313 const SfxItemSet& rAttrSet );
315 virtual BOOL FillItemSet( SfxItemSet& rSet );
316 virtual void Reset( const SfxItemSet& rSet );
319 //added by jmeng end
320 #endif
322 /* -----------------------------20.06.01 16:32--------------------------------
324 ---------------------------------------------------------------------------*/
325 #ifdef WNT
326 #else
327 #define HELPER_PAGE_COMPLETE
328 #endif
330 struct SvxEMailTabPage_Impl;
331 class SvxEMailTabPage : public SfxTabPage
333 FixedLine aMailFL;
334 ReadOnlyImage aMailerURLFI;
335 FixedText aMailerURLFT;
336 Edit aMailerURLED;
337 PushButton aMailerURLPB;
339 String m_sDefaultFilterName;
341 SvxEMailTabPage_Impl* pImpl;
343 DECL_LINK( FileDialogHdl_Impl, PushButton* ) ;
345 public:
346 SvxEMailTabPage( Window* pParent, const SfxItemSet& rSet );
347 ~SvxEMailTabPage();
349 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
351 virtual BOOL FillItemSet( SfxItemSet& rSet );
352 virtual void Reset( const SfxItemSet& rSet );
355 #endif // #ifndef _SVX_OPTINET_HXX