1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef DOM_NOTATION_HXX 29 #define DOM_NOTATION_HXX 30 31 #include <libxml/tree.h> 32 33 #include <com/sun/star/uno/Reference.h> 34 #include <com/sun/star/xml/dom/XNotation.hpp> 35 36 #include <node.hxx> 37 38 39 using ::rtl::OUString; 40 using namespace com::sun::star::uno; 41 using namespace com::sun::star::xml::dom; 42 43 namespace DOM 44 { 45 typedef cppu::ImplInheritanceHelper1< CNode, XNotation > CNotation_Base; 46 47 class CNotation 48 : public CNotation_Base 49 { 50 private: 51 friend class CDocument; 52 53 private: 54 xmlNotationPtr m_aNotationPtr; 55 56 protected: 57 CNotation(CDocument const& rDocument, ::osl::Mutex const& rMutex, 58 xmlNotationPtr const pNotation); 59 60 /** 61 The public identifier of this notation. 62 */ 63 virtual OUString SAL_CALL getPublicId() throw (RuntimeException); 64 65 /** 66 The system identifier of this notation. 67 */ 68 virtual OUString SAL_CALL getSystemId() throw (RuntimeException); 69 70 // ---- resolve uno inheritance problems... 71 // overrides for XNode base 72 virtual OUString SAL_CALL getNodeName() 73 throw (RuntimeException); 74 virtual OUString SAL_CALL getNodeValue() 75 throw (RuntimeException); 76 // --- delegation for XNde base. 77 virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild) 78 throw (RuntimeException, DOMException) 79 { 80 return CNode::appendChild(newChild); 81 } 82 virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep) 83 throw (RuntimeException) 84 { 85 return CNode::cloneNode(deep); 86 } 87 virtual Reference< XNamedNodeMap > SAL_CALL getAttributes() 88 throw (RuntimeException) 89 { 90 return CNode::getAttributes(); 91 } 92 virtual Reference< XNodeList > SAL_CALL getChildNodes() 93 throw (RuntimeException) 94 { 95 return CNode::getChildNodes(); 96 } 97 virtual Reference< XNode > SAL_CALL getFirstChild() 98 throw (RuntimeException) 99 { 100 return CNode::getFirstChild(); 101 } 102 virtual Reference< XNode > SAL_CALL getLastChild() 103 throw (RuntimeException) 104 { 105 return CNode::getLastChild(); 106 } 107 virtual OUString SAL_CALL getLocalName() 108 throw (RuntimeException) 109 { 110 return CNode::getLocalName(); 111 } 112 virtual OUString SAL_CALL getNamespaceURI() 113 throw (RuntimeException) 114 { 115 return CNode::getNamespaceURI(); 116 } 117 virtual Reference< XNode > SAL_CALL getNextSibling() 118 throw (RuntimeException) 119 { 120 return CNode::getNextSibling(); 121 } 122 virtual NodeType SAL_CALL getNodeType() 123 throw (RuntimeException) 124 { 125 return CNode::getNodeType(); 126 } 127 virtual Reference< XDocument > SAL_CALL getOwnerDocument() 128 throw (RuntimeException) 129 { 130 return CNode::getOwnerDocument(); 131 } 132 virtual Reference< XNode > SAL_CALL getParentNode() 133 throw (RuntimeException) 134 { 135 return CNode::getParentNode(); 136 } 137 virtual OUString SAL_CALL getPrefix() 138 throw (RuntimeException) 139 { 140 return CNode::getPrefix(); 141 } 142 virtual Reference< XNode > SAL_CALL getPreviousSibling() 143 throw (RuntimeException) 144 { 145 return CNode::getPreviousSibling(); 146 } 147 virtual sal_Bool SAL_CALL hasAttributes() 148 throw (RuntimeException) 149 { 150 return CNode::hasAttributes(); 151 } 152 virtual sal_Bool SAL_CALL hasChildNodes() 153 throw (RuntimeException) 154 { 155 return CNode::hasChildNodes(); 156 } 157 virtual Reference< XNode > SAL_CALL insertBefore( 158 const Reference< XNode >& newChild, const Reference< XNode >& refChild) 159 throw (RuntimeException, DOMException) 160 { 161 return CNode::insertBefore(newChild, refChild); 162 } 163 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) 164 throw (RuntimeException) 165 { 166 return CNode::isSupported(feature, ver); 167 } 168 virtual void SAL_CALL normalize() 169 throw (RuntimeException) 170 { 171 CNode::normalize(); 172 } 173 virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild) 174 throw (RuntimeException, DOMException) 175 { 176 return CNode::removeChild(oldChild); 177 } 178 virtual Reference< XNode > SAL_CALL replaceChild( 179 const Reference< XNode >& newChild, const Reference< XNode >& oldChild) 180 throw (RuntimeException, DOMException) 181 { 182 return CNode::replaceChild(newChild, oldChild); 183 } 184 virtual void SAL_CALL setNodeValue(const OUString& nodeValue) 185 throw (RuntimeException, DOMException) 186 { 187 return CNode::setNodeValue(nodeValue); 188 } 189 virtual void SAL_CALL setPrefix(const OUString& prefix) 190 throw (RuntimeException, DOMException) 191 { 192 return CNode::setPrefix(prefix); 193 } 194 195 196 }; 197 } 198 199 #endif 200