diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-14 15:30:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-14 15:37:13 +0000 |
commit | 7d53f81f0a88afcff0f60bbd066a5645ac2e6a8b (patch) | |
tree | 0baf5d42c9fc3c80cbd2134d83c7fefd17af94b4 | |
parent | d05b67a7b9448c67c3a923ecb33dac74b52dd192 (diff) |
Related: rhbz#1075951 abrt crash in MSWordExportBase::OutputFormat
Change-Id: I681fa40196eb04f4824e49458cba0acc15b26193
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 7eb3134bc9ae..da25acc68362 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -745,10 +745,13 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF case RES_TXTFMTCOLL: if( bPapFmt ) { + int nLvl = MAXLEVEL; + if (((const SwTxtFmtColl&)rFmt).IsAssignedToListLevelOfOutlineStyle()) - { - int nLvl = ((const SwTxtFmtColl&)rFmt).GetAssignedOutlineStyleLevel(); + nLvl = ((const SwTxtFmtColl&)rFmt).GetAssignedOutlineStyleLevel(); + if (nLvl >= 0 && nLvl < MAXLEVEL) + { //if outline numbered // if Write StyleDefinition then write the OutlineRule const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( static_cast<sal_uInt16>( nLvl ) ); |