diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-25 15:58:38 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-26 09:41:35 +0200 |
commit | ce46c98dbeb3364684843daa5b269c74fce2af64 (patch) | |
tree | 9adb1c5af4e9d6d371b14725e2f35b7e184059b0 /editeng | |
parent | 701343b1eea115e27a40ac93e59c0c1f0d2f6422 (diff) |
convert BS_ constants to SvxBulletStyle enum class
Change-Id: I8d68394c29b7602b21f8d972552aa7226778d3ff
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/bulitem.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index 0936d982345e..592c87820b83 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -112,13 +112,15 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich) , pGraphicObject(NULL) , nStart(0) - , nStyle(0) + , nStyle(SvxBulletStyle::ABC_BIG) , nScale(0) , nJustify(0) { - rStrm.ReadUInt16( nStyle ); + sal_uInt16 nTmp1; + rStrm.ReadUInt16( nTmp1 ); + nStyle = static_cast<SvxBulletStyle>(nTmp1); - if( nStyle != BS_BMP ) + if( nStyle != SvxBulletStyle::BMP ) aFont = CreateFont( rStrm, BULITEM_VERSION ); else { @@ -138,7 +140,7 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) if( aBmp.IsEmpty() ) { rStrm.Seek( nOldPos ); - nStyle = BS_NONE; + nStyle = SvxBulletStyle::NONE; } else pGraphicObject = new GraphicObject( aBmp ); @@ -218,7 +220,7 @@ void SvxBulletItem::SetDefaults_Impl() pGraphicObject = NULL; nWidth = 1200; // 1.2cm nStart = 1; - nStyle = BS_123; + nStyle = SvxBulletStyle::N123; nJustify = BJ_HLEFT | BJ_VCENTER; cSymbol = ' '; nScale = 75; @@ -283,10 +285,10 @@ bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const aFollowText != rBullet.aFollowText ) return false; - if( ( nStyle != BS_BMP ) && ( aFont != rBullet.aFont ) ) + if( ( nStyle != SvxBulletStyle::BMP ) && ( aFont != rBullet.aFont ) ) return false; - if( nStyle == BS_BMP ) + if( nStyle == SvxBulletStyle::BMP ) { if( ( pGraphicObject && !rBullet.pGraphicObject ) || ( !pGraphicObject && rBullet.pGraphicObject ) ) return false; @@ -307,7 +309,7 @@ bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { // Correction for empty bitmap - if( ( nStyle == BS_BMP ) && + if( ( nStyle == SvxBulletStyle::BMP ) && ( !pGraphicObject || ( GRAPHIC_NONE == pGraphicObject->GetType() ) || ( GRAPHIC_DEFAULT == pGraphicObject->GetType() ) ) ) { if( pGraphicObject ) @@ -316,12 +318,12 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c const_cast< SvxBulletItem* >( this )->pGraphicObject = NULL; } - const_cast< SvxBulletItem* >( this )->nStyle = BS_NONE; + const_cast< SvxBulletItem* >( this )->nStyle = SvxBulletStyle::NONE; } - rStrm.WriteUInt16( nStyle ); + rStrm.WriteUInt16( static_cast<sal_uInt16>(nStyle) ); - if( nStyle != BS_BMP ) + if( nStyle != SvxBulletStyle::BMP ) StoreFont( rStrm, aFont ); else { |