summaryrefslogtreecommitdiff
path: root/fileaccess
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2001-07-16 11:31:14 +0000
committerMathias Bauer <mba@openoffice.org>2001-07-16 11:31:14 +0000
commitd5a5f07b0446a2b0d2a00efa00da63dd03ca0203 (patch)
treedb7f761f2087bb2447189c036c7eea0e231202b9 /fileaccess
parentc62eecb41944ea7f82e25322e441732ea54395bc (diff)
#89377#: OpenMode ReadWrite now handled by UCP
Diffstat (limited to 'fileaccess')
-rw-r--r--fileaccess/source/FileAccess.cxx30
1 files changed, 17 insertions, 13 deletions
diff --git a/fileaccess/source/FileAccess.cxx b/fileaccess/source/FileAccess.cxx
index fb139bf114..5c07719c89 100644
--- a/fileaccess/source/FileAccess.cxx
+++ b/fileaccess/source/FileAccess.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FileAccess.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: ab $ $Date: 2001-05-07 14:40:51 $
+ * last change: $Author: mba $ $Date: 2001-07-16 12:31:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -81,7 +81,7 @@ using namespace ::ucb;
#include <com/sun/star/ucb/TransferInfo.hpp>
#include <com/sun/star/ucb/NameClash.hpp>
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
-#include <com/sun/star/ucb/InsertCommandArgument.hpp>
+//#include <com/sun/star/ucb/InsertCommandArgument.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
@@ -289,7 +289,7 @@ void OFileAccess::transferImpl( const OUString& rSource, const OUString& rDest,
// SfxContentHelper::Transfer_Impl
INetURLObject aSourceObj( rSource, INET_PROT_FILE );
INetURLObject aDestObj( rDest, INET_PROT_FILE );
- String aName = aDestObj.getName( INetURLObject::LAST_SEGMENT, true,
+ String aName = aDestObj.getName( INetURLObject::LAST_SEGMENT, true,
INetURLObject::DECODE_WITH_CHARSET );
aDestObj.removeSegment();
aDestObj.setFinalSlash();
@@ -369,13 +369,16 @@ void OFileAccess::createFolder( const OUString& NewFolderURL )
INetURLObject aURL( NewFolderURL, INET_PROT_FILE );
String aNewFolderURLStr = aURL.GetMainURL();
String aTitle = aURL.getName();
- aURL.removeSegment();
-
- // Does the base folder exist? Otherwise create it first
- String aBaseFolderURLStr = aURL.GetMainURL();
- if( !isFolder( aBaseFolderURLStr ) )
+ if ( aTitle.Len() )
{
- createFolder( aBaseFolderURLStr );
+ aURL.removeSegment();
+
+ // Does the base folder exist? Otherwise create it first
+ String aBaseFolderURLStr = aURL.GetMainURL();
+ if( !isFolder( aBaseFolderURLStr ) )
+ {
+ createFolder( aBaseFolderURLStr );
+ }
}
Sequence<OUString> aNames(2);
@@ -531,17 +534,18 @@ Reference< XOutputStream > OFileAccess::openFileWrite( const OUString& FileURL )
Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL )
throw(CommandAbortedException, Exception, RuntimeException)
{
+/*
InsertCommandArgument aInsertArg;
aInsertArg.Data = Reference< XInputStream >();
aInsertArg.ReplaceExisting = sal_True;
-
+*/
INetURLObject aFileObj( FileURL, INET_PROT_FILE );
Content aCnt( aFileObj.GetMainURL(), mxEnvironment );
Any aCmdArg;
+/*
aCmdArg <<= aInsertArg;
aCnt.executeCommand( OUString::createFromAscii( "insert" ), aCmdArg );
-
-
+*/
Reference< XActiveDataStreamer > xSink = (XActiveDataStreamer*)new OActiveDataStreamer();
Reference< XInterface > xSinkIface = Reference< XInterface >::query( xSink );