xref: /aoo4110/main/cui/source/inc/hldoctp.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_DOC_HYPERLINK_HXX
24 #define _SVX_TABPAGE_DOC_HYPERLINK_HXX
25 
26 #include "hltpbase.hxx"
27 
28 /*************************************************************************
29 |*
30 |* Tabpage : Hyperlink - Document
31 |*
32 \************************************************************************/
33 
34 class SvxHyperlinkDocTp : public SvxHyperlinkTabPageBase
35 {
36 private:
37 	FixedLine			maGrpDocument;
38 	FixedText			maFtPath;
39 	SvxHyperURLBox		maCbbPath;
40 	ImageButton			maBtFileopen;
41 
42 	FixedLine			maGrpTarget;
43 	FixedText			maFtTarget;
44 	Edit				maEdTarget;
45 	FixedText			maFtURL;
46 	FixedText			maFtFullURL;
47 	ImageButton			maBtBrowse;
48 
49 	String				maStrURL;
50 
51 	sal_Bool				mbMarkWndOpen;
52 
53 	DECL_LINK (ClickFileopenHdl_Impl  , void * );		// Button : Fileopen
54 	DECL_LINK (ClickTargetHdl_Impl    , void * );		// Button : Target
55 
56 	DECL_LINK (ModifiedPathHdl_Impl	 , void * );		// Contens of combobox "Path" modified
57 	DECL_LINK (ModifiedTargetHdl_Impl, void * );		// Contens of editfield "Target" modified
58 
59 	DECL_LINK (LostFocusPathHdl_Impl,  void * );		// Combobox "path" lost its focus
60 
61 	DECL_LINK (TimeoutHdl_Impl      ,  Timer * );		// Handler for timer -timeout
62 
63 	enum EPathType { Type_Unknown, Type_Invalid,
64 		             Type_ExistsFile, Type_File,
65 					 Type_ExistsDir, Type_Dir };
66 	EPathType GetPathType ( String& aStrPath );
67 
68 protected:
69 	void FillDlgFields     ( String& aStrURL );
70 	void GetCurentItemData ( String& aStrURL, String& aStrName,
71 		                     String& aStrIntName, String& aStrFrame,
72 							 SvxLinkInsertMode& eMode );
ShouldOpenMarkWnd()73 	virtual sal_Bool   ShouldOpenMarkWnd () {return mbMarkWndOpen;}
SetMarkWndShouldOpen(sal_Bool bOpen)74 	virtual void   SetMarkWndShouldOpen (sal_Bool bOpen) {mbMarkWndOpen=bOpen;}
75 	String GetCurrentURL 	();
76 
77 public:
78 	SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemSet);
79 	~SvxHyperlinkDocTp ();
80 
81 	static  IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet );
82 
83 	virtual void		SetMarkStr ( String& aStrMark );
84 
85 	virtual void		SetInitFocus();
86 };
87 
88 
89 #endif // _SVX_TABPAGE_DOC_HYPERLINK_HXX
90