1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
37 typedef ::cppu::ImplInheritanceHelper
< CNode
, css::xml::dom::XDocumentType
>
41 : public CDocumentType_Base
44 friend class CDocument
;
48 CDocumentType(CDocument
const& rDocument
, ::osl::Mutex
const& rMutex
,
49 xmlDtdPtr
const pDtd
);
53 A NamedNodeMap containing the general entities, both external and
54 internal, declared in the DTD.
56 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getEntities() override
;
59 The internal subset as a string, or null if there is none.
61 virtual OUString SAL_CALL
getInternalSubset() override
;
64 The name of DTD; i.e., the name immediately following the DOCTYPE
67 virtual OUString SAL_CALL
getName() override
;
70 A NamedNodeMap containing the notations declared in the DTD.
72 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getNotations() override
;
75 The public identifier of the external subset.
77 virtual OUString SAL_CALL
getPublicId() override
;
80 The system identifier of the external subset.
82 virtual OUString SAL_CALL
getSystemId() override
;
84 // ---- resolve uno inheritance problems...
85 // overrides for XNode base
86 virtual OUString SAL_CALL
getNodeName() override
;
87 virtual OUString SAL_CALL
getNodeValue() override
;
88 // --- delegation for XNode base.
89 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
appendChild(const css::uno::Reference
< css::xml::dom::XNode
>& newChild
) override
91 return CNode::appendChild(newChild
);
93 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
cloneNode(sal_Bool deep
) override
95 return CNode::cloneNode(deep
);
97 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getAttributes() override
99 return CNode::getAttributes();
101 virtual css::uno::Reference
< css::xml::dom::XNodeList
> SAL_CALL
getChildNodes() override
103 return CNode::getChildNodes();
105 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getFirstChild() override
107 return CNode::getFirstChild();
109 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getLastChild() override
111 return CNode::getLastChild();
113 virtual OUString SAL_CALL
getLocalName() override
115 return CNode::getLocalName();
117 virtual OUString SAL_CALL
getNamespaceURI() override
119 return CNode::getNamespaceURI();
121 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getNextSibling() override
123 return CNode::getNextSibling();
125 virtual css::xml::dom::NodeType SAL_CALL
getNodeType() override
127 return CNode::getNodeType();
129 virtual css::uno::Reference
< css::xml::dom::XDocument
> SAL_CALL
getOwnerDocument() override
131 return CNode::getOwnerDocument();
133 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getParentNode() override
135 return CNode::getParentNode();
137 virtual OUString SAL_CALL
getPrefix() override
139 return CNode::getPrefix();
141 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getPreviousSibling() override
143 return CNode::getPreviousSibling();
145 virtual sal_Bool SAL_CALL
hasAttributes() override
147 return CNode::hasAttributes();
149 virtual sal_Bool SAL_CALL
hasChildNodes() override
151 return CNode::hasChildNodes();
153 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
insertBefore(
154 const css::uno::Reference
< css::xml::dom::XNode
>& newChild
, const css::uno::Reference
< css::xml::dom::XNode
>& refChild
) override
156 return CNode::insertBefore(newChild
, refChild
);
158 virtual sal_Bool SAL_CALL
isSupported(const OUString
& feature
, const OUString
& ver
) override
160 return CNode::isSupported(feature
, ver
);
162 virtual void SAL_CALL
normalize() override
166 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
removeChild(const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
168 return CNode::removeChild(oldChild
);
170 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
replaceChild(
171 const css::uno::Reference
< css::xml::dom::XNode
>& newChild
, const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
173 return CNode::replaceChild(newChild
, oldChild
);
175 virtual void SAL_CALL
setNodeValue(const OUString
& nodeValue
) override
177 return CNode::setNodeValue(nodeValue
);
179 virtual void SAL_CALL
setPrefix(const OUString
& prefix
) override
181 return CNode::setPrefix(prefix
);
188 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */