Blame SOURCES/0001-Related-rhbz-1075951-abrt-crash-in-MSWordExportBase-.patch

f085be
From 7d53f81f0a88afcff0f60bbd066a5645ac2e6a8b Mon Sep 17 00:00:00 2001
f085be
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
f085be
Date: Fri, 14 Mar 2014 15:30:31 +0000
f085be
Subject: [PATCH] Related: rhbz#1075951 abrt crash in
f085be
 MSWordExportBase::OutputFormat
f085be
f085be
Change-Id: I681fa40196eb04f4824e49458cba0acc15b26193
f085be
---
f085be
 sw/source/filter/ww8/ww8atr.cxx | 7 +++++--
f085be
 1 file changed, 5 insertions(+), 2 deletions(-)
f085be
f085be
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
f085be
index 7eb3134..da25acc 100644
f085be
--- a/sw/source/filter/ww8/ww8atr.cxx
f085be
+++ b/sw/source/filter/ww8/ww8atr.cxx
f085be
@@ -745,10 +745,13 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
f085be
     case RES_TXTFMTCOLL:
f085be
         if( bPapFmt )
f085be
         {
f085be
+            int nLvl = MAXLEVEL;
f085be
+
f085be
             if (((const SwTxtFmtColl&)rFmt).IsAssignedToListLevelOfOutlineStyle())
f085be
-            {
f085be
-                int nLvl = ((const SwTxtFmtColl&)rFmt).GetAssignedOutlineStyleLevel();
f085be
+                nLvl = ((const SwTxtFmtColl&)rFmt).GetAssignedOutlineStyleLevel();
f085be
 
f085be
+            if (nLvl >= 0 && nLvl < MAXLEVEL)
f085be
+            {
f085be
                 //if outline numbered
f085be
                 // if Write StyleDefinition then write the OutlineRule
f085be
                 const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( static_cast<sal_uInt16>( nLvl ) );
f085be
-- 
f085be
1.8.5.3
f085be