Kaydet (Commit) 987eae38 authored tarafından Keith McRae's avatar Keith McRae Kaydeden (comit) Kohei Yoshida

fdo#39428 Remove/audit SvStream operator>>/<<(long)

Replaced calls to operator<<(long) with sal::static_int_cast<sal_Int32>
Replaced calls to operator>>(long) with operator>>(sal_Int32)
üst 553b72ac
...@@ -98,7 +98,8 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer ) ...@@ -98,7 +98,8 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer )
if( nVer == 1 ) if( nVer == 1 )
{ {
long nHeight, nWidth; //#fdo39428 SvStream no longer supports operator>>(long&)
sal_Int32 nHeight(0), nWidth(0);
rStream >> nHeight; rStream >> nWidth; Size aSize( nWidth, nHeight ); rStream >> nHeight; rStream >> nWidth; Size aSize( nWidth, nHeight );
aFont.SetSize( aSize ); aFont.SetSize( aSize );
} }
...@@ -153,7 +154,9 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) : ...@@ -153,7 +154,9 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) :
pGraphicObject = new GraphicObject( aBmp ); pGraphicObject = new GraphicObject( aBmp );
} }
rStrm >> nWidth; //#fdo39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmp(0);
rStrm >> nTmp; nWidth = nTmp;
rStrm >> nStart; rStrm >> nStart;
rStrm >> nJustify; rStrm >> nJustify;
......
...@@ -353,8 +353,9 @@ SfxItemPresentation SvxSizeItem::GetPresentation ...@@ -353,8 +353,9 @@ SfxItemPresentation SvxSizeItem::GetPresentation
SvStream& SvxSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const SvStream& SvxSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{ {
rStrm << aSize.Width(); //#fdo39428 SvStream no longer supports operator<<(long)
rStrm << aSize.Height(); rStrm << sal::static_int_cast<sal_Int32>(aSize.Width());
rStrm << sal::static_int_cast<sal_Int32>(aSize.Height());
return rStrm; return rStrm;
} }
...@@ -378,7 +379,8 @@ bool SvxSizeItem::HasMetrics() const ...@@ -378,7 +379,8 @@ bool SvxSizeItem::HasMetrics() const
SfxPoolItem* SvxSizeItem::Create( SvStream& rStrm, sal_uInt16 ) const SfxPoolItem* SvxSizeItem::Create( SvStream& rStrm, sal_uInt16 ) const
{ {
long nWidth, nHeight; //#fdo39428 SvStream no longer supports operator>>(long&)
sal_Int32 nWidth(0), nHeight(0);
rStrm >> nWidth >> nHeight; rStrm >> nWidth >> nHeight;
SvxSizeItem* pAttr = new SvxSizeItem( Which() ); SvxSizeItem* pAttr = new SvxSizeItem( Which() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment