summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-21 13:50:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-22 10:46:29 +0100
commit1cb1db442e46616b1de121141cd94c114d4fce52 (patch)
tree758cb4e73286a4b2bfc187da28b91bb48953e17e /editeng
parent53e6c475939df22c849d410efc2aa9bfd28ad819 (diff)
restore SvxNumRule::SetLevel variant
correctly removed as unused by 1dc612970f57aa5599c6d1b7afb10a3f5f4403d2 but we will need it again Change-Id: I2d5c391506a84abe435547232398aa43a3468fe6
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/editeng/numitem.hxx1
-rw-r--r--editeng/source/items/numitem.cxx17
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;