[Libreoffice-commits] .: tools/inc tools/source

Jan Holesovsky kendy at kemper.freedesktop.org
Tue May 3 05:34:56 PDT 2011


 tools/inc/tools/fsys.hxx     |    2 -
 tools/source/fsys/dirent.cxx |   12 +++---
 tools/source/fsys/unx.cxx    |   75 -------------------------------------
 tools/source/fsys/wntmsc.cxx |   85 -------------------------------------------
 4 files changed, 6 insertions(+), 168 deletions(-)

New commits:
commit ef60bbed913806c1a293bee3d06cb769ab3e6473
Author: Francois Tigeot <ftigeot at wolfpond.org>
Date:   Tue May 3 14:32:45 2011 +0200

    Remove strange filesystems-related enum.

diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx
index 47ce264..e4ab76b 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -296,8 +296,6 @@ public:
                                    FSysPathStyle eParser = FSYS_STYLE_HOST );
                         ~DirEntry();
 
-    sal_Bool				IsCaseSensitive (FSysPathStyle eFormatter = FSYS_STYLE_HOST) const;
-
     sal_uIntPtr				GetError() const { return nError; }
     sal_Bool				IsValid() const;
     DirEntryFlag		GetFlag() const { return eFlag; };
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index a557edb..731a1d2 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -1662,13 +1662,13 @@ sal_Bool DirEntry::ImpToRel( String aCurStr )
     aThis.ToAbs();
     String aThisStr( aThis.GetFull( FSYS_STYLE_HPFS ) );
 
-    // #109512 preserve case of path even if caseinsensitive
+    // preserve case of path even if caseinsensitive
     String aThisCompareStr( aThisStr ), aCurCompareStr( aCurStr );
-    if ( ! IsCaseSensitive() )
-    {
-        aThisCompareStr.ToLowerAscii();
-        aCurCompareStr.ToLowerAscii();
-    }
+
+#if defined(WNT)
+    aThisCompareStr.ToLowerAscii();
+    aCurCompareStr.ToLowerAscii();
+#endif
 
     // "Ubereinstimmung pr"ufen
     sal_uInt16 nPos = aThisCompareStr.Match( aCurCompareStr );
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index a2eba54..90c7a94 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -191,81 +191,6 @@ static sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab)
 
 #endif
 
-/************************************************************************
-|*
-|*    DirEntry::IsCaseSensitive()
-|*
-*************************************************************************/
-
-sal_Bool DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
-{
-
-    if (eFormatter==FSYS_STYLE_HOST)
-    {
-#if defined(NETBSD) || defined(DRAGONFLY)
-        return sal_True;
-#else
-        struct stat buf;
-        DirEntry aPath(*this);
-        aPath.ToAbs();
-
-        while (stat (ByteString(aPath.GetFull(), osl_getThreadTextEncoding()).GetBuffer(), &buf))
-        {
-            if (aPath.Level() == 1)
-            {
-                return sal_True;	// ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
-            }
-            aPath = aPath [1];
-        }
-
-        struct mymnttab fsmnt;
-        GetMountEntry(buf.st_dev, &fsmnt);
-        if ((fsmnt.mymnttab_filesystem.CompareTo("msdos")==COMPARE_EQUAL) ||
-            (fsmnt.mymnttab_filesystem.CompareTo("umsdos")==COMPARE_EQUAL) ||
-            (fsmnt.mymnttab_filesystem.CompareTo("vfat")==COMPARE_EQUAL) ||
-            (fsmnt.mymnttab_filesystem.CompareTo("hpfs")==COMPARE_EQUAL) ||
-            (fsmnt.mymnttab_filesystem.CompareTo("smb")	==COMPARE_EQUAL) ||
-            (fsmnt.mymnttab_filesystem.CompareTo("ncpfs")==COMPARE_EQUAL))
-        {
-            return sal_False;
-        }
-        else
-        {
-            return sal_True;
-        }
-#endif
-    }
-    else
-    {
-        sal_Bool isCaseSensitive = sal_True;	// ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
-        switch ( eFormatter )
-        {
-            case FSYS_STYLE_MAC:
-            case FSYS_STYLE_FAT:
-            case FSYS_STYLE_VFAT:
-            case FSYS_STYLE_NTFS:
-            case FSYS_STYLE_NWFS:
-            case FSYS_STYLE_HPFS:
-                {
-                    isCaseSensitive = sal_False;
-                    break;
-                }
-            case FSYS_STYLE_SYSV:
-            case FSYS_STYLE_BSD:
-            case FSYS_STYLE_DETECT:
-                {
-                    isCaseSensitive = sal_True;
-                    break;
-                }
-            default:
-                {
-                    isCaseSensitive = sal_True;	// ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
-                    break;
-                }
-        }
-        return isCaseSensitive;
-    }
-}
 
 /************************************************************************
 |*
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx
index cfe64be..bfe7a3c 100644
--- a/tools/source/fsys/wntmsc.cxx
+++ b/tools/source/fsys/wntmsc.cxx
@@ -169,91 +169,6 @@ FSysPathStyle DirEntry::GetPathStyle( const String &rDevice )
 
 /*************************************************************************
 |*
-|*    DirEntry::IsCaseSensitive()
-|*
-*************************************************************************/
-
-sal_Bool DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
-{
-
-    if (eFormatter==FSYS_STYLE_HOST)
-    {
-/*
-        DirEntry            aRoot(*this);
-        aRoot.ToAbs();
-        aRoot =             aRoot[Level()-1];
-        String aRootDir =   aRoot.GetFull(FSYS_STYLE_HOST, sal_True);
-
-        char sVolumeName[256];
-        DWORD nVolumeSerial;
-        DWORD nMaxCompLen;
-        DWORD nFlags;
-        char sFileSysName[16];
-
-        if ( GetVolumeInformation(  (char*) aRootDir.GetStr(),
-                                    sVolumeName,
-                                    256,
-                                    (LPDWORD) &nVolumeSerial,
-                                    (LPDWORD) &nMaxCompLen,
-                                    (LPDWORD) &nFlags,
-                                    sFileSysName,
-                                    16 ))
-        {
-            return (nFlags & FS_CASE_SENSITIVE) ? sal_True : sal_False;
-        }
-        else
-        {
-            return sal_False;
-        }
-*/
-        //
-        // guter versuch, aber FS_CASE_SENSITIVE ist D?nnsinn in T?ten:
-        //
-        // sFileSysName     FS_CASE_SENSITIVE
-        // FAT              sal_False
-        // NTFS             sal_True !!!
-        // NWCompat         sal_False
-        // Samba            sal_False
-        //
-        // NT spricht auch NTFS lediglich case preserving an, also ist unter NT alles case insensitiv
-        //
-
-        return sal_False;
-    }
-    else
-    {
-        sal_Bool isCaseSensitive = sal_False;   // ich bin unter win32, also ist der default case insensitiv
-        switch ( eFormatter )
-        {
-            case FSYS_STYLE_MAC:
-            case FSYS_STYLE_FAT:
-            case FSYS_STYLE_VFAT:
-            case FSYS_STYLE_NTFS:
-            case FSYS_STYLE_NWFS:
-            case FSYS_STYLE_HPFS:
-            case FSYS_STYLE_DETECT:
-                {
-                    isCaseSensitive = sal_False;
-                    break;
-                }
-            case FSYS_STYLE_SYSV:
-            case FSYS_STYLE_BSD:
-                {
-                    isCaseSensitive = sal_True;
-                    break;
-                }
-            default:
-                {
-                    isCaseSensitive = sal_False;    // ich bin unter win32, also ist der default case insensitiv
-                    break;
-                }
-        }
-        return isCaseSensitive;
-    }
-}
-
-/*************************************************************************
-|*
 |*    DirEntry::ToAbs()
 |*
 *************************************************************************/


More information about the Libreoffice-commits mailing list