[Libreoffice-commits] core.git: sc/inc sc/source
Pelin Kuran (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 24 10:04:34 UTC 2020
sc/inc/rechead.hxx | 12 ++++++------
sc/source/core/tool/rechead.cxx | 18 +++++++++---------
2 files changed, 15 insertions(+), 15 deletions(-)
New commits:
commit 7fe377593e77c4ada5725e5e0d9acfdacbd70f57
Author: Pelin Kuran <pelinrkuran at gmail.com>
AuthorDate: Sun Feb 23 09:40:55 2020 +0300
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Feb 24 11:04:00 2020 +0100
tdf#114441: Convert use of sal_uLong to better integer types
Change-Id: I9d0e6cf0a638866ac11ea9b3ac4a840f5c0a241d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89295
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/sc/inc/rechead.hxx b/sc/inc/rechead.hxx
index aa5cccca14d8..53ccca673899 100644
--- a/sc/inc/rechead.hxx
+++ b/sc/inc/rechead.hxx
@@ -54,9 +54,9 @@ private:
pBuf;
std::unique_ptr<SvMemoryStream>
pMemStream;
- sal_uLong nEndPos;
- sal_uLong nEntryEnd;
- sal_uLong nTotalEnd;
+ sal_uInt64 nEndPos;
+ sal_uInt64 nEntryEnd;
+ sal_uInt64 nTotalEnd;
public:
ScMultipleReadHeader(SvStream& rNewStream);
@@ -64,7 +64,7 @@ public:
void StartEntry();
void EndEntry();
- sal_uLong BytesLeft() const;
+ sal_uInt64 BytesLeft() const;
};
class ScMultipleWriteHeader
@@ -72,9 +72,9 @@ class ScMultipleWriteHeader
private:
SvStream& rStream;
SvMemoryStream aMemStream;
- sal_uLong nDataPos;
+ sal_uInt64 nDataPos;
sal_uInt32 nDataSize;
- sal_uLong nEntryStart;
+ sal_uInt64 nEntryStart;
public:
ScMultipleWriteHeader(SvStream& rNewStream);
diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx
index 5e2262d4d8a6..abd44d04194a 100644
--- a/sc/source/core/tool/rechead.cxx
+++ b/sc/source/core/tool/rechead.cxx
@@ -27,7 +27,7 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) :
{
sal_uInt32 nDataSize;
rStream.ReadUInt32( nDataSize );
- sal_uLong nDataPos = rStream.Tell();
+ sal_uInt64 nDataPos = rStream.Tell();
nTotalEnd = nDataPos + nDataSize;
nEntryEnd = nTotalEnd;
@@ -72,7 +72,7 @@ ScMultipleReadHeader::~ScMultipleReadHeader()
void ScMultipleReadHeader::EndEntry()
{
- sal_uLong nPos = rStream.Tell();
+ sal_uInt64 nPos = rStream.Tell();
OSL_ENSURE( nPos <= nEntryEnd, "read too much" );
if ( nPos != nEntryEnd )
{
@@ -86,7 +86,7 @@ void ScMultipleReadHeader::EndEntry()
void ScMultipleReadHeader::StartEntry()
{
- sal_uLong nPos = rStream.Tell();
+ sal_uInt64 nPos = rStream.Tell();
sal_uInt32 nEntrySize;
(*pMemStream).ReadUInt32( nEntrySize );
@@ -94,9 +94,9 @@ void ScMultipleReadHeader::StartEntry()
OSL_ENSURE( nEntryEnd <= nTotalEnd, "read too many entries" );
}
-sal_uLong ScMultipleReadHeader::BytesLeft() const
+sal_uInt64 ScMultipleReadHeader::BytesLeft() const
{
- sal_uLong nReadEnd = rStream.Tell();
+ sal_uInt64 nReadEnd = rStream.Tell();
if (nReadEnd <= nEntryEnd)
return nEntryEnd-nReadEnd;
@@ -117,7 +117,7 @@ ScMultipleWriteHeader::ScMultipleWriteHeader(SvStream& rNewStream) :
ScMultipleWriteHeader::~ScMultipleWriteHeader()
{
- sal_uLong nDataEnd = rStream.Tell();
+ sal_uInt64 nDataEnd = rStream.Tell();
rStream.WriteUInt16( SCID_SIZES );
rStream.WriteUInt32( aMemStream.Tell() );
@@ -126,7 +126,7 @@ ScMultipleWriteHeader::~ScMultipleWriteHeader()
if ( nDataEnd - nDataPos != nDataSize ) // matched default ?
{
nDataSize = nDataEnd - nDataPos;
- sal_uLong nPos = rStream.Tell();
+ sal_uInt64 nPos = rStream.Tell();
rStream.Seek(nDataPos-sizeof(sal_uInt32));
rStream.WriteUInt32( nDataSize ); // record size at the beginning
rStream.Seek(nPos);
@@ -135,13 +135,13 @@ ScMultipleWriteHeader::~ScMultipleWriteHeader()
void ScMultipleWriteHeader::EndEntry()
{
- sal_uLong nPos = rStream.Tell();
+ sal_uInt64 nPos = rStream.Tell();
aMemStream.WriteUInt32( nPos - nEntryStart );
}
void ScMultipleWriteHeader::StartEntry()
{
- sal_uLong nPos = rStream.Tell();
+ sal_uInt64 nPos = rStream.Tell();
nEntryStart = nPos;
}
More information about the Libreoffice-commits
mailing list