summaryrefslogtreecommitdiff
path: root/editeng
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 /editeng
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 'editeng')
-rw-r--r--editeng/source/editeng/editobj.cxx8
-rw-r--r--editeng/source/editeng/eeobj.cxx3
-rw-r--r--editeng/source/items/bulitem.cxx6
-rw-r--r--editeng/source/items/frmitems.cxx2
-rw-r--r--editeng/source/items/textitem.cxx2
5 files changed, 11 insertions, 10 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 18dd3a4ac579..45ec5957a330 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -371,7 +371,7 @@ void EditTextObject::Store( SvStream& rOStream ) const
if ( rOStream.GetError() )
return;
- sal_Size nStartPos = rOStream.Tell();
+ sal_uInt64 const nStartPos = rOStream.Tell();
sal_uInt16 nWhich = static_cast<sal_uInt16>(EE_FORMAT_BIN);
rOStream.WriteUInt16( nWhich );
@@ -381,7 +381,7 @@ void EditTextObject::Store( SvStream& rOStream ) const
StoreData( rOStream );
- sal_Size nEndPos = rOStream.Tell();
+ sal_uInt64 const nEndPos = rOStream.Tell();
nStructSz = nEndPos - nStartPos - sizeof( nWhich ) - sizeof( nStructSz );
rOStream.Seek( nStartPos + sizeof( nWhich ) );
rOStream.WriteUInt32( nStructSz );
@@ -390,7 +390,7 @@ void EditTextObject::Store( SvStream& rOStream ) const
EditTextObject* EditTextObject::Create( SvStream& rIStream )
{
- sal_Size nStartPos = rIStream.Tell();
+ sal_uInt64 const nStartPos = rIStream.Tell();
// First check what type of Object...
sal_uInt16 nWhich;
@@ -413,7 +413,7 @@ EditTextObject* EditTextObject::Create( SvStream& rIStream )
pTxtObj->CreateData(rIStream);
// Make sure that the stream is left at the correct place.
- sal_Size nFullSz = sizeof( nWhich ) + sizeof( nStructSz ) + nStructSz;
+ std::size_t nFullSz = sizeof( nWhich ) + sizeof( nStructSz ) + nStructSz;
rIStream.Seek( nStartPos + nFullSz );
return pTxtObj;
}
diff --git a/editeng/source/editeng/eeobj.cxx b/editeng/source/editeng/eeobj.cxx
index 40839aa17b09..7347fa3f9ca8 100644
--- a/editeng/source/editeng/eeobj.cxx
+++ b/editeng/source/editeng/eeobj.cxx
@@ -65,7 +65,8 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo
SvMemoryStream* pStream = ( nT == SotClipboardFormatId::EDITENGINE ) ? &GetStream() : &GetRTFStream();
pStream->Seek( STREAM_SEEK_TO_END );
- sal_Size nLen = pStream->Tell();
+ sal_Int32 nLen = pStream->Tell();
+ if (nLen < 0) { abort(); }
pStream->Seek(0);
uno::Sequence< sal_Int8 > aSeq( nLen );
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index e2a68daaf513..5e2b91911357 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -116,7 +116,7 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich )
{
// Safe Load with Test on empty Bitmap
Bitmap aBmp;
- const sal_Size nOldPos = rStrm.Tell();
+ sal_uInt64 const nOldPos = rStrm.Tell();
// Ignore Errorcode when reading Bitmap,
// see comment in SvxBulletItem::Store()
bool bOldError = rStrm.GetError() != 0;
@@ -288,7 +288,7 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c
StoreFont( rStrm, aFont );
else
{
- sal_Size _nStart = rStrm.Tell();
+ sal_uInt64 const _nStart = rStrm.Tell();
// Small preliminary estimate of the size ...
sal_uInt16 nFac = ( rStrm.GetCompressMode() != SvStreamCompressFlags::NONE ) ? 3 : 1;
@@ -299,7 +299,7 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c
WriteDIB(aBmp, rStrm, false, true);
}
- sal_Size nEnd = rStrm.Tell();
+ sal_uInt64 const nEnd = rStrm.Tell();
// Item can not write with an overhead more than 64K or SfxMultiRecord
// will crash. Then prefer to forego on the bitmap, it is only
// important for the outliner and only for <= 5.0.
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 6af4e4918d17..ed7906d57bf5 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -745,7 +745,7 @@ SfxPoolItem* SvxLRSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) cons
{
rStrm.ReadUInt16( left ).ReadUInt16( prpleft ).ReadUInt16( right ).ReadUInt16( prpright ).ReadInt16( firstline ). ReadUInt16( prpfirstline ).ReadUInt16( txtleft ).ReadSChar( autofirst );
- sal_Size nPos = rStrm.Tell();
+ sal_uInt64 const nPos = rStrm.Tell();
sal_uInt32 nMarker;
rStrm.ReadUInt32( nMarker );
if ( nMarker == BULLETLR_MARKER )
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index ae857c8706db..9c1c339e323a 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -400,7 +400,7 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const
eFontTextEncoding = RTL_TEXTENCODING_SYMBOL;
// Check if we have stored unicode
- sal_Size nStreamPos = rStrm.Tell();
+ sal_uInt64 const nStreamPos = rStrm.Tell();
sal_uInt32 nMagic = STORE_UNICODE_MAGIC_MARKER;
rStrm.ReadUInt32( nMagic );
if ( nMagic == STORE_UNICODE_MAGIC_MARKER )