[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Fri Mar 14 08:37:42 PDT 2014


 sw/source/filter/ww8/ww8atr.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 7d53f81f0a88afcff0f60bbd066a5645ac2e6a8b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 14 15:30:31 2014 +0000

    Related: rhbz#1075951 abrt crash in MSWordExportBase::OutputFormat
    
    Change-Id: I681fa40196eb04f4824e49458cba0acc15b26193

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<sal_uInt16>( nLvl ) );


More information about the Libreoffice-commits mailing list