diff options
-rw-r--r-- | editeng/inc/editeng/numitem.hxx | 1 | ||||
-rw-r--r-- | editeng/source/items/numitem.cxx | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx index f17e9cf56026..9f88e79de0ec 100644 --- a/editeng/inc/editeng/numitem.hxx +++ b/editeng/inc/editeng/numitem.hxx @@ -267,6 +267,7 @@ public: const SvxNumberFormat* Get(sal_uInt16 nLevel)const; const SvxNumberFormat& GetLevel(sal_uInt16 nLevel)const; void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat& rFmt, sal_Bool bIsValid = sal_True); + void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt); sal_Bool IsContinuousNumbering()const {return bContinuousNumbering;} diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 7ef42e01cfac..973dd63a03b0 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -836,6 +836,23 @@ void SvxNumRule::SetLevel( sal_uInt16 i, const SvxNumberFormat& rNumFmt, sal_Boo } } +void SvxNumRule::SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt) +{ + DBG_ASSERT(nLevel < SVX_MAX_NUM, "Wrong Level" ); + + if( nLevel < SVX_MAX_NUM ) + { + aFmtsSet[nLevel] = 0 != pFmt; + if(pFmt) + SetLevel(nLevel, *pFmt); + else + { + delete aFmts[nLevel]; + aFmts[nLevel] = 0; + } + } +} + String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool bInclStrings ) const { String aStr; |