summaryrefslogtreecommitdiff
path: root/unotools/source/ucbhelper
diff options
context:
space:
mode:
authorXiaofei Zhang <Zhangxiaofei@openoffice.org>2010-07-29 10:56:19 +0800
committerXiaofei Zhang <Zhangxiaofei@openoffice.org>2010-07-29 10:56:19 +0800
commitd210c6ccc30466e98240c1409df0550514668d68 (patch)
tree0c94d52ecaebd283a92275cb372d5ddf926f5131 /unotools/source/ucbhelper
parent7f0993d43019a0ccb7f89c11fc23704c063b902f (diff)
#i112600#: clean up l10ntools, rsc, sot, svl, tools and unotools
Diffstat (limited to 'unotools/source/ucbhelper')
-rw-r--r--unotools/source/ucbhelper/localfilehelper.cxx4
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx32
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx20
3 files changed, 28 insertions, 28 deletions
diff --git a/unotools/source/ucbhelper/localfilehelper.cxx b/unotools/source/ucbhelper/localfilehelper.cxx
index 5ddd1f811923..a45d152b44f6 100644
--- a/unotools/source/ucbhelper/localfilehelper.cxx
+++ b/unotools/source/ucbhelper/localfilehelper.cxx
@@ -223,10 +223,10 @@ DECLARE_LIST( StringList_Impl, ::rtl::OUString* )
if ( pFiles )
{
- ULONG nCount = pFiles->Count();
+ sal_uIntPtr nCount = pFiles->Count();
Sequence < ::rtl::OUString > aRet( nCount );
::rtl::OUString* pRet = aRet.getArray();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
::rtl::OUString* pFile = pFiles->GetObject(i);
pRet[i] = *( pFile );
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 4160f2f2f443..a114e49d4949 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -366,10 +366,10 @@ Sequence < OUString > UCBContentHelper::GetFolderContents( const String& rFolder
if ( pFiles )
{
- ULONG nCount = pFiles->Count();
+ sal_uIntPtr nCount = pFiles->Count();
Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( ULONG i = 0; i < nCount; ++i )
+ for ( sal_uIntPtr i = 0; i < nCount; ++i )
{
OUString* pFile = pFiles->GetObject(i);
pRet[i] = *( pFile );
@@ -447,10 +447,10 @@ Sequence < OUString > UCBContentHelper::GetResultSet( const String& rURL )
if ( pList )
{
- ULONG nCount = pList->Count();
+ sal_uIntPtr nCount = pList->Count();
Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( ULONG i = 0; i < nCount; ++i )
+ for ( sal_uIntPtr i = 0; i < nCount; ++i )
{
OUString* pEntry = pList->GetObject(i);
pRet[i] = *( pEntry );
@@ -626,9 +626,9 @@ sal_Bool UCBContentHelper::HasParentFolder( const String& rFolder )
// -----------------------------------------------------------------------
-ULONG UCBContentHelper::GetSize( const String& rContent )
+sal_uIntPtr UCBContentHelper::GetSize( const String& rContent )
{
- ULONG nSize = 0;
+ sal_uIntPtr nSize = 0;
sal_Int64 nTemp = 0;
INetURLObject aObj( rContent );
DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
@@ -643,7 +643,7 @@ ULONG UCBContentHelper::GetSize( const String& rContent )
catch( ::com::sun::star::uno::Exception& )
{
}
- nSize = (UINT32)nTemp;
+ nSize = (sal_uInt32)nTemp;
return nSize;
}
@@ -679,9 +679,9 @@ sal_Bool UCBContentHelper::IsYounger( const String& rIsYoung, const String& rIsO
}
// -----------------------------------------------------------------------
-sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, String& rFile, BOOL bAllowWildCards )
+sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, String& rFile, sal_Bool bAllowWildCards )
{
- BOOL bWild = bAllowWildCards && ( rName.Search( '*' ) != STRING_NOTFOUND || rName.Search( '?' ) != STRING_NOTFOUND );
+ sal_Bool bWild = bAllowWildCards && ( rName.Search( '*' ) != STRING_NOTFOUND || rName.Search( '?' ) != STRING_NOTFOUND );
sal_Bool bRet = sal_False;
@@ -689,7 +689,7 @@ sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, Str
Sequence< ::rtl::OUString > aFiles = GetFolderContents( rFolder, sal_False );
const ::rtl::OUString* pFiles = aFiles.getConstArray();
- UINT32 i, nCount = aFiles.getLength();
+ sal_uInt32 i, nCount = aFiles.getLength();
for ( i = 0; i < nCount; ++i )
{
// get the last name of the URLs and compare it with rName
@@ -740,7 +740,7 @@ sal_Bool UCBContentHelper::Exists( const String& rURL )
Sequence< ::rtl::OUString > aFiles = GetFolderContents( aObj.GetMainURL( INetURLObject::NO_DECODE ), sal_True, sal_False );
const ::rtl::OUString* pFiles = aFiles.getConstArray();
- UINT32 i, nCount = aFiles.getLength();
+ sal_uInt32 i, nCount = aFiles.getLength();
for ( i = 0; i < nCount; ++i )
{
// get the last name of the URLs and compare it with rName
@@ -759,18 +759,18 @@ sal_Bool UCBContentHelper::Exists( const String& rURL )
}
// -----------------------------------------------------------------------
-sal_Bool UCBContentHelper::FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim, BOOL bAllowWildCards )
+sal_Bool UCBContentHelper::FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim, sal_Bool bAllowWildCards )
{
// extract the single folder names from the path variable and try to find the file in one of these folders
- USHORT nTokenCount = rPath.GetTokenCount( cDelim );
- for ( USHORT nToken = 0; nToken < nTokenCount; ++nToken )
+ sal_uInt16 nTokenCount = rPath.GetTokenCount( cDelim );
+ for ( sal_uInt16 nToken = 0; nToken < nTokenCount; ++nToken )
{
String aPath = rPath.GetToken( nToken, cDelim );
if ( Find( aPath, rName, rFile, bAllowWildCards ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index f21855d20aed..51b6bb0b1a61 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1284,7 +1284,7 @@ UcbLockBytes::UcbLockBytes( UcbLockBytesHandler* pHandler )
, m_bDontClose( sal_False )
, m_bStreamValid (sal_False)
{
- SetSynchronMode( TRUE );
+ SetSynchronMode( sal_True );
}
//----------------------------------------------------------------------------
@@ -1423,13 +1423,13 @@ void UcbLockBytes::terminate_Impl()
}
//----------------------------------------------------------------------------
-void UcbLockBytes::SetSynchronMode (BOOL bSynchron)
+void UcbLockBytes::SetSynchronMode (sal_Bool bSynchron)
{
SvLockBytes::SetSynchronMode (bSynchron);
}
//----------------------------------------------------------------------------
-ErrCode UcbLockBytes::ReadAt ( ULONG nPos, void *pBuffer, ULONG nCount, ULONG *pRead) const
+ErrCode UcbLockBytes::ReadAt ( sal_uIntPtr nPos, void *pBuffer, sal_uIntPtr nCount, sal_uIntPtr *pRead) const
{
if ( IsSynchronMode() )
{
@@ -1488,13 +1488,13 @@ ErrCode UcbLockBytes::ReadAt ( ULONG nPos, void *pBuffer, ULONG nCount, ULONG *p
rtl_copyMemory (pBuffer, aData.getConstArray(), nSize);
if (pRead)
- *pRead = ULONG(nSize);
+ *pRead = sal_uIntPtr(nSize);
return ERRCODE_NONE;
}
//----------------------------------------------------------------------------
-ErrCode UcbLockBytes::WriteAt ( ULONG nPos, const void *pBuffer, ULONG nCount, ULONG *pWritten)
+ErrCode UcbLockBytes::WriteAt ( sal_uIntPtr nPos, const void *pBuffer, sal_uIntPtr nCount, sal_uIntPtr *pWritten)
{
if ( pWritten )
*pWritten = 0;
@@ -1543,11 +1543,11 @@ ErrCode UcbLockBytes::Flush() const
}
//----------------------------------------------------------------------------
-ErrCode UcbLockBytes::SetSize (ULONG nNewSize)
+ErrCode UcbLockBytes::SetSize (sal_uIntPtr nNewSize)
{
SvLockBytesStat aStat;
Stat( &aStat, (SvLockBytesStatFlag) 0 );
- ULONG nSize = aStat.nSize;
+ sal_uIntPtr nSize = aStat.nSize;
if ( nSize > nNewSize )
{
@@ -1564,8 +1564,8 @@ ErrCode UcbLockBytes::SetSize (ULONG nNewSize)
if ( nSize < nNewSize )
{
- ULONG nDiff = nNewSize-nSize, nCount=0;
- BYTE* pBuffer = new BYTE[ nDiff ];
+ sal_uIntPtr nDiff = nNewSize-nSize, nCount=0;
+ sal_uInt8* pBuffer = new sal_uInt8[ nDiff ];
memset(pBuffer, 0, nDiff); // initialize for enhanced security
WriteAt( nSize, pBuffer, nDiff, &nCount );
delete[] pBuffer;
@@ -1603,7 +1603,7 @@ ErrCode UcbLockBytes::Stat( SvLockBytesStat *pStat, SvLockBytesStatFlag) const
try
{
- pStat->nSize = ULONG(xSeekable->getLength());
+ pStat->nSize = sal_uIntPtr(xSeekable->getLength());
}
catch (IOException)
{