summaryrefslogtreecommitdiff
path: root/oox/source/ole/vbaexport.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-09-14 17:01:50 +0200
committerMichael Stahl <mstahl@redhat.com>2016-09-15 12:01:11 +0200
commitb647996a9babbee7b33cf45192e57df6a124628b (patch)
treeddc6dfe8a62ec53fbacc4eeccfeb20019f3ef4f0 /oox/source/ole/vbaexport.cxx
parenta19a67e20e847a42063559694ec5beec71abcfb3 (diff)
replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
Diffstat (limited to 'oox/source/ole/vbaexport.cxx')
-rw-r--r--oox/source/ole/vbaexport.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 80e135362119..0215a6772a8f 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -112,7 +112,7 @@ OUString generateGUIDString()
}
-VBACompressionChunk::VBACompressionChunk(SvStream& rCompressedStream, const sal_uInt8* pData, sal_Size nChunkSize)
+VBACompressionChunk::VBACompressionChunk(SvStream& rCompressedStream, const sal_uInt8* pData, std::size_t nChunkSize)
: mrCompressedStream(rCompressedStream)
, mpUncompressedData(pData)
, mpCompressedChunkStream(nullptr)
@@ -357,7 +357,7 @@ void VBACompressionChunk::writeRawChunk()
// we need to use up to 4096 bytes of the original stream
// and fill the rest with padding
mrCompressedStream.WriteBytes(mpUncompressedData, mnChunkSize);
- sal_Size nPadding = 4096 - mnChunkSize;
+ std::size_t nPadding = 4096 - mnChunkSize;
for (size_t i = 0; i < nPadding; ++i)
{
mrCompressedStream.WriteUInt8(0);
@@ -378,11 +378,11 @@ void VBACompression::write()
mrCompressedStream.WriteUInt8(0x01); // signature byte of a compressed container
bool bStreamNotEnded = true;
const sal_uInt8* pData = static_cast<const sal_uInt8*>(mrUncompressedStream.GetData());
- sal_Size nSize = mrUncompressedStream.GetEndOfData();
- sal_Size nRemainingSize = nSize;
+ std::size_t nSize = mrUncompressedStream.GetEndOfData();
+ std::size_t nRemainingSize = nSize;
while(bStreamNotEnded)
{
- sal_Size nChunkSize = nRemainingSize > 4096 ? 4096 : nRemainingSize;
+ std::size_t nChunkSize = nRemainingSize > 4096 ? 4096 : nRemainingSize;
VBACompressionChunk aChunk(mrCompressedStream, &pData[nSize - nRemainingSize], nChunkSize);
aChunk.write();