summaryrefslogtreecommitdiff
path: root/svl/source/misc/strmadpt.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 /svl/source/misc/strmadpt.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 'svl/source/misc/strmadpt.cxx')
-rw-r--r--svl/source/misc/strmadpt.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index f29b7663ca36..3e1c17954080 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -139,7 +139,7 @@ bool SvInputStream::open()
}
// virtual
-sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
+std::size_t SvInputStream::GetData(void * pData, std::size_t const nSize)
{
if (!open())
{
@@ -168,8 +168,8 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
{
sal_Int32 nRemain
= sal_Int32(
- std::min(sal_uLong(nSize - nRead),
- sal_uLong(std::numeric_limits< sal_Int32 >::max())));
+ std::min(std::size_t(nSize - nRead),
+ std::size_t(std::numeric_limits<sal_Int32>::max())));
if (nRemain == 0)
break;
uno::Sequence< sal_Int8 > aBuffer;
@@ -205,8 +205,8 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
sal_Int32 nRemain
= sal_Int32(
std::min(
- sal_uLong(nSize - nRead),
- sal_uLong(std::numeric_limits< sal_Int32 >::max())));
+ std::size_t(nSize - nRead),
+ std::size_t(std::numeric_limits<sal_Int32>::max())));
if (nRemain == 0)
break;
uno::Sequence< sal_Int8 > aBuffer;
@@ -235,7 +235,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
}
// virtual
-sal_uLong SvInputStream::PutData(void const *, sal_uLong)
+std::size_t SvInputStream::PutData(void const *, std::size_t)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
@@ -265,7 +265,7 @@ sal_uInt64 SvInputStream::SeekPos(sal_uInt64 const nPos)
< STREAM_SEEK_TO_END)
{
m_nSeekedFrom = Tell();
- return sal_uLong(nLength);
+ return sal_uInt64(nLength);
}
}
catch (const io::IOException&)
@@ -347,27 +347,27 @@ SvInputStream::~SvInputStream()
// SvOutputStream
// virtual
-sal_uLong SvOutputStream::GetData(void *, sal_uLong)
+std::size_t SvOutputStream::GetData(void *, std::size_t)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
}
// virtual
-sal_uLong SvOutputStream::PutData(void const * pData, sal_uLong nSize)
+std::size_t SvOutputStream::PutData(void const * pData, std::size_t nSize)
{
if (!m_xStream.is())
{
SetError(ERRCODE_IO_CANTWRITE);
return 0;
}
- sal_uLong nWritten = 0;
+ std::size_t nWritten = 0;
for (;;)
{
sal_Int32 nRemain
= sal_Int32(
- std::min(sal_uLong(nSize - nWritten),
- sal_uLong(std::numeric_limits< sal_Int32 >::max())));
+ std::min(std::size_t(nSize - nWritten),
+ std::size_t(std::numeric_limits<sal_Int32>::max())));
if (nRemain == 0)
break;
try