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 $
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"
45 #ifdef _SVX_OPTINET2_CXX
46 #include <svtools/headbar.hxx>
50 #include <readonlyimage.hxx>
56 #define PROXY_CONTROLS 23
57 #define CACHE_CONTROLS 20
58 #define INET_SEARCH 19
61 #define TYPE_CONTROLS 20
63 #define TYPE_CONTROLS 18
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
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
98 FixedText aProxyModeFT
;
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
;
119 FixedText aNoProxyDescFT
;
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
* );
145 SvxProxyTabPage( Window
* pParent
, const SfxItemSet
& rSet
);
146 virtual ~SvxProxyTabPage();
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
;
164 FixedText aSearchNameFT
;
165 SvxNoSpaceEdit aSearchNameED
;
170 RadioButton aExactRB
;
173 SvxNoSpaceEdit aURLED
;
175 FixedText aPostFixFT
;
176 SvxNoSpaceEdit aPostFixED
;
177 FixedText aSeparatorFT
;
178 SvxNoSpaceEdit aSeparatorED
;
184 PushButton aChangePB
;
185 PushButton aDeletePB
;
187 String sLastSelectedEntry
;
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
* );
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();
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
222 SvxScriptExecListBox( Window
* pParent
, WinBits nStyle
= WB_BORDER
)
223 :ListBox(pParent
, nStyle
) {}
224 SvxScriptExecListBox( Window
* pParent
, const ResId
& rResId
)
225 :ListBox(pParent
, rResId
) {}
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
;
241 enum RedliningMode
{ RL_NONE
, RL_WRITER
, RL_CALC
};
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 );
284 SvxSecurityTabPage( Window
* pParent
, const SfxItemSet
& rSet
);
285 virtual ~SvxSecurityTabPage();
288 virtual void ActivatePage( const SfxItemSet
& rSet
);
289 virtual int DeactivatePage( SfxItemSet
* pSet
= 0 );
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
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();
312 static SfxTabPage
* Create( Window
* pParent
,
313 const SfxItemSet
& rAttrSet
);
315 virtual BOOL
FillItemSet( SfxItemSet
& rSet
);
316 virtual void Reset( const SfxItemSet
& rSet
);
322 /* -----------------------------20.06.01 16:32--------------------------------
324 ---------------------------------------------------------------------------*/
327 #define HELPER_PAGE_COMPLETE
330 struct SvxEMailTabPage_Impl
;
331 class SvxEMailTabPage
: public SfxTabPage
334 ReadOnlyImage aMailerURLFI
;
335 FixedText aMailerURLFT
;
337 PushButton aMailerURLPB
;
339 String m_sDefaultFilterName
;
341 SvxEMailTabPage_Impl
* pImpl
;
343 DECL_LINK( FileDialogHdl_Impl
, PushButton
* ) ;
346 SvxEMailTabPage( Window
* pParent
, const SfxItemSet
& rSet
);
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