summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rsc/source/rsc/rsc.cxx3
-rw-r--r--rsc/source/tools/rsctools.cxx13
-rw-r--r--sd/source/filter/html/htmlex.cxx19
-rw-r--r--sd/source/filter/html/htmlex.hxx2
-rw-r--r--svx/source/gengal/gengal.cxx1
5 files changed, 16 insertions, 22 deletions
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 007f4263069c..393e2e097b8c 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -92,8 +92,7 @@ void RscCmdLine::Init()
nCommands = 0;
nByteOrder = RSC_BIGENDIAN;
- DirEntry aEntry;
- aPath = rtl::OUStringToOString(aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US); //Immer im Aktuellen Pfad suchen
+ aPath = OString(".");
m_aOutputFiles.clear();
m_aOutputFiles.push_back( OutputFile() );
}
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx
index 857f6633d662..7e94c6e1e505 100644
--- a/rsc/source/tools/rsctools.cxx
+++ b/rsc/source/tools/rsctools.cxx
@@ -28,8 +28,6 @@
#include <string.h>
#include <ctype.h>
-#include <tools/fsys.hxx>
-
// Include
#include <rscdef.hxx>
#include <rsctools.hxx>
@@ -174,13 +172,14 @@ sal_Bool Append(const rtl::OString &rOutputSrs, const rtl::OString &rTmpFile)
*************************************************************************/
rtl::OString OutputFile(const rtl::OString &rInput, const char * pExt)
{
- rtl::OUString aUniInput(rtl::OStringToOUString(rInput, RTL_TEXTENCODING_ASCII_US));
- DirEntry aFileName(aUniInput);
+ sal_Int32 nSepInd = rInput.lastIndexOf(".");
- OUString aExt = OStringToOUString( pExt, RTL_TEXTENCODING_ASCII_US );
- aFileName.SetExtension( aExt );
+ if( nSepInd != -1 )
+ {
+ return rInput.copy(0, rInput.getLength() - nSepInd).concat(OString(pExt));
+ }
- return rtl::OUStringToOString(aFileName.GetFull(), RTL_TEXTENCODING_ASCII_US);
+ return rInput.concat(OString(".")).concat(OString(pExt));
}
/*************************************************************************
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 );
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 7653678c3f70..346ace097ea4 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -44,7 +44,6 @@
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
#include <tools/urlobj.hxx>
-#include <tools/fsys.hxx>
#include <vcl/vclmain.hxx>
#include <vcl/window.hxx>