summaryrefslogtreecommitdiff
path: root/svx/source/dialog/hltpbase.cxx
diff options
context:
space:
mode:
authorpw <pw@openoffice.org>2000-10-10 11:35:10 +0000
committerpw <pw@openoffice.org>2000-10-10 11:35:10 +0000
commita46ce77939a9537bbde0e9f955fc0869e6ec234e (patch)
tree9f196f96bb38fa79b622b8e75958da7a2ef753f0 /svx/source/dialog/hltpbase.cxx
parent960d77fcdd52141cdca250e3529f9523b9ebf89d (diff)
removed old fsys-stuff
Diffstat (limited to 'svx/source/dialog/hltpbase.cxx')
-rw-r--r--svx/source/dialog/hltpbase.cxx38
1 files changed, 36 insertions, 2 deletions
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 <svtools/macitem.hxx>
#endif
+#ifndef _UCBHELPER_CONTENT_HXX
+#include <ucbhelper/content.hxx>
+#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;
+}