summaryrefslogtreecommitdiffstats
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-01 14:16:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-01 14:41:30 +0100
commit6f7e93b9488c41a2b43d897c1e2d3fb527ef3b36 (patch)
tree1e0b4634a7dae5c0c6c06226ae03832fc81acbab /xmloff
parentcoverity#1325248 Unchecked dynamic_cast (diff)
downloadcore-6f7e93b9488c41a2b43d897c1e2d3fb527ef3b36.tar.gz
core-6f7e93b9488c41a2b43d897c1e2d3fb527ef3b36.zip
coverity#1325247 Unchecked dynamic_cast
Change-Id: I86e3387c277767018565ed0708d35682ba2de3ae
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/txtparaimphint.hxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx
index a447fd71846d..7d58e65addd4 100644
--- a/xmloff/source/text/txtparaimphint.hxx
+++ b/xmloff/source/text/txtparaimphint.hxx
@@ -205,11 +205,10 @@ public:
{
css::uno::Reference < css::text::XTextContent > xTxt;
SvXMLImportContext *pContext = &xContext;
- if( 0 != dynamic_cast<const XMLTextFrameContext*>(pContext) )
- xTxt = dynamic_cast< XMLTextFrameContext*>( pContext )->GetTextContent();
- else if( 0 != dynamic_cast<const XMLTextFrameHyperlinkContext*>(pContext) )
- xTxt = dynamic_cast< XMLTextFrameHyperlinkContext* >( pContext )
- ->GetTextContent();
+ if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext))
+ xTxt = pFrameContext->GetTextContent();
+ else if (XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext))
+ xTxt = pLinkContext->GetTextContent();
return xTxt;
}
@@ -219,7 +218,7 @@ public:
{
css::uno::Reference < css::drawing::XShape > xShape;
SvXMLImportContext *pContext = &xContext;
- if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext) )
+ if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext))
xShape = pFrameContext->GetShape();
else if(XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext))
xShape = pLinkContext->GetShape();