diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2011-02-14 18:20:23 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2011-02-14 18:20:23 +0100 |
commit | db45e5f229c444e481e354863da1d07348ba9d67 (patch) | |
tree | ada7b20bd8efcfd76f8e169754ddf5bdb774252e /tools/source/fsys/wntmsc.cxx | |
parent | a9aa5e1feff13541cdf725f83c408d5c5d795591 (diff) | |
parent | ce5f1dd187c3a7d8113c7653fa887b98fd50aaf6 (diff) |
rebase to DEV300_m100
Diffstat (limited to 'tools/source/fsys/wntmsc.cxx')
-rwxr-xr-x[-rw-r--r--] | tools/source/fsys/wntmsc.cxx | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx index a8cf1c1eecec..17421d83feaa 100644..100755 --- a/tools/source/fsys/wntmsc.cxx +++ b/tools/source/fsys/wntmsc.cxx @@ -52,7 +52,7 @@ DECLARE_LIST( FileStatList, FileStat* ); int Sys2SolarError_Impl( int nSysErr ); -static BOOL bLastCaseSensitive = FALSE; +static sal_Bool bLastCaseSensitive = sal_False; //-------------------------------------------------------------------- @@ -103,7 +103,7 @@ struct dirent *readdir( DIR *pDir ) int closedir( DIR *pDir ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; if ( pDir ) { bOk = 0 != pDir->p || FindClose( pDir->h ); @@ -136,7 +136,7 @@ ErrCode GetPathStyle_Impl( const String &rDevice, FSysPathStyle &rStyle ) // Windows95 hat VFAT, WindowsNT nicht DWORD nVer = GetVersion(); - BOOL bW95 = ( nVer & 0xFF ) >= 4; + sal_Bool bW95 = ( nVer & 0xFF ) >= 4; FSysFailOnErrorImpl(); rStyle = FSYS_STYLE_UNKNOWN; @@ -185,7 +185,7 @@ FSysPathStyle DirEntry::GetPathStyle( const String &rDevice ) |* *************************************************************************/ -BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const +sal_Bool DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const { if (eFormatter==FSYS_STYLE_HOST) @@ -194,7 +194,7 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const DirEntry aRoot(*this); aRoot.ToAbs(); aRoot = aRoot[Level()-1]; - String aRootDir = aRoot.GetFull(FSYS_STYLE_HOST, TRUE); + String aRootDir = aRoot.GetFull(FSYS_STYLE_HOST, sal_True); char sVolumeName[256]; DWORD nVolumeSerial; @@ -211,30 +211,30 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const sFileSysName, 16 )) { - return (nFlags & FS_CASE_SENSITIVE) ? TRUE : FALSE; + return (nFlags & FS_CASE_SENSITIVE) ? sal_True : sal_False; } else { - return FALSE; + return sal_False; } */ // // guter versuch, aber FS_CASE_SENSITIVE ist D?nnsinn in T?ten: // // sFileSysName FS_CASE_SENSITIVE - // FAT FALSE - // NTFS TRUE !!! - // NWCompat FALSE - // Samba FALSE + // 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 FALSE; + return sal_False; } else { - BOOL isCaseSensitive = FALSE; // ich bin unter win32, also ist der default case insensitiv + sal_Bool isCaseSensitive = sal_False; // ich bin unter win32, also ist der default case insensitiv switch ( eFormatter ) { case FSYS_STYLE_MAC: @@ -245,18 +245,18 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const case FSYS_STYLE_HPFS: case FSYS_STYLE_DETECT: { - isCaseSensitive = FALSE; + isCaseSensitive = sal_False; break; } case FSYS_STYLE_SYSV: case FSYS_STYLE_BSD: { - isCaseSensitive = TRUE; + isCaseSensitive = sal_True; break; } default: { - isCaseSensitive = FALSE; // ich bin unter win32, also ist der default case insensitiv + isCaseSensitive = sal_False; // ich bin unter win32, also ist der default case insensitiv break; } } @@ -274,19 +274,19 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const |* *************************************************************************/ -BOOL DirEntry::ToAbs() +sal_Bool DirEntry::ToAbs() { DBG_CHKTHIS( DirEntry, ImpCheckDirEntry ); if ( FSYS_FLAG_VOLUME == eFlag ) { eFlag = FSYS_FLAG_ABSROOT; - return TRUE; + return sal_True; } if ( IsAbs() ) { - return TRUE; + return sal_True; } @@ -295,10 +295,10 @@ BOOL DirEntry::ToAbs() ByteString aFullName( GetFull(), osl_getThreadTextEncoding() ); FSysFailOnErrorImpl(); if ( GetFullPathName((char*)aFullName.GetBuffer(),256,sBuf,&pOld) > 511 ) - return FALSE; + return sal_False; *this = DirEntry( String(sBuf, osl_getThreadTextEncoding() )); - return TRUE; + return sal_True; } @@ -364,27 +364,27 @@ String DirEntry::GetVolume() const |* *************************************************************************/ -BOOL DirEntry::SetCWD( BOOL bSloppy ) const +sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const { DBG_CHKTHIS( DirEntry, ImpCheckDirEntry ); FSysFailOnErrorImpl(); if ( eFlag == FSYS_FLAG_CURRENT && !aName.Len() ) - return TRUE; + return sal_True; if ( SetCurrentDirectory(ByteString(GetFull(), osl_getThreadTextEncoding()).GetBuffer()) ) { - return TRUE; + return sal_True; } if ( bSloppy && pParent && SetCurrentDirectory(ByteString(pParent->GetFull(), osl_getThreadTextEncoding()).GetBuffer()) ) { - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } //------------------------------------------------------------------------- @@ -444,7 +444,7 @@ USHORT DirReader_Impl::Read() CharLowerBuff( (char*) aLowerName.GetBuffer(), aLowerName.Len() ); // Flags pruefen - BOOL bIsDirAndWantsDir = + sal_Bool bIsDirAndWantsDir = ( ( pDir->eAttrMask & FSYS_KIND_DIR ) && #ifdef ICC ( pDosEntry->d_type & ( strcmp(pDosEntry->d_name,".") || @@ -452,7 +452,7 @@ USHORT DirReader_Impl::Read() #else ( pDosEntry->d_type & DOS_DIRECT ) ); #endif - BOOL bIsFileAndWantsFile = + sal_Bool bIsFileAndWantsFile = ( ( pDir->eAttrMask & FSYS_KIND_FILE ) && #ifdef ICC !( pDosEntry->d_type & ( strcmp(pDosEntry->d_name,".") || @@ -461,8 +461,8 @@ USHORT DirReader_Impl::Read() !( pDosEntry->d_type & DOS_DIRECT ) && #endif !( pDosEntry->d_type & DOS_VOLUMEID ) ); - BOOL bIsHidden = (pDosEntry->d_type & _A_HIDDEN) != 0; - BOOL bWantsHidden = 0 == ( pDir->eAttrMask & FSYS_KIND_VISIBLE ); + sal_Bool bIsHidden = (pDosEntry->d_type & _A_HIDDEN) != 0; + sal_Bool bWantsHidden = 0 == ( pDir->eAttrMask & FSYS_KIND_VISIBLE ); if ( ( bIsDirAndWantsDir || bIsFileAndWantsFile ) && ( bWantsHidden || !bIsHidden ) && pDir->aNameMask.Matches( String(aLowerName, osl_getThreadTextEncoding()) ) ) @@ -483,7 +483,7 @@ USHORT DirReader_Impl::Read() pTemp->ImpSetStat( new FileStat( (void*) pDosDir, (void*) 0 ) ); #endif if ( pParent ) - pTemp->ImpChangeParent( new DirEntry( *pParent ), FALSE ); + pTemp->ImpChangeParent( new DirEntry( *pParent ), sal_False ); if ( pDir->pStatLst ) //Status fuer Sort gewuenscht? { FileStat *pNewStat = new FileStat( (void*) pDosDir, (void*) 0 ); @@ -502,7 +502,7 @@ USHORT DirReader_Impl::Read() } else - bReady = TRUE; + bReady = sal_True; return 0; } @@ -793,13 +793,13 @@ HRESULT SHResolvePath( HWND hwndOwner, LPCTSTR pszPath, LPITEMIDLIST *ppidl ) // The Wrapper //--------------------------------------------------------------------------- -BOOL Exists_Impl( const ByteString & crPath ) +sal_Bool Exists_Impl( const ByteString & crPath ) { // We do not know if OLE was initialized for this thread CoInitialize( NULL ); - BOOL bSuccess = SUCCEEDED( SHResolvePath(NULL, crPath.GetBuffer(), NULL) ); + sal_Bool bSuccess = SUCCEEDED( SHResolvePath(NULL, crPath.GetBuffer(), NULL) ); CoUninitialize(); @@ -808,7 +808,7 @@ BOOL Exists_Impl( const ByteString & crPath ) //--------------------------------------------------------------------------- -BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) +sal_Bool FileStat::Update( const DirEntry& rDirEntry, sal_Bool bForceAccess ) { nSize = 0; nKindFlags = 0; @@ -825,7 +825,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) { nError = FSYS_ERR_UNKNOWN; nKindFlags = 0; - return FALSE; + return sal_False; } // Sonderbehandlung falls es sich um eine Root ohne Laufwerk handelt @@ -834,7 +834,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) { nKindFlags = FSYS_KIND_DIR; nError = FSYS_ERR_OK; - return TRUE; + return sal_True; } // keine Error-Boxen anzeigen @@ -849,7 +849,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) // ist ein Medium im Laufwerk? HACK("wie?") - BOOL bAccess = TRUE; + sal_Bool bAccess = sal_True; const DirEntry *pTop = aDirEntry.ImpGetTopPtr(); ByteString aName = ByteString(pTop->aName).ToLowerAscii(); if ( !bForceAccess && @@ -857,7 +857,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) pTop->eFlag == FSYS_FLAG_RELROOT || pTop->eFlag == FSYS_FLAG_VOLUME ) ) if ( aName == "a:" || aName == "b:" ) - bAccess = FALSE; + bAccess = sal_False; else DBG_TRACE( "FSys: will access removable device!" ); if ( bAccess && ( aName == "a:" || aName == "b:" ) ) { @@ -881,7 +881,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) nKindFlags |= FSYS_KIND_REMOVEABLE; nError = FSYS_ERR_NOTEXISTS; nKindFlags = 0; - return FALSE; + return sal_False; } ByteString aRootDir = aDirEntry.aName; @@ -891,7 +891,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) { nError = FSYS_ERR_NOTEXISTS; nKindFlags = 0; - return FALSE; + return sal_False; } if ( aDirEntry.eFlag == FSYS_FLAG_VOLUME ) @@ -905,7 +905,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) nError = ERRCODE_NONE; - return TRUE; + return sal_True; } // Statusinformation vom Betriebssystem holen @@ -945,7 +945,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) { nKindFlags = FSYS_KIND_UNKNOWN; nError = FSYS_ERR_NOTEXISTS; - return FALSE; + return sal_False; } // UNC-Volume? @@ -959,13 +959,13 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) { nKindFlags = FSYS_KIND_DIR|FSYS_KIND_REMOTE; nError = FSYS_ERR_OK; - return TRUE; + return sal_True; } else { nKindFlags = FSYS_KIND_UNKNOWN; nError = FSYS_ERR_NOTEXISTS; - return FALSE; + return sal_False; } } } @@ -984,7 +984,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) { nKindFlags = FSYS_KIND_WILD; nError = FSYS_ERR_OK; - return TRUE; + return sal_True; } if ( bAccess ) @@ -1008,7 +1008,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess ) } -BOOL IsRedirectable_Impl( const ByteString &rPath ) +sal_Bool IsRedirectable_Impl( const ByteString &rPath ) { if ( rPath.Len() >= 3 && ':' == rPath.GetBuffer()[1] ) { @@ -1017,7 +1017,7 @@ BOOL IsRedirectable_Impl( const ByteString &rPath ) SetLastError( ERROR_SUCCESS ); return DRIVE_FIXED != nType; } - return FALSE; + return sal_False; } /************************************************************************* @@ -1067,7 +1067,7 @@ ErrCode FileStat::QueryDiskSpace( const String &rPath, //========================================================================= -void FSysEnableSysErrorBox( BOOL bEnable ) +void FSysEnableSysErrorBox( sal_Bool bEnable ) { // Preserve other Bits!! sal_uInt32 nErrorMode = SetErrorMode( bEnable ? 0 : SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX ); if ( bEnable ) |