merge the formfield patch from ooo-build
[ooovba.git] / unoxml / source / dom / documentfragment.hxx
blob4d037caee88a449fae2e8630cf127a5030f7f941
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: documentfragment.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DOCUMENTFRAGMENT_HXX
32 #define _DOCUMENTFRAGMENT_HXX
34 #include <com/sun/star/uno/Reference.h>
35 #include <com/sun/star/uno/Exception.hpp>
36 #include <com/sun/star/xml/dom/XDocumentFragment.hpp>
38 #include "node.hxx"
40 using ::rtl::OUString;
41 using namespace com::sun::star::uno;
42 using namespace com::sun::star::xml::dom;
44 namespace DOM
46 class CDocumentFragment : public cppu::ImplInheritanceHelper1< CNode, XDocumentFragment >
48 friend class CNode;
49 protected:
50 CDocumentFragment(const xmlNodePtr aNodePtr);
52 public:
53 // ---- resolve uno inheritance problems...
54 // overrides for XNode base
55 virtual OUString SAL_CALL getNodeName()
56 throw (RuntimeException);
57 virtual OUString SAL_CALL getNodeValue()
58 throw (RuntimeException);
59 // --- delegation for XNde base.
60 virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
61 throw (RuntimeException, DOMException)
63 return CNode::appendChild(newChild);
65 virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
66 throw (RuntimeException)
68 return CNode::cloneNode(deep);
70 virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
71 throw (RuntimeException)
73 return CNode::getAttributes();
75 virtual Reference< XNodeList > SAL_CALL getChildNodes()
76 throw (RuntimeException)
78 return CNode::getChildNodes();
80 virtual Reference< XNode > SAL_CALL getFirstChild()
81 throw (RuntimeException)
83 return CNode::getFirstChild();
85 virtual Reference< XNode > SAL_CALL getLastChild()
86 throw (RuntimeException)
88 return CNode::getLastChild();
90 virtual OUString SAL_CALL getLocalName()
91 throw (RuntimeException)
93 return CNode::getLocalName();
95 virtual OUString SAL_CALL getNamespaceURI()
96 throw (RuntimeException)
98 return CNode::getNamespaceURI();
100 virtual Reference< XNode > SAL_CALL getNextSibling()
101 throw (RuntimeException)
103 return CNode::getNextSibling();
105 virtual NodeType SAL_CALL getNodeType()
106 throw (RuntimeException)
108 return CNode::getNodeType();
110 virtual Reference< XDocument > SAL_CALL getOwnerDocument()
111 throw (RuntimeException)
113 return CNode::getOwnerDocument();
115 virtual Reference< XNode > SAL_CALL getParentNode()
116 throw (RuntimeException)
118 return CNode::getParentNode();
120 virtual OUString SAL_CALL getPrefix()
121 throw (RuntimeException)
123 return CNode::getPrefix();
125 virtual Reference< XNode > SAL_CALL getPreviousSibling()
126 throw (RuntimeException)
128 return CNode::getPreviousSibling();
130 virtual sal_Bool SAL_CALL hasAttributes()
131 throw (RuntimeException)
133 return CNode::hasAttributes();
135 virtual sal_Bool SAL_CALL hasChildNodes()
136 throw (RuntimeException)
138 return CNode::hasChildNodes();
140 virtual Reference< XNode > SAL_CALL insertBefore(
141 const Reference< XNode >& newChild, const Reference< XNode >& refChild)
142 throw (RuntimeException, DOMException)
144 return CNode::insertBefore(newChild, refChild);
146 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
147 throw (RuntimeException)
149 return CNode::isSupported(feature, ver);
151 virtual void SAL_CALL normalize()
152 throw (RuntimeException)
154 CNode::normalize();
156 virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
157 throw (RuntimeException, DOMException)
159 return CNode::removeChild(oldChild);
161 virtual Reference< XNode > SAL_CALL replaceChild(
162 const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
163 throw (RuntimeException, DOMException)
165 return CNode::replaceChild(newChild, oldChild);
167 virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
168 throw (RuntimeException, DOMException)
170 return CNode::setNodeValue(nodeValue);
172 virtual void SAL_CALL setPrefix(const OUString& prefix)
173 throw (RuntimeException, DOMException)
175 return CNode::setPrefix(prefix);
181 #endif