diff options
author | Keith McRae <keithcoder@gmail.com> | 2012-01-18 16:06:48 +0000 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-18 22:56:13 -0500 |
commit | 987eae381d5c276ce239482d1cb79ecf53c015d8 (patch) | |
tree | 8cbb0bd71cecc097510d52eeb36f9ee48e66b9b0 /editeng | |
parent | 553b72ac78a4d1f8c7531748a903c4a52355f2cd (diff) |
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)
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/bulitem.cxx | 7 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 8 |
2 files changed, 10 insertions, 5 deletions
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<sal_Int32>(aSize.Width()); + rStrm << sal::static_int_cast<sal_Int32>(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() ); |