build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / unoxml / source / dom / documenttype.hxx
blob711f1a4e5a595a2463cd426b50a6b9b58a0a038b
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_DOCUMENTTYPE_HXX
21 #define INCLUDED_UNOXML_SOURCE_DOM_DOCUMENTTYPE_HXX
23 #include <libxml/tree.h>
25 #include <sal/types.h>
27 #include <com/sun/star/uno/Reference.h>
28 #include <com/sun/star/xml/dom/XDocumentType.hpp>
29 #include <com/sun/star/xml/dom/XNodeList.hpp>
30 #include <com/sun/star/xml/dom/XNamedNodeMap.hpp>
32 #include <cppuhelper/implbase.hxx>
33 #include <node.hxx>
35 namespace DOM
37 typedef ::cppu::ImplInheritanceHelper< CNode, css::xml::dom::XDocumentType >
38 CDocumentType_Base;
40 class CDocumentType
41 : public CDocumentType_Base
43 private:
44 friend class CDocument;
46 private:
47 xmlDtdPtr m_aDtdPtr;
49 protected:
50 CDocumentType(CDocument const& rDocument, ::osl::Mutex const& rMutex,
51 xmlDtdPtr const pDtd);
53 public:
54 /**
55 A NamedNodeMap containing the general entities, both external and
56 internal, declared in the DTD.
58 virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getEntities() throw (css::uno::RuntimeException, std::exception) override;
60 /**
61 The internal subset as a string, or null if there is none.
63 virtual OUString SAL_CALL getInternalSubset() throw (css::uno::RuntimeException, std::exception) override;
65 /**
66 The name of DTD; i.e., the name immediately following the DOCTYPE
67 keyword.
69 virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException, std::exception) override;
71 /**
72 A NamedNodeMap containing the notations declared in the DTD.
74 virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getNotations() throw (css::uno::RuntimeException, std::exception) override;
76 /**
77 The public identifier of the external subset.
79 virtual OUString SAL_CALL getPublicId() throw (css::uno::RuntimeException, std::exception) override;
81 /**
82 The system identifier of the external subset.
84 virtual OUString SAL_CALL getSystemId() throw (css::uno::RuntimeException, std::exception) override;
86 // ---- resolve uno inheritance problems...
87 // overrides for XNode base
88 virtual OUString SAL_CALL getNodeName()
89 throw (css::uno::RuntimeException, std::exception) override;
90 virtual OUString SAL_CALL getNodeValue()
91 throw (css::uno::RuntimeException, std::exception) override;
92 // --- delegation for XNode base.
93 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild)
94 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
96 return CNode::appendChild(newChild);
98 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep)
99 throw (css::uno::RuntimeException, std::exception) override
101 return CNode::cloneNode(deep);
103 virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes()
104 throw (css::uno::RuntimeException, std::exception) override
106 return CNode::getAttributes();
108 virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes()
109 throw (css::uno::RuntimeException, std::exception) override
111 return CNode::getChildNodes();
113 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild()
114 throw (css::uno::RuntimeException, std::exception) override
116 return CNode::getFirstChild();
118 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild()
119 throw (css::uno::RuntimeException, std::exception) override
121 return CNode::getLastChild();
123 virtual OUString SAL_CALL getLocalName()
124 throw (css::uno::RuntimeException, std::exception) override
126 return CNode::getLocalName();
128 virtual OUString SAL_CALL getNamespaceURI()
129 throw (css::uno::RuntimeException, std::exception) override
131 return CNode::getNamespaceURI();
133 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling()
134 throw (css::uno::RuntimeException, std::exception) override
136 return CNode::getNextSibling();
138 virtual css::xml::dom::NodeType SAL_CALL getNodeType()
139 throw (css::uno::RuntimeException, std::exception) override
141 return CNode::getNodeType();
143 virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument()
144 throw (css::uno::RuntimeException, std::exception) override
146 return CNode::getOwnerDocument();
148 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode()
149 throw (css::uno::RuntimeException, std::exception) override
151 return CNode::getParentNode();
153 virtual OUString SAL_CALL getPrefix()
154 throw (css::uno::RuntimeException, std::exception) override
156 return CNode::getPrefix();
158 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling()
159 throw (css::uno::RuntimeException, std::exception) override
161 return CNode::getPreviousSibling();
163 virtual sal_Bool SAL_CALL hasAttributes()
164 throw (css::uno::RuntimeException, std::exception) override
166 return CNode::hasAttributes();
168 virtual sal_Bool SAL_CALL hasChildNodes()
169 throw (css::uno::RuntimeException, std::exception) override
171 return CNode::hasChildNodes();
173 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore(
174 const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild)
175 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
177 return CNode::insertBefore(newChild, refChild);
179 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
180 throw (css::uno::RuntimeException, std::exception) override
182 return CNode::isSupported(feature, ver);
184 virtual void SAL_CALL normalize()
185 throw (css::uno::RuntimeException, std::exception) override
187 CNode::normalize();
189 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild)
190 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
192 return CNode::removeChild(oldChild);
194 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild(
195 const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild)
196 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
198 return CNode::replaceChild(newChild, oldChild);
200 virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
201 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
203 return CNode::setNodeValue(nodeValue);
205 virtual void SAL_CALL setPrefix(const OUString& prefix)
206 throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) override
208 return CNode::setPrefix(prefix);
213 #endif
215 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */