summaryrefslogtreecommitdiff
path: root/oox
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
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')
-rw-r--r--oox/source/dump/dumperbase.cxx6
-rw-r--r--oox/source/export/drawingml.cxx2
-rw-r--r--oox/source/ole/vbaexport.cxx10
3 files changed, 9 insertions, 9 deletions
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index e992d89b2a04..42c718adbb70 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -1665,7 +1665,7 @@ void Output::writeString( const OUString& rStr )
StringHelper::appendEncString( maLine, rStr );
}
-void Output::writeArray( const sal_uInt8* pnData, sal_Size nSize, sal_Unicode cSep )
+void Output::writeArray( const sal_uInt8* pnData, std::size_t nSize, sal_Unicode cSep )
{
const sal_uInt8* pnEnd = pnData ? (pnData + nSize) : nullptr;
for( const sal_uInt8* pnByte = pnData; pnByte < pnEnd; ++pnByte )
@@ -1991,7 +1991,7 @@ void OutputObjectBase::writeStringItem( const String& rName, const OUString& rDa
mxOut->writeAscii( ",cut" );
}
-void OutputObjectBase::writeArrayItem( const String& rName, const sal_uInt8* pnData, sal_Size nSize, sal_Unicode cSep )
+void OutputObjectBase::writeArrayItem( const String& rName, const sal_uInt8* pnData, std::size_t nSize, sal_Unicode cSep )
{
ItemGuard aItem( mxOut, rName );
mxOut->writeArray( pnData, nSize, cSep );
@@ -2169,7 +2169,7 @@ OUString InputObjectBase::dumpCharArray( const String& rName, sal_Int32 nLen, rt
OUString aString;
if( nDumpSize > 0 )
{
- ::std::vector< sal_Char > aBuffer( static_cast< sal_Size >( nLen ) + 1 );
+ ::std::vector< sal_Char > aBuffer( static_cast< std::size_t >( nLen ) + 1 );
sal_Int32 nCharsRead = mxStrm->readMemory( &aBuffer.front(), nLen );
aBuffer[ nCharsRead ] = 0;
aString = OStringToOUString( OString( &aBuffer.front() ), eTextEnc );
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 41b0eea28cca..3670664d7aac 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -839,7 +839,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
SvMemoryStream aStream;
const void* aData = aLink.GetData();
- sal_Size nDataSize = aLink.GetDataSize();
+ std::size_t nDataSize = aLink.GetDataSize();
switch ( aLink.GetType() )
{
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();