xref: /aoo41x/main/cui/source/dialogs/hldoctp.cxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_cui.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include "cuihyperdlg.hxx"
32*cdf0e10cSrcweir #include <unotools/localfilehelper.hxx>
33*cdf0e10cSrcweir #include <sfx2/filedlghelper.hxx>
34*cdf0e10cSrcweir #include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir #include "hldoctp.hxx"
37*cdf0e10cSrcweir #include "hyperdlg.hrc"
38*cdf0e10cSrcweir #include "hlmarkwn_def.hxx" //ADD CHINA001
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir sal_Char __READONLY_DATA sHash[]				= "#";
41*cdf0e10cSrcweir sal_Char __READONLY_DATA sFileScheme[]			= INET_FILE_SCHEME;
42*cdf0e10cSrcweir sal_Char __READONLY_DATA sNewsSRVScheme[] = "news://";
43*cdf0e10cSrcweir     // TODO news:// is nonsense
44*cdf0e10cSrcweir sal_Char __READONLY_DATA sHTTPScheme[]    = INET_HTTP_SCHEME;
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir /*************************************************************************
47*cdf0e10cSrcweir |*
48*cdf0e10cSrcweir |* Contructor / Destructor
49*cdf0e10cSrcweir |*
50*cdf0e10cSrcweir |************************************************************************/
51*cdf0e10cSrcweir 
52*cdf0e10cSrcweir SvxHyperlinkDocTp::SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemSet)
53*cdf0e10cSrcweir     : SvxHyperlinkTabPageBase ( pParent, CUI_RES( RID_SVXPAGE_HYPERLINK_DOCUMENT ), rItemSet ),
54*cdf0e10cSrcweir     maGrpDocument   ( this, CUI_RES (GRP_DOCUMENT) ),
55*cdf0e10cSrcweir 	maFtPath		( this, CUI_RES (FT_PATH_DOC) ),
56*cdf0e10cSrcweir 	maCbbPath		( this, INET_PROT_FILE ),
57*cdf0e10cSrcweir 	maBtFileopen	( this, CUI_RES (BTN_FILEOPEN) ),
58*cdf0e10cSrcweir 	maGrpTarget		( this, CUI_RES (GRP_TARGET) ),
59*cdf0e10cSrcweir 	maFtTarget		( this, CUI_RES (FT_TARGET_DOC) ),
60*cdf0e10cSrcweir 	maEdTarget		( this, CUI_RES (ED_TARGET_DOC) ),
61*cdf0e10cSrcweir 	maFtURL			( this, CUI_RES (FT_URL) ),
62*cdf0e10cSrcweir 	maFtFullURL		( this, CUI_RES (FT_FULL_URL) ),
63*cdf0e10cSrcweir 	maBtBrowse		( this, CUI_RES (BTN_BROWSE) ),
64*cdf0e10cSrcweir     mbMarkWndOpen   ( sal_False )
65*cdf0e10cSrcweir {
66*cdf0e10cSrcweir 	// Set HC bitmaps and disable display of bitmap names.
67*cdf0e10cSrcweir 	maBtBrowse.SetModeImage( Image( CUI_RES( IMG_BROWSE_HC ) ), BMP_COLOR_HIGHCONTRAST );
68*cdf0e10cSrcweir     maBtBrowse.EnableTextDisplay (sal_False);
69*cdf0e10cSrcweir 	maBtFileopen.SetModeImage( Image( CUI_RES( IMG_FILEOPEN_HC ) ), BMP_COLOR_HIGHCONTRAST );
70*cdf0e10cSrcweir     maBtFileopen.EnableTextDisplay (sal_False);
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir 	InitStdControls();
73*cdf0e10cSrcweir 	FreeResource();
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir 	// Init URL-Box (pos&size, Open-Handler)
76*cdf0e10cSrcweir 	maCbbPath.SetPosSizePixel ( LogicToPixel( Point( COL_2, 15 ), MAP_APPFONT ),
77*cdf0e10cSrcweir 		                        LogicToPixel( Size ( 176 - COL_DIFF, 60), MAP_APPFONT ) );
78*cdf0e10cSrcweir 	maCbbPath.Show();
79*cdf0e10cSrcweir 	String aFileScheme( INET_FILE_SCHEME, RTL_TEXTENCODING_ASCII_US );
80*cdf0e10cSrcweir 	maCbbPath.SetBaseURL(aFileScheme);
81*cdf0e10cSrcweir 	maCbbPath.SetHelpId( HID_HYPERDLG_DOC_PATH );
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir 	SetExchangeSupport ();
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir 	// overload handlers
86*cdf0e10cSrcweir 	maBtFileopen.SetClickHdl ( LINK ( this, SvxHyperlinkDocTp, ClickFileopenHdl_Impl ) );
87*cdf0e10cSrcweir 	maBtBrowse.SetClickHdl   ( LINK ( this, SvxHyperlinkDocTp, ClickTargetHdl_Impl ) );
88*cdf0e10cSrcweir 	maCbbPath.SetModifyHdl   ( LINK ( this, SvxHyperlinkDocTp, ModifiedPathHdl_Impl ) );
89*cdf0e10cSrcweir 	maEdTarget.SetModifyHdl  ( LINK ( this, SvxHyperlinkDocTp, ModifiedTargetHdl_Impl ) );
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir 	maCbbPath.SetLoseFocusHdl( LINK ( this, SvxHyperlinkDocTp, LostFocusPathHdl_Impl ) );
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir 	maBtBrowse.SetAccessibleRelationMemberOf( &maGrpTarget );
94*cdf0e10cSrcweir 	maBtBrowse.SetAccessibleRelationLabeledBy( &maFtTarget );
95*cdf0e10cSrcweir 	maBtFileopen.SetAccessibleRelationMemberOf( &maGrpDocument );
96*cdf0e10cSrcweir 	maBtFileopen.SetAccessibleRelationLabeledBy( &maFtPath );
97*cdf0e10cSrcweir 	maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkDocTp, TimeoutHdl_Impl ) );
98*cdf0e10cSrcweir }
99*cdf0e10cSrcweir 
100*cdf0e10cSrcweir SvxHyperlinkDocTp::~SvxHyperlinkDocTp ()
101*cdf0e10cSrcweir {
102*cdf0e10cSrcweir }
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir /*************************************************************************
105*cdf0e10cSrcweir |*
106*cdf0e10cSrcweir |* Fill all dialog-controls except controls in groupbox "more..."
107*cdf0e10cSrcweir |*
108*cdf0e10cSrcweir |************************************************************************/
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir void SvxHyperlinkDocTp::FillDlgFields ( String& aStrURL )
111*cdf0e10cSrcweir {
112*cdf0e10cSrcweir 	INetURLObject aURL ( aStrURL );
113*cdf0e10cSrcweir 
114*cdf0e10cSrcweir 	String aStrMark;
115*cdf0e10cSrcweir 	xub_StrLen nPos = aStrURL.SearchAscii( sHash );
116*cdf0e10cSrcweir 	// path
117*cdf0e10cSrcweir 	maCbbPath.SetText ( aStrURL.Copy( 0, ( nPos == STRING_NOTFOUND ? aStrURL.Len() : nPos ) ) );
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir 	// set target in document at editfield
120*cdf0e10cSrcweir 	if ( nPos != STRING_NOTFOUND && nPos<aStrURL.Len()-1 )
121*cdf0e10cSrcweir 		aStrMark = aStrURL.Copy( nPos+1, aStrURL.Len() );
122*cdf0e10cSrcweir 	 maEdTarget.SetText ( aStrMark );
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir 	ModifiedPathHdl_Impl ( NULL );
125*cdf0e10cSrcweir }
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir /*************************************************************************
128*cdf0e10cSrcweir |*
129*cdf0e10cSrcweir |* retrieve current url-string
130*cdf0e10cSrcweir |*
131*cdf0e10cSrcweir |************************************************************************/
132*cdf0e10cSrcweir 
133*cdf0e10cSrcweir String SvxHyperlinkDocTp::GetCurrentURL ()
134*cdf0e10cSrcweir {
135*cdf0e10cSrcweir 	// get data from dialog-controls
136*cdf0e10cSrcweir 	String aStrURL;
137*cdf0e10cSrcweir 	String aStrPath ( maCbbPath.GetText() );
138*cdf0e10cSrcweir 	const String aBaseURL ( maCbbPath.GetBaseURL() );
139*cdf0e10cSrcweir 	String aStrMark( maEdTarget.GetText() );
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir 	if ( aStrPath != aEmptyStr )
142*cdf0e10cSrcweir 	{
143*cdf0e10cSrcweir         INetURLObject aURL( aStrPath );
144*cdf0e10cSrcweir         if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )    // maybe the path is already a valid
145*cdf0e10cSrcweir             aStrURL = aStrPath;                             // hyperlink, then we can use this path directly
146*cdf0e10cSrcweir         else
147*cdf0e10cSrcweir 		    utl::LocalFileHelper::ConvertSystemPathToURL( aStrPath, aBaseURL, aStrURL );
148*cdf0e10cSrcweir 
149*cdf0e10cSrcweir         //#105788# always create a URL even if it is not valid
150*cdf0e10cSrcweir         if( aStrURL == aEmptyStr )
151*cdf0e10cSrcweir             aStrURL = aStrPath;
152*cdf0e10cSrcweir     }
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir 	if( aStrMark != aEmptyStr )
155*cdf0e10cSrcweir 	{
156*cdf0e10cSrcweir 		aStrURL.AppendAscii( sHash );
157*cdf0e10cSrcweir 		aStrURL += aStrMark;
158*cdf0e10cSrcweir 	}
159*cdf0e10cSrcweir 
160*cdf0e10cSrcweir 	return aStrURL;
161*cdf0e10cSrcweir }
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir /*************************************************************************
164*cdf0e10cSrcweir |*
165*cdf0e10cSrcweir |* retrieve and prepare data from dialog-fields
166*cdf0e10cSrcweir |*
167*cdf0e10cSrcweir |************************************************************************/
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir void SvxHyperlinkDocTp::GetCurentItemData ( String& aStrURL, String& aStrName,
170*cdf0e10cSrcweir 										    String& aStrIntName, String& aStrFrame,
171*cdf0e10cSrcweir 											SvxLinkInsertMode& eMode )
172*cdf0e10cSrcweir {
173*cdf0e10cSrcweir 	// get data from standard-fields
174*cdf0e10cSrcweir 	aStrURL = GetCurrentURL();
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir 	if( aStrURL.EqualsIgnoreCaseAscii( sFileScheme ) )
177*cdf0e10cSrcweir 		 aStrURL=aEmptyStr;
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir 	GetDataFromCommonFields( aStrName, aStrIntName, aStrFrame, eMode );
180*cdf0e10cSrcweir }
181*cdf0e10cSrcweir 
182*cdf0e10cSrcweir /*************************************************************************
183*cdf0e10cSrcweir |*
184*cdf0e10cSrcweir |* static method to create Tabpage
185*cdf0e10cSrcweir |*
186*cdf0e10cSrcweir |************************************************************************/
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir IconChoicePage* SvxHyperlinkDocTp::Create( Window* pWindow, const SfxItemSet& rItemSet )
189*cdf0e10cSrcweir {
190*cdf0e10cSrcweir 	return( new SvxHyperlinkDocTp( pWindow, rItemSet ) );
191*cdf0e10cSrcweir }
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir /*************************************************************************
194*cdf0e10cSrcweir |*
195*cdf0e10cSrcweir |* Set initial focus
196*cdf0e10cSrcweir |*
197*cdf0e10cSrcweir |************************************************************************/
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir void SvxHyperlinkDocTp::SetInitFocus()
200*cdf0e10cSrcweir {
201*cdf0e10cSrcweir 	maCbbPath.GrabFocus();
202*cdf0e10cSrcweir }
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir /*************************************************************************
205*cdf0e10cSrcweir |*
206*cdf0e10cSrcweir |* Click on imagebutton : fileopen
207*cdf0e10cSrcweir |*
208*cdf0e10cSrcweir |************************************************************************/
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir IMPL_LINK ( SvxHyperlinkDocTp, ClickFileopenHdl_Impl, void *, EMPTYARG )
211*cdf0e10cSrcweir {
212*cdf0e10cSrcweir 	// Open Fileopen-Dialog
213*cdf0e10cSrcweir    	::sfx2::FileDialogHelper aDlg(
214*cdf0e10cSrcweir         com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0,
215*cdf0e10cSrcweir         GetParent() );
216*cdf0e10cSrcweir 	String aOldURL( GetCurrentURL() );
217*cdf0e10cSrcweir 	if( aOldURL.EqualsIgnoreCaseAscii( sFileScheme, 0, sizeof( sFileScheme ) - 1 ) )
218*cdf0e10cSrcweir 	{
219*cdf0e10cSrcweir 		aDlg.SetDisplayDirectory( aOldURL );
220*cdf0e10cSrcweir 	}
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir     DisableClose( sal_True );
223*cdf0e10cSrcweir     ErrCode nError = aDlg.Execute();
224*cdf0e10cSrcweir     DisableClose( sal_False );
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir     if ( ERRCODE_NONE == nError )
227*cdf0e10cSrcweir 	{
228*cdf0e10cSrcweir 		String aURL( aDlg.GetPath() );
229*cdf0e10cSrcweir 		String aPath;
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir 		utl::LocalFileHelper::ConvertURLToSystemPath( aURL, aPath );
232*cdf0e10cSrcweir 
233*cdf0e10cSrcweir 		maCbbPath.SetBaseURL( aURL );
234*cdf0e10cSrcweir 		maCbbPath.SetText( aPath );
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir 		if ( aOldURL != GetCurrentURL() )
237*cdf0e10cSrcweir 			ModifiedPathHdl_Impl (NULL);
238*cdf0e10cSrcweir 	}
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir 	return( 0L );
241*cdf0e10cSrcweir }
242*cdf0e10cSrcweir 
243*cdf0e10cSrcweir /*************************************************************************
244*cdf0e10cSrcweir |*
245*cdf0e10cSrcweir |* Click on imagebutton : target
246*cdf0e10cSrcweir |*
247*cdf0e10cSrcweir |************************************************************************/
248*cdf0e10cSrcweir 
249*cdf0e10cSrcweir IMPL_LINK ( SvxHyperlinkDocTp, ClickTargetHdl_Impl, void *, EMPTYARG )
250*cdf0e10cSrcweir {
251*cdf0e10cSrcweir 	if ( GetPathType ( maStrURL ) == Type_ExistsFile  ||
252*cdf0e10cSrcweir 		 maStrURL == aEmptyStr                        ||
253*cdf0e10cSrcweir 		 maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) ||
254*cdf0e10cSrcweir 		 maStrURL.SearchAscii( sHash ) == 0 )
255*cdf0e10cSrcweir 	{
256*cdf0e10cSrcweir 		mpMarkWnd->SetError( LERR_NOERROR );
257*cdf0e10cSrcweir 
258*cdf0e10cSrcweir 		EnterWait();
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir 		if ( maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) )
261*cdf0e10cSrcweir 			mpMarkWnd->RefreshTree ( aEmptyStr );
262*cdf0e10cSrcweir 		else
263*cdf0e10cSrcweir 			mpMarkWnd->RefreshTree ( maStrURL );
264*cdf0e10cSrcweir 
265*cdf0e10cSrcweir 		LeaveWait();
266*cdf0e10cSrcweir 	}
267*cdf0e10cSrcweir 	else
268*cdf0e10cSrcweir 		mpMarkWnd->SetError( LERR_DOCNOTOPEN );
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir 	ShowMarkWnd ();
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir 	return( 0L );
273*cdf0e10cSrcweir }
274*cdf0e10cSrcweir 
275*cdf0e10cSrcweir /*************************************************************************
276*cdf0e10cSrcweir |*
277*cdf0e10cSrcweir |* Contens of combobox "Path" modified
278*cdf0e10cSrcweir |*
279*cdf0e10cSrcweir |************************************************************************/
280*cdf0e10cSrcweir 
281*cdf0e10cSrcweir IMPL_LINK ( SvxHyperlinkDocTp, ModifiedPathHdl_Impl, void *, EMPTYARG )
282*cdf0e10cSrcweir {
283*cdf0e10cSrcweir 	maStrURL = GetCurrentURL();
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir 	maTimer.SetTimeout( 2500 );
286*cdf0e10cSrcweir 	maTimer.Start();
287*cdf0e10cSrcweir 
288*cdf0e10cSrcweir 	maFtFullURL.SetText( maStrURL );
289*cdf0e10cSrcweir 
290*cdf0e10cSrcweir 	return( 0L );
291*cdf0e10cSrcweir }
292*cdf0e10cSrcweir 
293*cdf0e10cSrcweir /*************************************************************************
294*cdf0e10cSrcweir |*
295*cdf0e10cSrcweir |* If path-field was modify, to browse the new doc after timeout
296*cdf0e10cSrcweir |*
297*cdf0e10cSrcweir |************************************************************************/
298*cdf0e10cSrcweir 
299*cdf0e10cSrcweir IMPL_LINK ( SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, EMPTYARG )
300*cdf0e10cSrcweir {
301*cdf0e10cSrcweir 	if ( IsMarkWndVisible() && ( GetPathType( maStrURL )==Type_ExistsFile ||
302*cdf0e10cSrcweir 		                          maStrURL == aEmptyStr                   ||
303*cdf0e10cSrcweir 								  maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) ) )
304*cdf0e10cSrcweir 	{
305*cdf0e10cSrcweir 		EnterWait();
306*cdf0e10cSrcweir 
307*cdf0e10cSrcweir 		if ( maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) )
308*cdf0e10cSrcweir 			mpMarkWnd->RefreshTree ( aEmptyStr );
309*cdf0e10cSrcweir 		else
310*cdf0e10cSrcweir 			mpMarkWnd->RefreshTree ( maStrURL );
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir 		LeaveWait();
313*cdf0e10cSrcweir 	}
314*cdf0e10cSrcweir 
315*cdf0e10cSrcweir 	return( 0L );
316*cdf0e10cSrcweir }
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir /*************************************************************************
319*cdf0e10cSrcweir |*
320*cdf0e10cSrcweir |* Contens of editfield "Target" modified
321*cdf0e10cSrcweir |*
322*cdf0e10cSrcweir |************************************************************************/
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir IMPL_LINK ( SvxHyperlinkDocTp, ModifiedTargetHdl_Impl, void *, EMPTYARG )
325*cdf0e10cSrcweir {
326*cdf0e10cSrcweir 	maStrURL = GetCurrentURL();
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir 	if ( IsMarkWndVisible() )
329*cdf0e10cSrcweir 		mpMarkWnd->SelectEntry ( maEdTarget.GetText() );
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir 	maFtFullURL.SetText( maStrURL );
332*cdf0e10cSrcweir 
333*cdf0e10cSrcweir 	return( 0L );
334*cdf0e10cSrcweir }
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir /*************************************************************************
337*cdf0e10cSrcweir |*
338*cdf0e10cSrcweir |* editfield "Target" lost focus
339*cdf0e10cSrcweir |*
340*cdf0e10cSrcweir |************************************************************************/
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir IMPL_LINK ( SvxHyperlinkDocTp, LostFocusPathHdl_Impl, void *, EMPTYARG )
343*cdf0e10cSrcweir {
344*cdf0e10cSrcweir 	maStrURL = GetCurrentURL();
345*cdf0e10cSrcweir 
346*cdf0e10cSrcweir 	maFtFullURL.SetText( maStrURL );
347*cdf0e10cSrcweir 
348*cdf0e10cSrcweir 	return (0L);
349*cdf0e10cSrcweir }
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir /*************************************************************************
352*cdf0e10cSrcweir |*
353*cdf0e10cSrcweir |* Get String from Bookmark-Wnd
354*cdf0e10cSrcweir |*
355*cdf0e10cSrcweir |************************************************************************/
356*cdf0e10cSrcweir 
357*cdf0e10cSrcweir void SvxHyperlinkDocTp::SetMarkStr ( String& aStrMark )
358*cdf0e10cSrcweir {
359*cdf0e10cSrcweir 	maEdTarget.SetText ( aStrMark );
360*cdf0e10cSrcweir 
361*cdf0e10cSrcweir 	ModifiedTargetHdl_Impl ( NULL );
362*cdf0e10cSrcweir }
363*cdf0e10cSrcweir 
364*cdf0e10cSrcweir /*************************************************************************
365*cdf0e10cSrcweir |*
366*cdf0e10cSrcweir |* retrieve kind of pathstr
367*cdf0e10cSrcweir |*
368*cdf0e10cSrcweir |************************************************************************/
369*cdf0e10cSrcweir 
370*cdf0e10cSrcweir SvxHyperlinkDocTp::EPathType SvxHyperlinkDocTp::GetPathType ( String& aStrPath )
371*cdf0e10cSrcweir {
372*cdf0e10cSrcweir 	INetURLObject aURL( aStrPath, INET_PROT_FILE );
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir 	if( aURL.HasError() )
375*cdf0e10cSrcweir 		return Type_Invalid;
376*cdf0e10cSrcweir 	else
377*cdf0e10cSrcweir 		return Type_ExistsFile;
378*cdf0e10cSrcweir }
379