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

Caolán McNamara caolanm at redhat.com
Thu Oct 5 19:30:04 UTC 2017


 writerfilter/source/dmapper/NumberingManager.cxx |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit ca95e886b42157d1d6394ed0b4c910978f5c2fda
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 5 15:54:42 2017 +0100

    crashtesting: crash on import of abi3007-4.rtf
    
    which started happending at...
    
    commit 56a695fddb915bcba13b088b5b2b4e0841d4acbc
    Date:   Tue Sep 26 09:13:05 2017 +0200
    
        tdf#112211 RTF import: fix unwanted direct formatting for left indents
    
    Change-Id: Id3e8c4452238b48495b1014eff14cdaddcb047ab
    Reviewed-on: https://gerrit.libreoffice.org/43172
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index d1406421140a..c6165aad8784 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -754,16 +754,19 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal )
         }
         break;
         case NS_ooxml::LN_CT_Ind_left:
-            pCurrentLvl->Insert(
-                PROP_INDENT_AT, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
+            if ( pCurrentLvl.get( ) )
+                pCurrentLvl->Insert(
+                    PROP_INDENT_AT, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
             break;
         case NS_ooxml::LN_CT_Ind_hanging:
-            pCurrentLvl->Insert(
-                PROP_FIRST_LINE_INDENT, uno::makeAny( - ConversionHelper::convertTwipToMM100( nIntValue ) ));
+            if ( pCurrentLvl.get( ) )
+                pCurrentLvl->Insert(
+                    PROP_FIRST_LINE_INDENT, uno::makeAny( - ConversionHelper::convertTwipToMM100( nIntValue ) ));
         break;
         case NS_ooxml::LN_CT_Ind_firstLine:
-            pCurrentLvl->Insert(
-                PROP_FIRST_LINE_INDENT, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
+            if ( pCurrentLvl.get( ) )
+                pCurrentLvl->Insert(
+                    PROP_FIRST_LINE_INDENT, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
         break;
         case NS_ooxml::LN_CT_Lvl_ilvl: //overrides previous level - unsupported
         case NS_ooxml::LN_CT_Lvl_tplc: //template code - unsupported


More information about the Libreoffice-commits mailing list