From 987eae381d5c276ce239482d1cb79ecf53c015d8 Mon Sep 17 00:00:00 2001 From: Keith McRae Date: Wed, 18 Jan 2012 16:06:48 +0000 Subject: fdo#39428 Remove/audit SvStream operator>>/<<(long) Replaced calls to operator<<(long) with sal::static_int_cast Replaced calls to operator>>(long) with operator>>(sal_Int32) --- editeng/source/items/bulitem.cxx | 7 +++++-- editeng/source/items/frmitems.cxx | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'editeng') diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index b47a8e1ba372..cbfc20821591 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -98,7 +98,8 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer ) 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 ); aFont.SetSize( aSize ); } @@ -153,7 +154,9 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) : pGraphicObject = new GraphicObject( aBmp ); } - rStrm >> nWidth; + //#fdo39428 SvStream no longer supports operator>>(long&) + sal_Int32 nTmp(0); + rStrm >> nTmp; nWidth = nTmp; rStrm >> nStart; rStrm >> nJustify; diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 7627b0022182..50484b832df9 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -353,8 +353,9 @@ SfxItemPresentation SvxSizeItem::GetPresentation SvStream& SvxSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << aSize.Width(); - rStrm << aSize.Height(); + //#fdo39428 SvStream no longer supports operator<<(long) + rStrm << sal::static_int_cast(aSize.Width()); + rStrm << sal::static_int_cast(aSize.Height()); return rStrm; } @@ -378,7 +379,8 @@ bool SvxSizeItem::HasMetrics() 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; SvxSizeItem* pAttr = new SvxSizeItem( Which() ); -- cgit