From 7fce0e3fe7b6de17c896bcd60cf054e4721bce67 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 25 Mar 2014 13:57:25 +0000 Subject: coverity#982469 Unchecked dynamic_cast Change-Id: I6fa95fbd64f69cca1837b57f9c632f0bdbaec1d0 --- sdext/source/pdfimport/tree/drawtreevisiting.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sdext/source') diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index bd8e6181acb9..626480d263c2 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -707,7 +707,7 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) } bool bPara = strspn("ParagraphElement", typeid(rParent).name()); ParagraphElement* pPara = dynamic_cast(&rParent); - if (bPara && isComplex) + if (bPara && pPara && isComplex) pPara->bRtl = true; if( pNext ) { @@ -737,7 +737,7 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX) isComplex = true; } - if (bPara && isComplex) + if (bPara && pPara && isComplex) pPara->bRtl = true; // append eventual children to current element // and clear children (else the children just -- cgit