build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / unoxml / source / dom / documentfragment.hxx
blob62068af0c4784edf86b13084c09e8c19b6bb324a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_UNOXML_SOURCE_DOM_DOCUMENTFRAGMENT_HXX
21 #define INCLUDED_UNOXML_SOURCE_DOM_DOCUMENTFRAGMENT_HXX
23 #include <com/sun/star/uno/Reference.h>
24 #include <com/sun/star/xml/dom/XDocumentFragment.hpp>
26 #include <cppuhelper/implbase.hxx>
27 #include <node.hxx>
29 namespace DOM
31 typedef ::cppu::ImplInheritanceHelper< CNode, css::xml::dom::XDocumentFragment >
32 CDocumentFragment_Base;
34 class CDocumentFragment
35 : public CDocumentFragment_Base
37 private:
38 friend class CDocument;
40 protected:
41 CDocumentFragment(
42 CDocument const& rDocument, ::osl::Mutex const& rMutex,
43 xmlNodePtr const pNode);
45 public:
46 virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType) override;
48 // ---- resolve uno inheritance problems...
49 // overrides for XNode base
50 virtual OUString SAL_CALL getNodeName()
51 throw (css::uno::RuntimeException, std::exception) override;
52 virtual OUString SAL_CALL getNodeValue()
53 throw (css::uno::RuntimeException, std::exception) override;
54 // --- delegation for XNode base.
55 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild)
56 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
58 return CNode::appendChild(newChild);
60 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep)
61 throw (css::uno::RuntimeException, std::exception) override
63 return CNode::cloneNode(deep);
65 virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes()
66 throw (css::uno::RuntimeException, std::exception) override
68 return CNode::getAttributes();
70 virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes()
71 throw (css::uno::RuntimeException, std::exception) override
73 return CNode::getChildNodes();
75 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild()
76 throw (css::uno::RuntimeException, std::exception) override
78 return CNode::getFirstChild();
80 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild()
81 throw (css::uno::RuntimeException, std::exception) override
83 return CNode::getLastChild();
85 virtual OUString SAL_CALL getLocalName()
86 throw (css::uno::RuntimeException, std::exception) override
88 return CNode::getLocalName();
90 virtual OUString SAL_CALL getNamespaceURI()
91 throw (css::uno::RuntimeException, std::exception) override
93 return CNode::getNamespaceURI();
95 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling()
96 throw (css::uno::RuntimeException, std::exception) override
98 return CNode::getNextSibling();
100 virtual css::xml::dom::NodeType SAL_CALL getNodeType()
101 throw (css::uno::RuntimeException, std::exception) override
103 return CNode::getNodeType();
105 virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument()
106 throw (css::uno::RuntimeException, std::exception) override
108 return CNode::getOwnerDocument();
110 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode()
111 throw (css::uno::RuntimeException, std::exception) override
113 return CNode::getParentNode();
115 virtual OUString SAL_CALL getPrefix()
116 throw (css::uno::RuntimeException, std::exception) override
118 return CNode::getPrefix();
120 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling()
121 throw (css::uno::RuntimeException, std::exception) override
123 return CNode::getPreviousSibling();
125 virtual sal_Bool SAL_CALL hasAttributes()
126 throw (css::uno::RuntimeException, std::exception) override
128 return CNode::hasAttributes();
130 virtual sal_Bool SAL_CALL hasChildNodes()
131 throw (css::uno::RuntimeException, std::exception) override
133 return CNode::hasChildNodes();
135 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore(
136 const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild)
137 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
139 return CNode::insertBefore(newChild, refChild);
141 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
142 throw (css::uno::RuntimeException, std::exception) override
144 return CNode::isSupported(feature, ver);
146 virtual void SAL_CALL normalize()
147 throw (css::uno::RuntimeException, std::exception) override
149 CNode::normalize();
151 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild)
152 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
154 return CNode::removeChild(oldChild);
156 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild(
157 const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild)
158 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
160 return CNode::replaceChild(newChild, oldChild);
162 virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
163 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
165 return CNode::setNodeValue(nodeValue);
167 virtual void SAL_CALL setPrefix(const OUString& prefix)
168 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
170 return CNode::setPrefix(prefix);
176 #endif
178 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */