summaryrefslogtreecommitdiff
path: root/unotools/source/ucbhelper/ucbhelper.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2001-07-06 14:08:07 +0000
committerMathias Bauer <mba@openoffice.org>2001-07-06 14:08:07 +0000
commitf35b07ed46d71a39f3874bff2ec1bfe37d784161 (patch)
treea27611425c260c9c8ec94fc1e83a339efff60b5f /unotools/source/ucbhelper/ucbhelper.cxx
parent6f2f7e3091504e8e58d9be603ed3739f6f2cd68e (diff)
#89377#: new method for creating folders
Diffstat (limited to 'unotools/source/ucbhelper/ucbhelper.cxx')
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 0f77824e23af..b610e86ac6cf 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ucbhelper.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: pb $ $Date: 2001-07-03 13:48:07 $
+ * last change: $Author: mba $ $Date: 2001-07-06 15:08:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -554,7 +554,16 @@ sal_Bool UCBContentHelper::MakeFolder( const String& rFolder )
DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
String aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
aURL.removeSegment();
+ Content aCnt;
+ Content aNew;
+ if ( Content::create( aURL.GetMainURL(), Reference< XCommandEnvironment >(), aCnt ) )
+ return MakeFolder( aCnt, aTitle, aNew );
+ else
+ return sal_False;
+}
+sal_Bool UCBContentHelper::MakeFolder( Content& aCnt, const String& aTitle, Content& rNew )
+{
try
{
Content aCnt( aURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment > () );
@@ -589,8 +598,7 @@ sal_Bool UCBContentHelper::MakeFolder( const String& rFolder )
Any* pValues = aValues.getArray();
pValues[0] = makeAny( OUString( aTitle ) );
- Content aNewFolder;
- if ( !aCnt.insertNewContent( rCurr.Type, aNames, aValues, aNewFolder ) )
+ if ( !aCnt.insertNewContent( rCurr.Type, aNames, aValues, rNew ) )
continue;
return sal_True;