Kaydet (Commit) 83588ab3 authored tarafından Michael Stahl's avatar Michael Stahl

xmlfix3: #i113683#: finish CAttributesMap

üst 9f235cfe
......@@ -233,21 +233,39 @@ namespace DOM
// Adds a node using its nodeName attribute.
*/
Reference< XNode > SAL_CALL
CAttributesMap::setNamedItem(Reference< XNode > const& arg)
CAttributesMap::setNamedItem(Reference< XNode > const& xNode)
throw (RuntimeException)
{
return arg;
// return Reference< XNode >();
Reference< XAttr > const xAttr(xNode, UNO_QUERY);
if (!xNode.is()) {
throw DOMException(OUString(RTL_CONSTASCII_USTRINGPARAM(
"CAttributesMap::setNamedItem: XAttr argument expected")),
static_cast<OWeakObject*>(this),
DOMExceptionType_HIERARCHY_REQUEST_ERR);
}
// no MutexGuard needed: m_pElement is const
Reference< XNode > const xRet(
m_pElement->setAttributeNode(xAttr), UNO_QUERY);
return xRet;
}
/**
Adds a node using its namespaceURI and localName.
*/
Reference< XNode > SAL_CALL
CAttributesMap::setNamedItemNS(Reference< XNode > const& arg)
CAttributesMap::setNamedItemNS(Reference< XNode > const& xNode)
throw (RuntimeException)
{
return arg;
// return Reference< XNode >();
Reference< XAttr > const xAttr(xNode, UNO_QUERY);
if (!xNode.is()) {
throw DOMException(OUString(RTL_CONSTASCII_USTRINGPARAM(
"CAttributesMap::setNamedItemNS: XAttr argument expected")),
static_cast<OWeakObject*>(this),
DOMExceptionType_HIERARCHY_REQUEST_ERR);
}
// no MutexGuard needed: m_pElement is const
Reference< XNode > const xRet(
m_pElement->setAttributeNodeNS(xAttr), UNO_QUERY);
return xRet;
}
}
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