Commits

Anonymous committed 4aedef9

DomainMapper_Impl::finishParagraph: check if pParaContext is valid
DomainMapperTableHandler::endTable: catch all exceptions

Comments (0)

Files changed (2)

writerfilter/source/dmapper/DomainMapperTableHandler.cxx

             dmapper_logger->chars("failed to import table!");
 #endif
         }
-#ifdef DEBUG_DMAPPER_TABLE_HANDLER
         catch ( uno::Exception e )
         {
+#ifdef DEBUG_DMAPPER_TABLE_HANDLER
             dmapper_logger->startElement("exception");
             dmapper_logger->chars(rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ));
             dmapper_logger->endElement("exeception");
+#endif
         }
-#endif
     }
 
     m_aTableProperties.reset();

writerfilter/source/dmapper/DomainMapper_Impl.cxx

     dmapper_logger->attribute("isTextAppend", xTextAppend.is());
 #endif 
     
-    if(xTextAppend.is() && ! getTableManager( ).isIgnore())
+    if(xTextAppend.is() && ! getTableManager( ).isIgnore() && pParaContext != NULL)
     {
         try
         {
               old _and_ new DropCap must not occur
              */
 
-            bool bIsDropCap = pParaContext->IsFrameMode() && sal::static_int_cast<Id>(pParaContext->GetDropCap()) != NS_ooxml::LN_Value_wordprocessingml_ST_DropCap_none;
+            bool bIsDropCap = 
+                pParaContext->IsFrameMode() && 
+                sal::static_int_cast<Id>(pParaContext->GetDropCap()) != NS_ooxml::LN_Value_wordprocessingml_ST_DropCap_none;
+
             style::DropCapFormat aDrop;
             ParagraphPropertiesPtr pToBeSavedProperties;
             bool bKeepLastParagraphProperties = false;