diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-05 13:14:26 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-05 21:24:01 +0100 |
commit | 4ee1b8f144b90e3532adfac7e5e806552612472e (patch) | |
tree | c2a306f19f1bb7a4443056322e25db2fa07cd01c /starmath | |
parent | ef6940a48097fee287a7d8782a6a208292f6926c (diff) |
ofz#4531 Bad-cast
Change-Id: I152c2e7fa09fc637b176482de9718cf03880c23e
Reviewed-on: https://gerrit.libreoffice.org/45875
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathmlimport.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 6e7001214541..87befa6fdc85 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -2647,7 +2647,7 @@ void SmXMLTableContext_Impl::EndElement() for (auto i=nRows;i > 0;i--) { - SmStructureNode* pArray = static_cast<SmStructureNode *>(rNodeStack.front().release()); + SmNode* pArray = rNodeStack.front().release(); rNodeStack.pop_front(); if (pArray->GetNumSubNodes() == 0) { @@ -2663,13 +2663,14 @@ void SmXMLTableContext_Impl::EndElement() aRelationArray.resize(1); aRelationArray[0] = pArray; SmToken aDummy; - pArray = new SmExpressionNode(aDummy); - pArray->SetSubNodes(aRelationArray); + SmExpressionNode* pExprNode = new SmExpressionNode(aDummy); + pExprNode->SetSubNodes(aRelationArray); + pArray = pExprNode; } if (pArray->GetNumSubNodes() > nCols) nCols = pArray->GetNumSubNodes(); - aReverseStack.push_front(std::unique_ptr<SmStructureNode>(pArray)); + aReverseStack.push_front(std::unique_ptr<SmNode>(pArray)); } aExpressionArray.resize(nCols*nRows); size_t j=0; |