[Libreoffice-commits] .: 2 commits - tools/inc tools/source
François Tigeot
ftigeot at kemper.freedesktop.org
Sat Apr 30 22:50:05 PDT 2011
tools/inc/tools/fsys.hxx | 1
tools/source/datetime/tdate.cxx | 15 -------
tools/source/datetime/ttime.cxx | 43 +-------------------
tools/source/debug/debug.cxx | 32 ---------------
tools/source/fsys/comdep.cxx | 2
tools/source/fsys/comdep.hxx | 6 --
tools/source/fsys/dirent.cxx | 75 ++++-------------------------------
tools/source/fsys/filecopy.cxx | 56 --------------------------
tools/source/fsys/fstat.cxx | 83 ---------------------------------------
tools/source/fsys/tdir.cxx | 2
tools/source/generic/toolsin.cxx | 5 --
tools/source/rc/resmgr.cxx | 2
tools/source/stream/strmsys.cxx | 2
13 files changed, 21 insertions(+), 303 deletions(-)
New commits:
commit 1caa694a73f42caf60f13a769bf739a6b5f902eb
Author: Francois Tigeot <ftigeot at wolfpond.org>
Date: Sun May 1 07:49:30 2011 +0200
Remove some OS/2 code
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index 37f619c..812833b 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -29,10 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_tools.hxx"
-#if defined( OS2 )
-#define INCL_DOSDATETIME
-#include <svpm.h>
-#elif defined( WNT )
+#if defined( WNT )
#include <windows.h>
#else
#include <time.h>
@@ -140,15 +137,7 @@ static void DaysToDate( long nDays,
Date::Date()
{
-#if defined( OS2 )
- DATETIME aDateTime;
- DosGetDateTime( &aDateTime );
-
- // Datum zusammenbauen
- nDate = ((sal_uIntPtr)aDateTime.day) +
- (((sal_uIntPtr)aDateTime.month)*100) +
- (((sal_uIntPtr)aDateTime.year)*10000);
-#elif defined WNT
+#if defined WNT
SYSTEMTIME aDateTime;
GetLocalTime( &aDateTime );
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx
index ab28433..8a2cc3d 100644
--- a/tools/source/datetime/ttime.cxx
+++ b/tools/source/datetime/ttime.cxx
@@ -31,11 +31,7 @@
#define _TOOLS_TIME_CXX
-#if defined( OS2 )
-#define INCL_DOSMISC
-#define INCL_DOSDATETIME
-#include <svpm.h>
-#elif defined( WNT )
+#if defined( WNT )
#include <windows.h>
#elif defined UNX
#include <unistd.h>
@@ -94,16 +90,7 @@ static Time Sec100ToTime( sal_Int32 nSec100 )
Time::Time()
{
-#if defined( OS2 )
- DATETIME aDateTime;
- DosGetDateTime( &aDateTime );
-
- // Zeit zusammenbauen
- nTime = (((sal_Int32)aDateTime.hours)*1000000) +
- (((sal_Int32)aDateTime.minutes)*10000) +
- (((sal_Int32)aDateTime.seconds)*100) +
- ((sal_Int32)aDateTime.hundredths);
-#elif defined( WNT )
+#if defined( WNT )
SYSTEMTIME aDateTime;
GetLocalTime( &aDateTime );
@@ -313,23 +300,7 @@ sal_Bool Time::IsEqualIgnore100Sec( const Time& rTime ) const
Time Time::GetUTCOffset()
{
-#if defined( OS2 )
-#undef timezone
- DATETIME aDateTime;
- DosGetDateTime( &aDateTime );
-
- // Zeit zusammenbauen
- if ( aDateTime.timezone != -1 )
- {
- short nTempTime = (short)Abs( aDateTime.timezone );
- Time aTime( 0, (sal_uInt16)nTempTime );
- if ( aDateTime.timezone > 0 )
- aTime = -aTime;
- return aTime;
- }
- else
- return Time( 0 );
-#elif defined( WNT )
+#if defined( WNT )
TIME_ZONE_INFORMATION aTimeZone;
aTimeZone.Bias = 0;
DWORD nTimeZoneRet = GetTimeZoneInformation( &aTimeZone );
@@ -391,10 +362,6 @@ sal_uIntPtr Time::GetSystemTicks()
{
#if defined WNT
return (sal_uIntPtr)GetTickCount();
-#elif defined( OS2 )
- sal_uIntPtr nClock;
- DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (sal_uIntPtr)nClock;
#else
timeval tv;
gettimeofday (&tv, 0);
@@ -414,10 +381,6 @@ sal_uIntPtr Time::GetProcessTicks()
{
#if defined WNT
return (sal_uIntPtr)GetTickCount();
-#elif defined( OS2 )
- sal_uIntPtr nClock;
- DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (sal_uIntPtr)nClock;
#else
static sal_uIntPtr nImplTicksPerSecond = 0;
static double dImplTicksPerSecond;
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 8a6754e..985e7b5 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -44,14 +44,6 @@
#include <string.h>
#include <stdio.h>
-#ifdef OS2
-#define INCL_DOSSEMAPHORES
-#define INCL_DOSMISC
-#define INCL_WINDIALOGS
-#define INCL_WINSHELLDATA
-#include <svpm.h>
-#endif
-
#if defined ( WNT )
#include <windows.h>
#endif
@@ -210,8 +202,6 @@ static int bDbgImplInMain = sal_False;
#if defined( WNT )
static CRITICAL_SECTION aImplCritDbgSection;
-#elif defined( OS2 )
-static HMTX hImplCritDbgSection = 0;
#endif
static sal_Bool bImplCritDbgSectionInit = sal_False;
@@ -221,8 +211,6 @@ void ImplDbgInitLock()
{
#if defined( WNT )
InitializeCriticalSection( &aImplCritDbgSection );
-#elif defined( OS2 )
- DosCreateMutexSem( NULL, &hImplCritDbgSection, 0, sal_False );
#endif
bImplCritDbgSectionInit = sal_True;
}
@@ -233,8 +221,6 @@ void ImplDbgDeInitLock()
{
#if defined( WNT )
DeleteCriticalSection( &aImplCritDbgSection );
-#elif defined( OS2 )
- DosCloseMutexSem( hImplCritDbgSection );
#endif
bImplCritDbgSectionInit = sal_False;
}
@@ -248,8 +234,6 @@ void ImplDbgLock()
#if defined( WNT )
EnterCriticalSection( &aImplCritDbgSection );
-#elif defined( OS2 )
- DosRequestMutexSem( hImplCritDbgSection, SEM_INDEFINITE_WAIT );
#endif
}
@@ -262,14 +246,12 @@ void ImplDbgUnlock()
#if defined( WNT )
LeaveCriticalSection( &aImplCritDbgSection );
-#elif defined( OS2 )
- DosReleaseMutexSem( hImplCritDbgSection );
#endif
}
// =======================================================================
-#if (defined WNT || defined OS2)
+#if defined WNT
//#define SV_MEMMGR //
#endif
#ifdef SV_MEMMGR
@@ -316,10 +298,6 @@ static sal_uIntPtr ImplGetPerfTime()
{
#if defined( WNT )
return (sal_uIntPtr)GetTickCount();
-#elif defined( OS2 )
- sal_uIntPtr nClock;
- DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (sal_uIntPtr)nClock;
#else
static sal_uIntPtr nImplTicksPerSecond = 0;
static double dImplTicksPerSecond;
@@ -683,9 +661,6 @@ static void DbgGetDbgFileName( sal_Char* pStr, sal_Int32 nMaxLen )
strncpy( pStr, pName, nMaxLen );
else
GetProfileStringA( "sv", "dbgsv", "dbgsv.ini", pStr, nMaxLen );
-#elif defined( OS2 )
- PrfQueryProfileString( HINI_PROFILE, (PSZ)"SV", (PSZ)"DBGSV",
- "dbgsv.ini", (PSZ)pStr, nMaxLen );
#else
strncpy( pStr, "dbgsv.ini", nMaxLen );
#endif
@@ -707,9 +682,6 @@ static void DbgGetLogFileName( sal_Char* pStr )
strcpy( pStr, pName );
else
GetProfileStringA( "sv", "dbgsvlog", "dbgsv.log", pStr, 200 );
-#elif defined( OS2 )
- PrfQueryProfileString( HINI_PROFILE, (PSZ)"SV", (PSZ)"DBGSVLOG",
- "dbgsv.log", (PSZ)pStr, 200 );
#else
strcpy( pStr, "dbgsv.log" );
#endif
@@ -721,8 +693,6 @@ static void DbgDebugBeep()
{
#if defined( WNT )
MessageBeep( MB_ICONHAND );
-#elif defined( OS2 )
- WinAlarm( HWND_DESKTOP, WA_ERROR );
#endif
}
diff --git a/tools/source/fsys/comdep.cxx b/tools/source/fsys/comdep.cxx
index 1904e39..3461b46 100644
--- a/tools/source/fsys/comdep.cxx
+++ b/tools/source/fsys/comdep.cxx
@@ -39,8 +39,6 @@ DBG_NAMEEX( DirEntry )
#include "unx.cxx"
#elif defined WNT
#include "wntmsc.cxx"
-#elif defined OS2
-#include "os2.cxx"
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/fsys/comdep.hxx b/tools/source/fsys/comdep.hxx
index f9c3bba..bc28901 100644
--- a/tools/source/fsys/comdep.hxx
+++ b/tools/source/fsys/comdep.hxx
@@ -52,8 +52,6 @@
#include "unx.hxx"
#elif defined WNT
#include "wntmsc.hxx"
-#elif defined OS2
-#include "os2.hxx"
#endif
//--------------------------------------------------------------------
@@ -93,7 +91,7 @@ struct DirReader_Impl
// nur den String der Memer-Var nehmen!
-#if defined(UNX) || defined(OS2) //for further exlpanation see DirReader_Impl::Read() in unx.cxx
+#if defined(UNX) //for further eplanation see DirReader_Impl::Read() in unx.cxx
pDosDir = NULL;
#else
aBypass = ByteString(aPath, osl_getThreadTextEncoding());
@@ -145,7 +143,7 @@ struct FileCopier_Impl
//--------------------------------------------------------------------
-#if defined WNT || defined OS2
+#if defined WNT
sal_Bool IsRedirectable_Impl( const ByteString &rPath );
#else
#define IsRedirectable_Impl( rPath ) sal_True
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 6c70a8e..a9f15eb 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -38,7 +38,7 @@
#include <process.h>
#endif
-#if defined(UNX) || defined(OS2)
+#if defined(UNX)
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -966,7 +966,7 @@ sal_Bool DirEntry::Exists( FSysAccess nAccess ) const
if ( !IsValid() )
return sal_False;
-#if defined WNT || defined OS2
+#if defined WNT
// spezielle Filenamen sind vom System da
if ( ( aName.CompareIgnoreCaseToAscii("CLOCK$") == COMPARE_EQUAL ||
aName.CompareIgnoreCaseToAscii("CON") == COMPARE_EQUAL ||
@@ -990,7 +990,7 @@ sal_Bool DirEntry::Exists( FSysAccess nAccess ) const
return sal_True;
}
-#if defined WNT || defined OS2
+#if defined WNT
if ( 0 != ( eKind & FSYS_KIND_DEV ) )
{
return DRIVE_EXISTS( ImpGetTopPtr()->aName.GetChar(0) );
@@ -1358,14 +1358,8 @@ sal_Bool DirEntry::operator==( const DirEntry& rEntry ) const
( rEntry.eFlag == FSYS_FLAG_INVALID ) )
return sal_False;
-#ifndef OS2
- const
-#endif
- DirEntry *pThis = (DirEntry *)this;
-#ifndef OS2
- const
-#endif
- DirEntry *pWith = (DirEntry *)&rEntry;
+ const DirEntry *pThis = (DirEntry *)this;
+ const DirEntry *pWith = (DirEntry *)&rEntry;
while( pThis && pWith && (pThis->eFlag == pWith->eFlag) )
{
if ( CMP_LOWER(pThis->aName) != CMP_LOWER(pWith->aName) )
@@ -1971,7 +1965,7 @@ DirEntry DirEntry::TempName( DirEntryKind eKind ) const
strcpy(ret_val,dir);
/* Make sure directory ends with a separator */
-#if defined(WNT) || defined(OS2)
+#if defined(WNT)
if ( i>0 && ret_val[i-1] != '\\' && ret_val[i-1] != '/' &&
ret_val[i-1] != ':')
ret_val[i++] = '\\';
@@ -2039,7 +2033,7 @@ DirEntry DirEntry::TempName( DirEntryKind eKind ) const
}
else
{
-#if defined(UNX) || defined(OS2)
+#if defined(UNX)
if( access( ByteString(aRedirected, osl_getThreadTextEncoding()).GetBuffer(), F_OK ) )
{
aRet = DirEntry( aRetVal );
@@ -2530,7 +2524,7 @@ FSysError DirEntry::CopyTo( const DirEntry& rDest, FSysAction nActions ) const
|*
*************************************************************************/
-#if defined WNT || defined UNX || defined OS2
+#if defined WNT || defined UNX
FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
{
@@ -2553,13 +2547,6 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
return FSYS_ERR_ALREADYEXISTS;
}
-#if defined(OS2)
- if ( FileStat(*this).IsKind(FSYS_KIND_DIR) && aDest.GetPath() != GetPath() )
- {
- return FSYS_ERR_NOTSUPPORTED;
- }
-#endif
-
FSysFailOnErrorImpl();
String aFrom( GetFull() );
@@ -2634,7 +2621,7 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
// on some nfs connections rename with from == to
// leads to destruction of file
if ( ( aFrom != aTo ) && ( 0 != rename( bFrom.GetBuffer(), bTo.GetBuffer() ) ) )
-#if !defined(UNX) && !defined(OS2)
+#if !defined(UNX)
return Sys2SolarError_Impl( GetLastError() );
#else
{
@@ -2773,9 +2760,7 @@ FSysError DirEntry::Kill( FSysAction nActions ) const
{
if ( FSYS_ACTION_USERECYCLEBIN == (nActions & FSYS_ACTION_USERECYCLEBIN) )
{
-#ifdef OS2
- eError = ApiRet2ToSolarError_Impl( DosDelete( (PSZ) pName ) );
-#elif defined(WNT)
+#if defined(WNT)
SHFILEOPSTRUCT aOp;
aOp.hwnd = 0;
aOp.wFunc = FO_DELETE;
diff --git a/tools/source/fsys/filecopy.cxx b/tools/source/fsys/filecopy.cxx
index a0caeef..4a454f1 100644
--- a/tools/source/fsys/filecopy.cxx
+++ b/tools/source/fsys/filecopy.cxx
@@ -33,13 +33,6 @@
#include <windows.h>
#include <io.h>
-#elif defined(OS2)
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <share.h>
-#include <io.h>
-
#elif defined UNX
#include <fcntl.h>
#include <unistd.h>
@@ -242,55 +235,6 @@ FSysError FileCopier::DoCopy_Impl(
FileStat aSourceFileStat( rSource );
if ( aSourceFileStat.IsKind( FSYS_KIND_DIR ) )
{
-#ifdef OS2
- CHAR szSource[CCHMAXPATHCOMP];
- HOBJECT hSourceObject;
-
- strcpy(szSource, ByteString(rSource.GetFull(), osl_getThreadTextEncoding()).GetBuffer());
- hSourceObject = WinQueryObject(szSource);
-
- if ( hSourceObject )
- {
- PSZ pszSourceName;
- PSZ pszTargetName;
- CHAR szTarget[CCHMAXPATHCOMP];
- HOBJECT hTargetObject;
- HOBJECT hReturn = NULLHANDLE;
-
- strcpy(szTarget, ByteString(rTarget.GetFull(), osl_getThreadTextEncoding()).GetBuffer());
- pszTargetName = strrchr(szTarget, '\\');
- pszSourceName = strrchr(szSource, '\\');
-
- hTargetObject = WinQueryObject(szTarget);
-
- if ( hTargetObject )
- WinDestroyObject(hTargetObject);
-
- if ( pszTargetName && pszSourceName )
- {
- *pszTargetName = '\0';
- pszSourceName++;
- pszTargetName++;
-
- if(strcmp(pszSourceName, pszTargetName) == 0)
- {
- hTargetObject = WinQueryObject(szTarget);
-
- if(pImp->nActions & FSYS_ACTION_MOVE)
- {
- hReturn = WinMoveObject(hSourceObject, hTargetObject, 0);
- }
- else
- {
- hReturn = WinCopyObject(hSourceObject, hTargetObject, 0);
- }
- if ( bMakeShortNames && aTarget.Exists() )
- aTarget.Kill();
- return hReturn ? FSYS_ERR_OK : FSYS_ERR_UNKNOWN;
- }
- }
- }
-#endif
// recursive copy
eRet = Error( aTgt.MakeDir() ? FSYS_ERR_OK : FSYS_ERR_UNKNOWN, 0, &aTgt );
Dir aSourceDir( rSource, FSYS_KIND_DIR|FSYS_KIND_FILE );
diff --git a/tools/source/fsys/fstat.cxx b/tools/source/fsys/fstat.cxx
index 64d43b6..94cda65 100644
--- a/tools/source/fsys/fstat.cxx
+++ b/tools/source/fsys/fstat.cxx
@@ -146,16 +146,6 @@ sal_Bool FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
DWORD nRes = GetFileAttributes( (LPCTSTR) aFPath.GetBuffer() );
return ULONG_MAX != nRes &&
( FILE_ATTRIBUTE_READONLY & nRes ) == FILE_ATTRIBUTE_READONLY;
-#elif defined OS2
- FILESTATUS3 aFileStat;
- APIRET nRet = DosQueryPathInfo( (PSZ)aFPath.GetBuffer(), 1, &aFileStat, sizeof(aFileStat) );
- switch ( nRet )
- {
- case NO_ERROR:
- return FILE_READONLY == ( aFileStat.attrFile & FILE_READONLY );
- default:
- return sal_False;
- }
#elif defined UNX
/* could we stat the object? */
struct stat aBuf;
@@ -186,26 +176,6 @@ sal_uIntPtr FileStat::SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO )
( nRes & ~FILE_ATTRIBUTE_READONLY ) |
( bRO ? FILE_ATTRIBUTE_READONLY : 0 ) );
return ( ULONG_MAX == nRes ) ? ERRCODE_IO_UNKNOWN : 0;
-#elif defined OS2
- FILESTATUS3 aFileStat;
- APIRET nRet = DosQueryPathInfo( (PSZ)aFPath.GetBuffer(), 1, &aFileStat, sizeof(aFileStat) );
- if ( !nRet )
- {
- aFileStat.attrFile = ( aFileStat.attrFile & ~FILE_READONLY ) |
- ( bRO ? FILE_READONLY : 0 );
- nRet = DosSetPathInfo( (PSZ)aFPath.GetBuffer(), 1, &aFileStat, sizeof(aFileStat), 0 );
- }
- switch ( nRet )
- {
- case NO_ERROR:
- return ERRCODE_NONE;
-
- case ERROR_SHARING_VIOLATION:
- return ERRCODE_IO_LOCKVIOLATION;
-
- default:
- return ERRCODE_IO_NOTEXISTS;
- }
#elif defined UNX
/* first, stat the object to get permissions */
struct stat aBuf;
@@ -245,7 +215,7 @@ sal_uIntPtr FileStat::SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO )
|* FileStat::SetDateTime
|*
*************************************************************************/
-#if defined WNT || defined OS2
+#if defined WNT
void FileStat::SetDateTime( const String& rFileName,
const DateTime& rNewDateTime )
@@ -255,7 +225,6 @@ void FileStat::SetDateTime( const String& rFileName,
Date aNewDate = rNewDateTime;
Time aNewTime = rNewDateTime;
-#if defined WNT
TIME_ZONE_INFORMATION aTZI;
DWORD dwTZI = GetTimeZoneInformation( &aTZI );
@@ -320,56 +289,6 @@ void FileStat::SetDateTime( const String& rFileName,
SetFileTime( hFile, &aFileTime, &aFileTime, &aFileTime );
CloseHandle( hFile );
}
-#elif defined OS2
-
- // open file
- ULONG nAction = FILE_EXISTED;
- HFILE hFile = 0;
- ULONG nFlags = OPEN_FLAGS_WRITE_THROUGH |
- OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_CACHE |
- OPEN_FLAGS_RANDOM | OPEN_FLAGS_NOINHERIT |
- OPEN_SHARE_DENYNONE | OPEN_ACCESS_READWRITE;
-
- APIRET nRet = DosOpen((PSZ)aFileName.GetBuffer(), &hFile, (PULONG)&nAction,
- 0/*size*/, FILE_NORMAL,
- OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS,
- nFlags, 0/*ea*/);
-
- if ( nRet == 0 )
- {
- FILESTATUS3 FileInfoBuffer;
-
- nRet = DosQueryFileInfo(
- hFile, 1, &FileInfoBuffer, sizeof(FileInfoBuffer));
-
- if ( nRet == 0 )
- {
- FDATE aNewDate;
- FTIME aNewTime;
-
- // create date and time words
- aNewDate.day = rNewDateTime.GetDay();
- aNewDate.month = rNewDateTime.GetMonth();
- aNewDate.year = rNewDateTime.GetYear() - 1980;
- aNewTime.twosecs = rNewDateTime.GetSec() / 2;
- aNewTime.minutes = rNewDateTime.GetMin();
- aNewTime.hours = rNewDateTime.GetHour();
-
- // set file date and time
- FileInfoBuffer.fdateCreation = aNewDate;
- FileInfoBuffer.ftimeCreation = aNewTime;
- FileInfoBuffer.fdateLastAccess = aNewDate;
- FileInfoBuffer.ftimeLastAccess = aNewTime;
- FileInfoBuffer.fdateLastWrite = aNewDate;
- FileInfoBuffer.ftimeLastWrite = aNewTime;
-
- DosSetFileInfo(hFile, 1, &FileInfoBuffer, sizeof(FileInfoBuffer));
- }
- DosClose(hFile);
- }
-#endif
-
}
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx
index d022ddd..d15efb4 100644
--- a/tools/source/fsys/tdir.cxx
+++ b/tools/source/fsys/tdir.cxx
@@ -334,7 +334,7 @@ void Dir::Reset()
#endif
// gibt es das zu oeffnende Verzeichnis ueberhaupt?
-#if !defined(UNX) && !defined(OS2) //explanation: see DirReader_Impl::Read() in unx.cxx
+#if !defined(UNX) //explanation: see DirReader_Impl::Read() in unx.cxx
if( !pReader->pDosDir )
{
nError = FSYS_ERR_NOTADIRECTORY;
diff --git a/tools/source/generic/toolsin.cxx b/tools/source/generic/toolsin.cxx
index 39e6113..ad4dc04 100644
--- a/tools/source/generic/toolsin.cxx
+++ b/tools/source/generic/toolsin.cxx
@@ -36,7 +36,7 @@
#include <tools/debug.hxx>
#include <toolsin.hxx>
-#if defined WNT || defined OS2
+#if defined WNT
#include <dll.hxx>
#endif
@@ -90,9 +90,6 @@ void GlobalDeInitTools()
#if defined WNT
ImpDeInitWinTools();
#endif
-#ifdef OS2
- ImpDeInitOS2Tools();
-#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index e1c0ee0..9aa3d28 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -662,9 +662,7 @@ sal_Bool InternalResMgr::Create()
}
}
rtl_freeMemory( pContentBuf );
-#ifndef OS2
OSL_ENSURE( bSorted, "content not sorted" );
-#endif
OSL_ENSURE( bEqual2Content, "resource structure wrong" );
if( !bSorted )
::std::sort(pContent,pContent+nEntries,ImpContentLessCompare());
diff --git a/tools/source/stream/strmsys.cxx b/tools/source/stream/strmsys.cxx
index 9a1ce77..ed3cbee 100644
--- a/tools/source/stream/strmsys.cxx
+++ b/tools/source/stream/strmsys.cxx
@@ -33,8 +33,6 @@
#include "strmwnt.cxx"
#elif defined UNX
#include "strmunx.cxx"
-#elif defined OS2
-#include "strmos2.cxx"
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 915c6809521474a80dcbc0fd843e6e96f6e56a33
Author: Francois Tigeot <ftigeot at wolfpond.org>
Date: Sun May 1 07:38:07 2011 +0200
Remove unused function IsLongNameOnFAT()
diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx
index 8675ce7..2d4d42c 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -296,7 +296,6 @@ public:
FSysPathStyle eParser = FSYS_STYLE_HOST );
~DirEntry();
- sal_Bool IsLongNameOnFAT() const;
sal_Bool IsCaseSensitive (FSysPathStyle eFormatter = FSYS_STYLE_HOST) const;
sal_uIntPtr GetError() const { return nError; }
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 060cea2..6c70a8e 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -2908,46 +2908,6 @@ sal_Bool DirEntry::IsRFSAvailable()
return sal_False;
}
-/*************************************************************************
-|*
-|* IsLongNameOnFAT()
-|*
-|* Beschreibung ?berpr?ft , ob das DirEntry einen langen
-|* Filenamen auf einer FAT-Partition enth?lt (EAs).
-|* (eigentlich nur f?r OS2 interessant)
-|*
-*************************************************************************/
-
-sal_Bool DirEntry::IsLongNameOnFAT() const
-{
- // FAT-System?
- DirEntry aTempDirEntry(*this);
- aTempDirEntry.ToAbs();
- if (DirEntry::GetPathStyle(aTempDirEntry.GetDevice().GetName().GetChar(0)) != FSYS_STYLE_FAT)
- {
- return sal_False; // nein, also false
- }
-
- // DirEntry-Kette auf lange Dateinamen pr?fen
- for( sal_uInt16 iLevel = this->Level(); iLevel > 0; iLevel-- )
- {
- const DirEntry& rEntry = (const DirEntry&) (*this)[iLevel-1];
- String aBase( rEntry.GetBase() );
- String aExtension( rEntry.GetExtension() );
-
- if (aBase.Len()>8) // Name > 8?
- {
- return sal_True;
- }
-
- if (aExtension.Len()>3) // Extension > 3?
- {
- return sal_True;
- }
- }
- return sal_False;
-}
-
//========================================================================
#if defined(DBG_UTIL)
More information about the Libreoffice-commits
mailing list