diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2014-05-21 12:18:36 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2014-05-22 12:50:46 +0200 |
commit | abcbe967f2d46cc6d222dda06f6b1e734b2c9e08 (patch) | |
tree | 2c4f6dc419b147c97d0f8f6b4803532ac84f9253 /unoxml | |
parent | bc58eac34175253d6520be17ca962c77b3a1aef6 (diff) |
unoxml: huge namespacing cleanup
Change-Id: I2170e8fd9ef5ca0556545cb3f656a0e1ba49f43b
Diffstat (limited to 'unoxml')
67 files changed, 1234 insertions, 1275 deletions
diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx index 44c6d1e2726f..c7b11e6e06f4 100644 --- a/unoxml/source/dom/attr.cxx +++ b/unoxml/source/dom/attr.cxx @@ -28,6 +28,9 @@ #include <document.hxx> +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::dom::events; namespace DOM { diff --git a/unoxml/source/dom/attr.hxx b/unoxml/source/dom/attr.hxx index b79716d53ac6..eb85df90947d 100644 --- a/unoxml/source/dom/attr.hxx +++ b/unoxml/source/dom/attr.hxx @@ -32,14 +32,11 @@ #include <node.hxx> -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { typedef ::std::pair< OString, OString > stringpair_t; - typedef ::cppu::ImplInheritanceHelper1< CNode, XAttr > CAttr_Base; + typedef ::cppu::ImplInheritanceHelper1< CNode, css::xml::dom::XAttr > CAttr_Base; class CAttr : public CAttr_Base @@ -59,149 +56,149 @@ namespace DOM /// return the libxml namespace corresponding to m_pNamespace on pNode xmlNsPtr GetNamespace(xmlNodePtr const pNode); - virtual bool IsChildTypeAllowed(NodeType const nodeType) SAL_OVERRIDE; + virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType) SAL_OVERRIDE; /** Returns the name of this attribute. */ - virtual OUString SAL_CALL getName() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The Element node this attribute is attached to or null if this attribute is not in use. */ - virtual Reference< XElement > SAL_CALL getOwnerElement() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XElement > SAL_CALL getOwnerElement() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false. */ - virtual sal_Bool SAL_CALL getSpecified()throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getSpecified()throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** On retrieval, the value of the attribute is returned as a string. */ - virtual OUString SAL_CALL getValue() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getValue() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Sets the value of the attribute from a string. */ - virtual void SAL_CALL setValue(const OUString& value) throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setValue(const OUString& value) throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; // resolve uno inheritance problems... // overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return setValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; }; } diff --git a/unoxml/source/dom/attributesmap.cxx b/unoxml/source/dom/attributesmap.cxx index 9652bc60c2ae..e3d6ebffce1a 100644 --- a/unoxml/source/dom/attributesmap.cxx +++ b/unoxml/source/dom/attributesmap.cxx @@ -24,6 +24,8 @@ #include <element.hxx> #include <document.hxx> +using namespace css::uno; +using namespace css::xml::dom; namespace DOM { diff --git a/unoxml/source/dom/attributesmap.hxx b/unoxml/source/dom/attributesmap.hxx index 94449df979e3..d49a39f54552 100644 --- a/unoxml/source/dom/attributesmap.hxx +++ b/unoxml/source/dom/attributesmap.hxx @@ -29,16 +29,12 @@ #include <cppuhelper/implbase1.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { class CElement; class CAttributesMap - : public cppu::WeakImplHelper1< XNamedNodeMap > + : public cppu::WeakImplHelper1< css::xml::dom::XNamedNodeMap > { private: ::rtl::Reference<CElement> const m_pElement; @@ -51,54 +47,54 @@ namespace DOM /** The number of nodes in this map. */ - virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getLength() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Retrieves a node specified by local name */ - virtual Reference< XNode > SAL_CALL getNamedItem(OUString const& name) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNamedItem(OUString const& name) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Retrieves a node specified by local name and namespace URI. */ - virtual Reference< XNode > SAL_CALL getNamedItemNS( + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNamedItemNS( OUString const& namespaceURI, OUString const& localName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns the indexth item in the map. */ - virtual Reference< XNode > SAL_CALL item(sal_Int32 index) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL item(sal_Int32 index) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Removes a node specified by name. */ - virtual Reference< XNode > SAL_CALL + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeNamedItem(OUString const& name) - throw (DOMException, RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::xml::dom::DOMException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** // Removes a node specified by local name and namespace URI. */ - virtual Reference< XNode > SAL_CALL removeNamedItemNS( + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeNamedItemNS( OUString const& namespaceURI, OUString const& localName) - throw (DOMException, RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::xml::dom::DOMException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** // Adds a node using its nodeName attribute. */ - virtual Reference< XNode > SAL_CALL - setNamedItem(Reference< XNode > const& arg) - throw (DOMException, RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + setNamedItem(css::uno::Reference< css::xml::dom::XNode > const& arg) + throw (css::xml::dom::DOMException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Adds a node using its namespaceURI and localName. */ - virtual Reference< XNode > SAL_CALL - setNamedItemNS(Reference< XNode > const& arg) - throw (DOMException, RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + setNamedItemNS(css::uno::Reference< css::xml::dom::XNode > const& arg) + throw (css::xml::dom::DOMException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/unoxml/source/dom/cdatasection.cxx b/unoxml/source/dom/cdatasection.cxx index 49ffabdaf6be..a1c7550513e1 100644 --- a/unoxml/source/dom/cdatasection.cxx +++ b/unoxml/source/dom/cdatasection.cxx @@ -21,6 +21,10 @@ #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::sax; + namespace DOM { CCDATASection::CCDATASection( diff --git a/unoxml/source/dom/cdatasection.hxx b/unoxml/source/dom/cdatasection.hxx index 98a5a7a0c641..6073ba66f593 100644 --- a/unoxml/source/dom/cdatasection.hxx +++ b/unoxml/source/dom/cdatasection.hxx @@ -25,13 +25,9 @@ #include <text.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef ::cppu::ImplInheritanceHelper1< CText, XCDATASection > + typedef ::cppu::ImplInheritanceHelper1< CText, css::xml::dom::XCDATASection > CCDATASection_Base; class CCDATASection @@ -45,50 +41,50 @@ namespace DOM public: - virtual void saxify(const Reference< XDocumentHandler >& i_xHandler) SAL_OVERRIDE; + virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler >& i_xHandler) SAL_OVERRIDE; - virtual Reference< XText > SAL_CALL splitText(sal_Int32 offset) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XText > SAL_CALL splitText(sal_Int32 offset) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CText::splitText(offset); } // --- delegations for XCharacterData virtual void SAL_CALL appendData(const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::appendData(arg); } virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::deleteData(offset, count); } - virtual OUString SAL_CALL getData() throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual OUString SAL_CALL getData() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getData(); } - virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual sal_Int32 SAL_CALL getLength() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getLength(); } virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::insertData(offset, arg); } virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::replaceData(offset, count, arg); } virtual void SAL_CALL setData(const OUString& data) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::setData(data); } virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::subStringData(offset, count); } @@ -96,125 +92,125 @@ namespace DOM // --- overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CText::setNodeValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setPrefix(prefix); } diff --git a/unoxml/source/dom/characterdata.cxx b/unoxml/source/dom/characterdata.cxx index 648aaffdbac6..1033a7c9aabf 100644 --- a/unoxml/source/dom/characterdata.cxx +++ b/unoxml/source/dom/characterdata.cxx @@ -27,6 +27,9 @@ #include "../events/mutationevent.hxx" +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::dom::events; namespace DOM { diff --git a/unoxml/source/dom/characterdata.hxx b/unoxml/source/dom/characterdata.hxx index b032b627e4dd..39d637aa79a2 100644 --- a/unoxml/source/dom/characterdata.hxx +++ b/unoxml/source/dom/characterdata.hxx @@ -32,13 +32,9 @@ #include <node.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef ::cppu::ImplInheritanceHelper1< CNode, XCharacterData > + typedef ::cppu::ImplInheritanceHelper1< CNode, css::xml::dom::XCharacterData > CCharacterData_Base; class CCharacterData @@ -47,7 +43,7 @@ namespace DOM protected: CCharacterData(CDocument const& rDocument, ::osl::Mutex const& rMutex, - NodeType const& reNodeType, xmlNodePtr const& rpNode); + css::xml::dom::NodeType const& reNodeType, xmlNodePtr const& rpNode); void dispatchEvent_Impl( OUString const& prevValue, OUString const& newValue); @@ -57,175 +53,175 @@ namespace DOM Append the string to the end of the character data of the node. */ virtual void SAL_CALL appendData(const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Remove a range of 16-bit units from the node. */ virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Return the character data of the node that implements this interface. */ - virtual OUString SAL_CALL getData() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getData() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The number of 16-bit units that are available through data and the substringData method below. */ - virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getLength() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Insert a string at the specified 16-bit unit offset. */ virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Replace the characters starting at the specified 16-bit unit offset with the specified string. */ virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Set the character data of the node that implements this interface. */ virtual void SAL_CALL setData(const OUString& data) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Extracts a range of data from the node. */ virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; // --- delegation for XNode base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeName(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getData(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return setData(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setPrefix(prefix); } diff --git a/unoxml/source/dom/childlist.cxx b/unoxml/source/dom/childlist.cxx index 9f4235052229..e993d64fb2fd 100644 --- a/unoxml/source/dom/childlist.cxx +++ b/unoxml/source/dom/childlist.cxx @@ -24,6 +24,8 @@ #include <node.hxx> #include <document.hxx> +using namespace css::uno; +using namespace css::xml::dom; namespace DOM { diff --git a/unoxml/source/dom/childlist.hxx b/unoxml/source/dom/childlist.hxx index 1396c999a458..8ac42e0fbf4f 100644 --- a/unoxml/source/dom/childlist.hxx +++ b/unoxml/source/dom/childlist.hxx @@ -29,16 +29,12 @@ #include <cppuhelper/implbase1.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { class CNode; class CChildList - : public cppu::WeakImplHelper1< XNodeList > + : public cppu::WeakImplHelper1< css::xml::dom::XNodeList > { private: ::rtl::Reference<CNode> const m_pNode; @@ -51,12 +47,12 @@ namespace DOM /** The number of nodes in the list. */ - virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getLength() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns the indexth item in the collection. */ - virtual Reference< XNode > SAL_CALL item(sal_Int32 index) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL item(sal_Int32 index) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/unoxml/source/dom/comment.cxx b/unoxml/source/dom/comment.cxx index 325e9d10eb48..b6a1da8a9221 100644 --- a/unoxml/source/dom/comment.cxx +++ b/unoxml/source/dom/comment.cxx @@ -21,6 +21,9 @@ #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::sax; namespace DOM { diff --git a/unoxml/source/dom/comment.hxx b/unoxml/source/dom/comment.hxx index db2facdee0e3..6280c1886e70 100644 --- a/unoxml/source/dom/comment.hxx +++ b/unoxml/source/dom/comment.hxx @@ -25,13 +25,9 @@ #include <characterdata.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef ::cppu::ImplInheritanceHelper1< CCharacterData, XComment > + typedef ::cppu::ImplInheritanceHelper1< CCharacterData, css::xml::dom::XComment > CComment_Base; class CComment @@ -46,44 +42,44 @@ namespace DOM public: - virtual void saxify(const Reference< XDocumentHandler >& i_xHandler) SAL_OVERRIDE; + virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler >& i_xHandler) SAL_OVERRIDE; // --- delegations for XCharacterData virtual void SAL_CALL appendData(const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::appendData(arg); } virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::deleteData(offset, count); } - virtual OUString SAL_CALL getData() throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual OUString SAL_CALL getData() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getData(); } - virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual sal_Int32 SAL_CALL getLength() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getLength(); } virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::insertData(offset, arg); } virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::replaceData(offset, count, arg); } virtual void SAL_CALL setData(const OUString& data) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::setData(data); } virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::subStringData(offset, count); } @@ -91,125 +87,125 @@ namespace DOM // --- overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CCharacterData::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::setNodeValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::setPrefix(prefix); } diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx index b0697e6f1663..40b3ce71a855 100644 --- a/unoxml/source/dom/document.cxx +++ b/unoxml/source/dom/document.cxx @@ -45,6 +45,13 @@ #include <com/sun/star/xml/sax/FastToken.hpp> #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> +using namespace css; +using namespace css::io; +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::dom::events; +using namespace css::xml::sax; + namespace DOM { static xmlNodePtr lcl_getDocumentType(xmlDocPtr const i_pDocument) @@ -988,7 +995,7 @@ namespace DOM return Reference< XEvent >(pEvent); } - // ::com::sun::star::xml::sax::XSAXSerializable + // css::xml::sax::XSAXSerializable void SAL_CALL CDocument::serialize( const Reference< XDocumentHandler >& i_xHandler, const Sequence< beans::StringPair >& i_rNamespaces) @@ -1016,7 +1023,7 @@ namespace DOM saxify(i_xHandler); } - // ::com::sun::star::xml::sax::XFastSAXSerializable + // css::xml::sax::XFastSAXSerializable void SAL_CALL CDocument::fastSerialize( const Reference< XFastDocumentHandler >& i_xHandler, const Reference< XFastTokenHandler >& i_xTokenHandler, const Sequence< beans::StringPair >& i_rNamespaces, diff --git a/unoxml/source/dom/document.hxx b/unoxml/source/dom/document.hxx index a57280d04ce0..aef573fa6c94 100644 --- a/unoxml/source/dom/document.hxx +++ b/unoxml/source/dom/document.hxx @@ -48,15 +48,6 @@ #include "node.hxx" - -using namespace std; -using namespace com::sun::star; -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::sax; -using namespace com::sun::star::io; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::dom::events; - namespace DOM { namespace events { @@ -66,9 +57,9 @@ namespace DOM class CElement; typedef ::cppu::ImplInheritanceHelper6< - CNode, XDocument, XDocumentEvent, - XActiveDataControl, XActiveDataSource, - XSAXSerializable, XFastSAXSerializable> + CNode, css::xml::dom::XDocument, css::xml::dom::events::XDocumentEvent, + css::io::XActiveDataControl, css::io::XActiveDataSource, + css::xml::sax::XSAXSerializable, css::xml::sax::XFastSAXSerializable> CDocument_Base; class CDocument @@ -84,12 +75,12 @@ namespace DOM xmlDocPtr const m_aDocPtr; // datacontrol/source state - typedef set< Reference< XStreamListener > > listenerlist_t; + typedef std::set< css::uno::Reference< css::io::XStreamListener > > listenerlist_t; listenerlist_t m_streamListeners; - Reference< XOutputStream > m_rOutputStream; + css::uno::Reference< css::io::XOutputStream > m_rOutputStream; typedef std::map< const xmlNodePtr, - ::std::pair< WeakReference<XNode>, CNode* > > nodemap_t; + ::std::pair< css::uno::WeakReference<css::xml::dom::XNode>, CNode* > > nodemap_t; nodemap_t m_NodeMap; ::std::auto_ptr<events::CEventDispatcher> const m_pEventDispatcher; @@ -118,271 +109,271 @@ namespace DOM virtual CDocument & GetOwnerDocument() SAL_OVERRIDE; - virtual void saxify(const Reference< XDocumentHandler >& i_xHandler) SAL_OVERRIDE; + virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler >& i_xHandler) SAL_OVERRIDE; virtual void fastSaxify( Context& rContext ) SAL_OVERRIDE; - virtual bool IsChildTypeAllowed(NodeType const nodeType) SAL_OVERRIDE; + virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType) SAL_OVERRIDE; /** Creates an Attr of the given name. */ - virtual Reference< XAttr > SAL_CALL createAttribute(const OUString& name) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL createAttribute(const OUString& name) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Creates an attribute of the given qualified name and namespace URI. */ - virtual Reference< XAttr > SAL_CALL createAttributeNS(const OUString& namespaceURI, const OUString& qualifiedName) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL createAttributeNS(const OUString& namespaceURI, const OUString& qualifiedName) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Creates a CDATASection node whose value is the specified string. */ - virtual Reference< XCDATASection > SAL_CALL createCDATASection(const OUString& data) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XCDATASection > SAL_CALL createCDATASection(const OUString& data) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Creates a Comment node given the specified string. */ - virtual Reference< XComment > SAL_CALL createComment(const OUString& data) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XComment > SAL_CALL createComment(const OUString& data) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Creates an empty DocumentFragment object. */ - virtual Reference< XDocumentFragment > SAL_CALL createDocumentFragment() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDocumentFragment > SAL_CALL createDocumentFragment() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Creates an element of the type specified. */ - virtual Reference< XElement > SAL_CALL createElement(const OUString& tagName) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XElement > SAL_CALL createElement(const OUString& tagName) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Creates an element of the given qualified name and namespace URI. */ - virtual Reference< XElement > SAL_CALL createElementNS(const OUString& namespaceURI, const OUString& qualifiedName) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XElement > SAL_CALL createElementNS(const OUString& namespaceURI, const OUString& qualifiedName) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Creates an EntityReference object. */ - virtual Reference< XEntityReference > SAL_CALL createEntityReference(const OUString& name) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XEntityReference > SAL_CALL createEntityReference(const OUString& name) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Creates a ProcessingInstruction node given the specified name and data strings. */ - virtual Reference< XProcessingInstruction > SAL_CALL createProcessingInstruction( + virtual css::uno::Reference< css::xml::dom::XProcessingInstruction > SAL_CALL createProcessingInstruction( const OUString& target, const OUString& data) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Creates a Text node given the specified string. */ - virtual Reference< XText > SAL_CALL createTextNode(const OUString& data) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XText > SAL_CALL createTextNode(const OUString& data) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The Document Type Declaration (see DocumentType) associated with this document. */ - virtual Reference< XDocumentType > SAL_CALL getDoctype() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDocumentType > SAL_CALL getDoctype() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** This is a convenience attribute that allows direct access to the child node that is the root element of the document. */ - virtual Reference< XElement > SAL_CALL getDocumentElement() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XElement > SAL_CALL getDocumentElement() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns the Element whose ID is given by elementId. */ - virtual Reference< XElement > SAL_CALL getElementById(const OUString& elementId) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XElement > SAL_CALL getElementById(const OUString& elementId) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns a NodeList of all the Elements with a given tag name in the order in which they are encountered in a preorder traversal of the Document tree. */ - virtual Reference< XNodeList > SAL_CALL getElementsByTagName(const OUString& tagname) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getElementsByTagName(const OUString& tagname) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the Document tree. */ - virtual Reference< XNodeList > SAL_CALL getElementsByTagNameNS(const OUString& namespaceURI, const OUString& localName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getElementsByTagNameNS(const OUString& namespaceURI, const OUString& localName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The DOMImplementation object that handles this document. */ - virtual Reference< XDOMImplementation > SAL_CALL getImplementation() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDOMImplementation > SAL_CALL getImplementation() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Imports a node from another document to this document. */ - virtual Reference< XNode > SAL_CALL importNode(const Reference< XNode >& importedNode, sal_Bool deep) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL importNode(const css::uno::Reference< css::xml::dom::XNode >& importedNode, sal_Bool deep) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; // XDocumentEvent - virtual Reference< XEvent > SAL_CALL createEvent(const OUString& eventType) throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::events::XEvent > SAL_CALL createEvent(const OUString& eventType) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XActiveDataControl, // see http://api.libreoffice.org/docs/common/ref/com/sun/star/io/XActiveDataControl.html - virtual void SAL_CALL addListener(const Reference< XStreamListener >& aListener ) throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL removeListener(const Reference< XStreamListener >& aListener ) throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL start() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL terminate() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL addListener(const css::uno::Reference< css::io::XStreamListener >& aListener ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removeListener(const css::uno::Reference< css::io::XStreamListener >& aListener ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL start() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL terminate() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XActiveDataSource // see http://api.libreoffice.org/docs/common/ref/com/sun/star/io/XActiveDataSource.html - virtual void SAL_CALL setOutputStream( const Reference< XOutputStream >& aStream ) throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XOutputStream > SAL_CALL getOutputStream() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setOutputStream( const css::uno::Reference< css::io::XOutputStream >& aStream ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::io::XOutputStream > SAL_CALL getOutputStream() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ---- resolve uno inheritance problems... // overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE; - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setNodeValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setPrefix(prefix); } - // ::com::sun::star::xml::sax::XSAXSerializable + // css::xml::sax::XSAXSerializable virtual void SAL_CALL serialize( - const Reference< XDocumentHandler >& i_xHandler, - const Sequence< beans::StringPair >& i_rNamespaces) - throw (RuntimeException, SAXException, std::exception) SAL_OVERRIDE; - - // ::com::sun::star::xml::sax::XFastSAXSerializable - virtual void SAL_CALL fastSerialize( const Reference< XFastDocumentHandler >& handler, - const Reference< XFastTokenHandler >& tokenHandler, - const Sequence< beans::StringPair >& i_rNamespaces, - const Sequence< beans::Pair< OUString, sal_Int32 > >& namespaces ) - throw (SAXException, RuntimeException, std::exception) SAL_OVERRIDE; + const css::uno::Reference< css::xml::sax::XDocumentHandler >& i_xHandler, + const css::uno::Sequence< css::beans::StringPair >& i_rNamespaces) + throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE; + + // css::xml::sax::XFastSAXSerializable + virtual void SAL_CALL fastSerialize( const css::uno::Reference< css::xml::sax::XFastDocumentHandler >& handler, + const css::uno::Reference< css::xml::sax::XFastTokenHandler >& tokenHandler, + const css::uno::Sequence< css::beans::StringPair >& i_rNamespaces, + const css::uno::Sequence< css::beans::Pair< OUString, sal_Int32 > >& namespaces ) + throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx index c57ff627b35f..e404a1952b8c 100644 --- a/unoxml/source/dom/documentbuilder.cxx +++ b/unoxml/source/dom/documentbuilder.cxx @@ -45,11 +45,15 @@ #include <node.hxx> #include <document.hxx> - -using ::com::sun::star::xml::sax::InputSource; +using namespace css::io; +using namespace css::lang; +using namespace css::ucb; +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::sax; using namespace ucbhelper; -using namespace ::com::sun::star::ucb; -using ::com::sun::star::task::XInteractionHandler; +using css::task::XInteractionHandler; +using css::xml::sax::InputSource; namespace DOM @@ -59,7 +63,7 @@ namespace DOM { public: virtual InputSource SAL_CALL resolveEntity( const OUString& sPublicId, const OUString& sSystemId ) - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { InputSource is; is.sPublicId = sPublicId; @@ -73,7 +77,7 @@ namespace DOM Content aContent(sSystemId, aEnvironment, comphelper::getProcessComponentContext()); is.aInputStream = aContent.openStream(); - } catch (const com::sun::star::uno::Exception&) { + } catch (const css::uno::Exception&) { OSL_FAIL("exception in default entity resolver"); is.aInputStream.clear(); } @@ -205,7 +209,7 @@ namespace DOM // copy bytes to the provided buffer memcpy(buffer, chunk.getConstArray(), nread); return nread; - } catch (const com::sun::star::uno::Exception& ex) { + } catch (const css::uno::Exception& ex) { (void) ex; OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr()); return -1; @@ -225,7 +229,7 @@ namespace DOM if (pctx->freeOnClose) delete pctx; return 0; - } catch (const com::sun::star::uno::Exception& ex) { + } catch (const css::uno::Exception& ex) { (void) ex; OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr()); return -1; @@ -297,7 +301,7 @@ namespace DOM void throwEx(xmlParserCtxtPtr ctxt) { - com::sun::star::xml::sax::SAXParseException saxex; + css::xml::sax::SAXParseException saxex; saxex.Message = make_error_message(ctxt); saxex.LineNumber = static_cast<sal_Int32>(ctxt->lastError.line); saxex.ColumnNumber = static_cast<sal_Int32>(ctxt->lastError.int2); diff --git a/unoxml/source/dom/documentbuilder.hxx b/unoxml/source/dom/documentbuilder.hxx index ac47b1a07f37..a4b3bdc1b759 100644 --- a/unoxml/source/dom/documentbuilder.hxx +++ b/unoxml/source/dom/documentbuilder.hxx @@ -39,18 +39,11 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> - -using namespace com::sun::star::uno; -using namespace com::sun::star::lang; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::sax; -using namespace com::sun::star::io; - namespace DOM { typedef ::cppu::WeakImplHelper2 - < XDocumentBuilder - , ::com::sun::star::lang::XServiceInfo + < css::xml::dom::XDocumentBuilder + , css::lang::XServiceInfo > CDocumentBuilder_Base; class CDocumentBuilder @@ -58,98 +51,98 @@ namespace DOM { private: ::osl::Mutex m_Mutex; - Reference< ::com::sun::star::lang::XMultiServiceFactory > const + css::uno::Reference< css::lang::XMultiServiceFactory > const m_xFactory; - Reference< XEntityResolver > m_xEntityResolver; - Reference< XErrorHandler > m_xErrorHandler; + css::uno::Reference< css::xml::sax::XEntityResolver > m_xEntityResolver; + css::uno::Reference< css::xml::sax::XErrorHandler > m_xErrorHandler; public: // ctor CDocumentBuilder( - Reference< ::com::sun::star::lang::XMultiServiceFactory > const& + css::uno::Reference< css::lang::XMultiServiceFactory > const& xFactory); // call for factory - static Reference< XInterface > getInstance( - Reference< ::com::sun::star::lang::XMultiServiceFactory > const& + static css::uno::Reference< XInterface > getInstance( + css::uno::Reference< css::lang::XMultiServiceFactory > const& xFactory); // static helpers for service info and component management static const char* aImplementationName; static const char* aSupportedServiceNames[]; static OUString _getImplementationName(); - static Sequence< OUString > _getSupportedServiceNames(); - static Reference< XInterface > _getInstance( - Reference< ::com::sun::star::lang::XMultiServiceFactory > const& + static css::uno::Sequence< OUString > _getSupportedServiceNames(); + static css::uno::Reference< XInterface > _getInstance( + css::uno::Reference< css::lang::XMultiServiceFactory > const& rSMgr); // XServiceInfo virtual OUString SAL_CALL getImplementationName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames () - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Obtain an instance of a DOMImplementation object. */ - virtual Reference< XDOMImplementation > SAL_CALL getDOMImplementation() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDOMImplementation > SAL_CALL getDOMImplementation() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Indicates whether or not this parser is configured to understand namespaces. */ virtual sal_Bool SAL_CALL isNamespaceAware() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Indicates whether or not this parser is configured to validate XML documents. */ virtual sal_Bool SAL_CALL isValidating() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Obtain a new instance of a DOM Document object to build a DOM tree with. */ - virtual Reference< XDocument > SAL_CALL newDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL newDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Parse the content of the given InputStream as an XML document and return a new DOM Document object. */ - virtual Reference< XDocument > SAL_CALL parse(const Reference< XInputStream >& is) - throw (RuntimeException, SAXParseException, IOException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL parse(const css::uno::Reference< css::io::XInputStream >& is) + throw (css::uno::RuntimeException, css::xml::sax::SAXParseException, css::io::IOException, std::exception) SAL_OVERRIDE; /** Parse the content of the given URI as an XML document and return a new DOM Document object. */ - virtual Reference< XDocument > SAL_CALL parseURI(const OUString& uri) - throw (RuntimeException, SAXParseException, IOException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL parseURI(const OUString& uri) + throw (css::uno::RuntimeException, css::xml::sax::SAXParseException, css::io::IOException, std::exception) SAL_OVERRIDE; /** Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed. */ - virtual void SAL_CALL setEntityResolver(const Reference< XEntityResolver >& er) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setEntityResolver(const css::uno::Reference< css::xml::sax::XEntityResolver >& er) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XEntityResolver > SAL_CALL getEntityResolver() - throw (RuntimeException); + virtual css::uno::Reference< css::xml::sax::XEntityResolver > SAL_CALL getEntityResolver() + throw (css::uno::RuntimeException); /** Specify the ErrorHandler to be used to report errors present in the XML document to be parsed. */ - virtual void SAL_CALL setErrorHandler(const Reference< XErrorHandler >& eh) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setErrorHandler(const css::uno::Reference< css::xml::sax::XErrorHandler >& eh) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/unoxml/source/dom/documentfragment.cxx b/unoxml/source/dom/documentfragment.cxx index e885cb52ed6d..9b67514809ee 100644 --- a/unoxml/source/dom/documentfragment.cxx +++ b/unoxml/source/dom/documentfragment.cxx @@ -19,6 +19,9 @@ #include <documentfragment.hxx> +using namespace css::uno; +using namespace css::xml::dom; + namespace DOM { CDocumentFragment::CDocumentFragment( diff --git a/unoxml/source/dom/documentfragment.hxx b/unoxml/source/dom/documentfragment.hxx index 39bb72081bab..809c37df39ee 100644 --- a/unoxml/source/dom/documentfragment.hxx +++ b/unoxml/source/dom/documentfragment.hxx @@ -25,13 +25,9 @@ #include <node.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef ::cppu::ImplInheritanceHelper1< CNode, XDocumentFragment > + typedef ::cppu::ImplInheritanceHelper1< CNode, css::xml::dom::XDocumentFragment > CDocumentFragment_Base; class CDocumentFragment @@ -46,129 +42,129 @@ namespace DOM xmlNodePtr const pNode); public: - virtual bool IsChildTypeAllowed(NodeType const nodeType) SAL_OVERRIDE; + virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType) SAL_OVERRIDE; // ---- resolve uno inheritance problems... // overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setNodeValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setPrefix(prefix); } diff --git a/unoxml/source/dom/documenttype.cxx b/unoxml/source/dom/documenttype.cxx index fcdc0d4ded3b..aa71ebc7e64a 100644 --- a/unoxml/source/dom/documenttype.cxx +++ b/unoxml/source/dom/documenttype.cxx @@ -24,6 +24,8 @@ #include <entitiesmap.hxx> #include <notationsmap.hxx> +using namespace css::uno; +using namespace css::xml::dom; namespace DOM { @@ -41,11 +43,11 @@ namespace DOM A NamedNodeMap containing the general entities, both external and internal, declared in the DTD. */ - Reference< XNamedNodeMap > SAL_CALL CDocumentType::getEntities() throw (RuntimeException, std::exception) + css::uno::Reference< XNamedNodeMap > SAL_CALL CDocumentType::getEntities() throw (RuntimeException, std::exception) { ::osl::MutexGuard const g(m_rMutex); - Reference< XNamedNodeMap > aMap; + css::uno::Reference< XNamedNodeMap > aMap; if (m_aDtdPtr != NULL) { aMap.set(new CEntitiesMap(this)); @@ -82,11 +84,11 @@ namespace DOM /** A NamedNodeMap containing the notations declared in the DTD. */ - Reference< XNamedNodeMap > SAL_CALL CDocumentType::getNotations() throw (RuntimeException, std::exception) + css::uno::Reference< XNamedNodeMap > SAL_CALL CDocumentType::getNotations() throw (RuntimeException, std::exception) { ::osl::MutexGuard const g(m_rMutex); - Reference< XNamedNodeMap > aMap; + css::uno::Reference< XNamedNodeMap > aMap; if (m_aDtdPtr != NULL) { aMap.set(new CNotationsMap(this)); diff --git a/unoxml/source/dom/documenttype.hxx b/unoxml/source/dom/documenttype.hxx index 6a4aefc41406..5523eb428481 100644 --- a/unoxml/source/dom/documenttype.hxx +++ b/unoxml/source/dom/documenttype.hxx @@ -31,13 +31,9 @@ #include <node.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef ::cppu::ImplInheritanceHelper1< CNode, XDocumentType > + typedef ::cppu::ImplInheritanceHelper1< CNode, css::xml::dom::XDocumentType > CDocumentType_Base; class CDocumentType @@ -58,155 +54,155 @@ namespace DOM A NamedNodeMap containing the general entities, both external and internal, declared in the DTD. */ - virtual Reference< XNamedNodeMap > SAL_CALL getEntities() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getEntities() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The internal subset as a string, or null if there is none. */ - virtual OUString SAL_CALL getInternalSubset() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getInternalSubset() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The name of DTD; i.e., the name immediately following the DOCTYPE keyword. */ - virtual OUString SAL_CALL getName() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** A NamedNodeMap containing the notations declared in the DTD. */ - virtual Reference< XNamedNodeMap > SAL_CALL getNotations() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getNotations() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The public identifier of the external subset. */ - virtual OUString SAL_CALL getPublicId() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getPublicId() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The system identifier of the external subset. */ - virtual OUString SAL_CALL getSystemId() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getSystemId() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ---- resolve uno inheritance problems... // overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setNodeValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setPrefix(prefix); } diff --git a/unoxml/source/dom/domimplementation.cxx b/unoxml/source/dom/domimplementation.cxx index 677e13cf2c50..71f9b6c19ef5 100644 --- a/unoxml/source/dom/domimplementation.cxx +++ b/unoxml/source/dom/domimplementation.cxx @@ -21,6 +21,8 @@ #include <rtl/instance.hxx> +using namespace css::uno; +using namespace css::xml::dom; namespace DOM { diff --git a/unoxml/source/dom/domimplementation.hxx b/unoxml/source/dom/domimplementation.hxx index b29b4cb32bd4..4ffd1875c6d2 100644 --- a/unoxml/source/dom/domimplementation.hxx +++ b/unoxml/source/dom/domimplementation.hxx @@ -29,14 +29,10 @@ #include <cppuhelper/implbase1.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { class CDOMImplementation - : public cppu::WeakImplHelper1< XDOMImplementation > + : public cppu::WeakImplHelper1< css::xml::dom::XDOMImplementation > { public: @@ -49,20 +45,20 @@ namespace DOM /** Creates a DOM Document object of the specified type with its document element. */ - virtual Reference <XDocument > SAL_CALL createDocument(const OUString& namespaceURI, const OUString& qualifiedName, const Reference< XDocumentType >& doctype) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL createDocument(const OUString& namespaceURI, const OUString& qualifiedName, const css::uno::Reference< css::xml::dom::XDocumentType >& doctype) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Creates an empty DocumentType node. */ - virtual Reference< XDocumentType > SAL_CALL createDocumentType(const OUString& qualifiedName, const OUString& publicId, const OUString& systemId) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDocumentType > SAL_CALL createDocumentType(const OUString& qualifiedName, const OUString& publicId, const OUString& systemId) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Test if the DOM implementation implements a specific feature. */ virtual sal_Bool SAL_CALL hasFeature(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } #endif diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx index 4e98e5abf807..0ed516dd10ef 100644 --- a/unoxml/source/dom/element.cxx +++ b/unoxml/source/dom/element.cxx @@ -37,6 +37,10 @@ #include "../events/mutationevent.hxx" +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::dom::events; +using namespace css::xml::sax; namespace DOM { diff --git a/unoxml/source/dom/element.hxx b/unoxml/source/dom/element.hxx index f14eebd6943a..ff27d3d9dcc5 100644 --- a/unoxml/source/dom/element.hxx +++ b/unoxml/source/dom/element.hxx @@ -30,13 +30,9 @@ #include <node.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef ::cppu::ImplInheritanceHelper1<CNode, XElement > CElement_Base; + typedef ::cppu::ImplInheritanceHelper1<CNode, css::xml::dom::XElement > CElement_Base; class CElement : public CElement_Base @@ -44,8 +40,8 @@ namespace DOM private: friend class CDocument; - Reference< XAttr > setAttributeNode_Impl_Lock( - Reference< XAttr > const& xNewAttr, bool const bNS); + css::uno::Reference< css::xml::dom::XAttr > setAttributeNode_Impl_Lock( + css::uno::Reference< css::xml::dom::XAttr > const& xNewAttr, bool const bNS); protected: CElement(CDocument const& rDocument, ::osl::Mutex const& rMutex, @@ -53,238 +49,238 @@ namespace DOM public: - virtual void saxify(const Reference< XDocumentHandler >& i_xHandler) SAL_OVERRIDE; + virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler >& i_xHandler) SAL_OVERRIDE; virtual void fastSaxify( Context& i_rContext ) SAL_OVERRIDE; - virtual bool IsChildTypeAllowed(NodeType const nodeType) SAL_OVERRIDE; + virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType) SAL_OVERRIDE; /** Retrieves an attribute value by name. */ virtual OUString SAL_CALL getAttribute(const OUString& name) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Retrieves an attribute node by name. */ - virtual Reference< XAttr > SAL_CALL getAttributeNode(const OUString& name) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL getAttributeNode(const OUString& name) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Retrieves an Attr node by local name and namespace URI. */ - virtual Reference< XAttr > SAL_CALL getAttributeNodeNS(const OUString& namespaceURI, const OUString& localName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL getAttributeNodeNS(const OUString& namespaceURI, const OUString& localName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Retrieves an attribute value by local name and namespace URI. */ virtual OUString SAL_CALL getAttributeNS(const OUString& namespaceURI, const OUString& localName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns a NodeList of all descendant Elements with a given tag name, in the order in which they are encountered in a preorder traversal of this Element tree. */ - virtual Reference< XNodeList > SAL_CALL getElementsByTagName(const OUString& name) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getElementsByTagName(const OUString& name) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns a NodeList of all the descendant Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of this Element tree. */ - virtual Reference< XNodeList > SAL_CALL getElementsByTagNameNS(const OUString& namespaceURI, + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getElementsByTagNameNS(const OUString& namespaceURI, const OUString& localName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The name of the element. */ virtual OUString SAL_CALL getTagName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise. */ virtual sal_Bool SAL_CALL hasAttribute(const OUString& name) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise. */ virtual sal_Bool SAL_CALL hasAttributeNS(const OUString& namespaceURI, const OUString& localName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Removes an attribute by name. */ virtual void SAL_CALL removeAttribute(const OUString& name) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Removes the specified attribute node. */ - virtual Reference< XAttr > SAL_CALL removeAttributeNode(const Reference< XAttr >& oldAttr) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL removeAttributeNode(const css::uno::Reference< css::xml::dom::XAttr >& oldAttr) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Removes an attribute by local name and namespace URI. */ virtual void SAL_CALL removeAttributeNS(const OUString& namespaceURI, const OUString& localName) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Adds a new attribute. */ virtual void SAL_CALL setAttribute(const OUString& name, const OUString& value) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Adds a new attribute node. */ - virtual Reference< XAttr > SAL_CALL setAttributeNode(const Reference< XAttr >& newAttr) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL setAttributeNode(const css::uno::Reference< css::xml::dom::XAttr >& newAttr) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Adds a new attribute. */ - virtual Reference< XAttr > SAL_CALL setAttributeNodeNS(const Reference< XAttr >& newAttr) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL setAttributeNodeNS(const css::uno::Reference< css::xml::dom::XAttr >& newAttr) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Adds a new attribute. */ virtual void SAL_CALL setAttributeNS( const OUString& namespaceURI, const OUString& qualifiedName, const OUString& value) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** sets the element name */ virtual void SAL_CALL setElementName(const OUString& elementName) - throw (RuntimeException, DOMException); + throw (css::uno::RuntimeException, css::xml::dom::DOMException); // overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // resolve uno inheritance problems... - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::cloneNode(deep); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setNodeValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setPrefix(prefix); } diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx index 4490ecd83b61..98d150b2436e 100644 --- a/unoxml/source/dom/elementlist.cxx +++ b/unoxml/source/dom/elementlist.cxx @@ -24,6 +24,9 @@ #include <element.hxx> #include <document.hxx> +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::dom::events; namespace DOM { diff --git a/unoxml/source/dom/elementlist.hxx b/unoxml/source/dom/elementlist.hxx index f8be08b6c1ad..3cde5bce6fef 100644 --- a/unoxml/source/dom/elementlist.hxx +++ b/unoxml/source/dom/elementlist.hxx @@ -38,11 +38,6 @@ #include <cppuhelper/implbase2.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::dom::events; - namespace DOM { class CElement; @@ -50,8 +45,8 @@ namespace DOM typedef std::vector< xmlNodePtr > nodevector_t; class CElementList - : public cppu::WeakImplHelper2< XNodeList, - com::sun::star::xml::dom::events::XEventListener > + : public cppu::WeakImplHelper2< css::xml::dom::XNodeList, + css::xml::dom::events::XEventListener > { private: ::rtl::Reference<CElement> const m_pElement; @@ -72,16 +67,16 @@ namespace DOM /** The number of nodes in the list. */ - virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getLength() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns the indexth item in the collection. */ - virtual Reference< XNode > SAL_CALL item(sal_Int32 index) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL item(sal_Int32 index) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XEventListener - virtual void SAL_CALL handleEvent(const Reference< XEvent >& evt) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL handleEvent(const css::uno::Reference< css::xml::dom::events::XEvent >& evt) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/unoxml/source/dom/entitiesmap.cxx b/unoxml/source/dom/entitiesmap.cxx index 88d09fb26cc0..ca929d3bdb2f 100644 --- a/unoxml/source/dom/entitiesmap.cxx +++ b/unoxml/source/dom/entitiesmap.cxx @@ -21,6 +21,8 @@ #include <documenttype.hxx> +using namespace css::uno; +using namespace css::xml::dom; namespace DOM { diff --git a/unoxml/source/dom/entitiesmap.hxx b/unoxml/source/dom/entitiesmap.hxx index 75d9235569bd..fc7164c0ca2c 100644 --- a/unoxml/source/dom/entitiesmap.hxx +++ b/unoxml/source/dom/entitiesmap.hxx @@ -29,16 +29,12 @@ #include <cppuhelper/implbase1.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { class CDocumentType; class CEntitiesMap - : public cppu::WeakImplHelper1< XNamedNodeMap > + : public cppu::WeakImplHelper1< css::xml::dom::XNamedNodeMap > { private: ::rtl::Reference<CDocumentType> const m_pDocType; @@ -49,53 +45,53 @@ namespace DOM /** The number of nodes in this map. */ - virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getLength() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Retrieves a node specified by local name */ - virtual Reference< XNode > SAL_CALL - getNamedItem(const OUString& name) throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + getNamedItem(const OUString& name) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Retrieves a node specified by local name and namespace URI. */ - virtual Reference< XNode > SAL_CALL getNamedItemNS( + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNamedItemNS( OUString const& namespaceURI, OUString const& localName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns the indexth item in the map. */ - virtual Reference< XNode > SAL_CALL - item(sal_Int32 index) throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + item(sal_Int32 index) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Removes a node specified by name. */ - virtual Reference< XNode > SAL_CALL - removeNamedItem(OUString const& name) throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + removeNamedItem(OUString const& name) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** // Removes a node specified by local name and namespace URI. */ - virtual Reference< XNode > SAL_CALL removeNamedItemNS( + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeNamedItemNS( OUString const& namespaceURI, OUString const& localName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** // Adds a node using its nodeName attribute. */ - virtual Reference< XNode > SAL_CALL - setNamedItem(Reference< XNode > const& arg) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + setNamedItem(css::uno::Reference< css::xml::dom::XNode > const& arg) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Adds a node using its namespaceURI and localName. */ - virtual Reference< XNode > SAL_CALL - setNamedItemNS(Reference< XNode > const& arg) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + setNamedItemNS(css::uno::Reference< css::xml::dom::XNode > const& arg) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx index 7a56cfb6bc85..45c8d1682341 100644 --- a/unoxml/source/dom/entity.cxx +++ b/unoxml/source/dom/entity.cxx @@ -21,6 +21,8 @@ #include <string.h> +using namespace css::uno; +using namespace css::xml::dom; namespace DOM { diff --git a/unoxml/source/dom/entity.hxx b/unoxml/source/dom/entity.hxx index c1bc55ba08fd..501b596b9b6b 100644 --- a/unoxml/source/dom/entity.hxx +++ b/unoxml/source/dom/entity.hxx @@ -30,13 +30,9 @@ #include <node.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef ::cppu::ImplInheritanceHelper1< CNode, XEntity > CEntity_Base; + typedef ::cppu::ImplInheritanceHelper1< CNode, css::xml::dom::XEntity > CEntity_Base; class CEntity : public CEntity_Base @@ -52,144 +48,144 @@ namespace DOM xmlEntityPtr const pEntity); public: - virtual bool IsChildTypeAllowed(NodeType const nodeType) SAL_OVERRIDE; + virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType) SAL_OVERRIDE; /** For unparsed entities, the name of the notation for the entity. */ - virtual OUString SAL_CALL getNotationName() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getNotationName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The public identifier associated with the entity, if specified. */ - virtual OUString SAL_CALL getPublicId() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getPublicId() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The system identifier associated with the entity, if specified. */ - virtual OUString SAL_CALL getSystemId() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getSystemId() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ---- resolve uno inheritance problems... // overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setNodeValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setPrefix(prefix); } diff --git a/unoxml/source/dom/entityreference.cxx b/unoxml/source/dom/entityreference.cxx index e8f2a3fe9b23..8b98c70584d4 100644 --- a/unoxml/source/dom/entityreference.cxx +++ b/unoxml/source/dom/entityreference.cxx @@ -21,6 +21,9 @@ #include <string.h> +using namespace css::uno; +using namespace css::xml::dom; + namespace DOM { CEntityReference::CEntityReference( diff --git a/unoxml/source/dom/entityreference.hxx b/unoxml/source/dom/entityreference.hxx index a732e3aab6fa..7f154e16e2b1 100644 --- a/unoxml/source/dom/entityreference.hxx +++ b/unoxml/source/dom/entityreference.hxx @@ -27,13 +27,9 @@ #include <node.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef ::cppu::ImplInheritanceHelper1< CNode, XEntityReference > + typedef ::cppu::ImplInheritanceHelper1< CNode, css::xml::dom::XEntityReference > CEntityReference_Base; class CEntityReference @@ -48,129 +44,129 @@ namespace DOM xmlNodePtr const pNode); public: - virtual bool IsChildTypeAllowed(NodeType const nodeType) SAL_OVERRIDE; + virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType) SAL_OVERRIDE; // ---- resolve uno inheritance problems... // overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setNodeValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setPrefix(prefix); } diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx index ac386c3b5eb0..aab0ffe9430b 100644 --- a/unoxml/source/dom/node.cxx +++ b/unoxml/source/dom/node.cxx @@ -43,9 +43,11 @@ #include "../events/eventdispatcher.hxx" #include "../events/mutationevent.hxx" - - -using namespace ::com::sun::star; +using namespace css; +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::dom::events; +using namespace css::xml::sax; namespace { @@ -987,7 +989,7 @@ namespace DOM // --- XEventTarget void SAL_CALL CNode::addEventListener(const OUString& eventType, - const Reference< com::sun::star::xml::dom::events::XEventListener >& listener, + const Reference< css::xml::dom::events::XEventListener >& listener, sal_Bool useCapture) throw (RuntimeException, std::exception) { @@ -999,7 +1001,7 @@ namespace DOM } void SAL_CALL CNode::removeEventListener(const OUString& eventType, - const Reference< com::sun::star::xml::dom::events::XEventListener >& listener, + const Reference< css::xml::dom::events::XEventListener >& listener, sal_Bool useCapture) throw (RuntimeException, std::exception) { diff --git a/unoxml/source/dom/node.hxx b/unoxml/source/dom/node.hxx index b897f2278754..e04e0c3aee50 100644 --- a/unoxml/source/dom/node.hxx +++ b/unoxml/source/dom/node.hxx @@ -46,23 +46,15 @@ #include <boost/unordered_map.hpp> -using namespace sax_fastparser; -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::sax; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::dom::events; -using com::sun::star::lang::XUnoTunnel; - - namespace DOM { struct Context { - Context( const Reference< XFastDocumentHandler >& i_xHandler, - const Reference< XFastTokenHandler >& i_xTokenHandler ) : + Context( const css::uno::Reference< css::xml::sax::XFastDocumentHandler >& i_xHandler, + const css::uno::Reference< css::xml::sax::XFastTokenHandler >& i_xTokenHandler ) : maNamespaces( 1, std::vector<Namespace>() ), maNamespaceMap(101), - mxAttribList(new FastAttributeList(i_xTokenHandler)), + mxAttribList(new sax_fastparser::FastAttributeList(i_xTokenHandler)), mxCurrentHandler(i_xHandler), mxDocHandler(i_xHandler), mxTokenHandler(i_xTokenHandler) @@ -85,10 +77,10 @@ namespace DOM /// outer vector: xml context; inner vector: current NS NamespaceVectorType maNamespaces; NamespaceMapType maNamespaceMap; - ::rtl::Reference<FastAttributeList> mxAttribList; - Reference<XFastContextHandler> mxCurrentHandler; - Reference<XFastDocumentHandler> mxDocHandler; - Reference<XFastTokenHandler> mxTokenHandler; + ::rtl::Reference<sax_fastparser::FastAttributeList> mxAttribList; + css::uno::Reference<css::xml::sax::XFastContextHandler> mxCurrentHandler; + css::uno::Reference<css::xml::sax::XFastDocumentHandler> mxDocHandler; + css::uno::Reference<css::xml::sax::XFastTokenHandler> mxTokenHandler; }; void pushContext(Context& io_rContext); @@ -102,7 +94,7 @@ namespace DOM class CDocument; - class CNode : public cppu::WeakImplHelper3< XNode, XUnoTunnel, XEventTarget > + class CNode : public cppu::WeakImplHelper3< css::xml::dom::XNode, css::lang::XUnoTunnel, css::xml::dom::events::XEventTarget > { friend class CDocument; friend class CElement; @@ -112,7 +104,7 @@ namespace DOM bool m_bUnlinked; /// node has been removed from document protected: - NodeType const m_aNodeType; + css::xml::dom::NodeType const m_aNodeType; /// libxml node; NB: not const, because invalidate may reset it to 0! xmlNodePtr m_aNodePtr; @@ -121,7 +113,7 @@ namespace DOM // for initialization by classes derived through ImplInheritanceHelper CNode(CDocument const& rDocument, ::osl::Mutex const& rMutex, - NodeType const& reNodeType, xmlNodePtr const& rpNode); + css::xml::dom::NodeType const& reNodeType, xmlNodePtr const& rpNode); void invalidate(); void dispatchSubtreeModified(); @@ -130,150 +122,150 @@ namespace DOM virtual ~CNode(); - static CNode * GetImplementation(::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface> const& xNode); + static CNode * GetImplementation(css::uno::Reference< + css::uno::XInterface> const& xNode); xmlNodePtr GetNodePtr() { return m_aNodePtr; } virtual CDocument & GetOwnerDocument(); // recursively create SAX events - virtual void saxify(const Reference< XDocumentHandler >& i_xHandler); + virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler >& i_xHandler); // recursively create SAX events virtual void fastSaxify( Context& io_rContext ); // constrains child relationship between nodes based on type - virtual bool IsChildTypeAllowed(NodeType const nodeType); + virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType); // ---- DOM interfaces /** Adds the node newChild to the end of the list of children of this node. */ - virtual Reference< XNode > SAL_CALL - appendChild(Reference< XNode > const& xNewChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + appendChild(css::uno::Reference< css::xml::dom::XNode > const& xNewChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. */ - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise. */ - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** A NodeList that contains all children of this node. */ - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The first child of this node. */ - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The last child of this node. */ - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns the local part of the qualified name of this node. */ virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The namespace URI of this node, or null if it is unspecified. */ virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The node immediately following this node. */ - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The name of this node, depending on its type; see the table above. -- virtual implemented by actual node types */ virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** A code representing the type of the underlying object, as defined above. */ - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The value of this node, depending on its type; see the table above. -- virtual implemented by actual node types */ virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The Document object associated with this node. */ - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The parent of this node. */ - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The namespace prefix of this node, or null if it is unspecified. */ virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The node immediately preceding this node. */ - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns whether this node (if it is an element) has any attributes. */ virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns whether this node has any children. */ virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Inserts the node newChild before the existing child node refChild. */ - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Tests whether the DOM implementation implements a specific feature and that feature is supported by this node. */ virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Puts all Text nodes in the full depth of the sub-tree underneath this @@ -283,54 +275,54 @@ namespace DOM Text nodes nor empty Text nodes. */ virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Removes the child node indicated by oldChild from the list of children, and returns it. */ - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. */ - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** The value of this node, depending on its type; see the table above. */ virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; /** The namespace prefix of this node, or null if it is unspecified. */ virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; // --- XEventTarget virtual void SAL_CALL addEventListener(const OUString& eventType, - const Reference< XEventListener >& listener, + const css::uno::Reference< css::xml::dom::events::XEventListener >& listener, sal_Bool useCapture) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL removeEventListener(const OUString& eventType, - const Reference< XEventListener >& listener, + const css::uno::Reference< css::xml::dom::events::XEventListener >& listener, sal_Bool useCapture) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL dispatchEvent(const Reference< XEvent >& evt) - throw(RuntimeException, EventException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL dispatchEvent(const css::uno::Reference< css::xml::dom::events::XEvent >& evt) + throw(css::uno::RuntimeException, css::xml::dom::events::EventException, std::exception) SAL_OVERRIDE; // --- XUnoTunnel virtual ::sal_Int64 SAL_CALL - getSomething(Sequence< ::sal_Int8 > const& rId) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + getSomething(css::uno::Sequence< ::sal_Int8 > const& rId) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; /// eliminate redundant namespace declarations diff --git a/unoxml/source/dom/notation.cxx b/unoxml/source/dom/notation.cxx index e59f8d85bbc8..66b9657b6e73 100644 --- a/unoxml/source/dom/notation.cxx +++ b/unoxml/source/dom/notation.cxx @@ -21,6 +21,9 @@ #include <string.h> +using namespace css::uno; +using namespace css::xml::dom; + namespace DOM { CNotation::CNotation(CDocument const& rDocument, ::osl::Mutex const& rMutex, diff --git a/unoxml/source/dom/notation.hxx b/unoxml/source/dom/notation.hxx index bed459626fc7..50be07de89bd 100644 --- a/unoxml/source/dom/notation.hxx +++ b/unoxml/source/dom/notation.hxx @@ -27,13 +27,9 @@ #include <node.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef cppu::ImplInheritanceHelper1< CNode, XNotation > CNotation_Base; + typedef cppu::ImplInheritanceHelper1< CNode, css::xml::dom::XNotation > CNotation_Base; class CNotation : public CNotation_Base @@ -51,134 +47,134 @@ namespace DOM /** The public identifier of this notation. */ - virtual OUString SAL_CALL getPublicId() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getPublicId() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The system identifier of this notation. */ - virtual OUString SAL_CALL getSystemId() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getSystemId() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ---- resolve uno inheritance problems... // overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setNodeValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setPrefix(prefix); } diff --git a/unoxml/source/dom/notationsmap.cxx b/unoxml/source/dom/notationsmap.cxx index 090ffa88a942..0f12247309df 100644 --- a/unoxml/source/dom/notationsmap.cxx +++ b/unoxml/source/dom/notationsmap.cxx @@ -21,6 +21,8 @@ #include <documenttype.hxx> +using namespace css::uno; +using namespace css::xml::dom; namespace DOM { diff --git a/unoxml/source/dom/notationsmap.hxx b/unoxml/source/dom/notationsmap.hxx index 57a8e322c382..d740587e496d 100644 --- a/unoxml/source/dom/notationsmap.hxx +++ b/unoxml/source/dom/notationsmap.hxx @@ -29,16 +29,12 @@ #include <cppuhelper/implbase1.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { class CDocumentType; class CNotationsMap - : public cppu::WeakImplHelper1< XNamedNodeMap > + : public cppu::WeakImplHelper1< css::xml::dom::XNamedNodeMap > { private: ::rtl::Reference<CDocumentType> const m_pDocType; @@ -49,53 +45,53 @@ namespace DOM /** The number of nodes in this map. */ - virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getLength() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Retrieves a node specified by local name */ - virtual Reference< XNode > SAL_CALL - getNamedItem(OUString const& name) throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + getNamedItem(OUString const& name) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Retrieves a node specified by local name and namespace URI. */ - virtual Reference< XNode > SAL_CALL getNamedItemNS( + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNamedItemNS( OUString const& namespaceURI, OUString const& localName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns the indexth item in the map. */ - virtual Reference< XNode > SAL_CALL - item(sal_Int32 index) throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + item(sal_Int32 index) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Removes a node specified by name. */ - virtual Reference< XNode > SAL_CALL - removeNamedItem(OUString const& name) throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + removeNamedItem(OUString const& name) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** // Removes a node specified by local name and namespace URI. */ - virtual Reference< XNode > SAL_CALL removeNamedItemNS( + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeNamedItemNS( OUString const& namespaceURI, OUString const& localName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** // Adds a node using its nodeName attribute. */ - virtual Reference< XNode > SAL_CALL - setNamedItem(Reference< XNode > const& arg) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + setNamedItem(css::uno::Reference< css::xml::dom::XNode > const& arg) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Adds a node using its namespaceURI and localName. */ - virtual Reference< XNode > SAL_CALL - setNamedItemNS(Reference< XNode > const& arg) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL + setNamedItemNS(css::uno::Reference< css::xml::dom::XNode > const& arg) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/unoxml/source/dom/processinginstruction.cxx b/unoxml/source/dom/processinginstruction.cxx index b4b76d1b0000..79b2f1cdd157 100644 --- a/unoxml/source/dom/processinginstruction.cxx +++ b/unoxml/source/dom/processinginstruction.cxx @@ -23,6 +23,9 @@ #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::sax; namespace DOM { diff --git a/unoxml/source/dom/processinginstruction.hxx b/unoxml/source/dom/processinginstruction.hxx index 168b65176078..a052bcc5659e 100644 --- a/unoxml/source/dom/processinginstruction.hxx +++ b/unoxml/source/dom/processinginstruction.hxx @@ -27,13 +27,9 @@ #include <node.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef ::cppu::ImplInheritanceHelper1< CNode, XProcessingInstruction > + typedef ::cppu::ImplInheritanceHelper1< CNode, css::xml::dom::XProcessingInstruction > CProcessingInstruction_Base; class CProcessingInstruction @@ -49,142 +45,142 @@ namespace DOM public: - virtual void saxify(const Reference< XDocumentHandler >& i_xHandler) SAL_OVERRIDE; + virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler >& i_xHandler) SAL_OVERRIDE; /** The content of this processing instruction. */ - virtual OUString SAL_CALL getData() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getData() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The target of this processing instruction. */ - virtual OUString SAL_CALL getTarget() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getTarget() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** The content of this processing instruction. */ - virtual void SAL_CALL setData(const OUString& data) throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setData(const OUString& data) throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; // ---- resolve uno inheritance problems... // overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNodeValue() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setNodeValue(OUString const& rNodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE; - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getNodeType(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CNode::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CNode::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::replaceChild(newChild, oldChild); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CNode::setPrefix(prefix); } diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx index 7bb5ac9c0530..80100d238591 100644 --- a/unoxml/source/dom/saxbuilder.cxx +++ b/unoxml/source/dom/saxbuilder.cxx @@ -26,6 +26,11 @@ #include <comphelper/processfactory.hxx> #include <cppuhelper/supportsservice.hxx> +using namespace css::lang; +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::sax; + namespace DOM { Reference< XInterface > CSAXDocumentBuilder::_getInstance(const Reference< XMultiServiceFactory >& rSMgr) diff --git a/unoxml/source/dom/saxbuilder.hxx b/unoxml/source/dom/saxbuilder.hxx index a7d38378797c..4f2565c19b47 100644 --- a/unoxml/source/dom/saxbuilder.hxx +++ b/unoxml/source/dom/saxbuilder.hxx @@ -41,97 +41,89 @@ #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::sax; - -using com::sun::star::lang::XServiceInfo; -using com::sun::star::lang::XSingleServiceFactory; -using com::sun::star::lang::XMultiServiceFactory; - namespace DOM { - typedef std::stack< Reference< XNode > > NodeStack; + typedef std::stack< css::uno::Reference< css::xml::dom::XNode > > NodeStack; typedef std::map< OUString, OUString > NSMap; typedef std::map< OUString, OUString > AttrMap; typedef std::stack< NSMap > NSStack; class CSAXDocumentBuilder - : public ::cppu::WeakImplHelper2< XSAXDocumentBuilder2, XServiceInfo > + : public ::cppu::WeakImplHelper2< css::xml::dom::XSAXDocumentBuilder2, css::lang::XServiceInfo > { private: ::osl::Mutex m_Mutex; - const Reference< XMultiServiceFactory > m_aServiceManager; + const css::uno::Reference< css::lang::XMultiServiceFactory > m_aServiceManager; - SAXDocumentBuilderState m_aState; + css::xml::dom::SAXDocumentBuilderState m_aState; NodeStack m_aNodeStack; NSStack m_aNSStack; OUString resolvePrefix(const OUString& aPrefix); - Reference< XDocument > m_aDocument; - Reference< XDocumentFragment > m_aFragment; - Reference< XLocator > m_aLocator; + css::uno::Reference< css::xml::dom::XDocument > m_aDocument; + css::uno::Reference< css::xml::dom::XDocumentFragment > m_aFragment; + css::uno::Reference< css::xml::sax::XLocator > m_aLocator; public: // call for factory - static Reference< XInterface > getInstance(const Reference < XMultiServiceFactory >& xFactory); + static css::uno::Reference< XInterface > getInstance(const css::uno::Reference < css::lang::XMultiServiceFactory >& xFactory); // static helpers for service info and component management static const char* aImplementationName; static const char* aSupportedServiceNames[]; static OUString _getImplementationName(); - static Sequence< OUString > _getSupportedServiceNames(); - static Reference< XInterface > _getInstance(const Reference< XMultiServiceFactory >& rSMgr); + static css::uno::Sequence< OUString > _getSupportedServiceNames(); + static css::uno::Reference< XInterface > _getInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr); - CSAXDocumentBuilder(const Reference< XMultiServiceFactory >& mgr); + CSAXDocumentBuilder(const css::uno::Reference< css::lang::XMultiServiceFactory >& mgr); // XServiceInfo virtual OUString SAL_CALL getImplementationName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames () - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XDocumentHandler virtual void SAL_CALL startDocument() - throw( RuntimeException, com::sun::star::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; + throw( css::uno::RuntimeException, css::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; virtual void SAL_CALL endDocument() - throw( RuntimeException, com::sun::star::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; + throw( css::uno::RuntimeException, css::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; virtual void SAL_CALL startElement( const OUString& aName, - const Reference< XAttributeList >& xAttribs ) - throw( RuntimeException, com::sun::star::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; + const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs ) + throw( css::uno::RuntimeException, css::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; virtual void SAL_CALL endElement( const OUString& aName ) - throw( RuntimeException, com::sun::star::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; + throw( css::uno::RuntimeException, css::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; virtual void SAL_CALL characters( const OUString& aChars ) - throw( RuntimeException, com::sun::star::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; + throw( css::uno::RuntimeException, css::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces ) - throw( RuntimeException, com::sun::star::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; + throw( css::uno::RuntimeException, css::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; virtual void SAL_CALL processingInstruction( const OUString& aTarget, const OUString& aData ) - throw( RuntimeException, com::sun::star::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; - virtual void SAL_CALL setDocumentLocator( const Reference< XLocator >& xLocator ) - throw( RuntimeException, com::sun::star::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; + throw( css::uno::RuntimeException, css::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; + virtual void SAL_CALL setDocumentLocator( const css::uno::Reference< css::xml::sax::XLocator >& xLocator ) + throw( css::uno::RuntimeException, css::xml::sax::SAXException, std::exception ) SAL_OVERRIDE; // XSAXDocumentBuilder - virtual SAXDocumentBuilderState SAL_CALL getState() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::xml::dom::SAXDocumentBuilderState SAL_CALL getState() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL reset() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XDocument > SAL_CALL getDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XDocumentFragment > SAL_CALL getDocumentFragment() - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL startDocumentFragment(const Reference< XDocument >& ownerDoc) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XDocumentFragment > SAL_CALL getDocumentFragment() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL startDocumentFragment(const css::uno::Reference< css::xml::dom::XDocument >& ownerDoc) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL endDocumentFragment() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/unoxml/source/dom/text.cxx b/unoxml/source/dom/text.cxx index 4dd422ce6a96..229fdd80e8d1 100644 --- a/unoxml/source/dom/text.cxx +++ b/unoxml/source/dom/text.cxx @@ -19,6 +19,9 @@ #include <text.hxx> +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::sax; namespace DOM { diff --git a/unoxml/source/dom/text.hxx b/unoxml/source/dom/text.hxx index 865742baf085..fc90d8cff89c 100644 --- a/unoxml/source/dom/text.hxx +++ b/unoxml/source/dom/text.hxx @@ -32,13 +32,9 @@ #include <characterdata.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; - namespace DOM { - typedef ::cppu::ImplInheritanceHelper1< CCharacterData, XText > CText_Base; + typedef ::cppu::ImplInheritanceHelper1< CCharacterData, css::xml::dom::XText > CText_Base; class CText : public CText_Base @@ -48,58 +44,58 @@ namespace DOM protected: CText(CDocument const& rDocument, ::osl::Mutex const& rMutex, - NodeType const& reNodeType, xmlNodePtr const& rpNode); + css::xml::dom::NodeType const& reNodeType, xmlNodePtr const& rpNode); CText(CDocument const& rDocument, ::osl::Mutex const& rMutex, xmlNodePtr const pNode); public: - virtual void saxify(const Reference< XDocumentHandler >& i_xHandler) SAL_OVERRIDE; + virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler >& i_xHandler) SAL_OVERRIDE; virtual void fastSaxify( Context& io_rContext ) SAL_OVERRIDE; // Breaks this node into two nodes at the specified offset, keeping // both in the tree as siblings. - virtual Reference< XText > SAL_CALL splitText(sal_Int32 offset) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XText > SAL_CALL splitText(sal_Int32 offset) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // --- delegations for XCharacterData virtual void SAL_CALL appendData(const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::appendData(arg); } virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::deleteData(offset, count); } - virtual OUString SAL_CALL getData() throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual OUString SAL_CALL getData() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getData(); } - virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual sal_Int32 SAL_CALL getLength() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getLength(); } virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::insertData(offset, arg); } virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::replaceData(offset, count, arg); } virtual void SAL_CALL setData(const OUString& data) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { CCharacterData::setData(data); } virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::subStringData(offset, count); } @@ -107,128 +103,128 @@ namespace DOM // --- overrides for XNode base virtual OUString SAL_CALL getNodeName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // --- resolve uno inheritance problems... - // --- delegation for XNde base. - virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + // --- delegation for XNode base. + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::appendChild(newChild); } - virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::cloneNode(deep); } - virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getAttributes(); } - virtual Reference< XNodeList > SAL_CALL getChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getChildNodes(); } - virtual Reference< XNode > SAL_CALL getFirstChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getFirstChild(); } - virtual Reference< XNode > SAL_CALL getLastChild() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getLastChild(); } virtual OUString SAL_CALL getLocalName() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getLocalName(); } virtual OUString SAL_CALL getNamespaceURI() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getNamespaceURI(); } - virtual Reference< XNode > SAL_CALL getNextSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getNextSibling(); } - virtual NodeType SAL_CALL getNodeType() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::xml::dom::NodeType SAL_CALL getNodeType() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getNodeType(); } - virtual OUString SAL_CALL getNodeValue() throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual OUString SAL_CALL getNodeValue() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getNodeValue(); } - virtual Reference< XDocument > SAL_CALL getOwnerDocument() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getOwnerDocument(); } - virtual Reference< XNode > SAL_CALL getParentNode() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getParentNode(); } virtual OUString SAL_CALL getPrefix() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getPrefix(); } - virtual Reference< XNode > SAL_CALL getPreviousSibling() - throw (RuntimeException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::getPreviousSibling(); } virtual sal_Bool SAL_CALL hasAttributes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::hasAttributes(); } virtual sal_Bool SAL_CALL hasChildNodes() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::hasChildNodes(); } - virtual Reference< XNode > SAL_CALL insertBefore( - const Reference< XNode >& newChild, const Reference< XNode >& refChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::insertBefore(newChild, refChild); } virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return CCharacterData::isSupported(feature, ver); } virtual void SAL_CALL normalize() - throw (RuntimeException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { CCharacterData::normalize(); } - virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::removeChild(oldChild); } - virtual Reference< XNode > SAL_CALL replaceChild( - const Reference< XNode >& newChild, const Reference< XNode >& oldChild) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild( + const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::replaceChild(newChild, oldChild); } virtual void SAL_CALL setNodeValue(const OUString& nodeValue) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::setNodeValue(nodeValue); } virtual void SAL_CALL setPrefix(const OUString& prefix) - throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE + throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE { return CCharacterData::setPrefix(prefix); } diff --git a/unoxml/source/events/event.cxx b/unoxml/source/events/event.cxx index 6cab4eaae89a..39b2f850679b 100644 --- a/unoxml/source/events/event.cxx +++ b/unoxml/source/events/event.cxx @@ -19,6 +19,9 @@ #include <event.hxx> +using namespace css::uno; +using namespace css::xml::dom::events; + namespace DOM { namespace events { @@ -72,7 +75,7 @@ namespace DOM { namespace events return m_cancelable; } - com::sun::star::util::Time SAL_CALL + css::util::Time SAL_CALL CEvent::getTimeStamp() throw (RuntimeException, std::exception) { ::osl::MutexGuard const g(m_Mutex); diff --git a/unoxml/source/events/event.hxx b/unoxml/source/events/event.hxx index 23ed8b5686c2..55f15917ca8f 100644 --- a/unoxml/source/events/event.hxx +++ b/unoxml/source/events/event.hxx @@ -31,15 +31,9 @@ #include "../dom/node.hxx" - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::dom::events; - - namespace DOM {namespace events { -class CEvent : public cppu::WeakImplHelper1< XEvent > +class CEvent : public cppu::WeakImplHelper1< css::xml::dom::events::XEvent > { friend class CEventDispatcher; @@ -47,31 +41,31 @@ protected: ::osl::Mutex m_Mutex; bool m_canceled; OUString m_eventType; - Reference< XEventTarget > m_target; - Reference< XEventTarget > m_currentTarget; - PhaseType m_phase; + css::uno::Reference< css::xml::dom::events::XEventTarget > m_target; + css::uno::Reference< css::xml::dom::events::XEventTarget > m_currentTarget; + css::xml::dom::events::PhaseType m_phase; bool m_bubbles; bool m_cancelable; - com::sun::star::util::Time m_time; + css::util::Time m_time; public: explicit CEvent(); virtual ~CEvent(); - virtual OUString SAL_CALL getType() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XEventTarget > SAL_CALL getTarget() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XEventTarget > SAL_CALL getCurrentTarget() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual PhaseType SAL_CALL getEventPhase() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual com::sun::star::util::Time SAL_CALL getTimeStamp() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL stopPropagation() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL preventDefault() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getType() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getTarget() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getCurrentTarget() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::xml::dom::events::PhaseType SAL_CALL getEventPhase() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getBubbles() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getCancelable() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::util::Time SAL_CALL getTimeStamp() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL stopPropagation() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL preventDefault() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL initEvent( const OUString& eventTypeArg, sal_Bool canBubbleArg, - sal_Bool cancelableArg) throw (RuntimeException, std::exception) SAL_OVERRIDE; + sal_Bool cancelableArg) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; }} #endif diff --git a/unoxml/source/events/eventdispatcher.cxx b/unoxml/source/events/eventdispatcher.cxx index cbb8f42fed01..c94e3b66cd00 100644 --- a/unoxml/source/events/eventdispatcher.cxx +++ b/unoxml/source/events/eventdispatcher.cxx @@ -26,6 +26,9 @@ #include "../dom/document.hxx" +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::dom::events; namespace DOM { namespace events { diff --git a/unoxml/source/events/eventdispatcher.hxx b/unoxml/source/events/eventdispatcher.hxx index 7ec3c28e5b81..20f75597971b 100644 --- a/unoxml/source/events/eventdispatcher.hxx +++ b/unoxml/source/events/eventdispatcher.hxx @@ -33,18 +33,13 @@ #include <com/sun/star/xml/dom/events/PhaseType.hpp> #include <com/sun/star/xml/dom/events/XEvent.hpp> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::dom::events; - namespace DOM { class CDocument; namespace events { -typedef std::multimap< xmlNodePtr, Reference< com::sun::star::xml::dom::events::XEventListener> > ListenerMap; +typedef std::multimap< xmlNodePtr, css::uno::Reference< css::xml::dom::events::XEventListener> > ListenerMap; typedef std::map< OUString, ListenerMap*> TypeListenerMap; typedef std::vector<ListenerMap::value_type> ListenerPairVector; @@ -58,27 +53,27 @@ public: void addListener( xmlNodePtr pNode, const OUString& aType, - const Reference<com::sun::star::xml::dom::events::XEventListener>& aListener, + const css::uno::Reference<css::xml::dom::events::XEventListener>& aListener, bool bCapture); void removeListener( xmlNodePtr pNode, const OUString& aType, - const Reference<com::sun::star::xml::dom::events::XEventListener>& aListener, + const css::uno::Reference<css::xml::dom::events::XEventListener>& aListener, bool bCapture); static void callListeners( TypeListenerMap const& rTMap, xmlNodePtr const pNode, const OUString& aType, - const Reference< XEvent >& xEvent); + const css::uno::Reference< css::xml::dom::events::XEvent >& xEvent); bool dispatchEvent( DOM::CDocument & rDocument, ::osl::Mutex & rMutex, xmlNodePtr const pNode, - Reference<XNode> const& xNode, - Reference< XEvent > const& xEvent) const; + css::uno::Reference<css::xml::dom::XNode> const& xNode, + css::uno::Reference< css::xml::dom::events::XEvent > const& xEvent) const; ~CEventDispatcher(); }; diff --git a/unoxml/source/events/mouseevent.cxx b/unoxml/source/events/mouseevent.cxx index ca0b3d93af05..b710d799e1b0 100644 --- a/unoxml/source/events/mouseevent.cxx +++ b/unoxml/source/events/mouseevent.cxx @@ -19,6 +19,10 @@ #include <mouseevent.hxx> +using namespace css::uno; +using namespace css::xml::dom::events; +using namespace css::xml::dom::views; + namespace DOM { namespace events { CMouseEvent::CMouseEvent() @@ -168,7 +172,7 @@ namespace DOM { namespace events return CUIEvent::getCancelable(); } - com::sun::star::util::Time SAL_CALL CMouseEvent::getTimeStamp() throw (RuntimeException, std::exception) + css::util::Time SAL_CALL CMouseEvent::getTimeStamp() throw (RuntimeException, std::exception) { return CUIEvent::getTimeStamp(); } diff --git a/unoxml/source/events/mouseevent.hxx b/unoxml/source/events/mouseevent.hxx index bbbae9242e09..19df1edc467c 100644 --- a/unoxml/source/events/mouseevent.hxx +++ b/unoxml/source/events/mouseevent.hxx @@ -29,7 +29,7 @@ namespace DOM { namespace events { -typedef ::cppu::ImplInheritanceHelper1< CUIEvent, XMouseEvent > +typedef ::cppu::ImplInheritanceHelper1< CUIEvent, css::xml::dom::events::XMouseEvent > CMouseEvent_Base; class CMouseEvent @@ -45,27 +45,27 @@ protected: bool m_altKey; bool m_metaKey; sal_Int16 m_button; - Reference< XEventTarget > m_relatedTarget; + css::uno::Reference< css::xml::dom::events::XEventTarget > m_relatedTarget; public: explicit CMouseEvent(); - virtual sal_Int32 SAL_CALL getScreenX() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Int32 SAL_CALL getScreenY() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Int32 SAL_CALL getClientX() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Int32 SAL_CALL getClientY() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getCtrlKey() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getShiftKey() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getAltKey() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getMetaKey() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Int16 SAL_CALL getButton() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XEventTarget > SAL_CALL getRelatedTarget() throw(RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getScreenX() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getScreenY() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getClientX() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getClientY() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getCtrlKey() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getShiftKey() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getAltKey() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getMetaKey() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int16 SAL_CALL getButton() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getRelatedTarget() throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL initMouseEvent( const OUString& typeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg, - const Reference< XAbstractView >& viewArg, + const css::uno::Reference< css::xml::dom::views::XAbstractView >& viewArg, sal_Int32 detailArg, sal_Int32 screenXArg, sal_Int32 screenYArg, @@ -76,31 +76,31 @@ public: sal_Bool shiftKeyArg, sal_Bool metaKeyArg, sal_Int16 buttonArg, - const Reference< XEventTarget >& relatedTargetArg) - throw(RuntimeException, std::exception) SAL_OVERRIDE; + const css::uno::Reference< css::xml::dom::events::XEventTarget >& relatedTargetArg) + throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // delegate to CUIevent - virtual Reference< XAbstractView > SAL_CALL getView() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Int32 SAL_CALL getDetail() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::views::XAbstractView > SAL_CALL getView() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getDetail() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL initUIEvent(const OUString& typeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg, - const Reference< XAbstractView >& viewArg, - sal_Int32 detailArg) throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual OUString SAL_CALL getType() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XEventTarget > SAL_CALL getTarget() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XEventTarget > SAL_CALL getCurrentTarget() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual PhaseType SAL_CALL getEventPhase() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual com::sun::star::util::Time SAL_CALL getTimeStamp() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL stopPropagation() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL preventDefault() throw (RuntimeException, std::exception) SAL_OVERRIDE; + const css::uno::Reference< css::xml::dom::views::XAbstractView >& viewArg, + sal_Int32 detailArg) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getType() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getTarget() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getCurrentTarget() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::xml::dom::events::PhaseType SAL_CALL getEventPhase() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getBubbles() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getCancelable() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::util::Time SAL_CALL getTimeStamp() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL stopPropagation() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL preventDefault() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL initEvent( const OUString& eventTypeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; }} #endif diff --git a/unoxml/source/events/mutationevent.cxx b/unoxml/source/events/mutationevent.cxx index fb6da513cd1e..16ebd52a462d 100644 --- a/unoxml/source/events/mutationevent.cxx +++ b/unoxml/source/events/mutationevent.cxx @@ -19,6 +19,10 @@ #include <mutationevent.hxx> +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::dom::events; + namespace DOM { namespace events { CMutationEvent::CMutationEvent() @@ -108,7 +112,7 @@ namespace DOM { namespace events return CEvent::getCancelable(); } - com::sun::star::util::Time SAL_CALL CMutationEvent::getTimeStamp() throw (RuntimeException, std::exception) + css::util::Time SAL_CALL CMutationEvent::getTimeStamp() throw (RuntimeException, std::exception) { return CEvent::getTimeStamp(); } diff --git a/unoxml/source/events/mutationevent.hxx b/unoxml/source/events/mutationevent.hxx index f9651039587a..7fe031d9ba9f 100644 --- a/unoxml/source/events/mutationevent.hxx +++ b/unoxml/source/events/mutationevent.hxx @@ -34,54 +34,54 @@ namespace DOM { namespace events { -typedef ::cppu::ImplInheritanceHelper1< CEvent, XMutationEvent > +typedef ::cppu::ImplInheritanceHelper1< CEvent, css::xml::dom::events::XMutationEvent > CMutationEvent_Base; class CMutationEvent : public CMutationEvent_Base { protected: - Reference< XNode > m_relatedNode; + css::uno::Reference< css::xml::dom::XNode > m_relatedNode; OUString m_prevValue; OUString m_newValue; OUString m_attrName; - AttrChangeType m_attrChangeType; + css::xml::dom::events::AttrChangeType m_attrChangeType; public: explicit CMutationEvent(); virtual ~CMutationEvent(); - virtual Reference< XNode > SAL_CALL getRelatedNode() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual OUString SAL_CALL getPrevValue() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual OUString SAL_CALL getNewValue() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual OUString SAL_CALL getAttrName() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual AttrChangeType SAL_CALL getAttrChange() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getRelatedNode() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getPrevValue() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getNewValue() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getAttrName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::xml::dom::events::AttrChangeType SAL_CALL getAttrChange() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL initMutationEvent( const OUString& typeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg, - const Reference< XNode >& relatedNodeArg, + const css::uno::Reference< css::xml::dom::XNode >& relatedNodeArg, const OUString& prevValueArg, const OUString& newValueArg, const OUString& attrNameArg, - AttrChangeType attrChangeArg) throw (RuntimeException, std::exception) SAL_OVERRIDE; + css::xml::dom::events::AttrChangeType attrChangeArg) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // delegate to CEvent, since we are inheriting from CEvent and XEvent - virtual OUString SAL_CALL getType() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XEventTarget > SAL_CALL getTarget() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XEventTarget > SAL_CALL getCurrentTarget() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual PhaseType SAL_CALL getEventPhase() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual com::sun::star::util::Time SAL_CALL getTimeStamp() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL stopPropagation() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL preventDefault() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getType() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getTarget() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getCurrentTarget() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::xml::dom::events::PhaseType SAL_CALL getEventPhase() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getBubbles() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getCancelable() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::util::Time SAL_CALL getTimeStamp() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL stopPropagation() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL preventDefault() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL initEvent( const OUString& eventTypeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; }} #endif diff --git a/unoxml/source/events/testlistener.cxx b/unoxml/source/events/testlistener.cxx index 1e65584ffae9..191cb04af556 100644 --- a/unoxml/source/events/testlistener.cxx +++ b/unoxml/source/events/testlistener.cxx @@ -25,9 +25,10 @@ #define U2S(s) OUStringToOString(s, RTL_TEXTENCODING_UTF8).getStr() - -using ::com::sun::star::lang::XMultiServiceFactory; -using ::com::sun::star::lang::IllegalArgumentException; +using namespace css::uno; +using namespace css::xml::dom::events; +using css::lang::XMultiServiceFactory; +using css::lang::IllegalArgumentException; namespace DOM { namespace events diff --git a/unoxml/source/events/testlistener.hxx b/unoxml/source/events/testlistener.hxx index 8cc977cd97ea..06126cb9ed75 100644 --- a/unoxml/source/events/testlistener.hxx +++ b/unoxml/source/events/testlistener.hxx @@ -36,18 +36,13 @@ #include <cppuhelper/implbase3.hxx> - -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::dom::events; - namespace DOM { namespace events { typedef ::cppu::WeakImplHelper3 - < ::com::sun::star::xml::dom::events::XEventListener - , ::com::sun::star::lang::XInitialization - , ::com::sun::star::lang::XServiceInfo + < css::xml::dom::events::XEventListener + , css::lang::XInitialization + , css::lang::XServiceInfo > CTestListener_Base; class CTestListener @@ -55,8 +50,8 @@ namespace DOM { namespace events { private: - Reference< ::com::sun::star::lang::XMultiServiceFactory > m_factory; - Reference <XEventTarget> m_target; + css::uno::Reference< css::lang::XMultiServiceFactory > m_factory; + css::uno::Reference <css::xml::dom::events::XEventTarget> m_target; OUString m_type; bool m_capture; OUString m_name; @@ -67,13 +62,13 @@ namespace DOM { namespace events static const char* aImplementationName; static const char* aSupportedServiceNames[]; static OUString _getImplementationName(); - static Sequence< OUString > _getSupportedServiceNames(); - static Reference< XInterface > _getInstance( - const Reference< ::com::sun::star::lang::XMultiServiceFactory >& + static css::uno::Sequence< OUString > _getSupportedServiceNames(); + static css::uno::Reference< XInterface > _getInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr); CTestListener( - const Reference< ::com::sun::star::lang::XMultiServiceFactory >& + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr) : m_factory(rSMgr) , m_capture(false) @@ -84,17 +79,17 @@ namespace DOM { namespace events // XServiceInfo virtual OUString SAL_CALL getImplementationName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames () - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XEventListener - virtual void SAL_CALL initialize(const Sequence< Any >& args) throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any >& args) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL handleEvent(const Reference< XEvent >& evt) throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL handleEvent(const css::uno::Reference< css::xml::dom::events::XEvent >& evt) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/unoxml/source/events/uievent.cxx b/unoxml/source/events/uievent.cxx index 31562be5cccc..bb7fc4557ed8 100644 --- a/unoxml/source/events/uievent.cxx +++ b/unoxml/source/events/uievent.cxx @@ -19,6 +19,10 @@ #include <uievent.hxx> +using namespace css::uno; +using namespace css::xml::dom::events; +using namespace css::xml::dom::views; + namespace DOM { namespace events { CUIEvent::CUIEvent() @@ -86,7 +90,7 @@ namespace DOM { namespace events return sal_False; } - com::sun::star::util::Time SAL_CALL CUIEvent::getTimeStamp() throw (RuntimeException, std::exception) + css::util::Time SAL_CALL CUIEvent::getTimeStamp() throw (RuntimeException, std::exception) { return CEvent::getTimeStamp(); } diff --git a/unoxml/source/events/uievent.hxx b/unoxml/source/events/uievent.hxx index 5111c0eaac77..fbf5744bc2e7 100644 --- a/unoxml/source/events/uievent.hxx +++ b/unoxml/source/events/uievent.hxx @@ -30,46 +30,43 @@ #include "event.hxx" - -using namespace com::sun::star::xml::dom::views; - namespace DOM { namespace events { -typedef ::cppu::ImplInheritanceHelper1< CEvent, XUIEvent > CUIEvent_Base; +typedef ::cppu::ImplInheritanceHelper1< CEvent, css::xml::dom::events::XUIEvent > CUIEvent_Base; class CUIEvent : public CUIEvent_Base { protected: sal_Int32 m_detail; - Reference< XAbstractView > m_view; + css::uno::Reference< css::xml::dom::views::XAbstractView > m_view; public: explicit CUIEvent(); - virtual Reference< XAbstractView > SAL_CALL getView() throw(RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Int32 SAL_CALL getDetail() throw(RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::views::XAbstractView > SAL_CALL getView() throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getDetail() throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL initUIEvent(const OUString& typeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg, - const Reference< XAbstractView >& viewArg, - sal_Int32 detailArg) throw(RuntimeException, std::exception) SAL_OVERRIDE; + const css::uno::Reference< css::xml::dom::views::XAbstractView >& viewArg, + sal_Int32 detailArg) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // delegate to CEvent, since we are inheriting from CEvent and XEvent - virtual OUString SAL_CALL getType() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XEventTarget > SAL_CALL getTarget() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Reference< XEventTarget > SAL_CALL getCurrentTarget() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual PhaseType SAL_CALL getEventPhase() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual com::sun::star::util::Time SAL_CALL getTimeStamp() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL stopPropagation() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL preventDefault() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getType() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getTarget() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getCurrentTarget() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::xml::dom::events::PhaseType SAL_CALL getEventPhase() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getBubbles() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getCancelable() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::util::Time SAL_CALL getTimeStamp() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL stopPropagation() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL preventDefault() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL initEvent( const OUString& eventTypeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; }} #endif diff --git a/unoxml/source/rdf/CBlankNode.cxx b/unoxml/source/rdf/CBlankNode.cxx index 2c16ee4fcd02..68addbf1dc29 100644 --- a/unoxml/source/rdf/CBlankNode.cxx +++ b/unoxml/source/rdf/CBlankNode.cxx @@ -43,15 +43,15 @@ public: explicit CBlankNode(css::uno::Reference< css::uno::XComponentContext > const & context); virtual ~CBlankNode() {} - // ::com::sun::star::lang::XServiceInfo: + // css::lang::XServiceInfo: virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsService(const OUString & ServiceName) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::lang::XInitialization: - virtual void SAL_CALL initialize(const css::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) SAL_OVERRIDE; + // css::lang::XInitialization: + virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) SAL_OVERRIDE; - // ::com::sun::star::rdf::XNode: + // css::rdf::XNode: virtual OUString SAL_CALL getStringValue() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: @@ -80,8 +80,8 @@ css::uno::Sequence< OUString > SAL_CALL CBlankNode::getSupportedServiceNames() t return comp_CBlankNode::_getSupportedServiceNames(); } -// ::com::sun::star::lang::XInitialization: -void SAL_CALL CBlankNode::initialize(const css::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) +// css::lang::XInitialization: +void SAL_CALL CBlankNode::initialize(const css::uno::Sequence< css::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) { if (aArguments.getLength() != 1) { throw css::lang::IllegalArgumentException( @@ -106,7 +106,7 @@ void SAL_CALL CBlankNode::initialize(const css::uno::Sequence< ::com::sun::star: } } -// ::com::sun::star::rdf::XNode: +// css::rdf::XNode: OUString SAL_CALL CBlankNode::getStringValue() throw (css::uno::RuntimeException, std::exception) { return m_NodeID; diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx index 5fd0befed7cd..3cc332886ac3 100644 --- a/unoxml/source/rdf/CLiteral.cxx +++ b/unoxml/source/rdf/CLiteral.cxx @@ -45,18 +45,18 @@ public: explicit CLiteral(css::uno::Reference< css::uno::XComponentContext > const & context); virtual ~CLiteral() {} - // ::com::sun::star::lang::XServiceInfo: + // css::lang::XServiceInfo: virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsService(const OUString & ServiceName) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::lang::XInitialization: - virtual void SAL_CALL initialize(const css::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) SAL_OVERRIDE; + // css::lang::XInitialization: + virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) SAL_OVERRIDE; - // ::com::sun::star::rdf::XNode: + // css::rdf::XNode: virtual OUString SAL_CALL getStringValue() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::rdf::XLiteral: + // css::rdf::XLiteral: virtual OUString SAL_CALL getValue() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getLanguage() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual css::uno::Reference< css::rdf::XURI > SAL_CALL getDatatype() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -89,8 +89,8 @@ css::uno::Sequence< OUString > SAL_CALL CLiteral::getSupportedServiceNames() thr return comp_CLiteral::_getSupportedServiceNames(); } -// ::com::sun::star::lang::XInitialization: -void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) +// css::lang::XInitialization: +void SAL_CALL CLiteral::initialize(const css::uno::Sequence< css::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) { const sal_Int32 len( aArguments.getLength() ); if (len < 1 || len > 2) { @@ -141,7 +141,7 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u } } -// ::com::sun::star::rdf::XNode: +// css::rdf::XNode: OUString SAL_CALL CLiteral::getStringValue() throw (css::uno::RuntimeException, std::exception) { if (!m_Language.isEmpty()) { @@ -159,7 +159,7 @@ OUString SAL_CALL CLiteral::getStringValue() throw (css::uno::RuntimeException, } } -// ::com::sun::star::rdf::XLiteral: +// css::rdf::XLiteral: OUString SAL_CALL CLiteral::getValue() throw (css::uno::RuntimeException, std::exception) { return m_Value; diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx index 228af1c63f13..1e688c349d80 100644 --- a/unoxml/source/rdf/CURI.cxx +++ b/unoxml/source/rdf/CURI.cxx @@ -44,18 +44,18 @@ public: explicit CURI(css::uno::Reference< css::uno::XComponentContext > const & context); virtual ~CURI() {} - // ::com::sun::star::lang::XServiceInfo: + // css::lang::XServiceInfo: virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsService(const OUString & ServiceName) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::lang::XInitialization: - virtual void SAL_CALL initialize(const css::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) SAL_OVERRIDE; + // css::lang::XInitialization: + virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) SAL_OVERRIDE; - // ::com::sun::star::rdf::XNode: + // css::rdf::XNode: virtual OUString SAL_CALL getStringValue() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::rdf::XURI: + // css::rdf::XURI: virtual OUString SAL_CALL getLocalName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getNamespace() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -710,8 +710,8 @@ void SAL_CALL CURI::initFromConstant(const sal_Int16 i_Constant) return; } -// ::com::sun::star::lang::XInitialization: -void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) +// css::lang::XInitialization: +void SAL_CALL CURI::initialize(const css::uno::Sequence< css::uno::Any > & aArguments) throw (css::uno::RuntimeException, css::uno::Exception, std::exception) { sal_Int32 len = aArguments.getLength(); if ((len < 1) || (len > 2)) { @@ -784,13 +784,13 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno:: } } -// ::com::sun::star::rdf::XNode: +// css::rdf::XNode: OUString SAL_CALL CURI::getStringValue() throw (css::uno::RuntimeException, std::exception) { return m_Namespace + m_LocalName; } -// ::com::sun::star::rdf::XURI: +// css::rdf::XURI: OUString SAL_CALL CURI::getNamespace() throw (css::uno::RuntimeException, std::exception) { return m_Namespace; diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 473c0b34ac3a..52fc79cd82f2 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -284,7 +284,7 @@ public: uno::Reference< uno::XComponentContext > const & i_xContext); virtual ~librdf_Repository(); - // ::com::sun::star::lang::XServiceInfo: + // css::lang::XServiceInfo: virtual OUString SAL_CALL getImplementationName() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsService( @@ -292,7 +292,7 @@ public: virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::rdf::XRepository: + // css::rdf::XRepository: virtual uno::Reference< rdf::XBlankNode > SAL_CALL createBlankNode() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual uno::Reference<rdf::XNamedGraph> SAL_CALL importGraph( @@ -344,7 +344,7 @@ public: throw (uno::RuntimeException, rdf::QueryException, rdf::RepositoryException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::rdf::XDocumentRepository: + // css::rdf::XDocumentRepository: virtual void SAL_CALL setStatementRDFa( const uno::Reference< rdf::XResource > & i_xSubject, const uno::Sequence< uno::Reference< rdf::XURI > > & i_rPredicates, @@ -369,9 +369,9 @@ public: throw (uno::RuntimeException, rdf::RepositoryException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::lang::XInitialization: + // css::lang::XInitialization: virtual void SAL_CALL initialize( - const uno::Sequence< ::com::sun::star::uno::Any > & i_rArguments) + const uno::Sequence< css::uno::Any > & i_rArguments) throw (uno::RuntimeException, uno::Exception, std::exception) SAL_OVERRIDE; // XNamedGraph forwards --------------------------------------------- @@ -483,7 +483,7 @@ public: const_cast<boost::shared_ptr<librdf_query>& >(m_pQuery).reset(); } - // ::com::sun::star::container::XEnumeration: + // css::container::XEnumeration: virtual sal_Bool SAL_CALL hasMoreElements() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual uno::Any SAL_CALL nextElement() @@ -508,7 +508,7 @@ private: }; -// ::com::sun::star::container::XEnumeration: +// css::container::XEnumeration: sal_Bool SAL_CALL librdf_GraphResult::hasMoreElements() throw (uno::RuntimeException, std::exception) { @@ -531,7 +531,7 @@ librdf_node* librdf_GraphResult::getContext_Lock() const return m_pContext.get(); } -::com::sun::star::uno::Any SAL_CALL +css::uno::Any SAL_CALL librdf_GraphResult::nextElement() throw (uno::RuntimeException, container::NoSuchElementException, lang::WrappedTargetException, std::exception) @@ -596,14 +596,14 @@ public: const_cast<boost::shared_ptr<librdf_query>& >(m_pQuery).reset(); } - // ::com::sun::star::container::XEnumeration: + // css::container::XEnumeration: virtual sal_Bool SAL_CALL hasMoreElements() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual uno::Any SAL_CALL nextElement() throw (uno::RuntimeException, container::NoSuchElementException, lang::WrappedTargetException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::rdf::XQuerySelectResult: + // css::rdf::XQuerySelectResult: virtual uno::Sequence< OUString > SAL_CALL getBindingNames() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -623,7 +623,7 @@ private: }; -// ::com::sun::star::container::XEnumeration: +// css::container::XEnumeration: sal_Bool SAL_CALL librdf_QuerySelectResult::hasMoreElements() throw (uno::RuntimeException, std::exception) { @@ -645,7 +645,7 @@ public: } }; -::com::sun::star::uno::Any SAL_CALL +css::uno::Any SAL_CALL librdf_QuerySelectResult::nextElement() throw (uno::RuntimeException, container::NoSuchElementException, lang::WrappedTargetException, std::exception) @@ -682,7 +682,7 @@ throw (uno::RuntimeException, container::NoSuchElementException, } } -// ::com::sun::star::rdf::XQuerySelectResult: +// css::rdf::XQuerySelectResult: uno::Sequence< OUString > SAL_CALL librdf_QuerySelectResult::getBindingNames() throw (uno::RuntimeException, std::exception) { @@ -710,17 +710,17 @@ public: virtual ~librdf_NamedGraph() {} - // ::com::sun::star::rdf::XNode: + // css::rdf::XNode: virtual OUString SAL_CALL getStringValue() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::rdf::XURI: + // css::rdf::XURI: virtual OUString SAL_CALL getNamespace() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getLocalName() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; - // ::com::sun::star::rdf::XNamedGraph: + // css::rdf::XNamedGraph: virtual uno::Reference<rdf::XURI> SAL_CALL getName() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL clear() @@ -754,14 +754,14 @@ private: }; -// ::com::sun::star::rdf::XNode: +// css::rdf::XNode: OUString SAL_CALL librdf_NamedGraph::getStringValue() throw (uno::RuntimeException, std::exception) { return m_xName->getStringValue(); } -// ::com::sun::star::rdf::XURI: +// css::rdf::XURI: OUString SAL_CALL librdf_NamedGraph::getNamespace() throw (uno::RuntimeException, std::exception) { @@ -774,7 +774,7 @@ throw (uno::RuntimeException, std::exception) return m_xName->getLocalName(); } -// ::com::sun::star::rdf::XNamedGraph: +// css::rdf::XNamedGraph: uno::Reference< rdf::XURI > SAL_CALL librdf_NamedGraph::getName() throw (uno::RuntimeException, std::exception) { @@ -909,7 +909,7 @@ librdf_Repository::getSupportedServiceNames() throw (uno::RuntimeException, std: return comp_librdf_Repository::_getSupportedServiceNames(); } -// ::com::sun::star::rdf::XRepository: +// css::rdf::XRepository: uno::Reference< rdf::XBlankNode > SAL_CALL librdf_Repository::createBlankNode() throw (uno::RuntimeException, std::exception) { @@ -1494,7 +1494,7 @@ throw (uno::RuntimeException, rdf::QueryException, rdf::RepositoryException, std ? sal_True : sal_False; } -// ::com::sun::star::rdf::XDocumentRepository: +// css::rdf::XDocumentRepository: void SAL_CALL librdf_Repository::setStatementRDFa( const uno::Reference< rdf::XResource > & i_xSubject, const uno::Sequence< uno::Reference< rdf::XURI > > & i_rPredicates, @@ -1747,9 +1747,9 @@ throw (uno::RuntimeException, rdf::RepositoryException, std::exception) ::boost::shared_ptr<librdf_node>()); } -// ::com::sun::star::lang::XInitialization: +// css::lang::XInitialization: void SAL_CALL librdf_Repository::initialize( - const uno::Sequence< ::com::sun::star::uno::Any > & i_rArguments) + const uno::Sequence< css::uno::Any > & i_rArguments) throw (uno::RuntimeException, uno::Exception, std::exception) { (void) i_rArguments; diff --git a/unoxml/source/service/services.cxx b/unoxml/source/service/services.cxx index 8978309bc734..8cb63852d86d 100644 --- a/unoxml/source/service/services.cxx +++ b/unoxml/source/service/services.cxx @@ -37,9 +37,9 @@ using namespace ::DOM; using namespace ::DOM::events; using namespace ::XPath; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::registry; +using namespace css::uno; +using namespace css::lang; +using namespace css::registry; extern "C" { diff --git a/unoxml/source/xpath/nodelist.cxx b/unoxml/source/xpath/nodelist.cxx index 7b3fb19b2eb3..ee71e51927d9 100644 --- a/unoxml/source/xpath/nodelist.cxx +++ b/unoxml/source/xpath/nodelist.cxx @@ -21,6 +21,9 @@ #include "../dom/document.hxx" +using namespace css::uno; +using namespace css::xml::dom; + namespace XPath { CNodeList::CNodeList( diff --git a/unoxml/source/xpath/nodelist.hxx b/unoxml/source/xpath/nodelist.hxx index d46bd4ef4cad..f1aa9f41da44 100644 --- a/unoxml/source/xpath/nodelist.hxx +++ b/unoxml/source/xpath/nodelist.hxx @@ -35,10 +35,6 @@ #include <boost/shared_ptr.hpp> -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::xpath; - namespace DOM { class CDocument; } @@ -46,7 +42,7 @@ namespace DOM { namespace XPath { - class CNodeList : public cppu::WeakImplHelper1< XNodeList > + class CNodeList : public cppu::WeakImplHelper1< css::xml::dom::XNodeList > { private: /// #i115995# keep document alive @@ -64,12 +60,12 @@ namespace XPath /** The number of nodes in the list. */ - virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getLength() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Returns the indexth item in the collection. */ - virtual Reference< XNode > SAL_CALL item(sal_Int32 index) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL item(sal_Int32 index) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx index 9c2879397aec..a7346b9042bc 100644 --- a/unoxml/source/xpath/xpathapi.cxx +++ b/unoxml/source/xpath/xpathapi.cxx @@ -37,8 +37,11 @@ #include <cppuhelper/supportsservice.hxx> -using ::com::sun::star::lang::XMultiServiceFactory; - +using namespace css::io; +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::xpath; +using css::lang::XMultiServiceFactory; namespace XPath { diff --git a/unoxml/source/xpath/xpathapi.hxx b/unoxml/source/xpath/xpathapi.hxx index 60cbeeb5ea76..52b274d4ab72 100644 --- a/unoxml/source/xpath/xpathapi.hxx +++ b/unoxml/source/xpath/xpathapi.hxx @@ -43,18 +43,14 @@ #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::xpath; - namespace XPath { typedef std::map<OUString, OUString> nsmap_t; - typedef std::vector< Reference<XXPathExtension> > extensions_t; + typedef std::vector< css::uno::Reference<css::xml::xpath::XXPathExtension> > extensions_t; typedef ::cppu::WeakImplHelper2 - < XXPathAPI - , ::com::sun::star::lang::XServiceInfo + < css::xml::xpath::XXPathAPI + , css::lang::XServiceInfo > CXPathAPI_Base; class CXPathAPI @@ -64,78 +60,78 @@ namespace XPath private: ::osl::Mutex m_Mutex; nsmap_t m_nsmap; - const Reference< ::com::sun::star::lang::XMultiServiceFactory > m_aFactory; + const css::uno::Reference< css::lang::XMultiServiceFactory > m_aFactory; extensions_t m_extensions; public: // ctor CXPathAPI( - const Reference< ::com::sun::star::lang::XMultiServiceFactory >& + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr); // call for factory - static Reference< XInterface > getInstance( - const Reference < ::com::sun::star::lang::XMultiServiceFactory >& + static css::uno::Reference< XInterface > getInstance( + const css::uno::Reference < css::lang::XMultiServiceFactory >& xFactory); // static helpers for service info and component management static const char* aImplementationName; static const char* aSupportedServiceNames[]; static OUString _getImplementationName(); - static Sequence< OUString > _getSupportedServiceNames(); - static Reference< XInterface > _getInstance( - const Reference< ::com::sun::star::lang::XMultiServiceFactory >& + static css::uno::Sequence< OUString > _getSupportedServiceNames(); + static css::uno::Reference< XInterface > _getInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr); // XServiceInfo virtual OUString SAL_CALL getImplementationName() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) - throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames () - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // --- XXPathAPI --- virtual void SAL_CALL registerNS(const OUString& aPrefix, const OUString& aURI) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL unregisterNS(const OUString& aPrefix, const OUString& aURI) - throw (RuntimeException, std::exception) SAL_OVERRIDE; + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** Use an XPath string to select a nodelist. */ - virtual Reference< XNodeList > SAL_CALL selectNodeList(const Reference< XNode >& contextNode, const OUString& str) - throw (RuntimeException, XPathException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL selectNodeList(const css::uno::Reference< css::xml::dom::XNode >& contextNode, const OUString& str) + throw (css::uno::RuntimeException, css::xml::xpath::XPathException, std::exception) SAL_OVERRIDE; /** Use an XPath string to select a nodelist. */ - virtual Reference< XNodeList > SAL_CALL selectNodeListNS(const Reference< XNode >& contextNode, const OUString& str, const Reference< XNode >& namespaceNode) - throw (RuntimeException, XPathException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL selectNodeListNS(const css::uno::Reference< css::xml::dom::XNode >& contextNode, const OUString& str, const css::uno::Reference< css::xml::dom::XNode >& namespaceNode) + throw (css::uno::RuntimeException, css::xml::xpath::XPathException, std::exception) SAL_OVERRIDE; /** Use an XPath string to select a single node. */ - virtual Reference< XNode > SAL_CALL selectSingleNode(const Reference< XNode >& contextNode, const OUString& str) - throw (RuntimeException, XPathException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL selectSingleNode(const css::uno::Reference< css::xml::dom::XNode >& contextNode, const OUString& str) + throw (css::uno::RuntimeException, css::xml::xpath::XPathException, std::exception) SAL_OVERRIDE; /** Use an XPath string to select a single node. */ - virtual Reference< XNode > SAL_CALL selectSingleNodeNS(const Reference< XNode >& contextNode, const OUString& str, const Reference< XNode >& namespaceNode) - throw (RuntimeException, XPathException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL selectSingleNodeNS(const css::uno::Reference< css::xml::dom::XNode >& contextNode, const OUString& str, const css::uno::Reference< css::xml::dom::XNode >& namespaceNode) + throw (css::uno::RuntimeException, css::xml::xpath::XPathException, std::exception) SAL_OVERRIDE; - virtual Reference< XXPathObject > SAL_CALL eval(const Reference< XNode >& contextNode, const OUString& str) - throw (RuntimeException, XPathException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::xpath::XXPathObject > SAL_CALL eval(const css::uno::Reference< css::xml::dom::XNode >& contextNode, const OUString& str) + throw (css::uno::RuntimeException, css::xml::xpath::XPathException, std::exception) SAL_OVERRIDE; - virtual Reference< XXPathObject > SAL_CALL evalNS(const Reference< XNode >& contextNode, const OUString& str, const Reference< XNode >& namespaceNode) - throw (RuntimeException, XPathException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::xpath::XXPathObject > SAL_CALL evalNS(const css::uno::Reference< css::xml::dom::XNode >& contextNode, const OUString& str, const css::uno::Reference< css::xml::dom::XNode >& namespaceNode) + throw (css::uno::RuntimeException, css::xml::xpath::XPathException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL registerExtension(const OUString& aName) throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL registerExtensionInstance(const Reference< XXPathExtension>& aExtension) throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL registerExtension(const OUString& aName) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL registerExtensionInstance(const css::uno::Reference< css::xml::xpath::XXPathExtension>& aExtension) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx index 11078401865a..636f0865c2f5 100644 --- a/unoxml/source/xpath/xpathobject.cxx +++ b/unoxml/source/xpath/xpathobject.cxx @@ -24,6 +24,9 @@ #include "../dom/document.hxx" #include <nodelist.hxx> +using namespace css::uno; +using namespace css::xml::dom; +using namespace css::xml::xpath; namespace XPath { diff --git a/unoxml/source/xpath/xpathobject.hxx b/unoxml/source/xpath/xpathobject.hxx index 6634d229eca4..987621b4a618 100644 --- a/unoxml/source/xpath/xpathobject.hxx +++ b/unoxml/source/xpath/xpathobject.hxx @@ -34,24 +34,19 @@ #include <com/sun/star/xml/dom/XNodeList.hpp> #include <com/sun/star/xml/xpath/XXPathObject.hpp> -using namespace com::sun::star::uno; -using namespace com::sun::star::xml::dom; -using namespace com::sun::star::xml::xpath; - - namespace DOM { class CDocument; } namespace XPath { - class CXPathObject : public cppu::WeakImplHelper1< XXPathObject > + class CXPathObject : public cppu::WeakImplHelper1< css::xml::xpath::XXPathObject > { private: ::rtl::Reference< DOM::CDocument > const m_pDocument; ::osl::Mutex & m_rMutex; boost::shared_ptr<xmlXPathObject> const m_pXPathObj; - XPathObjectType const m_XPathObjectType; + css::xml::xpath::XPathObjectType const m_XPathObjectType; public: CXPathObject( ::rtl::Reference<DOM::CDocument> const& pDocument, @@ -61,53 +56,53 @@ namespace XPath /** get object type */ - virtual XPathObjectType SAL_CALL getObjectType() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::xml::xpath::XPathObjectType SAL_CALL getObjectType() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** get the nodes from a nodelist type object */ - virtual Reference< XNodeList > SAL_CALL getNodeList() - throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getNodeList() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** get value of a boolean object */ - virtual sal_Bool SAL_CALL getBoolean() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL getBoolean() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** get number as byte */ - virtual sal_Int8 SAL_CALL getByte() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int8 SAL_CALL getByte() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** get number as short */ - virtual sal_Int16 SAL_CALL getShort() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int16 SAL_CALL getShort() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** get number as long */ - virtual sal_Int32 SAL_CALL getLong() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL getLong() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** get number as hyper */ - virtual sal_Int64 SAL_CALL getHyper() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int64 SAL_CALL getHyper() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** get number as float */ - virtual float SAL_CALL getFloat() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual float SAL_CALL getFloat() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** get number as double */ - virtual double SAL_CALL getDouble() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual double SAL_CALL getDouble() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; /** get string value */ - virtual OUString SAL_CALL getString() throw (RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL getString() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; } |