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_PROCESSINGINSTRUCTION_HXX
21 #define INCLUDED_UNOXML_SOURCE_DOM_PROCESSINGINSTRUCTION_HXX
23 #include <libxml/tree.h>
25 #include <com/sun/star/uno/Reference.h>
26 #include <com/sun/star/xml/dom/XProcessingInstruction.hpp>
28 #include <cppuhelper/implbase.hxx>
33 typedef ::cppu::ImplInheritanceHelper
< CNode
, css::xml::dom::XProcessingInstruction
>
34 CProcessingInstruction_Base
;
36 class CProcessingInstruction
37 : public CProcessingInstruction_Base
40 friend class CDocument
;
42 CProcessingInstruction(
43 CDocument
const& rDocument
, ::osl::Mutex
const& rMutex
,
44 xmlNodePtr
const pNode
);
48 virtual void saxify(const css::uno::Reference
< css::xml::sax::XDocumentHandler
>& i_xHandler
) override
;
51 The content of this processing instruction.
53 virtual OUString SAL_CALL
getData() override
;
56 The target of this processing instruction.
58 virtual OUString SAL_CALL
getTarget() override
;
61 The content of this processing instruction.
63 virtual void SAL_CALL
setData(const OUString
& data
) override
;
65 // ---- resolve uno inheritance problems...
66 // overrides for XNode base
67 virtual OUString SAL_CALL
getNodeName() override
;
68 virtual OUString SAL_CALL
getNodeValue() override
;
69 virtual void SAL_CALL
setNodeValue(OUString
const& rNodeValue
) override
;
71 // --- delegation for XNode base.
72 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
appendChild(const css::uno::Reference
< css::xml::dom::XNode
>& newChild
) override
74 return CNode::appendChild(newChild
);
76 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
cloneNode(sal_Bool deep
) override
78 return CNode::cloneNode(deep
);
80 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getAttributes() override
82 return CNode::getAttributes();
84 virtual css::uno::Reference
< css::xml::dom::XNodeList
> SAL_CALL
getChildNodes() override
86 return CNode::getChildNodes();
88 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getFirstChild() override
90 return CNode::getFirstChild();
92 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getLastChild() override
94 return CNode::getLastChild();
96 virtual OUString SAL_CALL
getLocalName() override
98 return CNode::getLocalName();
100 virtual OUString SAL_CALL
getNamespaceURI() override
102 return CNode::getNamespaceURI();
104 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getNextSibling() override
106 return CNode::getNextSibling();
108 virtual css::xml::dom::NodeType SAL_CALL
getNodeType() override
110 return CNode::getNodeType();
112 virtual css::uno::Reference
< css::xml::dom::XDocument
> SAL_CALL
getOwnerDocument() override
114 return CNode::getOwnerDocument();
116 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getParentNode() override
118 return CNode::getParentNode();
120 virtual OUString SAL_CALL
getPrefix() override
122 return CNode::getPrefix();
124 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getPreviousSibling() override
126 return CNode::getPreviousSibling();
128 virtual sal_Bool SAL_CALL
hasAttributes() override
130 return CNode::hasAttributes();
132 virtual sal_Bool SAL_CALL
hasChildNodes() override
134 return CNode::hasChildNodes();
136 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
insertBefore(
137 const css::uno::Reference
< css::xml::dom::XNode
>& newChild
, const css::uno::Reference
< css::xml::dom::XNode
>& refChild
) override
139 return CNode::insertBefore(newChild
, refChild
);
141 virtual sal_Bool SAL_CALL
isSupported(const OUString
& feature
, const OUString
& ver
) override
143 return CNode::isSupported(feature
, ver
);
145 virtual void SAL_CALL
normalize() override
149 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
removeChild(const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
151 return CNode::removeChild(oldChild
);
153 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
replaceChild(
154 const css::uno::Reference
< css::xml::dom::XNode
>& newChild
, const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
156 return CNode::replaceChild(newChild
, oldChild
);
158 virtual void SAL_CALL
setPrefix(const OUString
& prefix
) override
160 return CNode::setPrefix(prefix
);
168 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */