masterfix DEV300: #i10000# build fix
[LibreOffice.git] / cui / source / options / optinet2.hxx
blobb0d47efe6141eaeb51a518b0897f46ed158e800d
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>
42 #else
43 class HeaderBar;
44 #endif
45 #include <readonlyimage.hxx>
47 class SfxFilter;
48 class SvtInetOptions;
50 #ifndef SV_NODIALOG
51 #define PROXY_CONTROLS 23
52 #define CACHE_CONTROLS 20
53 #define INET_SEARCH 19
55 #if defined(OS2)
56 #define TYPE_CONTROLS 20
57 #else
58 #define TYPE_CONTROLS 18
59 #endif
61 namespace svx {
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
72 private:
73 sal_Bool bOnlyNumeric;
75 public:
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
90 private:
91 FixedLine aOptionGB;
93 FixedText aProxyModeFT;
94 ListBox aProxyModeLB;
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;
113 Edit aNoProxyForED;
114 FixedText aNoProxyDescFT;
116 String sFromBrowser;
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 * );
138 #endif
140 SvxProxyTabPage( Window* pParent, const SfxItemSet& rSet );
141 virtual ~SvxProxyTabPage();
143 public:
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;
156 private:
157 FixedLine aSearchGB;
158 ListBox aSearchLB;
159 FixedText aSearchNameFT;
160 SvxNoSpaceEdit aSearchNameED;
162 FixedText aSearchFT;
163 RadioButton aAndRB;
164 RadioButton aOrRB;
165 RadioButton aExactRB;
167 FixedText aURLFT;
168 SvxNoSpaceEdit aURLED;
170 FixedText aPostFixFT;
171 SvxNoSpaceEdit aPostFixED;
172 FixedText aSeparatorFT;
173 SvxNoSpaceEdit aSeparatorED;
174 FixedText aCaseFT;
175 ListBox aCaseED;
177 PushButton aNewPB;
178 PushButton aAddPB;
179 PushButton aChangePB;
180 PushButton aDeletePB;
182 String sLastSelectedEntry;
183 String sModifyMsg;
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 * );
198 #endif
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();
207 public:
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
216 public:
217 SvxScriptExecListBox( Window* pParent, WinBits nStyle = WB_BORDER )
218 :ListBox(pParent, nStyle) {}
219 SvxScriptExecListBox( Window* pParent, const ResId& rResId )
220 :ListBox(pParent, rResId) {}
222 protected:
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;
236 private:
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* );
265 void InitControls();
267 SvxSecurityTabPage( Window* pParent, const SfxItemSet& rSet );
268 virtual ~SvxSecurityTabPage();
270 protected:
271 virtual void ActivatePage( const SfxItemSet& rSet );
272 virtual int DeactivatePage( SfxItemSet* pSet = 0 );
274 public:
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
283 FixedLine aMSWordGB;
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();
293 public:
295 static SfxTabPage* Create( Window* pParent,
296 const SfxItemSet& rAttrSet );
298 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
299 virtual void Reset( const SfxItemSet& rSet );
302 //added by jmeng end
303 #endif
305 /* -----------------------------20.06.01 16:32--------------------------------
307 ---------------------------------------------------------------------------*/
308 #ifdef WNT
309 #else
310 #define HELPER_PAGE_COMPLETE
311 #endif
313 struct SvxEMailTabPage_Impl;
314 class SvxEMailTabPage : public SfxTabPage
316 FixedLine aMailFL;
317 ReadOnlyImage aMailerURLFI;
318 FixedText aMailerURLFT;
319 Edit aMailerURLED;
320 PushButton aMailerURLPB;
322 String m_sDefaultFilterName;
324 SvxEMailTabPage_Impl* pImpl;
326 DECL_LINK( FileDialogHdl_Impl, PushButton* ) ;
328 public:
329 SvxEMailTabPage( Window* pParent, const SfxItemSet& rSet );
330 ~SvxEMailTabPage();
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