diff options
Diffstat (limited to 'svl/source/items/rngitem_inc.cxx')
-rw-r--r-- | svl/source/items/rngitem_inc.cxx | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/svl/source/items/rngitem_inc.cxx b/svl/source/items/rngitem_inc.cxx index 7c87cb71d85b..2ce985758434 100644 --- a/svl/source/items/rngitem_inc.cxx +++ b/svl/source/items/rngitem_inc.cxx @@ -108,7 +108,7 @@ SfxPoolItem* SfxXRangeItem::Clone(SfxItemPool *) const SfxPoolItem* SfxXRangeItem::Create(SvStream &rStream, sal_uInt16) const { - NUMTYPE nVon, nBis; + NUMTYPE nVon(0), nBis(0); rStream >> nVon; rStream >> nBis; return new SfxXRangeItem( Which(), nVon, nBis ); @@ -132,20 +132,10 @@ SfxXRangesItem::SfxXRangesItem() //------------------------------------------------------------------------- -SfxXRangesItem::SfxXRangesItem( sal_uInt16 nWID, const NUMTYPE *pRanges ) -: SfxPoolItem( nWID ) -{ - NUMTYPE nCount = Count_Impl(pRanges) + 1; - _pRanges = new NUMTYPE[nCount]; - memcpy( _pRanges, pRanges, sizeof(NUMTYPE) * nCount ); -} - -//------------------------------------------------------------------------- - SfxXRangesItem::SfxXRangesItem( sal_uInt16 nWID, SvStream &rStream ) : SfxPoolItem( nWID ) { - NUMTYPE nCount; + NUMTYPE nCount(0); rStream >> nCount; _pRanges = new NUMTYPE[nCount + 1]; for ( NUMTYPE n = 0; n < nCount; ++n ) |