summaryrefslogtreecommitdiff
path: root/unoxml/source/dom/childlist.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2011-01-19 20:27:24 +0100
committerMichael Stahl <mst@openoffice.org>2011-01-19 20:27:24 +0100
commitaa85497de77acae2c9e58d7339584dcd7665e425 (patch)
tree927dc441175ad182c6c8bad866e52a0bf9c6117b /unoxml/source/dom/childlist.hxx
parentcb42fe10fa5cdefe902e63c735ddf508c68c84e2 (diff)
xmlfix3: unoxml: fix CChildList: member pointer does not keep document alive
Diffstat (limited to 'unoxml/source/dom/childlist.hxx')
-rw-r--r--unoxml/source/dom/childlist.hxx28
1 files changed, 17 insertions, 11 deletions
diff --git a/unoxml/source/dom/childlist.hxx b/unoxml/source/dom/childlist.hxx
index c639d327a7d2..9d3dec0a147a 100644
--- a/unoxml/source/dom/childlist.hxx
+++ b/unoxml/source/dom/childlist.hxx
@@ -25,18 +25,18 @@
*
************************************************************************/
-#ifndef _CHILDLIST_HXX
-#define _CHILDLIST_HXX
+#ifndef DOM_CHILDLIST_HXX
+#define DOM_CHILDLIST_HXX
-#include <map>
#include <sal/types.h>
-#include <cppuhelper/implbase1.hxx>
+#include <rtl/ref.hxx>
+
#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/xml/dom/XNode.hpp>
#include <com/sun/star/xml/dom/XNodeList.hpp>
-#include "node.hxx"
-#include "libxml/tree.h"
+
+#include <cppuhelper/implbase1.hxx>
+
using ::rtl::OUString;
using namespace com::sun::star::uno;
@@ -44,12 +44,17 @@ using namespace com::sun::star::xml::dom;
namespace DOM
{
- class CChildList : public cppu::WeakImplHelper1< XNodeList >
+ class CNode;
+
+ class CChildList
+ : public cppu::WeakImplHelper1< XNodeList >
{
private:
- const xmlNodePtr m_pNode;
+ ::rtl::Reference<CNode> const m_pNode;
+
public:
- CChildList(CNode const& rBase);
+ CChildList(::rtl::Reference<CNode> const& pBase);
+
/**
The number of nodes in the list.
*/
@@ -57,7 +62,8 @@ namespace DOM
/**
Returns the indexth item in the collection.
*/
- virtual Reference< XNode > SAL_CALL item(sal_Int32 index) throw (RuntimeException);
+ virtual Reference< XNode > SAL_CALL item(sal_Int32 index)
+ throw (RuntimeException);
};
}