Kaydet (Commit) 9692c7d2 authored tarafından Caolán McNamara's avatar Caolán McNamara

CID#736197 out of bounds

Change-Id: I9b105926b812e4341700d87d77288fe429beda53
üst 540e817e
...@@ -2729,7 +2729,15 @@ long SwTxtNode::GetLeftMarginWithNum( sal_Bool bTxtLeft ) const ...@@ -2729,7 +2729,15 @@ long SwTxtNode::GetLeftMarginWithNum( sal_Bool bTxtLeft ) const
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if( pRule ) if( pRule )
{ {
const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel())); int nLevel = GetActualListLevel();
if (nLevel < 0)
nLevel = 0;
if (nLevel >= MAXLEVEL)
nLevel = MAXLEVEL - 1;
const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(nLevel));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment