diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-25 14:42:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-26 09:41:34 +0200 |
commit | 44101b295071484f4797a9d3140e5ea1a42bc431 (patch) | |
tree | 0cb68ab8840fdeb581fd5cba8b25640088fff731 /editeng | |
parent | 0fb66458c08b9c0ce59bca85e77d26fad8b59e4b (diff) |
convert NUM_ constants to enum clas
Change-Id: Id41ea91aaf618c7f3f323698c09caa7c8df2290a
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/eerdll.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/numitem.cxx | 12 | ||||
-rw-r--r-- | editeng/source/uno/unonrule.cxx | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index 2a6b40017c06..9250e230b9d8 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -101,7 +101,7 @@ SfxPoolItem** GlobalEditData::GetDefItems() ppDefItems = new SfxPoolItem*[EDITITEMCOUNT]; // Paragraph attributes: - SvxNumRule aDefaultNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, + SvxNumRule aDefaultNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR | SvxNumRuleFlags::CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false ); ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ); diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 4b71f2a3f5a5..6d4fd8aa7d98 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -573,7 +573,7 @@ OUString SvxNumberFormat::GetCharFmtName()const sal_Int32 SvxNumRule::nRefCount = 0; static SvxNumberFormat* pStdNumFmt = 0; static SvxNumberFormat* pStdOutlineNumFmt = 0; -SvxNumRule::SvxNumRule( sal_uLong nFeatures, +SvxNumRule::SvxNumRule( SvxNumRuleFlags nFeatures, sal_uInt16 nLevels, bool bCont, SvxNumRuleType eType, @@ -591,7 +591,7 @@ SvxNumRule::SvxNumRule( sal_uLong nFeatures, { aFmts[i] = new SvxNumberFormat(SVX_NUM_CHARS_UPPER_LETTER); // It is a distinction between writer and draw - if(nFeatures & NUM_CONTINUOUS) + if(nFeatures & SvxNumRuleFlags::CONTINUOUS) { if ( eDefaultNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) @@ -653,7 +653,7 @@ SvxNumRule::SvxNumRule( SvStream &rStream ) rStream.ReadUInt16( nLevelCount ); // first nFeatureFlags of old Versions - rStream.ReadUInt16( nTmp16 ); nFeatureFlags = nTmp16; + rStream.ReadUInt16( nTmp16 ); nFeatureFlags = static_cast<SvxNumRuleFlags>(nTmp16); rStream.ReadUInt16( nTmp16 ); bContinuousNumbering = nTmp16; rStream.ReadUInt16( nTmp16 ); eNumberingType = ( SvxNumRuleType )nTmp16; @@ -672,7 +672,7 @@ SvxNumRule::SvxNumRule( SvStream &rStream ) } } //second nFeatureFlags for new versions - rStream.ReadUInt16( nTmp16 ); nFeatureFlags = nTmp16; + rStream.ReadUInt16( nTmp16 ); nFeatureFlags = static_cast<SvxNumRuleFlags>(nTmp16); } SvStream& SvxNumRule::Store( SvStream &rStream ) @@ -680,7 +680,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream ) rStream.WriteUInt16( NUMITEM_VERSION_03 ); rStream.WriteUInt16( nLevelCount ); //first save of nFeatureFlags for old versions - rStream.WriteUInt16( nFeatureFlags ); + rStream.WriteUInt16( static_cast<sal_uInt16>(nFeatureFlags) ); rStream.WriteUInt16( sal_uInt16(bContinuousNumbering) ); rStream.WriteUInt16( eNumberingType ); @@ -705,7 +705,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream ) rStream.WriteUInt16( 0 | nSetFlag ); } //second save of nFeatureFlags for new versions - rStream.WriteUInt16( nFeatureFlags ); + rStream.WriteUInt16( static_cast<sal_uInt16>(nFeatureFlags) ); if(pConverter) DestroyFontToSubsFontConverter(pConverter); diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index 5959a72f4277..34e47d5c6645 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -487,7 +487,7 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr } else { - SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false); + SvxNumRule aDefaultRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR | SvxNumRuleFlags::CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false); return new SvxUnoNumberingRules( aDefaultRule ); } } @@ -546,7 +546,7 @@ Reference< XAnyCompare > SvxCreateNumRuleCompare() throw() ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SvxCreateNumRule() throw() { - SvxNumRule aTempRule( 0, 10, false ); + SvxNumRule aTempRule( SvxNumRuleFlags::NONE, 10, false ); return SvxCreateNumRule( &aTempRule ); } |