[Libreoffice-commits] core.git: 2 commits - tools/source

Michael Stahl mstahl at redhat.com
Sat Mar 23 15:06:55 PDT 2013


 tools/source/fsys/dirent.cxx   |    8 +++++++-
 tools/source/fsys/tempfile.cxx |   18 +-----------------
 2 files changed, 8 insertions(+), 18 deletions(-)

New commits:
commit 2098b720dd9cdfef5b214802f0b37f49ad42982c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Sat Mar 23 22:44:00 2013 +0100

    tools: TempFile: create a file in ctor, not a directory
    
    related: fdo#62617
    (regression from a548924aece3dc99b2aa36b5c9b0fa52de9951ae)
    
    Change-Id: Ie29a22e2bacc5fc31c9a5d1c33c01c3b6f22fe49

diff --git a/tools/source/fsys/tempfile.cxx b/tools/source/fsys/tempfile.cxx
index bb68187..24557f5 100644
--- a/tools/source/fsys/tempfile.cxx
+++ b/tools/source/fsys/tempfile.cxx
@@ -127,7 +127,7 @@ TempFile::TempFile()
     pImp->aName = ConstructTempDir_Impl();
 
     // get TempFile with default naming scheme
-    CreateTempName_Impl( pImp->aName, sal_True );
+    CreateTempName_Impl( pImp->aName, sal_True, false );
 }
 
 TempFile::TempFile( const String& rLeadingChars, const String* pExtension )
commit 1a777d4387589d36918d4f71cd7413fc79d518c4
Author: Michael Stahl <mstahl at redhat.com>
Date:   Sat Mar 23 20:24:55 2013 +0100

    tools: move some code around so there is less of it
    
    Change-Id: Ib93ce32cbdceae959989f9575899be0519db8377

diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 624cac0..5c392e0 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -57,7 +57,13 @@
 using namespace osl;
 using ::rtl::OUString;
 
-extern rtl::OUString GetSystemTempDirPath_Impl();
+static rtl::OUString GetSystemTempDirPath_Impl()
+{
+    rtl::OUString aTmpURL, aPath;
+    osl::FileBase::getTempDirURL( aTmpURL );
+    osl::FileBase::getSystemPathFromFileURL( aTmpURL, aPath );
+    return aPath;
+}
 
 int Sys2SolarError_Impl( int nSysErr )
 {
diff --git a/tools/source/fsys/tempfile.cxx b/tools/source/fsys/tempfile.cxx
index e771849..bb68187 100644
--- a/tools/source/fsys/tempfile.cxx
+++ b/tools/source/fsys/tempfile.cxx
@@ -29,10 +29,6 @@
 
 #include <stdio.h>
 
-#ifdef UNX
-#define _MAX_PATH 260
-#endif
-
 using namespace osl;
 
 namespace { struct TempNameBase_Impl : public rtl::Static< ::rtl::OUString, TempNameBase_Impl > {}; }
@@ -42,18 +38,6 @@ struct TempFile_Impl
     String      aName;
 };
 
-extern rtl::OUString GetSystemTempDirPath_Impl();
-
-rtl::OUString GetSystemTempDirPath_Impl()
-{
-    rtl::OUString aTmpURL, aPath;
-    osl::FileBase::getTempDirURL( aTmpURL );
-    osl::FileBase::getSystemPathFromFileURL( aTmpURL, aPath );
-    return aPath;
-}
-
-#define TMPNAME_SIZE  ( 1 + 5 + 5 + 4 + 1 )
-
 OUString ConstructTempDir_Impl()
 {
     // use system directory


More information about the Libreoffice-commits mailing list