bump product version to 4.1.6.2
[LibreOffice.git] / unoxml / source / dom / documentfragment.hxx
blobd3f3ca941766dcc951cb360c56c056313c088888
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_DOCUMENTFRAGMENT_HXX
21 #define DOM_DOCUMENTFRAGMENT_HXX
23 #include <com/sun/star/uno/Reference.h>
24 #include <com/sun/star/xml/dom/XDocumentFragment.hpp>
26 #include <node.hxx>
29 using namespace com::sun::star::uno;
30 using namespace com::sun::star::xml::dom;
32 namespace DOM
34 typedef ::cppu::ImplInheritanceHelper1< CNode, XDocumentFragment >
35 CDocumentFragment_Base;
37 class CDocumentFragment
38 : public CDocumentFragment_Base
40 private:
41 friend class CDocument;
43 protected:
44 CDocumentFragment(
45 CDocument const& rDocument, ::osl::Mutex const& rMutex,
46 xmlNodePtr const pNode);
48 public:
49 virtual bool IsChildTypeAllowed(NodeType const nodeType);
51 // ---- resolve uno inheritance problems...
52 // overrides for XNode base
53 virtual OUString SAL_CALL getNodeName()
54 throw (RuntimeException);
55 virtual OUString SAL_CALL getNodeValue()
56 throw (RuntimeException);
57 // --- delegation for XNde base.
58 virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
59 throw (RuntimeException, DOMException)
61 return CNode::appendChild(newChild);
63 virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
64 throw (RuntimeException)
66 return CNode::cloneNode(deep);
68 virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
69 throw (RuntimeException)
71 return CNode::getAttributes();
73 virtual Reference< XNodeList > SAL_CALL getChildNodes()
74 throw (RuntimeException)
76 return CNode::getChildNodes();
78 virtual Reference< XNode > SAL_CALL getFirstChild()
79 throw (RuntimeException)
81 return CNode::getFirstChild();
83 virtual Reference< XNode > SAL_CALL getLastChild()
84 throw (RuntimeException)
86 return CNode::getLastChild();
88 virtual OUString SAL_CALL getLocalName()
89 throw (RuntimeException)
91 return CNode::getLocalName();
93 virtual OUString SAL_CALL getNamespaceURI()
94 throw (RuntimeException)
96 return CNode::getNamespaceURI();
98 virtual Reference< XNode > SAL_CALL getNextSibling()
99 throw (RuntimeException)
101 return CNode::getNextSibling();
103 virtual NodeType SAL_CALL getNodeType()
104 throw (RuntimeException)
106 return CNode::getNodeType();
108 virtual Reference< XDocument > SAL_CALL getOwnerDocument()
109 throw (RuntimeException)
111 return CNode::getOwnerDocument();
113 virtual Reference< XNode > SAL_CALL getParentNode()
114 throw (RuntimeException)
116 return CNode::getParentNode();
118 virtual OUString SAL_CALL getPrefix()
119 throw (RuntimeException)
121 return CNode::getPrefix();
123 virtual Reference< XNode > SAL_CALL getPreviousSibling()
124 throw (RuntimeException)
126 return CNode::getPreviousSibling();
128 virtual sal_Bool SAL_CALL hasAttributes()
129 throw (RuntimeException)
131 return CNode::hasAttributes();
133 virtual sal_Bool SAL_CALL hasChildNodes()
134 throw (RuntimeException)
136 return CNode::hasChildNodes();
138 virtual Reference< XNode > SAL_CALL insertBefore(
139 const Reference< XNode >& newChild, const Reference< XNode >& refChild)
140 throw (RuntimeException, DOMException)
142 return CNode::insertBefore(newChild, refChild);
144 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
145 throw (RuntimeException)
147 return CNode::isSupported(feature, ver);
149 virtual void SAL_CALL normalize()
150 throw (RuntimeException)
152 CNode::normalize();
154 virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
155 throw (RuntimeException, DOMException)
157 return CNode::removeChild(oldChild);
159 virtual Reference< XNode > SAL_CALL replaceChild(
160 const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
161 throw (RuntimeException, DOMException)
163 return CNode::replaceChild(newChild, oldChild);
165 virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
166 throw (RuntimeException, DOMException)
168 return CNode::setNodeValue(nodeValue);
170 virtual void SAL_CALL setPrefix(const OUString& prefix)
171 throw (RuntimeException, DOMException)
173 return CNode::setPrefix(prefix);
179 #endif
181 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */