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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/bastyp/mieclip.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/bastyp/sfxhtml.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/oleprops.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/oleprops.hxx | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx index 00d1e52f1bae..65c2fee624a1 100644 --- a/sfx2/source/bastyp/mieclip.cxx +++ b/sfx2/source/bastyp/mieclip.cxx @@ -66,7 +66,7 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream ) sBaseURL = OStringToOUString( sLine.copy(nIndex), RTL_TEXTENCODING_UTF8 ); if (nEnd >= 0 && nStt >= 0 && - (!sBaseURL.isEmpty() || rStream.Tell() >= static_cast<sal_Size>(nStt))) + (!sBaseURL.isEmpty() || rStream.Tell() >= static_cast<sal_uInt64>(nStt))) { bRet = true; break; diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index d994d7e4ff2b..ac5dd5affeb0 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -251,7 +251,7 @@ bool SfxHTMLParser::FinishFileDownload( OUString& rStr ) aStream.WriteStream( *pStream ); aStream.Seek( STREAM_SEEK_TO_END ); - sal_Size nLen = aStream.Tell(); + sal_uInt64 const nLen = aStream.Tell(); aStream.Seek( 0 ); OString sBuffer = read_uInt8s_ToOString(aStream, nLen); rStr = OStringToOUString( sBuffer, RTL_TEXTENCODING_UTF8 ); diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index 027c0b759e68..809200f95987 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -277,7 +277,7 @@ OUString SfxOleStringHelper::ImplLoadString8( SvStream& rStrm ) const { // load character buffer ::std::vector< sal_Char > aBuffer( static_cast< size_t >( nSize + 1 ), 0 ); - rStrm.ReadBytes(&aBuffer.front(), static_cast<sal_Size>(nSize)); + rStrm.ReadBytes(&aBuffer.front(), static_cast<std::size_t>(nSize)); // create string from encoded character array aValue = OUString( &aBuffer.front(), strlen( &aBuffer.front() ), GetTextEncoding() ); } @@ -1012,7 +1012,7 @@ void SfxOleSection::ImplSave( SvStream& rStrm ) rStrm.WriteUInt32( 0 ).WriteInt32( nPropCount ); // write placeholders for property ID/position pairs - sal_Size nPropPosPos = rStrm.Tell(); + sal_uInt64 nPropPosPos = rStrm.Tell(); rStrm.SeekRel( static_cast< sal_sSize >( 8 * nPropCount ) ); // write dictionary property @@ -1033,7 +1033,7 @@ void SfxOleSection::ImplSave( SvStream& rStrm ) bool SfxOleSection::SeekToPropertyPos( SvStream& rStrm, sal_uInt32 nPropPos ) const { - rStrm.Seek( static_cast< sal_Size >( mnStartPos + nPropPos ) ); + rStrm.Seek( static_cast< std::size_t >( mnStartPos + nPropPos ) ); return rStrm.GetErrorCode() == SVSTREAM_OK; } @@ -1076,7 +1076,7 @@ void SfxOleSection::LoadProperty( SvStream& rStrm, sal_Int32 nPropId ) } } -void SfxOleSection::SaveProperty( SvStream& rStrm, SfxOlePropertyBase& rProp, sal_Size& rnPropPosPos ) +void SfxOleSection::SaveProperty( SvStream& rStrm, SfxOlePropertyBase& rProp, sal_uInt64 & rnPropPosPos ) { rStrm.Seek( STREAM_SEEK_TO_END ); sal_uInt32 nPropPos = static_cast< sal_uInt32 >( rStrm.Tell() - mnStartPos ); @@ -1173,7 +1173,7 @@ void SfxOlePropertySet::ImplLoad( SvStream& rStrm ) rStrm.ReadInt32( nSectCount ); // read sections - sal_Size nSectPosPos = rStrm.Tell(); + sal_uInt64 nSectPosPos = rStrm.Tell(); for (sal_Int32 nSectIdx = 0; nSectIdx < nSectCount; ++nSectIdx) { // read section guid/position pair @@ -1206,7 +1206,7 @@ void SfxOlePropertySet::ImplSave( SvStream& rStrm ) rStrm .WriteInt32( nSectCount ); // number of sections // write placeholders for section guid/position pairs - sal_Size nSectPosPos = rStrm.Tell(); + sal_uInt64 nSectPosPos = rStrm.Tell(); rStrm.SeekRel( static_cast< sal_sSize >( 20 * nSectCount ) ); // write sections diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx index ebbf4fa6c1d2..a4190a20ea47 100644 --- a/sfx2/source/doc/oleprops.hxx +++ b/sfx2/source/doc/oleprops.hxx @@ -333,13 +333,13 @@ private: bool SeekToPropertyPos( SvStream& rStrm, sal_uInt32 nPropPos ) const; void LoadProperty( SvStream& rStrm, sal_Int32 nPropId ); - void SaveProperty( SvStream& rStrm, SfxOlePropertyBase& rProp, sal_Size& rnPropPosPos ); + void SaveProperty( SvStream& rStrm, SfxOlePropertyBase& rProp, sal_uInt64 & rnPropPosPos ); private: SfxOlePropMap maPropMap; /// All properties in this section, by identifier. SfxOleCodePageProperty maCodePageProp; /// The codepage property. SfxOleDictionaryProperty maDictProp; /// The dictionary property. - sal_Size mnStartPos; /// Start stream position of the section. + sal_uInt64 mnStartPos; /// Start stream position of the section. bool mbSupportsDict; /// true = section supports dictionary. }; |