Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > cd8ce32c919af60229fca1d7f792c60e > files > 42

openoffice.org-3.2.0-12.35.fc13.src.rpm

import openoffice.org-3.1.1.rhbz568277.avoid-crash-in-docx-import.patch

diff -r a5415084a883 writerfilter/source/dmapper/ListTable.cxx
--- a/writerfilter/source/dmapper/ListTable.cxx	Sat Aug 14 13:10:18 2010 +0200
+++ b/writerfilter/source/dmapper/ListTable.cxx	Sat Aug 14 15:50:36 2010 +0200
@@ -421,17 +421,20 @@
         break;
         case NS_ooxml::LN_CT_Ind_left:
             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
-            m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert(
+            if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get())
+                m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert(
                 PROP_INDENT_AT, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
             break;
         case NS_ooxml::LN_CT_Ind_hanging:
             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
-            m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert(
+            if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get())
+                m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert(
                 PROP_FIRST_LINE_INDENT, true, uno::makeAny( - ConversionHelper::convertTwipToMM100( nIntValue ) ));
         break;
         case NS_ooxml::LN_CT_Ind_firstLine:
             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
-            m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert(
+            if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get())
+                m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert(
                 PROP_FIRST_LINE_INDENT, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
         break;
         case NS_ooxml::LN_CT_Lvl_ilvl: //overrides previous level - unsupported
@@ -440,8 +443,9 @@
         break;
         case NS_ooxml::LN_CT_TabStop_pos:
         {
-            //no paragraph attributes in ListTable char style sheets
-            m_pImpl->m_pCurrentEntry->pCurrentProperties->nTabstop = ConversionHelper::convertTwipToMM100( nIntValue );
+            if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get())
+                //no paragraph attributes in ListTable char style sheets
+                m_pImpl->m_pCurrentEntry->pCurrentProperties->nTabstop = ConversionHelper::convertTwipToMM100( nIntValue );
         }
         break;
         default:
@@ -566,8 +570,9 @@
                     text::HoriOrientation::CENTER,
                     text::HoriOrientation::RIGHT
                 };
-                m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert( 
-                    PROP_ADJUST, true, uno::makeAny( aWWAlignments[ nIntValue ] ) );
+                if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get())
+                    m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert( 
+                        PROP_ADJUST, true, uno::makeAny( aWWAlignments[ nIntValue ] ) );
                     writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
             }
             break;