summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-29 00:31:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-29 09:56:08 +0100
commitde82a40f84c69081a517617989c344ec9597cb45 (patch)
tree6b9c15c67b11db681e6e8417b62efdd0a98b013a /tools
parent313332e76bd17c0a5a6bd67c0abc467877948a3a (diff)
callcatcher: drop various unused methods
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/fsys.hxx3
-rw-r--r--tools/inc/tools/string.hxx3
-rw-r--r--tools/source/fsys/fstat.cxx82
-rw-r--r--tools/source/fsys/unx.cxx38
-rw-r--r--tools/source/string/tstring.cxx42
5 files changed, 0 insertions, 168 deletions
diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx
index 2aae76db878d..ee64c7f12edf 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -205,9 +205,6 @@ public:
static sal_uIntPtr SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO = sal_True );
static sal_Bool GetReadOnlyFlag( const DirEntry &rEntry );
-
- static void SetDateTime( const String& rFileName,
- const DateTime& rNewDateTime );
};
// ------------
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 6f53f3f8a52b..0ddeef0f2d60 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -253,9 +253,6 @@ public:
ByteString& ConvertLineEnd()
{ return ConvertLineEnd( GetSystemLineEnd() ); }
- sal_Bool IsLowerAscii() const;
- sal_Bool IsUpperAscii() const;
-
ByteString& ToLowerAscii();
ByteString& ToUpperAscii();
diff --git a/tools/source/fsys/fstat.cxx b/tools/source/fsys/fstat.cxx
index c0a9c8ce5eba..e633d1bbc444 100644
--- a/tools/source/fsys/fstat.cxx
+++ b/tools/source/fsys/fstat.cxx
@@ -210,86 +210,4 @@ sal_uIntPtr FileStat::SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO )
#endif
}
-/*************************************************************************
-|*
-|* FileStat::SetDateTime
-|*
-*************************************************************************/
-#if defined WNT
-
-void FileStat::SetDateTime( const String& rFileName,
- const DateTime& rNewDateTime )
-{
- ByteString aFileName(rFileName, osl_getThreadTextEncoding());
-
- Date aNewDate = rNewDateTime;
- Time aNewTime = rNewDateTime;
-
- TIME_ZONE_INFORMATION aTZI;
- DWORD dwTZI = GetTimeZoneInformation( &aTZI );
-
- if ( dwTZI != (DWORD)-1 && dwTZI != TIME_ZONE_ID_UNKNOWN )
- {
- // 1. Korrektur der Zeitzone
- LONG nDiff = aTZI.Bias;
- Time aOldTime = aNewTime; // alte Zeit merken
-
- // 2. evt. Korrektur Sommer-/Winterzeit
- if ( dwTZI == TIME_ZONE_ID_DAYLIGHT )
- nDiff += aTZI.DaylightBias;
-
- Time aDiff( abs( nDiff / 60 /*Min -> Std*/ ), 0 );
-
- if ( nDiff > 0 )
- {
- aNewTime += aDiff; // Stundenkorrektur
-
- // bei "Uberlauf korrigieren
- if ( aNewTime >= Time( 24, 0 ) )
- aNewTime -= Time( 24, 0 );
-
- // Tages"uberlauf?
- if ( aOldTime == Time( 0, 0 ) || // 00:00 -> 01:00
- aNewTime < aOldTime ) // 23:00 -> 00:00 | 01:00 ...
- aNewDate++;
- }
- else if ( nDiff < 0 )
- {
- aNewTime -= aDiff; // Stundenkorrektur
-
- // negative Zeit (-1:00) korrigieren: 23:00
- if (aNewTime < Time( 0, 0 ) )
- aNewTime += Time( 24, 0 );
-
- // Tagesunterlauf ?
- if ( aOldTime == Time( 0, 0 ) || // 00:00 -> 23:00
- aNewTime > aOldTime ) // 01:00 -> 23:00 | 22:00 ...
- aNewDate--;
- }
- }
-
-
- SYSTEMTIME aTime;
- aTime.wYear = aNewDate.GetYear();
- aTime.wMonth = aNewDate.GetMonth();
- aTime.wDayOfWeek = 0;
- aTime.wDay = aNewDate.GetDay();
- aTime.wHour = aNewTime.GetHour();
- aTime.wMinute = aNewTime.GetMin();
- aTime.wSecond = aNewTime.GetSec();
- aTime.wMilliseconds = 0;
- FILETIME aFileTime;
- SystemTimeToFileTime( &aTime, &aFileTime );
-
- HANDLE hFile = CreateFile( aFileName.GetBuffer(), GENERIC_WRITE, 0, 0,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 );
-
- if ( hFile != INVALID_HANDLE_VALUE )
- {
- SetFileTime( hFile, &aFileTime, &aFileTime, &aFileTime );
- CloseHandle( hFile );
- }
-}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index 34d4b5b5a2e5..736730339a5a 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -472,42 +472,4 @@ const char *TempDirImpl( char *pBuf )
return pBuf;
}
-/*************************************************************************
-|*
-|* FileStat::SetDateTime
-|*
-*************************************************************************/
-
-void FileStat::SetDateTime( const String& rFileName,
- const DateTime& rNewDateTime )
-{
- tm times;
-
- times.tm_year = rNewDateTime.GetYear() - 1900; // 1997 -> 97
- times.tm_mon = rNewDateTime.GetMonth() - 1; // 0 == Januar!
- times.tm_mday = rNewDateTime.GetDay();
-
- times.tm_hour = rNewDateTime.GetHour();
- times.tm_min = rNewDateTime.GetMin();
- times.tm_sec = rNewDateTime.GetSec();
-
- times.tm_wday = 0;
- times.tm_yday = 0;
-#ifdef SOLARIS
- times.tm_isdst = -1;
-#else
- times.tm_isdst = 0;
-#endif
-
- time_t time = mktime (&times);
-
- if (time != (time_t) -1)
- {
- struct utimbuf u_time;
- u_time.actime = time;
- u_time.modtime = time;
- utime(rtl::OUStringToOString(rFileName, osl_getThreadTextEncoding()).getStr(), &u_time);
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index f24f4ea90f44..ec74b249fd0f 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -88,48 +88,6 @@ xub_StrLen ImplStringLen( const sal_Unicode* pStr )
#include <strimp.cxx>
#include <strcvt.cxx>
-// -----------------------------------------------------------------------
-
-sal_Bool ByteString::IsLowerAscii() const
-{
- DBG_CHKTHIS( ByteString, DbgCheckByteString );
-
- sal_Int32 nIndex = 0;
- sal_Int32 nLen = mpData->mnLen;
- const sal_Char* pStr = mpData->maStr;
- while ( nIndex < nLen )
- {
- if ( (*pStr >= 65) && (*pStr <= 90) )
- return sal_False;
-
- ++pStr,
- ++nIndex;
- }
-
- return sal_True;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool ByteString::IsUpperAscii() const
-{
- DBG_CHKTHIS( ByteString, DbgCheckByteString );
-
- sal_Int32 nIndex = 0;
- sal_Int32 nLen = mpData->mnLen;
- const sal_Char* pStr = mpData->maStr;
- while ( nIndex < nLen )
- {
- if ( (*pStr >= 97) && (*pStr <= 122) )
- return sal_False;
-
- ++pStr,
- ++nIndex;
- }
-
- return sal_True;
-}
-
void STRING::SearchAndReplaceAll( const STRCODE* pCharStr, const STRING& rRepStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );