diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-23 15:20:12 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-24 09:36:58 +0200 |
commit | ecec9afe852d3bca019b6b44a40d8be39e0f58f4 (patch) | |
tree | dc030eaa8f80a0dc3ff6103507ed4dabf9558bbd /sfx2/source/doc | |
parent | 5d37fa2a710e3bd76d3f1e18d1d66b8a4ab15030 (diff) |
convert SVX_ZOOM_ENABLE constants to enum class
Change-Id: Iead354b95b832edd72eb8e881855f228fd85be70
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/zoomitem.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx index a89e590ddf39..69a24f376b00 100644 --- a/sfx2/source/doc/zoomitem.cxx +++ b/sfx2/source/doc/zoomitem.cxx @@ -43,7 +43,7 @@ SvxZoomItem::SvxZoomItem sal_uInt16 _nWhich ) : SfxUInt16Item( _nWhich, nVal ), - nValueSet( SVX_ZOOM_ENABLE_ALL ), + nValueSet( SvxZoomEnableFlags::ALL ), eType( eZoomType ) { } @@ -79,7 +79,7 @@ SfxPoolItem* SvxZoomItem::Create( SvStream& rStrm, sal_uInt16 /*nVersion*/ ) con sal_Int8 nType; rStrm.ReadUInt16( nValue ).ReadUInt16( nValSet ).ReadSChar( nType ); SvxZoomItem* pNew = new SvxZoomItem( (SvxZoomType)nType, nValue, Which() ); - pNew->SetValueSet( nValSet ); + pNew->SetValueSet( static_cast<SvxZoomEnableFlags>(nValSet) ); return pNew; } @@ -88,7 +88,7 @@ SfxPoolItem* SvxZoomItem::Create( SvStream& rStrm, sal_uInt16 /*nVersion*/ ) con SvStream& SvxZoomItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { rStrm.WriteUInt16( GetValue() ) - .WriteUInt16( nValueSet ) + .WriteUInt16( static_cast<sal_uInt16>(nValueSet) ) .WriteSChar( static_cast<int>(eType) ); return rStrm; } @@ -172,8 +172,8 @@ bool SvxZoomItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMem if ( bAllConverted && nConvertedCount == ZOOM_PARAMS ) { SetValue( (sal_uInt16)nValueTmp ); - nValueSet = nValueSetTmp; - eType = SvxZoomType( nTypeTmp ); + nValueSet = static_cast<SvxZoomEnableFlags>(nValueSetTmp); + eType = static_cast<SvxZoomType>(nTypeTmp); return true; } } @@ -194,13 +194,13 @@ bool SvxZoomItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMem case MID_VALUESET: case MID_TYPE: { - sal_Int16 nVal = sal_Int16(); + sal_Int16 nVal; if ( rVal >>= nVal ) { if ( nMemberId == MID_VALUESET ) - nValueSet = (sal_Int16) nVal; + nValueSet = static_cast<SvxZoomEnableFlags>(nVal); else if ( nMemberId == MID_TYPE ) - eType = SvxZoomType( (sal_Int16) nVal ); + eType = static_cast<SvxZoomType>(nVal); return true; } else |