1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef _SVX_OPTINET_HXX
28 #define _SVX_OPTINET_HXX
30 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
31 #include <vcl/lstbox.hxx>
32 #include <vcl/group.hxx>
33 #include <vcl/field.hxx>
34 #include <svl/svarray.hxx>
35 #include <svtools/stdctrl.hxx>
36 #include <svtools/svtabbx.hxx>
37 #include <sfx2/tabdlg.hxx>
38 #include <svl/srchcfg.hxx>
40 #ifdef _SVX_OPTINET2_CXX
41 #include <svtools/headbar.hxx>
45 #include <readonlyimage.hxx>
51 #define PROXY_CONTROLS 23
52 #define CACHE_CONTROLS 20
53 #define INET_SEARCH 19
56 #define TYPE_CONTROLS 20
58 #define TYPE_CONTROLS 18
62 class SecurityOptionsDialog
;
65 namespace lang
= ::com::sun::star::lang
;
66 namespace uno
= ::com::sun::star::uno
;
68 // class SvxNoSpaceEdit --------------------------------------------------
70 class SvxNoSpaceEdit
: public Edit
73 sal_Bool bOnlyNumeric
;
76 SvxNoSpaceEdit(Window
* pParent
, ResId rResId
, sal_Bool bNum
= sal_False
) :
77 Edit( pParent
, rResId
), bOnlyNumeric( bNum
) {}
79 virtual void KeyInput( const KeyEvent
& rKEvent
);
80 virtual void Modify();
83 typedef SfxFilter
* SfxFilterPtr
;
84 SV_DECL_PTRARR( SfxFilterPtrArr
, SfxFilterPtr
, 0, 4 )
86 // class SvxProxyTabPage -------------------------------------------------
88 class SvxProxyTabPage
: public SfxTabPage
93 FixedText aProxyModeFT
;
96 FixedText aHttpProxyFT
;
97 SvxNoSpaceEdit aHttpProxyED
;
98 FixedText aHttpPortFT
;
99 SvxNoSpaceEdit aHttpPortED
;
101 FixedText aHttpsProxyFT
;
102 SvxNoSpaceEdit aHttpsProxyED
;
103 FixedText aHttpsPortFT
;
104 SvxNoSpaceEdit aHttpsPortED
;
107 FixedText aFtpProxyFT
;
108 SvxNoSpaceEdit aFtpProxyED
;
109 FixedText aFtpPortFT
;
110 SvxNoSpaceEdit aFtpPortED
;
112 FixedText aNoProxyForFT
;
114 FixedText aNoProxyDescFT
;
118 const rtl::OUString aProxyModePN
;
119 const rtl::OUString aHttpProxyPN
;
120 const rtl::OUString aHttpPortPN
;
121 const rtl::OUString aHttpsProxyPN
;
122 const rtl::OUString aHttpsPortPN
;
123 const rtl::OUString aFtpProxyPN
;
124 const rtl::OUString aFtpPortPN
;
125 const rtl::OUString aNoProxyDescPN
;
127 uno::Reference
< uno::XInterface
> m_xConfigurationUpdateAccess
;
129 #ifdef _SVX_OPTINET2_CXX
130 void ArrangeControls_Impl();
131 void EnableControls_Impl(sal_Bool bEnable
);
132 void ReadConfigData_Impl();
133 void ReadConfigDefaults_Impl();
134 void RestoreConfigDefaults_Impl();
136 DECL_LINK( ProxyHdl_Impl
, ListBox
* );
137 DECL_LINK( LoseFocusHdl_Impl
, Edit
* );
140 SvxProxyTabPage( Window
* pParent
, const SfxItemSet
& rSet
);
141 virtual ~SvxProxyTabPage();
144 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& rAttrSet
);
145 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
146 virtual void Reset( const SfxItemSet
& rSet
);
149 // class SvxSearchTabPage ------------------------------------------------
150 class SvxSearchConfig
;
151 class SvxSearchTabPage
: public SfxTabPage
153 using TabPage::ActivatePage
;
154 using TabPage::DeactivatePage
;
159 FixedText aSearchNameFT
;
160 SvxNoSpaceEdit aSearchNameED
;
165 RadioButton aExactRB
;
168 SvxNoSpaceEdit aURLED
;
170 FixedText aPostFixFT
;
171 SvxNoSpaceEdit aPostFixED
;
172 FixedText aSeparatorFT
;
173 SvxNoSpaceEdit aSeparatorED
;
179 PushButton aChangePB
;
180 PushButton aDeletePB
;
182 String sLastSelectedEntry
;
185 SvxSearchConfig aSearchConfig
;
186 SvxSearchEngineData aCurrentSrchData
;
188 #ifdef _SVX_OPTINET2_CXX
189 void InitControls_Impl();
191 DECL_LINK( NewSearchHdl_Impl
, PushButton
* );
192 DECL_LINK( AddSearchHdl_Impl
, PushButton
* );
193 DECL_LINK( ChangeSearchHdl_Impl
, PushButton
* );
194 DECL_LINK( DeleteSearchHdl_Impl
, PushButton
* );
195 DECL_LINK( SearchEntryHdl_Impl
, ListBox
* );
196 DECL_LINK( SearchModifyHdl_Impl
, SvxNoSpaceEdit
* );
197 DECL_LINK( SearchPartHdl_Impl
, RadioButton
* );
200 virtual void ActivatePage( const SfxItemSet
& rSet
);
201 virtual int DeactivatePage( SfxItemSet
* pSet
= 0 );
202 sal_Bool
ConfirmLeave( const String
& rStringSelection
); //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00)
204 SvxSearchTabPage( Window
* pParent
, const SfxItemSet
& rSet
);
205 virtual ~SvxSearchTabPage();
208 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& rAttrSet
);
209 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
210 virtual void Reset( const SfxItemSet
& rSet
);
213 // #98647# class SvxScriptExecListBox ------------------------------------
214 class SvxScriptExecListBox
: public ListBox
215 { // for adding tooltips to ListBox
217 SvxScriptExecListBox( Window
* pParent
, WinBits nStyle
= WB_BORDER
)
218 :ListBox(pParent
, nStyle
) {}
219 SvxScriptExecListBox( Window
* pParent
, const ResId
& rResId
)
220 :ListBox(pParent
, rResId
) {}
223 virtual void RequestHelp( const HelpEvent
& rHEvt
);
226 // class SvxSecurityTabPage ---------------------------------------------
228 class SvtJavaOptions
;
229 class SvtSecurityOptions
;
231 class SvxSecurityTabPage
: public SfxTabPage
233 using TabPage::ActivatePage
;
234 using TabPage::DeactivatePage
;
237 FixedLine maSecurityOptionsFL
;
238 FixedInfo maSecurityOptionsFI
;
239 PushButton maSecurityOptionsPB
;
241 FixedLine maPasswordsFL
;
242 CheckBox maSavePasswordsCB
;
243 PushButton maShowConnectionsPB
;
244 CheckBox maMasterPasswordCB
;
245 FixedInfo maMasterPasswordFI
;
246 PushButton maMasterPasswordPB
;
248 FixedLine maMacroSecFL
;
249 FixedInfo maMacroSecFI
;
250 PushButton maMacroSecPB
;
253 SvtSecurityOptions
* mpSecOptions
;
254 svx::SecurityOptionsDialog
* mpSecOptDlg
;
256 String msPasswordStoringDeactivateStr
;
258 DECL_LINK( SecurityOptionsHdl
, PushButton
* );
259 DECL_LINK( SavePasswordHdl
, void* );
260 DECL_LINK( MasterPasswordHdl
, PushButton
* );
261 DECL_LINK( MasterPasswordCBHdl
, void* );
262 DECL_LINK( ShowPasswordsHdl
, PushButton
* );
263 DECL_LINK( MacroSecPBHdl
, void* );
267 SvxSecurityTabPage( Window
* pParent
, const SfxItemSet
& rSet
);
268 virtual ~SvxSecurityTabPage();
271 virtual void ActivatePage( const SfxItemSet
& rSet
);
272 virtual int DeactivatePage( SfxItemSet
* pSet
= 0 );
275 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& rAttrSet
);
276 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
277 virtual void Reset( const SfxItemSet
& rSet
);
280 //added by jmeng begin
281 class MozPluginTabPage
: public SfxTabPage
284 CheckBox aWBasicCodeCB
;
286 sal_Bool
isInstalled(void);
287 sal_Bool
installPlugin(void);
288 sal_Bool
uninstallPlugin(void);
290 MozPluginTabPage( Window
* pParent
, const SfxItemSet
& rSet
);
291 virtual ~MozPluginTabPage();
295 static SfxTabPage
* Create( Window
* pParent
,
296 const SfxItemSet
& rAttrSet
);
298 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
299 virtual void Reset( const SfxItemSet
& rSet
);
305 /* -----------------------------20.06.01 16:32--------------------------------
307 ---------------------------------------------------------------------------*/
310 #define HELPER_PAGE_COMPLETE
313 struct SvxEMailTabPage_Impl
;
314 class SvxEMailTabPage
: public SfxTabPage
317 ReadOnlyImage aMailerURLFI
;
318 FixedText aMailerURLFT
;
320 PushButton aMailerURLPB
;
322 String m_sDefaultFilterName
;
324 SvxEMailTabPage_Impl
* pImpl
;
326 DECL_LINK( FileDialogHdl_Impl
, PushButton
* ) ;
329 SvxEMailTabPage( Window
* pParent
, const SfxItemSet
& rSet
);
332 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& rAttrSet
);
334 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
335 virtual void Reset( const SfxItemSet
& rSet
);
338 #endif // #ifndef _SVX_OPTINET_HXX