Kaydet (Commit) 6f7e93b9 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1325247 Unchecked dynamic_cast

Change-Id: I86e3387c277767018565ed0708d35682ba2de3ae
üst 40c7d271
...@@ -205,11 +205,10 @@ public: ...@@ -205,11 +205,10 @@ public:
{ {
css::uno::Reference < css::text::XTextContent > xTxt; css::uno::Reference < css::text::XTextContent > xTxt;
SvXMLImportContext *pContext = &xContext; SvXMLImportContext *pContext = &xContext;
if( 0 != dynamic_cast<const XMLTextFrameContext*>(pContext) ) if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext))
xTxt = dynamic_cast< XMLTextFrameContext*>( pContext )->GetTextContent(); xTxt = pFrameContext->GetTextContent();
else if( 0 != dynamic_cast<const XMLTextFrameHyperlinkContext*>(pContext) ) else if (XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext))
xTxt = dynamic_cast< XMLTextFrameHyperlinkContext* >( pContext ) xTxt = pLinkContext->GetTextContent();
->GetTextContent();
return xTxt; return xTxt;
} }
...@@ -219,7 +218,7 @@ public: ...@@ -219,7 +218,7 @@ public:
{ {
css::uno::Reference < css::drawing::XShape > xShape; css::uno::Reference < css::drawing::XShape > xShape;
SvXMLImportContext *pContext = &xContext; SvXMLImportContext *pContext = &xContext;
if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext) ) if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext))
xShape = pFrameContext->GetShape(); xShape = pFrameContext->GetShape();
else if(XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext)) else if(XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext))
xShape = pLinkContext->GetShape(); xShape = pLinkContext->GetShape();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment