diff options
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index c0a34c80e679..bc49164fa0a3 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3317,7 +3317,15 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule ) if( pTxtNd->IsCountedInList()) { - nLvl = static_cast< sal_uInt8 >(pTxtNd->GetActualListLevel()); + int nLevel = pTxtNd->GetActualListLevel(); + + if (nLevel < 0) + nLevel = 0; + + if (nLevel >= MAXLEVEL) + nLevel = MAXLEVEL - 1; + + nLvl = static_cast< sal_uInt8 >(nLevel); if ( pTxtNd->IsListRestart() ) { |