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 INCLUDED_UNOXML_SOURCE_DOM_DOCUMENTFRAGMENT_HXX
21 : #define INCLUDED_UNOXML_SOURCE_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 namespace com::sun::star::uno;
30 : using namespace com::sun::star::xml::dom;
31 :
32 : namespace DOM
33 : {
34 : typedef ::cppu::ImplInheritanceHelper1< CNode, XDocumentFragment >
35 : CDocumentFragment_Base;
36 :
37 0 : class CDocumentFragment
38 : : public CDocumentFragment_Base
39 : {
40 : private:
41 : friend class CDocument;
42 :
43 : protected:
44 : CDocumentFragment(
45 : CDocument const& rDocument, ::osl::Mutex const& rMutex,
46 : xmlNodePtr const pNode);
47 :
48 : public:
49 : virtual bool IsChildTypeAllowed(NodeType const nodeType) SAL_OVERRIDE;
50 :
51 : // ---- resolve uno inheritance problems...
52 : // overrides for XNode base
53 : virtual OUString SAL_CALL getNodeName()
54 : throw (RuntimeException, std::exception) SAL_OVERRIDE;
55 : virtual OUString SAL_CALL getNodeValue()
56 : throw (RuntimeException, std::exception) SAL_OVERRIDE;
57 : // --- delegation for XNde base.
58 0 : virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
59 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
60 : {
61 0 : return CNode::appendChild(newChild);
62 : }
63 0 : virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
64 : throw (RuntimeException, std::exception) SAL_OVERRIDE
65 : {
66 0 : return CNode::cloneNode(deep);
67 : }
68 0 : virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
69 : throw (RuntimeException, std::exception) SAL_OVERRIDE
70 : {
71 0 : return CNode::getAttributes();
72 : }
73 0 : virtual Reference< XNodeList > SAL_CALL getChildNodes()
74 : throw (RuntimeException, std::exception) SAL_OVERRIDE
75 : {
76 0 : return CNode::getChildNodes();
77 : }
78 0 : virtual Reference< XNode > SAL_CALL getFirstChild()
79 : throw (RuntimeException, std::exception) SAL_OVERRIDE
80 : {
81 0 : return CNode::getFirstChild();
82 : }
83 0 : virtual Reference< XNode > SAL_CALL getLastChild()
84 : throw (RuntimeException, std::exception) SAL_OVERRIDE
85 : {
86 0 : return CNode::getLastChild();
87 : }
88 0 : virtual OUString SAL_CALL getLocalName()
89 : throw (RuntimeException, std::exception) SAL_OVERRIDE
90 : {
91 0 : return CNode::getLocalName();
92 : }
93 0 : virtual OUString SAL_CALL getNamespaceURI()
94 : throw (RuntimeException, std::exception) SAL_OVERRIDE
95 : {
96 0 : return CNode::getNamespaceURI();
97 : }
98 0 : virtual Reference< XNode > SAL_CALL getNextSibling()
99 : throw (RuntimeException, std::exception) SAL_OVERRIDE
100 : {
101 0 : return CNode::getNextSibling();
102 : }
103 0 : virtual NodeType SAL_CALL getNodeType()
104 : throw (RuntimeException, std::exception) SAL_OVERRIDE
105 : {
106 0 : return CNode::getNodeType();
107 : }
108 0 : virtual Reference< XDocument > SAL_CALL getOwnerDocument()
109 : throw (RuntimeException, std::exception) SAL_OVERRIDE
110 : {
111 0 : return CNode::getOwnerDocument();
112 : }
113 0 : virtual Reference< XNode > SAL_CALL getParentNode()
114 : throw (RuntimeException, std::exception) SAL_OVERRIDE
115 : {
116 0 : return CNode::getParentNode();
117 : }
118 0 : virtual OUString SAL_CALL getPrefix()
119 : throw (RuntimeException, std::exception) SAL_OVERRIDE
120 : {
121 0 : return CNode::getPrefix();
122 : }
123 0 : virtual Reference< XNode > SAL_CALL getPreviousSibling()
124 : throw (RuntimeException, std::exception) SAL_OVERRIDE
125 : {
126 0 : return CNode::getPreviousSibling();
127 : }
128 0 : virtual sal_Bool SAL_CALL hasAttributes()
129 : throw (RuntimeException, std::exception) SAL_OVERRIDE
130 : {
131 0 : return CNode::hasAttributes();
132 : }
133 0 : virtual sal_Bool SAL_CALL hasChildNodes()
134 : throw (RuntimeException, std::exception) SAL_OVERRIDE
135 : {
136 0 : return CNode::hasChildNodes();
137 : }
138 0 : virtual Reference< XNode > SAL_CALL insertBefore(
139 : const Reference< XNode >& newChild, const Reference< XNode >& refChild)
140 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
141 : {
142 0 : return CNode::insertBefore(newChild, refChild);
143 : }
144 0 : virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
145 : throw (RuntimeException, std::exception) SAL_OVERRIDE
146 : {
147 0 : return CNode::isSupported(feature, ver);
148 : }
149 0 : virtual void SAL_CALL normalize()
150 : throw (RuntimeException, std::exception) SAL_OVERRIDE
151 : {
152 0 : CNode::normalize();
153 0 : }
154 0 : virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
155 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
156 : {
157 0 : return CNode::removeChild(oldChild);
158 : }
159 0 : virtual Reference< XNode > SAL_CALL replaceChild(
160 : const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
161 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
162 : {
163 0 : return CNode::replaceChild(newChild, oldChild);
164 : }
165 0 : virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
166 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
167 : {
168 0 : return CNode::setNodeValue(nodeValue);
169 : }
170 0 : virtual void SAL_CALL setPrefix(const OUString& prefix)
171 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
172 : {
173 0 : return CNode::setPrefix(prefix);
174 : }
175 :
176 :
177 : };
178 : }
179 : #endif
180 :
181 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|