summaryrefslogtreecommitdiff
path: root/unoxml/source/dom/elementlist.hxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-23 16:59:02 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-23 16:59:02 +0100
commit90087ebb40a6cf12c9464da4e4ea7cc8b5f24bc5 (patch)
treebb3d6cb01c18dd12ae7ec77234cd43a6092d5a4b /unoxml/source/dom/elementlist.hxx
parent5d7d145d411c8974ceb12ac08759e7ccf3bb9b27 (diff)
parent82c070266d0440348c61c710e0caa89ae1e74b1b (diff)
Merge commit 'ooo/DEV300_m103'
Conflicts: binfilter/bf_xmloff/source/forms/formcellbinding.hxx binfilter/bf_xmloff/source/forms/xmloff_elementexport.cxx binfilter/bf_xmloff/source/forms/xmloff_formcellbinding.cxx filter/source/xsltfilter/makefile.mk unoxml/source/dom/characterdata.cxx unoxml/source/dom/document.cxx unoxml/source/dom/documentbuilder.cxx unoxml/source/dom/element.cxx unoxml/source/dom/elementlist.cxx unoxml/source/dom/node.cxx unoxml/source/dom/node.hxx unoxml/source/dom/text.cxx unoxml/source/events/event.cxx unoxml/source/events/event.hxx unoxml/source/events/eventdispatcher.cxx unoxml/source/events/eventdispatcher.hxx unoxml/source/events/mouseevent.cxx unoxml/source/events/mouseevent.hxx unoxml/source/events/mutationevent.cxx unoxml/source/events/mutationevent.hxx unoxml/source/events/uievent.cxx unoxml/source/events/uievent.hxx unoxml/source/xpath/nodelist.cxx unoxml/source/xpath/nodelist.hxx unoxml/source/xpath/xpathobject.cxx
Diffstat (limited to 'unoxml/source/dom/elementlist.hxx')
-rw-r--r--unoxml/source/dom/elementlist.hxx55
1 files changed, 33 insertions, 22 deletions
diff --git a/unoxml/source/dom/elementlist.hxx b/unoxml/source/dom/elementlist.hxx
index 82568064eca0..eeb2cd89094f 100644
--- a/unoxml/source/dom/elementlist.hxx
+++ b/unoxml/source/dom/elementlist.hxx
@@ -26,22 +26,27 @@
*
************************************************************************/
-#ifndef _ELEMENTLIST_HXX
-#define _ELEMENTLIST_HXX
+#ifndef DOM_ELEMENTLIST_HXX
+#define DOM_ELEMENTLIST_HXX
#include <vector>
+
+#include <boost/scoped_array.hpp>
+
+#include <libxml/tree.h>
+
#include <sal/types.h>
-#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase2.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 <com/sun/star/xml/dom/events/XEvent.hpp>
#include <com/sun/star/xml/dom/events/XEventListener.hpp>
-#include "element.hxx"
-#include "document.hxx"
-#include "libxml/tree.h"
+
+#include <cppuhelper/implbase2.hxx>
+
using ::rtl::OUString;
using namespace com::sun::star::uno;
@@ -50,26 +55,30 @@ using namespace com::sun::star::xml::dom::events;
namespace DOM
{
- typedef std::vector< xmlNodePtr > nodevector;
+ class CElement;
+
+ typedef std::vector< xmlNodePtr > nodevector_t;
- class CElementList : public cppu::WeakImplHelper2< XNodeList, com::sun::star::xml::dom::events::XEventListener >
+ class CElementList
+ : public cppu::WeakImplHelper2< XNodeList,
+ com::sun::star::xml::dom::events::XEventListener >
{
private:
- const CElement* m_pElement;
- const OUString m_aName;
- const OUString m_aURI;
- xmlChar *xName;
- xmlChar *xURI;
- sal_Bool m_bRebuild;
- nodevector m_nodevector;
-
+ ::rtl::Reference<CElement> const m_pElement;
+ ::osl::Mutex & m_rMutex;
+ ::boost::scoped_array<xmlChar> const m_pName;
+ ::boost::scoped_array<xmlChar> const m_pURI;
+ bool m_bRebuild;
+ nodevector_t m_nodevector;
void buildlist(xmlNodePtr pNode, sal_Bool start=sal_True);
- void registerListener(const CElement* pElement);
+ void registerListener(CElement & rElement);
public:
- CElementList(const CElement* aDoc, const OUString& aName);
- CElementList(const CElement* aDoc, const OUString& aName, const OUString& aURI);
+ CElementList(::rtl::Reference<CElement> const& pElement,
+ ::osl::Mutex & rMutex,
+ OUString const& rName, OUString const*const pURI = 0);
+
/**
The number of nodes in the list.
*/
@@ -77,10 +86,12 @@ 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);
// XEventListener
- virtual void SAL_CALL handleEvent(const Reference< XEvent >& evt) throw (RuntimeException);
+ virtual void SAL_CALL handleEvent(const Reference< XEvent >& evt)
+ throw (RuntimeException);
};
}