From 7d53f81f0a88afcff0f60bbd066a5645ac2e6a8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 14 Mar 2014 15:30:31 +0000 Subject: [PATCH] Related: rhbz#1075951 abrt crash in MSWordExportBase::OutputFormat Change-Id: I681fa40196eb04f4824e49458cba0acc15b26193 --- sw/source/filter/ww8/ww8atr.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 7eb3134..da25acc 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( nLvl ) ); -- 1.8.5.3