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_TABPAGE_INET_HYPERLINK_HXX 28 #define _SVX_TABPAGE_INET_HYPERLINK_HXX 29 30 #include <svx/hyperdlg.hxx> 31 #include "cuihyperdlg.hxx" 32 #include "hltpbase.hxx" 33 34 /************************************************************************* 35 |* 36 |* Tabpage : Hyperlink - Internet 37 |* 38 \************************************************************************/ 39 40 class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase 41 { 42 private: 43 FixedLine maGrpLinkTyp; 44 RadioButton maRbtLinktypInternet; 45 RadioButton maRbtLinktypFTP; 46 RadioButton maRbtLinktypTelnet; 47 FixedText maFtTarget; 48 SvxHyperURLBox maCbbTarget; 49 ImageButton maBtBrowse; 50 FixedText maFtLogin; 51 Edit maEdLogin; 52 ImageButton maBtTarget; 53 FixedText maFtPassword; 54 Edit maEdPassword; 55 CheckBox maCbAnonymous; 56 57 String maStrOldUser; 58 String maStrOldPassword; 59 60 sal_Bool mbMarkWndOpen; 61 62 String maStrStdDocURL; 63 64 DECL_LINK (Click_SmartProtocol_Impl , void * ); // Radiobutton clicked: Type Internet, FTP or Telnet 65 DECL_LINK (ClickAnonymousHdl_Impl , void * ); // Checkbox : Anonymer Benutzer 66 DECL_LINK (ClickBrowseHdl_Impl , void * ); // Button : Browse 67 DECL_LINK (ClickTargetHdl_Impl , void * ); // Button : Ziel 68 DECL_LINK (ModifiedLoginHdl_Impl , void * ); // Contens of editfield "Login" modified 69 DECL_LINK (LostFocusTargetHdl_Impl , void * ); // Combobox "Target" lost its focus 70 DECL_LINK (ModifiedTargetHdl_Impl , void * ); // Contens of editfield "Target" modified 71 72 DECL_LINK (TimeoutHdl_Impl , Timer * ); // Handler for timer -timeout 73 74 75 void SetScheme( const String& aScheme ); 76 void RemoveImproperProtocol(const String& aProperScheme); 77 String GetSchemeFromButtons() const; 78 INetProtocol GetSmartProtocolFromButtons() const; 79 80 String CreateAbsoluteURL() const; 81 82 void setAnonymousFTPUser(); 83 void setFTPUser(const String& rUser, const String& rPassword); 84 void RefreshMarkWindow(); 85 86 protected: 87 virtual void FillDlgFields ( String& aStrURL ); 88 virtual void GetCurentItemData ( String& aStrURL, String& aStrName, 89 String& aStrIntName, String& aStrFrame, 90 SvxLinkInsertMode& eMode ); 91 virtual sal_Bool ShouldOpenMarkWnd () {return ( mbMarkWndOpen && maRbtLinktypInternet.IsChecked() );} 92 virtual void SetMarkWndShouldOpen (sal_Bool bOpen) {mbMarkWndOpen=bOpen;} 93 94 public: 95 SvxHyperlinkInternetTp ( Window *pParent, const SfxItemSet& rItemSet); 96 ~SvxHyperlinkInternetTp (); 97 98 static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet ); 99 100 virtual void SetMarkStr ( String& aStrMark ); 101 virtual void SetOnlineMode( sal_Bool bEnable ); 102 103 virtual void SetInitFocus(); 104 }; 105 106 107 #endif // _SVX_TABPAGE_INET_HYPERLINK_HXX 108