1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27 #ifndef _SVX_OPTINET_HXX 28 #define _SVX_OPTINET_HXX 29 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> 39 40 #ifdef _SVX_OPTINET2_CXX 41 #include <svtools/headbar.hxx> 42 #else 43 class HeaderBar; 44 #endif 45 #include <readonlyimage.hxx> 46 47 class SfxFilter; 48 class SvtInetOptions; 49 50 #ifndef SV_NODIALOG 51 #define PROXY_CONTROLS 23 52 #define CACHE_CONTROLS 20 53 #define INET_SEARCH 19 54 55 #if defined(OS2) 56 #define TYPE_CONTROLS 20 57 #else 58 #define TYPE_CONTROLS 18 59 #endif 60 61 namespace svx { 62 class SecurityOptionsDialog; 63 } 64 65 namespace lang = ::com::sun::star::lang; 66 namespace uno = ::com::sun::star::uno; 67 68 // class SvxNoSpaceEdit -------------------------------------------------- 69 70 class SvxNoSpaceEdit : public Edit 71 { 72 private: 73 sal_Bool bOnlyNumeric; 74 75 public: 76 SvxNoSpaceEdit(Window* pParent, ResId rResId, sal_Bool bNum = sal_False ) : 77 Edit( pParent, rResId ), bOnlyNumeric( bNum ) {} 78 79 virtual void KeyInput( const KeyEvent& rKEvent ); 80 virtual void Modify(); 81 }; 82 83 typedef SfxFilter* SfxFilterPtr; 84 SV_DECL_PTRARR( SfxFilterPtrArr, SfxFilterPtr, 0, 4 ) 85 86 // class SvxProxyTabPage ------------------------------------------------- 87 88 class SvxProxyTabPage : public SfxTabPage 89 { 90 private: 91 FixedLine aOptionGB; 92 93 FixedText aProxyModeFT; 94 ListBox aProxyModeLB; 95 96 FixedText aHttpProxyFT; 97 SvxNoSpaceEdit aHttpProxyED; 98 FixedText aHttpPortFT; 99 SvxNoSpaceEdit aHttpPortED; 100 101 FixedText aHttpsProxyFT; 102 SvxNoSpaceEdit aHttpsProxyED; 103 FixedText aHttpsPortFT; 104 SvxNoSpaceEdit aHttpsPortED; 105 106 107 FixedText aFtpProxyFT; 108 SvxNoSpaceEdit aFtpProxyED; 109 FixedText aFtpPortFT; 110 SvxNoSpaceEdit aFtpPortED; 111 112 FixedText aNoProxyForFT; 113 Edit aNoProxyForED; 114 FixedText aNoProxyDescFT; 115 116 String sFromBrowser; 117 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; 126 127 uno::Reference< uno::XInterface > m_xConfigurationUpdateAccess; 128 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(); 135 136 DECL_LINK( ProxyHdl_Impl, ListBox * ); 137 DECL_LINK( LoseFocusHdl_Impl, Edit * ); 138 #endif 139 140 SvxProxyTabPage( Window* pParent, const SfxItemSet& rSet ); 141 virtual ~SvxProxyTabPage(); 142 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 ); 147 }; 148 149 // class SvxSearchTabPage ------------------------------------------------ 150 class SvxSearchConfig; 151 class SvxSearchTabPage : public SfxTabPage 152 { 153 using TabPage::ActivatePage; 154 using TabPage::DeactivatePage; 155 156 private: 157 FixedLine aSearchGB; 158 ListBox aSearchLB; 159 FixedText aSearchNameFT; 160 SvxNoSpaceEdit aSearchNameED; 161 162 FixedText aSearchFT; 163 RadioButton aAndRB; 164 RadioButton aOrRB; 165 RadioButton aExactRB; 166 167 FixedText aURLFT; 168 SvxNoSpaceEdit aURLED; 169 170 FixedText aPostFixFT; 171 SvxNoSpaceEdit aPostFixED; 172 FixedText aSeparatorFT; 173 SvxNoSpaceEdit aSeparatorED; 174 FixedText aCaseFT; 175 ListBox aCaseED; 176 177 PushButton aNewPB; 178 PushButton aAddPB; 179 PushButton aChangePB; 180 PushButton aDeletePB; 181 182 String sLastSelectedEntry; 183 String sModifyMsg; 184 185 SvxSearchConfig aSearchConfig; 186 SvxSearchEngineData aCurrentSrchData; 187 188 #ifdef _SVX_OPTINET2_CXX 189 void InitControls_Impl(); 190 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 199 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) 203 204 SvxSearchTabPage( Window* pParent, const SfxItemSet& rSet ); 205 virtual ~SvxSearchTabPage(); 206 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 ); 211 }; 212 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) {} 221 222 protected: 223 virtual void RequestHelp( const HelpEvent& rHEvt ); 224 }; 225 226 // class SvxSecurityTabPage --------------------------------------------- 227 228 class SvtJavaOptions; 229 class SvtSecurityOptions; 230 231 class SvxSecurityTabPage : public SfxTabPage 232 { 233 using TabPage::ActivatePage; 234 using TabPage::DeactivatePage; 235 236 private: 237 FixedLine maSecurityOptionsFL; 238 FixedInfo maSecurityOptionsFI; 239 PushButton maSecurityOptionsPB; 240 241 FixedLine maPasswordsFL; 242 CheckBox maSavePasswordsCB; 243 PushButton maShowConnectionsPB; 244 CheckBox maMasterPasswordCB; 245 FixedInfo maMasterPasswordFI; 246 PushButton maMasterPasswordPB; 247 248 FixedLine maMacroSecFL; 249 FixedInfo maMacroSecFI; 250 PushButton maMacroSecPB; 251 252 253 SvtSecurityOptions* mpSecOptions; 254 svx::SecurityOptionsDialog* mpSecOptDlg; 255 256 String msPasswordStoringDeactivateStr; 257 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* ); 264 265 void InitControls(); 266 267 SvxSecurityTabPage( Window* pParent, const SfxItemSet& rSet ); 268 virtual ~SvxSecurityTabPage(); 269 270 protected: 271 virtual void ActivatePage( const SfxItemSet& rSet ); 272 virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 273 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 ); 278 }; 279 280 //added by jmeng begin 281 class MozPluginTabPage : public SfxTabPage 282 { 283 FixedLine aMSWordGB; 284 CheckBox aWBasicCodeCB; 285 286 sal_Bool isInstalled(void); 287 sal_Bool installPlugin(void); 288 sal_Bool uninstallPlugin(void); 289 290 MozPluginTabPage( Window* pParent, const SfxItemSet& rSet ); 291 virtual ~MozPluginTabPage(); 292 293 public: 294 295 static SfxTabPage* Create( Window* pParent, 296 const SfxItemSet& rAttrSet ); 297 298 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 299 virtual void Reset( const SfxItemSet& rSet ); 300 301 }; 302 //added by jmeng end 303 #endif 304 305 /* -----------------------------20.06.01 16:32-------------------------------- 306 307 ---------------------------------------------------------------------------*/ 308 #ifdef WNT 309 #else 310 #define HELPER_PAGE_COMPLETE 311 #endif 312 313 struct SvxEMailTabPage_Impl; 314 class SvxEMailTabPage : public SfxTabPage 315 { 316 FixedLine aMailFL; 317 ReadOnlyImage aMailerURLFI; 318 FixedText aMailerURLFT; 319 Edit aMailerURLED; 320 PushButton aMailerURLPB; 321 322 String m_sDefaultFilterName; 323 324 SvxEMailTabPage_Impl* pImpl; 325 326 DECL_LINK( FileDialogHdl_Impl, PushButton* ) ; 327 328 public: 329 SvxEMailTabPage( Window* pParent, const SfxItemSet& rSet ); 330 ~SvxEMailTabPage(); 331 332 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); 333 334 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 335 virtual void Reset( const SfxItemSet& rSet ); 336 }; 337 338 #endif // #ifndef _SVX_OPTINET_HXX 339 340 341