diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-10-14 13:04:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-10-14 13:34:16 +0100 |
commit | 3e46d50d71eb3861ce73120e06dc6b8a4b17a36a (patch) | |
tree | 76655a59ba31ac0562159618f83b5957b8c970bf | |
parent | d98da8e16e3a7d282bbfadd8a382b0a103aaf54e (diff) |
fdo#30825# fix more ownership issues
-rw-r--r-- | unoxml/source/xpath/nodelist.cxx | 3 | ||||
-rw-r--r-- | unoxml/source/xpath/nodelist.hxx | 3 | ||||
-rw-r--r-- | unoxml/source/xpath/xpathobject.cxx | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/unoxml/source/xpath/nodelist.cxx b/unoxml/source/xpath/nodelist.cxx index 67a29145d..4b5c4698b 100644 --- a/unoxml/source/xpath/nodelist.cxx +++ b/unoxml/source/xpath/nodelist.cxx @@ -31,8 +31,9 @@ namespace XPath { - CNodeList::CNodeList(boost::shared_ptr<xmlXPathObject>& rxpathObj) + CNodeList::CNodeList(boost::shared_ptr<xmlXPathObject>& rxpathObj, const Reference< XNode >& contextNode) : m_pNodeSet(0) + , m_xContextNode(contextNode) { if (rxpathObj != NULL && rxpathObj->type == XPATH_NODESET) { diff --git a/unoxml/source/xpath/nodelist.hxx b/unoxml/source/xpath/nodelist.hxx index 6c7ae1c26..5ab978a23 100644 --- a/unoxml/source/xpath/nodelist.hxx +++ b/unoxml/source/xpath/nodelist.hxx @@ -53,10 +53,11 @@ namespace XPath { private: boost::shared_ptr<xmlXPathObject> m_pXPathObj; + const Reference< XNode > m_xContextNode; xmlNodeSetPtr m_pNodeSet; public: - CNodeList(boost::shared_ptr<xmlXPathObject> &rxpathObj); + CNodeList(boost::shared_ptr<xmlXPathObject> &rxpathObj, const Reference< XNode >& contextNode); /** The number of nodes in the list. */ diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx index ad505c5ce..67a8f59b7 100644 --- a/unoxml/source/xpath/xpathobject.cxx +++ b/unoxml/source/xpath/xpathobject.cxx @@ -86,7 +86,7 @@ namespace XPath */ Reference< XNodeList > SAL_CALL CXPathObject::getNodeList() throw (RuntimeException) { - return Reference< XNodeList >(new CNodeList(m_pXPathObj)); + return Reference< XNodeList >(new CNodeList(m_pXPathObj, m_xContextNode)); } /** |