diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-09-14 17:01:50 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-09-15 12:01:11 +0200 |
commit | b647996a9babbee7b33cf45192e57df6a124628b (patch) | |
tree | ddc6dfe8a62ec53fbacc4eeccfeb20019f3ef4f0 /basic/source/uno/scriptcont.cxx | |
parent | a19a67e20e847a42063559694ec5beec71abcfb3 (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 'basic/source/uno/scriptcont.cxx')
-rw-r--r-- | basic/source/uno/scriptcont.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index ff1b567b22f1..29ace2433bfd 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -634,7 +634,8 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons SvMemoryStream aMemStream; /*sal_Bool bStore = */pMod->StoreBinaryData( aMemStream, B_CURVERSION ); - sal_Size nSize = aMemStream.Tell(); + sal_Int32 const nSize = aMemStream.Tell(); + if (nSize < 0) { abort(); } Sequence< sal_Int8 > aBinSeq( nSize ); sal_Int8* pData = aBinSeq.getArray(); memcpy( pData, aMemStream.GetData(), nSize ); @@ -775,7 +776,8 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons SvMemoryStream aMemStream; /*sal_Bool bStore = */pMod->StoreBinaryData( aMemStream, B_CURVERSION ); - sal_Size nSize = aMemStream.Tell(); + sal_Int32 const nSize = aMemStream.Tell(); + if (nSize < 0) { abort(); } Sequence< sal_Int8 > aBinSeq( nSize ); sal_Int8* pData = aBinSeq.getArray(); memcpy( pData, aMemStream.GetData(), nSize ); |