xref: /aoo41x/main/unoxml/source/dom/document.hxx (revision 7f654276)
1*7f654276SAndrew Rist /**************************************************************
2*7f654276SAndrew Rist  *
3*7f654276SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*7f654276SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*7f654276SAndrew Rist  * distributed with this work for additional information
6*7f654276SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*7f654276SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*7f654276SAndrew Rist  * "License"); you may not use this file except in compliance
9*7f654276SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*7f654276SAndrew Rist  *
11*7f654276SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*7f654276SAndrew Rist  *
13*7f654276SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*7f654276SAndrew Rist  * software distributed under the License is distributed on an
15*7f654276SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7f654276SAndrew Rist  * KIND, either express or implied.  See the License for the
17*7f654276SAndrew Rist  * specific language governing permissions and limitations
18*7f654276SAndrew Rist  * under the License.
19*7f654276SAndrew Rist  *
20*7f654276SAndrew Rist  *************************************************************/
21*7f654276SAndrew Rist 
22*7f654276SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef DOM_DOCUMENT_HXX
25cdf0e10cSrcweir #define DOM_DOCUMENT_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <set>
28cdf0e10cSrcweir #include <memory>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #include <libxml/tree.h>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <sal/types.h>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include <cppuhelper/implbase6.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h>
37cdf0e10cSrcweir #include <com/sun/star/beans/StringPair.hpp>
38cdf0e10cSrcweir #include <com/sun/star/xml/dom/XNode.hpp>
39cdf0e10cSrcweir #include <com/sun/star/xml/dom/XAttr.hpp>
40cdf0e10cSrcweir #include <com/sun/star/xml/dom/XElement.hpp>
41cdf0e10cSrcweir #include <com/sun/star/xml/dom/XDOMImplementation.hpp>
42cdf0e10cSrcweir #include <com/sun/star/xml/dom/events/XDocumentEvent.hpp>
43cdf0e10cSrcweir #include <com/sun/star/xml/dom/events/XEvent.hpp>
44cdf0e10cSrcweir #include <com/sun/star/xml/sax/XSAXSerializable.hpp>
45cdf0e10cSrcweir #include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
46cdf0e10cSrcweir #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
47cdf0e10cSrcweir #include <com/sun/star/xml/sax/XFastDocumentHandler.hpp>
48cdf0e10cSrcweir #include <com/sun/star/io/XActiveDataSource.hpp>
49cdf0e10cSrcweir #include <com/sun/star/io/XActiveDataControl.hpp>
50cdf0e10cSrcweir #include <com/sun/star/io/XOutputStream.hpp>
51cdf0e10cSrcweir #include <com/sun/star/io/XStreamListener.hpp>
52cdf0e10cSrcweir 
53cdf0e10cSrcweir #include "node.hxx"
54cdf0e10cSrcweir 
55cdf0e10cSrcweir 
56cdf0e10cSrcweir using namespace std;
57cdf0e10cSrcweir using ::rtl::OUString;
58cdf0e10cSrcweir using namespace com::sun::star;
59cdf0e10cSrcweir using namespace com::sun::star::uno;
60cdf0e10cSrcweir using namespace com::sun::star::xml::sax;
61cdf0e10cSrcweir using namespace com::sun::star::io;
62cdf0e10cSrcweir using namespace com::sun::star::xml::dom;
63cdf0e10cSrcweir using namespace com::sun::star::xml::dom::events;
64cdf0e10cSrcweir 
65cdf0e10cSrcweir namespace DOM
66cdf0e10cSrcweir {
67cdf0e10cSrcweir     namespace events {
68cdf0e10cSrcweir         class CEventDispatcher;
69cdf0e10cSrcweir     }
70cdf0e10cSrcweir 
71cdf0e10cSrcweir     class CElement;
72cdf0e10cSrcweir 
73cdf0e10cSrcweir     typedef ::cppu::ImplInheritanceHelper6<
74cdf0e10cSrcweir             CNode, XDocument, XDocumentEvent,
75cdf0e10cSrcweir             XActiveDataControl, XActiveDataSource,
76cdf0e10cSrcweir             XSAXSerializable, XFastSAXSerializable>
77cdf0e10cSrcweir         CDocument_Base;
78cdf0e10cSrcweir 
79cdf0e10cSrcweir     class CDocument
80cdf0e10cSrcweir         : public CDocument_Base
81cdf0e10cSrcweir     {
82cdf0e10cSrcweir 
83cdf0e10cSrcweir     private:
84cdf0e10cSrcweir         /// this Mutex is used for synchronization of all UNO wrapper
85cdf0e10cSrcweir         /// objects that belong to this document
86cdf0e10cSrcweir         ::osl::Mutex m_Mutex;
87cdf0e10cSrcweir         /// the libxml document: freed in destructor
88cdf0e10cSrcweir         /// => all UNO wrapper objects must keep the CDocument alive
89cdf0e10cSrcweir         xmlDocPtr const m_aDocPtr;
90cdf0e10cSrcweir 
91cdf0e10cSrcweir 		// datacontrol/source state
92cdf0e10cSrcweir         typedef set< Reference< XStreamListener > > listenerlist_t;
93cdf0e10cSrcweir 		listenerlist_t m_streamListeners;
94cdf0e10cSrcweir 		Reference< XOutputStream > m_rOutputStream;
95cdf0e10cSrcweir 
96cdf0e10cSrcweir         typedef std::map< const xmlNodePtr,
97cdf0e10cSrcweir                     ::std::pair< WeakReference<XNode>, CNode* > > nodemap_t;
98cdf0e10cSrcweir         nodemap_t m_NodeMap;
99cdf0e10cSrcweir 
100cdf0e10cSrcweir         ::std::auto_ptr<events::CEventDispatcher> const m_pEventDispatcher;
101cdf0e10cSrcweir 
102cdf0e10cSrcweir         CDocument(xmlDocPtr const pDocPtr);
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 
105cdf0e10cSrcweir     public:
106cdf0e10cSrcweir         /// factory: only way to create instance!
107cdf0e10cSrcweir         static ::rtl::Reference<CDocument>
108cdf0e10cSrcweir             CreateCDocument(xmlDocPtr const pDoc);
109cdf0e10cSrcweir 
110cdf0e10cSrcweir         virtual ~CDocument();
111cdf0e10cSrcweir 
112cdf0e10cSrcweir         // needed by CXPathAPI
GetMutex()113cdf0e10cSrcweir         ::osl::Mutex & GetMutex() { return m_Mutex; }
114cdf0e10cSrcweir 
115cdf0e10cSrcweir         events::CEventDispatcher & GetEventDispatcher();
116cdf0e10cSrcweir         ::rtl::Reference< CElement > GetDocumentElement();
117cdf0e10cSrcweir 
118cdf0e10cSrcweir         /// get UNO wrapper instance for a libxml node
119cdf0e10cSrcweir         ::rtl::Reference<CNode> GetCNode(
120cdf0e10cSrcweir                 xmlNodePtr const pNode, bool const bCreate = true);
121cdf0e10cSrcweir         /// remove a UNO wrapper instance
122cdf0e10cSrcweir         void RemoveCNode(xmlNodePtr const pNode, CNode const*const pCNode);
123cdf0e10cSrcweir 
124cdf0e10cSrcweir         virtual CDocument & GetOwnerDocument();
125cdf0e10cSrcweir 
126cdf0e10cSrcweir         virtual void saxify(const Reference< XDocumentHandler >& i_xHandler);
127cdf0e10cSrcweir 
128cdf0e10cSrcweir         virtual void fastSaxify( Context& rContext );
129cdf0e10cSrcweir 
130cdf0e10cSrcweir         virtual bool IsChildTypeAllowed(NodeType const nodeType);
131cdf0e10cSrcweir 
132cdf0e10cSrcweir         /**
133cdf0e10cSrcweir         Creates an Attr of the given name.
134cdf0e10cSrcweir         */
135cdf0e10cSrcweir         virtual Reference< XAttr > SAL_CALL createAttribute(const OUString& name)
136cdf0e10cSrcweir             throw (RuntimeException, DOMException);
137cdf0e10cSrcweir 
138cdf0e10cSrcweir         /**
139cdf0e10cSrcweir         Creates an attribute of the given qualified name and namespace URI.
140cdf0e10cSrcweir         */
141cdf0e10cSrcweir         virtual Reference< XAttr > SAL_CALL createAttributeNS(const OUString& namespaceURI, const OUString& qualifiedName)
142cdf0e10cSrcweir             throw (RuntimeException, DOMException);
143cdf0e10cSrcweir 
144cdf0e10cSrcweir         /**
145cdf0e10cSrcweir         Creates a CDATASection node whose value is the specified string.
146cdf0e10cSrcweir         */
147cdf0e10cSrcweir         virtual Reference< XCDATASection > SAL_CALL createCDATASection(const OUString& data)
148cdf0e10cSrcweir             throw (RuntimeException);
149cdf0e10cSrcweir 
150cdf0e10cSrcweir         /**
151cdf0e10cSrcweir         Creates a Comment node given the specified string.
152cdf0e10cSrcweir         */
153cdf0e10cSrcweir         virtual Reference< XComment > SAL_CALL createComment(const OUString& data)
154cdf0e10cSrcweir             throw (RuntimeException);
155cdf0e10cSrcweir 
156cdf0e10cSrcweir         /**
157cdf0e10cSrcweir         Creates an empty DocumentFragment object.
158cdf0e10cSrcweir         */
159cdf0e10cSrcweir         virtual Reference< XDocumentFragment > SAL_CALL createDocumentFragment()
160cdf0e10cSrcweir             throw (RuntimeException);
161cdf0e10cSrcweir 
162cdf0e10cSrcweir         /**
163cdf0e10cSrcweir         Creates an element of the type specified.
164cdf0e10cSrcweir         */
165cdf0e10cSrcweir         virtual Reference< XElement > SAL_CALL createElement(const OUString& tagName)
166cdf0e10cSrcweir             throw (RuntimeException, DOMException);
167cdf0e10cSrcweir 
168cdf0e10cSrcweir         /**
169cdf0e10cSrcweir         Creates an element of the given qualified name and namespace URI.
170cdf0e10cSrcweir         */
171cdf0e10cSrcweir         virtual Reference< XElement > SAL_CALL createElementNS(const OUString& namespaceURI, const OUString& qualifiedName)
172cdf0e10cSrcweir             throw (RuntimeException, DOMException);
173cdf0e10cSrcweir 
174cdf0e10cSrcweir         /**
175cdf0e10cSrcweir         Creates an EntityReference object.
176cdf0e10cSrcweir         */
177cdf0e10cSrcweir         virtual Reference< XEntityReference > SAL_CALL createEntityReference(const OUString& name)
178cdf0e10cSrcweir             throw (RuntimeException, DOMException);
179cdf0e10cSrcweir 
180cdf0e10cSrcweir         /**
181cdf0e10cSrcweir         Creates a ProcessingInstruction node given the specified name and
182cdf0e10cSrcweir         data strings.
183cdf0e10cSrcweir         */
184cdf0e10cSrcweir         virtual Reference< XProcessingInstruction > SAL_CALL createProcessingInstruction(
185cdf0e10cSrcweir                 const OUString& target, const OUString& data)
186cdf0e10cSrcweir             throw (RuntimeException, DOMException);
187cdf0e10cSrcweir 
188cdf0e10cSrcweir         /**
189cdf0e10cSrcweir         Creates a Text node given the specified string.
190cdf0e10cSrcweir         */
191cdf0e10cSrcweir         virtual Reference< XText > SAL_CALL createTextNode(const OUString& data)
192cdf0e10cSrcweir             throw (RuntimeException);
193cdf0e10cSrcweir 
194cdf0e10cSrcweir         /**
195cdf0e10cSrcweir         The Document Type Declaration (see DocumentType) associated with this
196cdf0e10cSrcweir         document.
197cdf0e10cSrcweir         */
198cdf0e10cSrcweir         virtual Reference< XDocumentType > SAL_CALL getDoctype()
199cdf0e10cSrcweir             throw (RuntimeException);
200cdf0e10cSrcweir 
201cdf0e10cSrcweir         /**
202cdf0e10cSrcweir         This is a convenience attribute that allows direct access to the child
203cdf0e10cSrcweir         node that is the root element of the document.
204cdf0e10cSrcweir         */
205cdf0e10cSrcweir         virtual Reference< XElement > SAL_CALL getDocumentElement()
206cdf0e10cSrcweir             throw (RuntimeException);
207cdf0e10cSrcweir 
208cdf0e10cSrcweir         /**
209cdf0e10cSrcweir         Returns the Element whose ID is given by elementId.
210cdf0e10cSrcweir         */
211cdf0e10cSrcweir         virtual Reference< XElement > SAL_CALL getElementById(const OUString& elementId)
212cdf0e10cSrcweir             throw (RuntimeException);
213cdf0e10cSrcweir 
214cdf0e10cSrcweir         /**
215cdf0e10cSrcweir         Returns a NodeList of all the Elements with a given tag name in the
216cdf0e10cSrcweir         order in which they are encountered in a preorder traversal of the
217cdf0e10cSrcweir         Document tree.
218cdf0e10cSrcweir         */
219cdf0e10cSrcweir         virtual Reference< XNodeList > SAL_CALL getElementsByTagName(const OUString& tagname)
220cdf0e10cSrcweir             throw (RuntimeException);
221cdf0e10cSrcweir 
222cdf0e10cSrcweir         /**
223cdf0e10cSrcweir         Returns a NodeList of all the Elements with a given local name and
224cdf0e10cSrcweir         namespace URI in the order in which they are encountered in a preorder
225cdf0e10cSrcweir         traversal of the Document tree.
226cdf0e10cSrcweir         */
227cdf0e10cSrcweir         virtual Reference< XNodeList > SAL_CALL getElementsByTagNameNS(const OUString& namespaceURI, const OUString& localName)
228cdf0e10cSrcweir             throw (RuntimeException);
229cdf0e10cSrcweir 
230cdf0e10cSrcweir         /**
231cdf0e10cSrcweir         The DOMImplementation object that handles this document.
232cdf0e10cSrcweir         */
233cdf0e10cSrcweir         virtual Reference< XDOMImplementation > SAL_CALL getImplementation()
234cdf0e10cSrcweir             throw (RuntimeException);
235cdf0e10cSrcweir 
236cdf0e10cSrcweir         /**
237cdf0e10cSrcweir         Imports a node from another document to this document.
238cdf0e10cSrcweir         */
239cdf0e10cSrcweir         virtual Reference< XNode > SAL_CALL importNode(const Reference< XNode >& importedNode, sal_Bool deep)
240cdf0e10cSrcweir             throw (RuntimeException, DOMException);
241cdf0e10cSrcweir 
242cdf0e10cSrcweir 		// XDocumentEvent
243cdf0e10cSrcweir 		virtual Reference< XEvent > SAL_CALL createEvent(const OUString& eventType) throw (RuntimeException);
244cdf0e10cSrcweir 
245cdf0e10cSrcweir 		// XActiveDataControl,
246cdf0e10cSrcweir 		// see http://api.openoffice.org/docs/common/ref/com/sun/star/io/XActiveDataControl.html
247cdf0e10cSrcweir 		virtual void SAL_CALL addListener(const Reference< XStreamListener >& aListener )  throw (RuntimeException);
248cdf0e10cSrcweir 		virtual void SAL_CALL removeListener(const Reference< XStreamListener >& aListener ) throw (RuntimeException);
249cdf0e10cSrcweir 		virtual void SAL_CALL start() throw (RuntimeException);
250cdf0e10cSrcweir 		virtual void SAL_CALL terminate() throw (RuntimeException);
251cdf0e10cSrcweir 
252cdf0e10cSrcweir 		// XActiveDataSource
253cdf0e10cSrcweir 		// see http://api.openoffice.org/docs/common/ref/com/sun/star/io/XActiveDataSource.html
254cdf0e10cSrcweir 		virtual void SAL_CALL setOutputStream( 	const Reference< XOutputStream >& aStream ) throw (RuntimeException);
255cdf0e10cSrcweir 		virtual Reference< XOutputStream > SAL_CALL getOutputStream() throw (RuntimeException);
256cdf0e10cSrcweir 
257cdf0e10cSrcweir         // ---- resolve uno inheritance problems...
258cdf0e10cSrcweir         // overrides for XNode base
259cdf0e10cSrcweir         virtual OUString SAL_CALL getNodeName()
260cdf0e10cSrcweir             throw (RuntimeException);
261cdf0e10cSrcweir         virtual OUString SAL_CALL getNodeValue()
262cdf0e10cSrcweir             throw (RuntimeException);
263cdf0e10cSrcweir         virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
264cdf0e10cSrcweir             throw (RuntimeException);
265cdf0e10cSrcweir         // --- delegation for XNde base.
appendChild(const Reference<XNode> & newChild)266cdf0e10cSrcweir         virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
267cdf0e10cSrcweir             throw (RuntimeException, DOMException)
268cdf0e10cSrcweir         {
269cdf0e10cSrcweir             return CNode::appendChild(newChild);
270cdf0e10cSrcweir         }
getAttributes()271cdf0e10cSrcweir         virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
272cdf0e10cSrcweir             throw (RuntimeException)
273cdf0e10cSrcweir         {
274cdf0e10cSrcweir             return CNode::getAttributes();
275cdf0e10cSrcweir         }
getChildNodes()276cdf0e10cSrcweir         virtual Reference< XNodeList > SAL_CALL getChildNodes()
277cdf0e10cSrcweir             throw (RuntimeException)
278cdf0e10cSrcweir         {
279cdf0e10cSrcweir             return CNode::getChildNodes();
280cdf0e10cSrcweir         }
getFirstChild()281cdf0e10cSrcweir         virtual Reference< XNode > SAL_CALL getFirstChild()
282cdf0e10cSrcweir             throw (RuntimeException)
283cdf0e10cSrcweir         {
284cdf0e10cSrcweir             return CNode::getFirstChild();
285cdf0e10cSrcweir         }
getLastChild()286cdf0e10cSrcweir         virtual Reference< XNode > SAL_CALL getLastChild()
287cdf0e10cSrcweir             throw (RuntimeException)
288cdf0e10cSrcweir         {
289cdf0e10cSrcweir             return CNode::getLastChild();
290cdf0e10cSrcweir         }
getLocalName()291cdf0e10cSrcweir         virtual OUString SAL_CALL getLocalName()
292cdf0e10cSrcweir             throw (RuntimeException)
293cdf0e10cSrcweir         {
294cdf0e10cSrcweir             return CNode::getLocalName();
295cdf0e10cSrcweir         }
getNamespaceURI()296cdf0e10cSrcweir         virtual OUString SAL_CALL getNamespaceURI()
297cdf0e10cSrcweir             throw (RuntimeException)
298cdf0e10cSrcweir         {
299cdf0e10cSrcweir             return CNode::getNamespaceURI();
300cdf0e10cSrcweir         }
getNextSibling()301cdf0e10cSrcweir         virtual Reference< XNode > SAL_CALL getNextSibling()
302cdf0e10cSrcweir             throw (RuntimeException)
303cdf0e10cSrcweir         {
304cdf0e10cSrcweir             return CNode::getNextSibling();
305cdf0e10cSrcweir         }
getNodeType()306cdf0e10cSrcweir         virtual NodeType SAL_CALL getNodeType()
307cdf0e10cSrcweir             throw (RuntimeException)
308cdf0e10cSrcweir         {
309cdf0e10cSrcweir             return CNode::getNodeType();
310cdf0e10cSrcweir         }
getOwnerDocument()311cdf0e10cSrcweir         virtual Reference< XDocument > SAL_CALL getOwnerDocument()
312cdf0e10cSrcweir             throw (RuntimeException)
313cdf0e10cSrcweir         {
314cdf0e10cSrcweir             return CNode::getOwnerDocument();
315cdf0e10cSrcweir         }
getParentNode()316cdf0e10cSrcweir         virtual Reference< XNode > SAL_CALL getParentNode()
317cdf0e10cSrcweir             throw (RuntimeException)
318cdf0e10cSrcweir         {
319cdf0e10cSrcweir             return CNode::getParentNode();
320cdf0e10cSrcweir         }
getPrefix()321cdf0e10cSrcweir         virtual OUString SAL_CALL getPrefix()
322cdf0e10cSrcweir             throw (RuntimeException)
323cdf0e10cSrcweir         {
324cdf0e10cSrcweir            return CNode::getPrefix();
325cdf0e10cSrcweir         }
getPreviousSibling()326cdf0e10cSrcweir         virtual Reference< XNode > SAL_CALL getPreviousSibling()
327cdf0e10cSrcweir             throw (RuntimeException)
328cdf0e10cSrcweir         {
329cdf0e10cSrcweir             return CNode::getPreviousSibling();
330cdf0e10cSrcweir         }
hasAttributes()331cdf0e10cSrcweir         virtual sal_Bool SAL_CALL hasAttributes()
332cdf0e10cSrcweir             throw (RuntimeException)
333cdf0e10cSrcweir         {
334cdf0e10cSrcweir             return CNode::hasAttributes();
335cdf0e10cSrcweir         }
hasChildNodes()336cdf0e10cSrcweir         virtual sal_Bool SAL_CALL hasChildNodes()
337cdf0e10cSrcweir             throw (RuntimeException)
338cdf0e10cSrcweir         {
339cdf0e10cSrcweir             return CNode::hasChildNodes();
340cdf0e10cSrcweir         }
insertBefore(const Reference<XNode> & newChild,const Reference<XNode> & refChild)341cdf0e10cSrcweir 		virtual Reference< XNode > SAL_CALL insertBefore(
342cdf0e10cSrcweir 				const Reference< XNode >& newChild, const Reference< XNode >& refChild)
343cdf0e10cSrcweir             throw (RuntimeException, DOMException)
344cdf0e10cSrcweir 		{
345cdf0e10cSrcweir 			return CNode::insertBefore(newChild, refChild);
346cdf0e10cSrcweir 		}
isSupported(const OUString & feature,const OUString & ver)347cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
348cdf0e10cSrcweir 			throw (RuntimeException)
349cdf0e10cSrcweir 		{
350cdf0e10cSrcweir 			return CNode::isSupported(feature, ver);
351cdf0e10cSrcweir 		}
normalize()352cdf0e10cSrcweir 		virtual void SAL_CALL normalize()
353cdf0e10cSrcweir 			throw (RuntimeException)
354cdf0e10cSrcweir 		{
355cdf0e10cSrcweir 			CNode::normalize();
356cdf0e10cSrcweir 		}
removeChild(const Reference<XNode> & oldChild)357cdf0e10cSrcweir         virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
358cdf0e10cSrcweir             throw (RuntimeException, DOMException)
359cdf0e10cSrcweir         {
360cdf0e10cSrcweir             return CNode::removeChild(oldChild);
361cdf0e10cSrcweir         }
replaceChild(const Reference<XNode> & newChild,const Reference<XNode> & oldChild)362cdf0e10cSrcweir         virtual Reference< XNode > SAL_CALL replaceChild(
363cdf0e10cSrcweir                 const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
364cdf0e10cSrcweir             throw (RuntimeException, DOMException)
365cdf0e10cSrcweir         {
366cdf0e10cSrcweir             return CNode::replaceChild(newChild, oldChild);
367cdf0e10cSrcweir         }
setNodeValue(const OUString & nodeValue)368cdf0e10cSrcweir         virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
369cdf0e10cSrcweir             throw (RuntimeException, DOMException)
370cdf0e10cSrcweir         {
371cdf0e10cSrcweir             return CNode::setNodeValue(nodeValue);
372cdf0e10cSrcweir         }
setPrefix(const OUString & prefix)373cdf0e10cSrcweir         virtual void SAL_CALL setPrefix(const OUString& prefix)
374cdf0e10cSrcweir             throw (RuntimeException, DOMException)
375cdf0e10cSrcweir         {
376cdf0e10cSrcweir             return CNode::setPrefix(prefix);
377cdf0e10cSrcweir         }
378cdf0e10cSrcweir 
379cdf0e10cSrcweir         // ::com::sun::star::xml::sax::XSAXSerializable
380cdf0e10cSrcweir         virtual void SAL_CALL serialize(
381cdf0e10cSrcweir             const Reference< XDocumentHandler >& i_xHandler,
382cdf0e10cSrcweir             const Sequence< beans::StringPair >& i_rNamespaces)
383cdf0e10cSrcweir             throw (RuntimeException, SAXException);
384cdf0e10cSrcweir 
385cdf0e10cSrcweir         // ::com::sun::star::xml::sax::XFastSAXSerializable
386cdf0e10cSrcweir         virtual void SAL_CALL fastSerialize( const Reference< XFastDocumentHandler >& handler,
387cdf0e10cSrcweir                                              const Reference< XFastTokenHandler >& tokenHandler,
388cdf0e10cSrcweir                                              const Sequence< beans::StringPair >& i_rNamespaces,
389cdf0e10cSrcweir                                              const Sequence< beans::Pair< rtl::OUString, sal_Int32 > >& namespaces )
390cdf0e10cSrcweir             throw (SAXException, RuntimeException);
391cdf0e10cSrcweir     };
392cdf0e10cSrcweir }
393cdf0e10cSrcweir 
394cdf0e10cSrcweir #endif
395