xmlfix3: #i113663#: unoxml: fix xmlRemoveProp errors
This commit is contained in:
parent
6145d8c3f4
commit
8f5bbf5b12
2 changed files with 7 additions and 2 deletions
|
@ -380,7 +380,8 @@ namespace DOM
|
|||
Reference< XAttr > aAttr;
|
||||
if(m_aNodePtr != NULL)
|
||||
{
|
||||
xmlAttrPtr pAttr = (xmlAttrPtr) CNode::getNodePtr(oldAttr.get());
|
||||
xmlNodePtr const pNode = CNode::getNodePtr(oldAttr.get());
|
||||
xmlAttrPtr const pAttr = (xmlAttrPtr) pNode;
|
||||
|
||||
if (pAttr->parent != m_aNodePtr)
|
||||
{
|
||||
|
@ -402,7 +403,8 @@ namespace DOM
|
|||
aAttr = oldAttr->getOwnerDocument()->createAttribute(oldAttr->getName());
|
||||
aAttr->setValue(oldAttr->getValue());
|
||||
xmlRemoveProp(pAttr);
|
||||
|
||||
CNode *const pCNode( CNode::get(pNode) );
|
||||
pCNode->m_aNodePtr = NULL; // freed by xmlRemoveProp
|
||||
}
|
||||
return aAttr;
|
||||
}
|
||||
|
|
|
@ -831,6 +831,7 @@ namespace DOM
|
|||
{
|
||||
xmlAttrPtr pAttr = (xmlAttrPtr) old;
|
||||
xmlRemoveProp( pAttr );
|
||||
pOld->m_aNodePtr = NULL; // freed by xmlRemoveProp
|
||||
xReturn.clear();
|
||||
}
|
||||
else
|
||||
|
@ -900,6 +901,8 @@ namespace DOM
|
|||
|
||||
xmlAttrPtr pAttr = (xmlAttrPtr)pOld;
|
||||
xmlRemoveProp( pAttr );
|
||||
CNode *const pOldNode( CNode::get(pOld) );
|
||||
pOldNode->m_aNodePtr = NULL; // freed by xmlRemoveProp
|
||||
appendChild( newChild );
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue