[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - writerfilter/source

Caolán McNamara caolanm at redhat.com
Tue Aug 19 06:29:10 PDT 2014


 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 2a12ec16edbfad4c25c2cfe261c39fcb69abb4c6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 10 14:07:19 2014 +0100

    fix build, coverity#1209547 Unchecked dynamic_cast
    
    (cherry picked from commit f4c80aaf3f2b97661ecf1cfd014aaa5ad00da846)
    
    Change-Id: Ibf614156aeafcd74be444cf388e02a9273d38d5f
    Reviewed-on: https://gerrit.libreoffice.org/11019
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 1d5c199..3b55e86 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1047,7 +1047,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
     dmapper_logger->attribute("isTextAppend", xTextAppend.is());
 #endif
 
-    if(xTextAppend.is() && ! getTableManager( ).isIgnore() && pParaContext != NULL)
+    if (xTextAppend.is() && !getTableManager( ).isIgnore() && pParaContext != NULL)
     {
         try
         {
@@ -1182,14 +1182,17 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
     }
 
     m_bParaChanged = false;
-    if(!pParaContext->IsFrameMode())
+    if (!pParaContext || !pParaContext->IsFrameMode())
     { // If the paragraph is in a frame, it's not a paragraph of the section itself.
         m_bIsFirstParaInSection = false;
         m_bIsLastParaInSection = false;
     }
 
-    // Reset the frame properties for the next paragraph
-    pParaContext->ResetFrameProperties();
+    if (pParaContext)
+    {
+        // Reset the frame properties for the next paragraph
+        pParaContext->ResetFrameProperties();
+    }
 
 #ifdef DEBUG_DOMAINMAPPER
     dmapper_logger->endElement();


More information about the Libreoffice-commits mailing list