summaryrefslogtreecommitdiff
path: root/sot/qa
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-05-06 20:08:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-07 11:02:56 +0200
commitcc8144faafa0518334075090b0c8f90d0b2a2fde (patch)
tree75cdecb5179d9fb45543765dbe4f130a4653e1a9 /sot/qa
parent533a998e540b0f04068c876dde0e74adc3f79c93 (diff)
convert sal_uLong in sot
Change-Id: I51027e731ce6581ebea08b1f5eb88472c3c27550 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot/qa')
-rw-r--r--sot/qa/cppunit/test_sot.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sot/qa/cppunit/test_sot.cxx b/sot/qa/cppunit/test_sot.cxx
index ce8b7c8c8307..74f0771851d5 100644
--- a/sot/qa/cppunit/test_sot.cxx
+++ b/sot/qa/cppunit/test_sot.cxx
@@ -45,7 +45,7 @@ namespace
bool checkStream( const tools::SvRef<SotStorage> &xObjStor,
const OUString &rStreamName,
- sal_uLong nSize );
+ sal_uInt64 nSize );
bool checkStorage( const tools::SvRef<SotStorage> &xObjStor );
virtual bool load(const OUString &,
@@ -65,27 +65,27 @@ namespace
bool SotTest::checkStream( const tools::SvRef<SotStorage> &xObjStor,
const OUString &rStreamName,
- sal_uLong nSize )
+ sal_uInt64 nSize )
{
unsigned char *pData = static_cast<unsigned char*>(malloc( nSize ));
- sal_uLong nReadableSize = 0;
+ sal_uInt64 nReadableSize = 0;
if( !pData )
return true;
{ // Read the data in one block
tools::SvRef<SotStorageStream> xStream( xObjStor->OpenSotStream( rStreamName ) );
xStream->Seek(0);
- sal_uLong nRemaining = xStream->GetSize() - xStream->Tell();
+ sal_uInt64 nRemaining = xStream->GetSize() - xStream->Tell();
CPPUNIT_ASSERT_EQUAL_MESSAGE( "check size", nSize, nRemaining );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "check size #2", static_cast<sal_uInt64>(nSize), xStream->remainingSize());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "check size #2", nSize, xStream->remainingSize());
// Read as much as we can, a corrupted FAT chain can cause real grief here
nReadableSize = xStream->ReadBytes(static_cast<void *>(pData), nSize);
}
{ // Read the data backwards as well
tools::SvRef<SotStorageStream> xStream( xObjStor->OpenSotStream( rStreamName ) );
- for( sal_uLong i = nReadableSize; i > 0; i-- )
+ for( sal_uInt64 i = nReadableSize; i > 0; i-- )
{
CPPUNIT_ASSERT_MESSAGE( "sot reading error", !xStream->GetError() );
unsigned char c;
@@ -154,8 +154,8 @@ namespace
CPPUNIT_ASSERT_MESSAGE("stream failed to open",
!xObjStor->GetError());
CPPUNIT_ASSERT_MESSAGE("error in opened stream", !xStream->GetError());
- sal_uLong nPos = xStream->GetSize();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("odd stream length", static_cast<sal_uLong>(13312), nPos);
+ sal_uInt64 nPos = xStream->GetSize();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("odd stream length", static_cast<sal_uInt64>(13312), nPos);
xStream->Seek(STREAM_SEEK_TO_END);
CPPUNIT_ASSERT_MESSAGE("error seeking to end", !xStream->GetError());