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 .
22 #include <libxml/tree.h>
24 #include <sal/types.h>
26 #include <com/sun/star/uno/Reference.h>
27 #include <com/sun/star/xml/dom/XDocumentType.hpp>
28 #include <com/sun/star/xml/dom/XNodeList.hpp>
29 #include <com/sun/star/xml/dom/XNamedNodeMap.hpp>
31 #include <cppuhelper/implbase.hxx>
36 typedef ::cppu::ImplInheritanceHelper
< CNode
, css::xml::dom::XDocumentType
>
40 : public CDocumentType_Base
43 friend class CDocument
;
47 CDocumentType(CDocument
const& rDocument
, ::osl::Mutex
const& rMutex
,
48 xmlDtdPtr
const pDtd
);
52 A NamedNodeMap containing the general entities, both external and
53 internal, declared in the DTD.
55 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getEntities() override
;
58 The internal subset as a string, or null if there is none.
60 virtual OUString SAL_CALL
getInternalSubset() override
;
63 The name of DTD; i.e., the name immediately following the DOCTYPE
66 virtual OUString SAL_CALL
getName() override
;
69 A NamedNodeMap containing the notations declared in the DTD.
71 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getNotations() override
;
74 The public identifier of the external subset.
76 virtual OUString SAL_CALL
getPublicId() override
;
79 The system identifier of the external subset.
81 virtual OUString SAL_CALL
getSystemId() override
;
83 // ---- resolve uno inheritance problems...
84 // overrides for XNode base
85 virtual OUString SAL_CALL
getNodeName() override
;
86 virtual OUString SAL_CALL
getNodeValue() override
;
87 // --- delegation for XNode base.
88 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
appendChild(const css::uno::Reference
< css::xml::dom::XNode
>& newChild
) override
90 return CNode::appendChild(newChild
);
92 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
cloneNode(sal_Bool deep
) override
94 return CNode::cloneNode(deep
);
96 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getAttributes() override
98 return CNode::getAttributes();
100 virtual css::uno::Reference
< css::xml::dom::XNodeList
> SAL_CALL
getChildNodes() override
102 return CNode::getChildNodes();
104 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getFirstChild() override
106 return CNode::getFirstChild();
108 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getLastChild() override
110 return CNode::getLastChild();
112 virtual OUString SAL_CALL
getLocalName() override
114 return CNode::getLocalName();
116 virtual OUString SAL_CALL
getNamespaceURI() override
118 return CNode::getNamespaceURI();
120 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getNextSibling() override
122 return CNode::getNextSibling();
124 virtual css::xml::dom::NodeType SAL_CALL
getNodeType() override
126 return CNode::getNodeType();
128 virtual css::uno::Reference
< css::xml::dom::XDocument
> SAL_CALL
getOwnerDocument() override
130 return CNode::getOwnerDocument();
132 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getParentNode() override
134 return CNode::getParentNode();
136 virtual OUString SAL_CALL
getPrefix() override
138 return CNode::getPrefix();
140 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getPreviousSibling() override
142 return CNode::getPreviousSibling();
144 virtual sal_Bool SAL_CALL
hasAttributes() override
146 return CNode::hasAttributes();
148 virtual sal_Bool SAL_CALL
hasChildNodes() override
150 return CNode::hasChildNodes();
152 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
insertBefore(
153 const css::uno::Reference
< css::xml::dom::XNode
>& newChild
, const css::uno::Reference
< css::xml::dom::XNode
>& refChild
) override
155 return CNode::insertBefore(newChild
, refChild
);
157 virtual sal_Bool SAL_CALL
isSupported(const OUString
& feature
, const OUString
& ver
) override
159 return CNode::isSupported(feature
, ver
);
161 virtual void SAL_CALL
normalize() override
165 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
removeChild(const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
167 return CNode::removeChild(oldChild
);
169 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
replaceChild(
170 const css::uno::Reference
< css::xml::dom::XNode
>& newChild
, const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
172 return CNode::replaceChild(newChild
, oldChild
);
174 virtual void SAL_CALL
setNodeValue(const OUString
& nodeValue
) override
176 return CNode::setNodeValue(nodeValue
);
178 virtual void SAL_CALL
setPrefix(const OUString
& prefix
) override
180 return CNode::setPrefix(prefix
);
186 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */