diff options
Diffstat (limited to 'unoxml/source/dom/attributesmap.hxx')
-rw-r--r-- | unoxml/source/dom/attributesmap.hxx | 53 |
1 files changed, 35 insertions, 18 deletions
diff --git a/unoxml/source/dom/attributesmap.hxx b/unoxml/source/dom/attributesmap.hxx index fb91c168c7bc..bb2cd6aa0a56 100644 --- a/unoxml/source/dom/attributesmap.hxx +++ b/unoxml/source/dom/attributesmap.hxx @@ -26,19 +26,18 @@ * ************************************************************************/ -#ifndef _ATTRIBUTESMAP_HXX -#define _ATTRIBUTESMAP_HXX +#ifndef DOM_ATTRIBUTESMAP_HXX +#define DOM_ATTRIBUTESMAP_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/XNamedNodeMap.hpp> -#include "node.hxx" -#include "element.hxx" -#include "attr.hxx" + +#include <cppuhelper/implbase1.hxx> + using ::rtl::OUString; using namespace com::sun::star::uno; @@ -46,12 +45,18 @@ using namespace com::sun::star::xml::dom; namespace DOM { - class CAttributesMap : public cppu::WeakImplHelper1< XNamedNodeMap > + class CElement; + + class CAttributesMap + : public cppu::WeakImplHelper1< XNamedNodeMap > { private: - const CElement* m_pElement; + ::rtl::Reference<CElement> const m_pElement; + ::osl::Mutex & m_rMutex; + public: - CAttributesMap(const CElement* aDocType); + CAttributesMap(::rtl::Reference<CElement> const& pElement, + ::osl::Mutex & rMutex); /** The number of nodes in this map. @@ -61,37 +66,49 @@ namespace DOM /** Retrieves a node specified by local name */ - virtual Reference< XNode > SAL_CALL getNamedItem(const OUString& name) throw (RuntimeException); + virtual Reference< XNode > SAL_CALL getNamedItem(OUString const& name) + throw (RuntimeException); /** Retrieves a node specified by local name and namespace URI. */ - virtual Reference< XNode > SAL_CALL getNamedItemNS(const OUString& namespaceURI, const OUString& localName) throw (RuntimeException); + virtual Reference< XNode > SAL_CALL getNamedItemNS( + OUString const& namespaceURI, OUString const& localName) + throw (RuntimeException); /** Returns the indexth item in the map. */ - virtual Reference< XNode > SAL_CALL item(sal_Int32 index) throw (RuntimeException); + virtual Reference< XNode > SAL_CALL item(sal_Int32 index) + throw (RuntimeException); /** Removes a node specified by name. */ - virtual Reference< XNode > SAL_CALL removeNamedItem(const OUString& name) throw (RuntimeException); + virtual Reference< XNode > SAL_CALL + removeNamedItem(OUString const& name) + throw (RuntimeException); /** // Removes a node specified by local name and namespace URI. */ - virtual Reference< XNode > SAL_CALL removeNamedItemNS(const OUString& namespaceURI, const OUString& localName) throw (RuntimeException); + virtual Reference< XNode > SAL_CALL removeNamedItemNS( + OUString const& namespaceURI, OUString const& localName) + throw (RuntimeException); /** // Adds a node using its nodeName attribute. */ - virtual Reference< XNode > SAL_CALL setNamedItem(const Reference< XNode >& arg) throw (RuntimeException); + virtual Reference< XNode > SAL_CALL + setNamedItem(Reference< XNode > const& arg) + throw (RuntimeException); /** Adds a node using its namespaceURI and localName. */ - virtual Reference< XNode > SAL_CALL setNamedItemNS(const Reference< XNode >& arg) throw (RuntimeException); + virtual Reference< XNode > SAL_CALL + setNamedItemNS(Reference< XNode > const& arg) + throw (RuntimeException); }; } |