Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : :
20 : : #ifndef DOM_DOCUMENTFRAGMENT_HXX
21 : : #define DOM_DOCUMENTFRAGMENT_HXX
22 : :
23 : : #include <com/sun/star/uno/Reference.h>
24 : : #include <com/sun/star/xml/dom/XDocumentFragment.hpp>
25 : :
26 : : #include <node.hxx>
27 : :
28 : :
29 : : using ::rtl::OUString;
30 : : using namespace com::sun::star::uno;
31 : : using namespace com::sun::star::xml::dom;
32 : :
33 : : namespace DOM
34 : : {
35 : : typedef ::cppu::ImplInheritanceHelper1< CNode, XDocumentFragment >
36 : : CDocumentFragment_Base;
37 : :
38 [ - + ]: 16 : class CDocumentFragment
39 : : : public CDocumentFragment_Base
40 : : {
41 : : private:
42 : : friend class CDocument;
43 : :
44 : : protected:
45 : : CDocumentFragment(
46 : : CDocument const& rDocument, ::osl::Mutex const& rMutex,
47 : : xmlNodePtr const pNode);
48 : :
49 : : public:
50 : : virtual bool IsChildTypeAllowed(NodeType const nodeType);
51 : :
52 : : // ---- resolve uno inheritance problems...
53 : : // overrides for XNode base
54 : : virtual OUString SAL_CALL getNodeName()
55 : : throw (RuntimeException);
56 : : virtual OUString SAL_CALL getNodeValue()
57 : : throw (RuntimeException);
58 : : // --- delegation for XNde base.
59 : 4 : virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
60 : : throw (RuntimeException, DOMException)
61 : : {
62 : 4 : return CNode::appendChild(newChild);
63 : : }
64 : 4 : virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
65 : : throw (RuntimeException)
66 : : {
67 : 4 : return CNode::cloneNode(deep);
68 : : }
69 : 2 : virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
70 : : throw (RuntimeException)
71 : : {
72 : 2 : return CNode::getAttributes();
73 : : }
74 : 2 : virtual Reference< XNodeList > SAL_CALL getChildNodes()
75 : : throw (RuntimeException)
76 : : {
77 : 2 : return CNode::getChildNodes();
78 : : }
79 : 12 : virtual Reference< XNode > SAL_CALL getFirstChild()
80 : : throw (RuntimeException)
81 : : {
82 : 12 : return CNode::getFirstChild();
83 : : }
84 : 8 : virtual Reference< XNode > SAL_CALL getLastChild()
85 : : throw (RuntimeException)
86 : : {
87 : 8 : return CNode::getLastChild();
88 : : }
89 : 2 : virtual OUString SAL_CALL getLocalName()
90 : : throw (RuntimeException)
91 : : {
92 : 2 : return CNode::getLocalName();
93 : : }
94 : 2 : virtual OUString SAL_CALL getNamespaceURI()
95 : : throw (RuntimeException)
96 : : {
97 : 2 : return CNode::getNamespaceURI();
98 : : }
99 : 2 : virtual Reference< XNode > SAL_CALL getNextSibling()
100 : : throw (RuntimeException)
101 : : {
102 : 2 : return CNode::getNextSibling();
103 : : }
104 : 2 : virtual NodeType SAL_CALL getNodeType()
105 : : throw (RuntimeException)
106 : : {
107 : 2 : return CNode::getNodeType();
108 : : }
109 : 26 : virtual Reference< XDocument > SAL_CALL getOwnerDocument()
110 : : throw (RuntimeException)
111 : : {
112 : 26 : return CNode::getOwnerDocument();
113 : : }
114 : 2 : virtual Reference< XNode > SAL_CALL getParentNode()
115 : : throw (RuntimeException)
116 : : {
117 : 2 : return CNode::getParentNode();
118 : : }
119 : 2 : virtual OUString SAL_CALL getPrefix()
120 : : throw (RuntimeException)
121 : : {
122 : 2 : return CNode::getPrefix();
123 : : }
124 : 2 : virtual Reference< XNode > SAL_CALL getPreviousSibling()
125 : : throw (RuntimeException)
126 : : {
127 : 2 : return CNode::getPreviousSibling();
128 : : }
129 : 2 : virtual sal_Bool SAL_CALL hasAttributes()
130 : : throw (RuntimeException)
131 : : {
132 : 2 : return CNode::hasAttributes();
133 : : }
134 : 8 : virtual sal_Bool SAL_CALL hasChildNodes()
135 : : throw (RuntimeException)
136 : : {
137 : 8 : return CNode::hasChildNodes();
138 : : }
139 : 8 : virtual Reference< XNode > SAL_CALL insertBefore(
140 : : const Reference< XNode >& newChild, const Reference< XNode >& refChild)
141 : : throw (RuntimeException, DOMException)
142 : : {
143 : 8 : return CNode::insertBefore(newChild, refChild);
144 : : }
145 : 2 : virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
146 : : throw (RuntimeException)
147 : : {
148 : 2 : return CNode::isSupported(feature, ver);
149 : : }
150 : 2 : virtual void SAL_CALL normalize()
151 : : throw (RuntimeException)
152 : : {
153 : 2 : CNode::normalize();
154 : 2 : }
155 : 6 : virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
156 : : throw (RuntimeException, DOMException)
157 : : {
158 : 6 : return CNode::removeChild(oldChild);
159 : : }
160 : 10 : virtual Reference< XNode > SAL_CALL replaceChild(
161 : : const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
162 : : throw (RuntimeException, DOMException)
163 : : {
164 : 10 : return CNode::replaceChild(newChild, oldChild);
165 : : }
166 : 2 : virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
167 : : throw (RuntimeException, DOMException)
168 : : {
169 : 2 : return CNode::setNodeValue(nodeValue);
170 : : }
171 : 2 : virtual void SAL_CALL setPrefix(const OUString& prefix)
172 : : throw (RuntimeException, DOMException)
173 : : {
174 : 2 : return CNode::setPrefix(prefix);
175 : : }
176 : :
177 : :
178 : : };
179 : : }
180 : : #endif
181 : :
182 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|