summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-22 12:15:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-23 10:19:51 +0200
commit00dfa1f2f06bcba5dcd67e8955f9a78b95f16632 (patch)
treebc9808c02f52eee04496890089e0325eae7bdc95 /sdext
parentdc63d52591da6e8972ad904ebfc9dd62509a1034 (diff)
cid#1448446 Unchecked dynamic_cast
Change-Id: I888ca249e0e9551c74611dcfb8ba7c7c1dc36880 Reviewed-on: https://gerrit.libreoffice.org/76133 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/tree/writertreevisiting.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index 6c0325019c9a..b84e5f2fcb07 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -694,8 +694,8 @@ void WriterXmlOptimizer::checkHeaderAndFooter( PageElement& rElem )
if (rit == rElem.Children.rend())
return;
- ParagraphElement* pPara = dynamic_cast<ParagraphElement*>(rit->get());
- if( !(pPara->y > rElem.h*0.85 && pPara->isSingleLined( m_rProcessor )) )
+ ParagraphElement& rPara = dynamic_cast<ParagraphElement&>(*rit->get());
+ if( !(rPara.y > rElem.h*0.85 && rPara.isSingleLined( m_rProcessor )) )
return;
std::list< std::unique_ptr<Element> >::reverse_iterator next_it = rit;
@@ -704,10 +704,10 @@ void WriterXmlOptimizer::checkHeaderAndFooter( PageElement& rElem )
{
pNextPara = dynamic_cast<ParagraphElement*>(next_it->get());
}
- if( pNextPara && pNextPara->y < pPara->y-pPara->h*2 )
+ if( pNextPara && pNextPara->y < rPara.y-rPara.h*2 )
{
rElem.FooterElement = std::move(*rit);
- pPara->Parent = nullptr;
+ rPara.Parent = nullptr;
rElem.Children.erase( std::next(rit).base() );
}
}