summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFrancois Tigeot <ftigeot@wolfpond.org>2011-06-15 22:24:06 +0200
committerFrancois Tigeot <ftigeot@wolfpond.org>2011-06-15 22:24:06 +0200
commit67ad4156818e8c95d075ead152fc35672b1a6135 (patch)
treec2da2dfc4124aa7e4dcde5215d5e2d2f05836aca /tools
parent7c2224a88f9df3bc6cb956ddbb4fc1251711b0c4 (diff)
Remove unused methods
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/fsys.hxx9
-rw-r--r--tools/source/fsys/dirent.cxx67
-rw-r--r--tools/source/fsys/unx.cxx13
-rw-r--r--tools/source/fsys/wntmsc.cxx38
4 files changed, 0 insertions, 127 deletions
diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx
index c8a6d9ed60c6..341d74d8bc5d 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -215,9 +215,6 @@ public:
static sal_uIntPtr SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO = sal_True );
static sal_Bool GetReadOnlyFlag( const DirEntry &rEntry );
- static ErrCode QueryDiskSpace( const String &rPath,
- BigInt &rFreeBytes, BigInt &rTotalBytes );
-
static void SetDateTime( const String& rFileName,
const DateTime& rNewDateTime );
};
@@ -522,12 +519,6 @@ public:
#endif // BOOTSTRP
-//========================================================================
-
-void FSysEnableSysErrorBox( sal_Bool bEnable );
-
-//========================================================================
-
#if defined(DBG_UTIL)
void FSysTest();
#endif
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 5683b5b45542..a38d698b2f9b 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -1842,73 +1842,6 @@ FSysError DirEntry::ImpParseUnixName( const ByteString& rPfad, FSysPathStyle eSt
return FSYS_ERR_OK;
}
-ErrCode CreateEntry_Impl( const DirEntry &rPath, DirEntryKind eKind )
-{
- // versuchen, anzulegen (ausser bei FSYS_KIND_ALL)
- ErrCode eErr = ERRCODE_NONE;
- if ( FSYS_KIND_FILE == eKind )
- {
- SvFileStream aStream( rPath.GetFull(), STREAM_STD_WRITE );
- aStream.WriteLine( "" );
- eErr = aStream.GetError();
- }
- else if ( FSYS_KIND_ALL != eKind )
- eErr = rPath.MakeDir() ? ERRCODE_NONE : ERRCODE_IO_UNKNOWN;
-
- // erfolgreich?
- if ( !rPath.Exists() )
- eErr = ERRCODE_IO_UNKNOWN; // Doch was schiefgegangen ?
-
- // ggf. wieder l"oschen
- if ( FSYS_KIND_NONE == eKind )
- rPath.Kill();
-
- // Fehlercode zur?ckliefern
- return eErr;
-}
-
-sal_Bool IsValidEntry_Impl( const DirEntry &rPath,
- const String &rLongName,
- DirEntryKind eKind,
- sal_Bool bIsShortened,
- sal_Bool bUseDelim )
-{
- // Parameter-Pr"uefung
- DBG_ASSERT( eKind == FSYS_KIND_NONE || eKind == FSYS_KIND_ALL ||
- eKind == FSYS_KIND_FILE || eKind == FSYS_KIND_DIR,
- "invalid entry-kind" );
-
- // Alle von MSDOS erreichbaren FSYS_STYLES muessen den
- // MSDOS Filenamenanforderungen genuegen. Sonst wird probiert,
- // ob sich eine Datei des gewuenschten Names anlegen laesst.
- FSysPathStyle eStyle = DirEntry::GetPathStyle();
- DirEntry aPath(rPath);
- DirEntry aName(rLongName, eStyle);
- if ( !aName.IsValid() || aName.Level() != 1 )
- return sal_False;
- aPath += aName;
- if ( 1 == aPath.Level() )
- return sal_False;
-
- // Pfad-Trenner sind nicht erlaubt (bei ungek"urzten auch nicht FSYS_SHORTNAME_DELIMITER)
- char cDelim = bUseDelim == 2 ? FSYS_SHORTNAME_DELIMITER : char(0);
- if (
- rLongName.Search(DirEntry::GetAccessDelimiter()) != STRING_NOTFOUND ||
- (!bIsShortened && rLongName.Search(cDelim) != STRING_NOTFOUND)
- )
- {
- return sal_False;
- }
-
- // MI: Abfrage nach 'CON:' etc. wird jetzt in Exists() mitgemacht
- if ( aPath.Exists() )
- return sal_False;
-
- return (ERRCODE_NONE == CreateEntry_Impl( aPath, eKind ));
-}
-
-//-------------------------------------------------------------------------
-
#define MAX_EXT_MAX 250
#define MAX_LEN_MAX 255
#define INVALID_CHARS_DEF "\\/\"':|^<>?*"
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index f19c14bfb84b..0adc7ce8fa03 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -521,17 +521,4 @@ void FileStat::SetDateTime( const String& rFileName,
}
}
-//=========================================================================
-
-ErrCode FileStat::QueryDiskSpace( const String &, BigInt &, BigInt & )
-{
- return ERRCODE_IO_NOTSUPPORTED;
-}
-
-//=========================================================================
-
-void FSysEnableSysErrorBox( sal_Bool )
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx
index 6ed2ba1950c9..ab783b45a161 100644
--- a/tools/source/fsys/wntmsc.cxx
+++ b/tools/source/fsys/wntmsc.cxx
@@ -872,42 +872,4 @@ const char* TempDirImpl( char *pBuf )
return pBuf;
}
-//=======================================================================
-
-ErrCode FileStat::QueryDiskSpace( const String &rPath,
- BigInt &rFreeBytes, BigInt &rTotalBytes )
-{
- DWORD nSectorsPerCluster; /* address of sectors per cluster */
- DWORD nBytesPerSector; /* address of bytes per sector */
- DWORD nFreeClusters; /* address of number of free clusters */
- DWORD nClusters; /* address of total number of clusters */
-
- ByteString aVol( DirEntry(rPath).ImpGetTopPtr()->GetName(), osl_getThreadTextEncoding());
- bool bOK = GetDiskFreeSpace( aVol.GetBuffer(),
- &nSectorsPerCluster, &nBytesPerSector,
- &nFreeClusters, &nClusters );
- if ( !bOK )
- return Sys2SolarError_Impl( GetLastError() );
-
- BigInt aBytesPerCluster( BigInt(nSectorsPerCluster) *
- BigInt(nBytesPerSector) );
- rFreeBytes = aBytesPerCluster * BigInt(nFreeClusters);
- rTotalBytes = aBytesPerCluster * BigInt(nClusters);
- return 0;
-}
-
-//=========================================================================
-
-void FSysEnableSysErrorBox( sal_Bool bEnable )
-{ // Preserve other Bits!!
- sal_uInt32 nErrorMode = SetErrorMode( bEnable ? 0 : SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX );
- if ( bEnable )
- nErrorMode &= ~(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
- else
- nErrorMode |= (SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
- SetErrorMode( nErrorMode );
-}
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */