summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev/xtabdash.cxx
diff options
context:
space:
mode:
authorKai Ahrens <ka@openoffice.org>2000-11-10 14:24:49 +0000
committerKai Ahrens <ka@openoffice.org>2000-11-10 14:24:49 +0000
commit5f6f190946389a1bb025da753ccbe27f6f25fdc8 (patch)
tree8b135f73fa0e58165a8cc1b64fbd64d7b6e4c654 /svx/source/xoutdev/xtabdash.cxx
parent259a522b9aa0b67e566215308a02c3035a973213 (diff)
must changes (file access)
Diffstat (limited to 'svx/source/xoutdev/xtabdash.cxx')
-rw-r--r--svx/source/xoutdev/xtabdash.cxx26
1 files changed, 18 insertions, 8 deletions
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 8dbabda1f34c..755c14a43577 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xtabdash.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2000-10-30 11:17:23 $
+ * last change: $Author: ka $ $Date: 2000-11-10 15:17:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -328,15 +328,20 @@ BOOL XDashList::Load()
{
bListDirty = FALSE;
- INetURLObject aURL;
+ INetURLObject aURL( aPath );
+
+ if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+ {
+ DBG_ERROR( "invalid URL" );
+ return FALSE;
+ }
- aURL.SetSmartURL( aPath );
aURL.Append( aName );
if( !aURL.getExtension().Len() )
aURL.setExtension( String( pszExtDash, 3 ) );
- SfxMedium aMedium( aURL.PathToFileName(), STREAM_READ | STREAM_NOCREATE, TRUE );
+ SfxMedium aMedium( aURL.GetMainURL(), STREAM_READ | STREAM_NOCREATE, TRUE );
SvStream* pStream = aMedium.GetInStream();
if( !pStream )
return( FALSE );
@@ -366,15 +371,20 @@ BOOL XDashList::Load()
BOOL XDashList::Save()
{
#ifndef SVX_LIGHT
- INetURLObject aURL;
+ INetURLObject aURL( aPath );
+
+ if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+ {
+ DBG_ERROR( "invalid URL" );
+ return FALSE;
+ }
- aURL.SetSmartURL( aPath );
aURL.Append( aName );
if( !aURL.getExtension().Len() )
aURL.setExtension( String( pszExtDash, 3 ) );
- SfxMedium aMedium( aURL.PathToFileName(), STREAM_WRITE | STREAM_TRUNC, TRUE );
+ SfxMedium aMedium( aURL.GetMainURL(), STREAM_WRITE | STREAM_TRUNC, TRUE );
aMedium.IsRemote();
SvStream* pStream = aMedium.GetOutStream();