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 <com/sun/star/uno/Reference.h>
25 #include <com/sun/star/xml/dom/XProcessingInstruction.hpp>
27 #include <cppuhelper/implbase.hxx>
32 typedef ::cppu::ImplInheritanceHelper
< CNode
, css::xml::dom::XProcessingInstruction
>
33 CProcessingInstruction_Base
;
35 class CProcessingInstruction
36 : public CProcessingInstruction_Base
39 friend class CDocument
;
41 CProcessingInstruction(
42 CDocument
const& rDocument
, ::osl::Mutex
const& rMutex
,
43 xmlNodePtr
const pNode
);
47 virtual void saxify(const css::uno::Reference
< css::xml::sax::XDocumentHandler
>& i_xHandler
) override
;
50 The content of this processing instruction.
52 virtual OUString SAL_CALL
getData() override
;
55 The target of this processing instruction.
57 virtual OUString SAL_CALL
getTarget() override
;
60 The content of this processing instruction.
62 virtual void SAL_CALL
setData(const OUString
& data
) override
;
64 // ---- resolve uno inheritance problems...
65 // overrides for XNode base
66 virtual OUString SAL_CALL
getNodeName() override
;
67 virtual OUString SAL_CALL
getNodeValue() override
;
68 virtual void SAL_CALL
setNodeValue(OUString
const& rNodeValue
) override
;
70 // --- delegation for XNode base.
71 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
appendChild(const css::uno::Reference
< css::xml::dom::XNode
>& newChild
) override
73 return CNode::appendChild(newChild
);
75 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
cloneNode(sal_Bool deep
) override
77 return CNode::cloneNode(deep
);
79 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getAttributes() override
81 return CNode::getAttributes();
83 virtual css::uno::Reference
< css::xml::dom::XNodeList
> SAL_CALL
getChildNodes() override
85 return CNode::getChildNodes();
87 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getFirstChild() override
89 return CNode::getFirstChild();
91 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getLastChild() override
93 return CNode::getLastChild();
95 virtual OUString SAL_CALL
getLocalName() override
97 return CNode::getLocalName();
99 virtual OUString SAL_CALL
getNamespaceURI() override
101 return CNode::getNamespaceURI();
103 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getNextSibling() override
105 return CNode::getNextSibling();
107 virtual css::xml::dom::NodeType SAL_CALL
getNodeType() override
109 return CNode::getNodeType();
111 virtual css::uno::Reference
< css::xml::dom::XDocument
> SAL_CALL
getOwnerDocument() override
113 return CNode::getOwnerDocument();
115 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getParentNode() override
117 return CNode::getParentNode();
119 virtual OUString SAL_CALL
getPrefix() override
121 return CNode::getPrefix();
123 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getPreviousSibling() override
125 return CNode::getPreviousSibling();
127 virtual sal_Bool SAL_CALL
hasAttributes() override
129 return CNode::hasAttributes();
131 virtual sal_Bool SAL_CALL
hasChildNodes() 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
) override
138 return CNode::insertBefore(newChild
, refChild
);
140 virtual sal_Bool SAL_CALL
isSupported(const OUString
& feature
, const OUString
& ver
) override
142 return CNode::isSupported(feature
, ver
);
144 virtual void SAL_CALL
normalize() override
148 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
removeChild(const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
150 return CNode::removeChild(oldChild
);
152 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
replaceChild(
153 const css::uno::Reference
< css::xml::dom::XNode
>& newChild
, const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
155 return CNode::replaceChild(newChild
, oldChild
);
157 virtual void SAL_CALL
setPrefix(const OUString
& prefix
) override
159 return CNode::setPrefix(prefix
);
165 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */