From a46ce77939a9537bbde0e9f955fc0869e6ec234e Mon Sep 17 00:00:00 2001 From: pw Date: Tue, 10 Oct 2000 11:35:10 +0000 Subject: removed old fsys-stuff --- svx/source/dialog/hltpbase.cxx | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'svx/source/dialog/hltpbase.cxx') diff --git a/svx/source/dialog/hltpbase.cxx b/svx/source/dialog/hltpbase.cxx index e681b7318e53..bb3336fb4f7b 100644 --- a/svx/source/dialog/hltpbase.cxx +++ b/svx/source/dialog/hltpbase.cxx @@ -2,9 +2,9 @@ * * $RCSfile: hltpbase.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $ + * last change: $Author: pw $ $Date: 2000-10-10 12:35:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,6 +79,10 @@ #include #endif +#ifndef _UCBHELPER_CONTENT_HXX +#include +#endif + #include "hyperdlg.hrc" #ifndef _SVX_TAB_HYPERLINK_HXX @@ -87,6 +91,8 @@ #include "hltpbase.hxx" +using namespace ucb; + //######################################################################## //# # //# ComboBox-Control, wich is filled with all current framenames # @@ -717,3 +723,31 @@ SvxMacroTableDtor* SvxHyperlinkTabPageBase::GetMacroTable() return ( (SvxMacroTableDtor*)pHyperlinkItem->GetMacroTbl() ); } +/************************************************************************* +|* +|* Does the given file exists ? +|* +|************************************************************************/ + +BOOL SvxHyperlinkTabPageBase::FileExists( const INetURLObject& rURL ) +{ + BOOL bRet = FALSE; + + if( rURL.GetFull().Len() > 0 ) + { + try + { + Content aCnt( rURL.GetMainURL(), ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); + ::rtl::OUString aTitle; + + aCnt.getPropertyValue( ::rtl::OUString::createFromAscii( "Title" ) ) >>= aTitle; + bRet = ( aTitle.getLength() > 0 ); + } + catch( ... ) + { + DBG_ERROR( "FileExists: ucb error" ); + } + } + + return bRet; +} -- cgit