summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-10 14:07:19 +0100
committerDavid Tardon <dtardon@redhat.com>2014-08-19 08:28:44 -0500
commit2a12ec16edbfad4c25c2cfe261c39fcb69abb4c6 (patch)
treec38d8b82e320c4f72ee5463aa84d5bb725dead29 /writerfilter
parent20e714167a713ef1129cb2f82bb650c803a5bf0c (diff)
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@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 1d5c19946377..3b55e8661377 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();