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 DOM_PROCESSINGINSTRUCTION_HXX
21 #define 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>
31 using namespace com::sun::star::uno
;
32 using namespace com::sun::star::xml::dom
;
36 typedef ::cppu::ImplInheritanceHelper1
< CNode
, XProcessingInstruction
>
37 CProcessingInstruction_Base
;
39 class CProcessingInstruction
40 : public CProcessingInstruction_Base
43 friend class CDocument
;
46 CProcessingInstruction(
47 CDocument
const& rDocument
, ::osl::Mutex
const& rMutex
,
48 xmlNodePtr
const pNode
);
52 virtual void saxify(const Reference
< XDocumentHandler
>& i_xHandler
);
55 The content of this processing instruction.
57 virtual OUString SAL_CALL
getData() throw (RuntimeException
);
60 The target of this processing instruction.
62 virtual OUString SAL_CALL
getTarget() throw (RuntimeException
);
65 The content of this processing instruction.
67 virtual void SAL_CALL
setData(const OUString
& data
) throw (RuntimeException
, DOMException
);
69 // ---- resolve uno inheritance problems...
70 // overrides for XNode base
71 virtual OUString SAL_CALL
getNodeName()
72 throw (RuntimeException
);
73 virtual OUString SAL_CALL
getNodeValue()
74 throw (RuntimeException
);
75 virtual void SAL_CALL
setNodeValue(OUString
const& rNodeValue
)
76 throw (RuntimeException
, DOMException
);
78 // --- delegation for XNde base.
79 virtual Reference
< XNode
> SAL_CALL
appendChild(const Reference
< XNode
>& newChild
)
80 throw (RuntimeException
, DOMException
)
82 return CNode::appendChild(newChild
);
84 virtual Reference
< XNode
> SAL_CALL
cloneNode(sal_Bool deep
)
85 throw (RuntimeException
)
87 return CNode::cloneNode(deep
);
89 virtual Reference
< XNamedNodeMap
> SAL_CALL
getAttributes()
90 throw (RuntimeException
)
92 return CNode::getAttributes();
94 virtual Reference
< XNodeList
> SAL_CALL
getChildNodes()
95 throw (RuntimeException
)
97 return CNode::getChildNodes();
99 virtual Reference
< XNode
> SAL_CALL
getFirstChild()
100 throw (RuntimeException
)
102 return CNode::getFirstChild();
104 virtual Reference
< XNode
> SAL_CALL
getLastChild()
105 throw (RuntimeException
)
107 return CNode::getLastChild();
109 virtual OUString SAL_CALL
getLocalName()
110 throw (RuntimeException
)
112 return CNode::getLocalName();
114 virtual OUString SAL_CALL
getNamespaceURI()
115 throw (RuntimeException
)
117 return CNode::getNamespaceURI();
119 virtual Reference
< XNode
> SAL_CALL
getNextSibling()
120 throw (RuntimeException
)
122 return CNode::getNextSibling();
124 virtual NodeType SAL_CALL
getNodeType()
125 throw (RuntimeException
)
127 return CNode::getNodeType();
129 virtual Reference
< XDocument
> SAL_CALL
getOwnerDocument()
130 throw (RuntimeException
)
132 return CNode::getOwnerDocument();
134 virtual Reference
< XNode
> SAL_CALL
getParentNode()
135 throw (RuntimeException
)
137 return CNode::getParentNode();
139 virtual OUString SAL_CALL
getPrefix()
140 throw (RuntimeException
)
142 return CNode::getPrefix();
144 virtual Reference
< XNode
> SAL_CALL
getPreviousSibling()
145 throw (RuntimeException
)
147 return CNode::getPreviousSibling();
149 virtual sal_Bool SAL_CALL
hasAttributes()
150 throw (RuntimeException
)
152 return CNode::hasAttributes();
154 virtual sal_Bool SAL_CALL
hasChildNodes()
155 throw (RuntimeException
)
157 return CNode::hasChildNodes();
159 virtual Reference
< XNode
> SAL_CALL
insertBefore(
160 const Reference
< XNode
>& newChild
, const Reference
< XNode
>& refChild
)
161 throw (RuntimeException
, DOMException
)
163 return CNode::insertBefore(newChild
, refChild
);
165 virtual sal_Bool SAL_CALL
isSupported(const OUString
& feature
, const OUString
& ver
)
166 throw (RuntimeException
)
168 return CNode::isSupported(feature
, ver
);
170 virtual void SAL_CALL
normalize()
171 throw (RuntimeException
)
175 virtual Reference
< XNode
> SAL_CALL
removeChild(const Reference
< XNode
>& oldChild
)
176 throw (RuntimeException
, DOMException
)
178 return CNode::removeChild(oldChild
);
180 virtual Reference
< XNode
> SAL_CALL
replaceChild(
181 const Reference
< XNode
>& newChild
, const Reference
< XNode
>& oldChild
)
182 throw (RuntimeException
, DOMException
)
184 return CNode::replaceChild(newChild
, oldChild
);
186 virtual void SAL_CALL
setPrefix(const OUString
& prefix
)
187 throw (RuntimeException
, DOMException
)
189 return CNode::setPrefix(prefix
);
197 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */