Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2680

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/80/2680/1

fdo#39445 - some progress

Change-Id: Ifd57d73847ff271bcb64b12a26a564acc051fcef
---
M rsc/source/rsc/rsc.cxx
M rsc/source/tools/rsctools.cxx
M sd/source/filter/html/htmlex.cxx
M svx/source/gengal/gengal.cxx
4 files changed, 25 insertions(+), 15 deletions(-)



diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 92da200..05f697c 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -92,8 +92,13 @@
     nCommands       = 0;
     nByteOrder      = RSC_BIGENDIAN;
 
+    /*
     DirEntry aEntry;
     aPath = rtl::OUStringToOString(aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US); //Immer im 
Aktuellen Pfad suchen
+    * Replaced the above two lines with this, seems to work, not sure
+    * about it though.
+    */
+    aPath = OString();
     m_aOutputFiles.clear();
     m_aOutputFiles.push_back( OutputFile() );
 }
@@ -173,6 +178,15 @@
 
                     m_aReplacements.push_back( std::pair< OString, OString >( OString( (*ppStr)+4, 
pEqual - *ppStr - 4 ),
                         rtl::OUStringToOString(aSDir.GetFull(), RTL_TEXTENCODING_ASCII_US) ) );
+                    /*
+                     * Tried replacing the above with this, doesn't work.
+                     *
+                    OUString aSDir;
+                    osl::FileBase::getFileURLFromSystemPath(OStringToOUString(aSPath, 
RTL_TEXTENCODING_ASCII_US), aSDir);
+                    m_aReplacements.push_back( std::pair< OString, OString >
+                        ( OString( (*ppStr)+4, pEqual - *ppStr - 4 ),
+                        OUStringToOString(aSDir, RTL_TEXTENCODING_ASCII_US) ) );
+                    */
                 }
             }
             else if( !rsc_stricmp( (*ppStr) + 1, "PreLoad" ) )
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx
index 857f663..7e94c6e 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 @@
 *************************************************************************/
 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 9988797..8d9a384 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3069,15 +3069,12 @@
 
 bool HtmlExport::CopyFile( const String& rSourceFile, const String& rDestPath )
 {
-    DirEntry aSourceEntry( rSourceFile );
-    DirEntry aDestEntry( rDestPath );
+    meEC.SetContext( STR_HTMLEXP_ERROR_COPY_FILE, rSourceFile, rDestPath );
+    osl::FileBase::RC Error = osl::File::copy( rSourceFile, rDestPath ); //?
 
-    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/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 7653678..56bd3a6 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -44,7 +44,7 @@
 #include <com/sun/star/ucb/UniversalContentBroker.hpp>
 
 #include <tools/urlobj.hxx>
-#include <tools/fsys.hxx>
+//#include <tools/fsys.hxx>
 
 #include <vcl/vclmain.hxx>
 #include <vcl/window.hxx>

-- 
To view, visit https://gerrit.libreoffice.org/2680
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd57d73847ff271bcb64b12a26a564acc051fcef
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Krisztian Pinter <pin.terminator@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.