summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-25 13:57:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-25 17:03:50 +0000
commit7fce0e3fe7b6de17c896bcd60cf054e4721bce67 (patch)
tree479607a4d9b72adfa9b340a9782c240198eaf6c3 /sdext
parent356263dcdb499631cf642eca869449b374e1f7dd (diff)
coverity#982469 Unchecked dynamic_cast
Change-Id: I6fa95fbd64f69cca1837b57f9c632f0bdbaec1d0
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.cxx4
1 files changed, 2 insertions, 2 deletions
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<ParagraphElement*>(&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