xref: /aoo4110/main/cui/source/inc/hlinettp.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SVX_TABPAGE_INET_HYPERLINK_HXX
24 #define _SVX_TABPAGE_INET_HYPERLINK_HXX
25 
26 #include <svx/hyperdlg.hxx>
27 #include "cuihyperdlg.hxx"
28 #include "hltpbase.hxx"
29 
30 /*************************************************************************
31 |*
32 |* Tabpage : Hyperlink - Internet
33 |*
34 \************************************************************************/
35 
36 class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase
37 {
38 private:
39 	FixedLine			maGrpLinkTyp;
40 	RadioButton         maRbtLinktypInternet;
41 	RadioButton         maRbtLinktypFTP;
42 	RadioButton         maRbtLinktypTelnet;
43 	FixedText           maFtTarget;
44 	SvxHyperURLBox		maCbbTarget;
45 	ImageButton			maBtBrowse;
46 	FixedText			maFtLogin;
47 	Edit				maEdLogin;
48 	ImageButton			maBtTarget;
49 	FixedText			maFtPassword;
50 	Edit				maEdPassword;
51 	CheckBox			maCbAnonymous;
52 
53 	String				maStrOldUser;
54 	String				maStrOldPassword;
55 
56 	sal_Bool				mbMarkWndOpen;
57 
58 	String				maStrStdDocURL;
59 
60     DECL_LINK (Click_SmartProtocol_Impl  , void * );	    // Radiobutton clicked: Type Internet, FTP or Telnet
61 	DECL_LINK (ClickAnonymousHdl_Impl    , void * );		// Checkbox : Anonymer Benutzer
62 	DECL_LINK (ClickBrowseHdl_Impl       , void * );		// Button : Browse
63 	DECL_LINK (ClickTargetHdl_Impl       , void * );		// Button : Ziel
64 	DECL_LINK (ModifiedLoginHdl_Impl     , void * );		// Contens of editfield "Login" modified
65 	DECL_LINK (LostFocusTargetHdl_Impl   , void * );		// Combobox "Target" lost its focus
66 	DECL_LINK (ModifiedTargetHdl_Impl    , void * );		// Contens of editfield "Target" modified
67 
68 	DECL_LINK (TimeoutHdl_Impl           , Timer * );		// Handler for timer -timeout
69 
70 
71     void    SetScheme( const String& aScheme );
72     void    RemoveImproperProtocol(const String& aProperScheme);
73     String  GetSchemeFromButtons() const;
74 	INetProtocol GetSmartProtocolFromButtons() const;
75 
76     String CreateAbsoluteURL() const;
77 
78     void   setAnonymousFTPUser();
79     void   setFTPUser(const String& rUser, const String& rPassword);
80     void   RefreshMarkWindow();
81 
82 protected:
83 	virtual void FillDlgFields	   ( String& aStrURL );
84 	virtual void GetCurentItemData ( String& aStrURL, String& aStrName,
85 		                             String& aStrIntName, String& aStrFrame,
86 									 SvxLinkInsertMode& eMode );
ShouldOpenMarkWnd()87 	virtual sal_Bool ShouldOpenMarkWnd () {return ( mbMarkWndOpen && maRbtLinktypInternet.IsChecked() );}
SetMarkWndShouldOpen(sal_Bool bOpen)88 	virtual void SetMarkWndShouldOpen (sal_Bool bOpen) {mbMarkWndOpen=bOpen;}
89 
90 public:
91 	SvxHyperlinkInternetTp ( Window *pParent, const SfxItemSet& rItemSet);
92 	~SvxHyperlinkInternetTp ();
93 
94 	static  IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet );
95 
96 	virtual void		SetMarkStr ( String& aStrMark );
97 	virtual void		SetOnlineMode( sal_Bool bEnable );
98 
99 	virtual void		SetInitFocus();
100 };
101 
102 
103 #endif // _SVX_TABPAGE_INET_HYPERLINK_HXX
104