summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorKrisztian Pinter <pin.terminator@gmail.com>2013-03-06 20:30:30 +0100
committerAndras Timar <atimar@suse.com>2013-03-14 10:36:24 +0000
commitde99bcde8a66a410287c7fb9c4ae6d6c9b7f05a6 (patch)
tree78b9f3a4f31df4722e41c899b6b9f2f1ad0220c7 /sd
parentc03448ddbb11d96e0c9985ddfaa4f2c5d6cd426e (diff)
fdo#39445 writing out tools/fsys.hxx
removed unused <tools/fsys.hxx> include from gengal.cxx changed file copying to sal version in htmlex.cxx rewrote OutputFile in rsctools.cxx very minor change in rsc.cxx - instead of creating an empty DirEntry and getting its path, just used "." Change-Id: Ifd57d73847ff271bcb64b12a26a564acc051fcef Reviewed-on: https://gerrit.libreoffice.org/2680 Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/html/htmlex.cxx19
-rw-r--r--sd/source/filter/html/htmlex.hxx2
2 files changed, 9 insertions, 12 deletions
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 99887975200f..92690d0ccb57 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -27,7 +27,6 @@
#include <rtl/uri.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/file.hxx>
-#include <tools/fsys.hxx>
#include <unotools/pathoptions.hxx>
#include <vcl/FilterConfigItem.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -3054,30 +3053,28 @@ String HtmlExport::InsertSound( const String& rSoundFile )
String aStr( RTL_CONSTASCII_USTRINGPARAM("<embed src=\"") );
INetURLObject aURL( rSoundFile );
+ String aSoundFileName = String(aURL.getName());
DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
- aStr += String(aURL.getName());
+ aStr += aSoundFileName;
aStr.AppendAscii( "\" hidden=\"true\" autostart=\"true\">" );
- CopyFile( rSoundFile, maExportPath );
+ CopyFile( OUString(rSoundFile), OUString(maExportPath) + OUString(aSoundFileName) );
return aStr;
}
// =====================================================================
-bool HtmlExport::CopyFile( const String& rSourceFile, const String& rDestPath )
+bool HtmlExport::CopyFile( const OUString& rSourceFile, const OUString& rDestFile )
{
- DirEntry aSourceEntry( rSourceFile );
- DirEntry aDestEntry( rDestPath );
+ meEC.SetContext( STR_HTMLEXP_ERROR_COPY_FILE, rSourceFile, rDestFile );
+ osl::FileBase::RC Error = osl::File::copy( rSourceFile, rDestFile );
- meEC.SetContext( STR_HTMLEXP_ERROR_COPY_FILE, aSourceEntry.GetName(), rDestPath );
- FSysError nError = aSourceEntry.CopyTo( aDestEntry, FSYS_ACTION_COPYFILE );
-
- if( nError != FSYS_ERR_OK )
+ if( Error != osl::FileBase::E_None )
{
- ErrorHandler::HandleError(nError);
+ ErrorHandler::HandleError(Error);
return false;
}
else
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 6993cdbbce1e..8d4a57877347 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -195,7 +195,7 @@ class HtmlExport
String CreatePageURL( sal_uInt16 nPgNum );
String InsertSound( const String& rSoundFile );
- bool CopyFile( const String& rSourceFile, const String& rDestPath );
+ bool CopyFile( const OUString& rSourceFile, const OUString& rDestFile );
bool CopyScript( const String& rPath, const String& rSource, const String& rDest, bool bUnix = false );
void InitProgress( sal_uInt16 nProgrCount );