Kaydet (Commit) 6941b7c8 authored tarafından Noel Grandin's avatar Noel Grandin

convert FILEACCESS module from String to OUString

Change-Id: If3dd7564e2931691062ce209784aaab6eddc6d9e
üst 7865b976
...@@ -228,10 +228,10 @@ void OFileAccess::transferImpl( const OUString& rSource, ...@@ -228,10 +228,10 @@ void OFileAccess::transferImpl( const OUString& rSource,
// SfxContentHelper::Transfer_Impl // SfxContentHelper::Transfer_Impl
INetURLObject aSourceObj( rSource, INET_PROT_FILE ); INetURLObject aSourceObj( rSource, INET_PROT_FILE );
INetURLObject aDestObj( rDest, INET_PROT_FILE ); INetURLObject aDestObj( rDest, INET_PROT_FILE );
String aName = aDestObj.getName( OUString aName = aDestObj.getName(
INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
String aDestURL; OUString aDestURL;
String aSourceURL = aSourceObj.GetMainURL( INetURLObject::NO_DECODE ); OUString aSourceURL = aSourceObj.GetMainURL( INetURLObject::NO_DECODE );
if ( aDestObj.removeSegment() ) if ( aDestObj.removeSegment() )
{ {
// hierarchical URL. // hierarchical URL.
...@@ -367,13 +367,13 @@ void OFileAccess::createFolder( const OUString& NewFolderURL ) ...@@ -367,13 +367,13 @@ void OFileAccess::createFolder( const OUString& NewFolderURL )
// SfxContentHelper::MakeFolder // SfxContentHelper::MakeFolder
INetURLObject aURL( NewFolderURL, INET_PROT_FILE ); INetURLObject aURL( NewFolderURL, INET_PROT_FILE );
String aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
if ( aTitle.Len() ) if ( !aTitle.isEmpty() )
{ {
aURL.removeSegment(); aURL.removeSegment();
// Does the base folder exist? Otherwise create it first // Does the base folder exist? Otherwise create it first
String aBaseFolderURLStr = aURL.GetMainURL( INetURLObject::NO_DECODE ); OUString aBaseFolderURLStr = aURL.GetMainURL( INetURLObject::NO_DECODE );
if( !isFolder( aBaseFolderURLStr ) ) if( !isFolder( aBaseFolderURLStr ) )
{ {
createFolder( aBaseFolderURLStr ); createFolder( aBaseFolderURLStr );
...@@ -731,14 +731,14 @@ void SAL_CALL OFileAccess::writeFile( const OUString& FileURL, ...@@ -731,14 +731,14 @@ void SAL_CALL OFileAccess::writeFile( const OUString& FileURL,
INetURLObject aParentURLObj( aURL ); INetURLObject aParentURLObj( aURL );
if ( aParentURLObj.removeSegment() ) if ( aParentURLObj.removeSegment() )
{ {
String aParentURL OUString aParentURL
= aParentURLObj.GetMainURL( INetURLObject::NO_DECODE ); = aParentURLObj.GetMainURL( INetURLObject::NO_DECODE );
// ensure all parent folders exist. // ensure all parent folders exist.
createFolder( aParentURL ); createFolder( aParentURL );
// create the new file... // create the new file...
String aTitle OUString aTitle
= aURL.getName( INetURLObject::LAST_SEGMENT, = aURL.getName( INetURLObject::LAST_SEGMENT,
true, true,
INetURLObject::DECODE_WITH_CHARSET ); INetURLObject::DECODE_WITH_CHARSET );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment