LibreOffice Module unoxml (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Friends | List of all members
DOM::CElement Class Reference

#include <element.hxx>

Inheritance diagram for DOM::CElement:
[legend]
Collaboration diagram for DOM::CElement:
[legend]

Public Member Functions

virtual void saxify (const css::uno::Reference< css::xml::sax::XDocumentHandler > &i_xHandler) override
 
virtual void fastSaxify (Context &i_rContext) override
 
virtual bool IsChildTypeAllowed (css::xml::dom::NodeType const nodeType, css::xml::dom::NodeType const *) override
 
virtual OUString SAL_CALL getAttribute (const OUString &name) override
 Retrieves an attribute value by name. More...
 
virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL getAttributeNode (const OUString &name) override
 Retrieves an attribute node by name. More...
 
virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL getAttributeNodeNS (const OUString &namespaceURI, const OUString &localName) override
 Retrieves an Attr node by local name and namespace URI. More...
 
virtual OUString SAL_CALL getAttributeNS (const OUString &namespaceURI, const OUString &localName) override
 Retrieves an attribute value by local name and namespace URI. More...
 
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getElementsByTagName (const OUString &name) override
 Returns a NodeList of all descendant Elements with a given tag name, in the order in which they are encountered in a preorder traversal of this Element tree. More...
 
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getElementsByTagNameNS (const OUString &namespaceURI, const OUString &localName) override
 Returns a NodeList of all the descendant Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of this Element tree. More...
 
virtual OUString SAL_CALL getTagName () override
 The name of the element. More...
 
virtual sal_Bool SAL_CALL hasAttribute (const OUString &name) override
 Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise. More...
 
virtual sal_Bool SAL_CALL hasAttributeNS (const OUString &namespaceURI, const OUString &localName) override
 Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise. More...
 
virtual void SAL_CALL removeAttribute (const OUString &name) override
 Removes an attribute by name. More...
 
virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL removeAttributeNode (const css::uno::Reference< css::xml::dom::XAttr > &oldAttr) override
 Removes the specified attribute node. More...
 
virtual void SAL_CALL removeAttributeNS (const OUString &namespaceURI, const OUString &localName) override
 Removes an attribute by local name and namespace URI. More...
 
virtual void SAL_CALL setAttribute (const OUString &name, const OUString &value) override
 Adds a new attribute. More...
 
virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL setAttributeNode (const css::uno::Reference< css::xml::dom::XAttr > &newAttr) override
 Adds a new attribute node. More...
 
virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL setAttributeNodeNS (const css::uno::Reference< css::xml::dom::XAttr > &newAttr) override
 Adds a new attribute. More...
 
virtual void SAL_CALL setAttributeNS (const OUString &namespaceURI, const OUString &qualifiedName, const OUString &value) override
 Adds a new attribute. More...
 
virtual OUString SAL_CALL getNodeName () override
 
virtual OUString SAL_CALL getNodeValue () override
 
virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes () override
 
virtual OUString SAL_CALL getLocalName () override
 
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild (const css::uno::Reference< css::xml::dom::XNode > &newChild) override
 
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode (sal_Bool deep) override
 
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes () override
 
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild () override
 
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild () override
 
virtual OUString SAL_CALL getNamespaceURI () override
 
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling () override
 
virtual css::xml::dom::NodeType SAL_CALL getNodeType () override
 
virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument () override
 
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode () override
 
virtual OUString SAL_CALL getPrefix () override
 
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling () override
 
virtual sal_Bool SAL_CALL hasAttributes () override
 
virtual sal_Bool SAL_CALL hasChildNodes () override
 
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore (const css::uno::Reference< css::xml::dom::XNode > &newChild, const css::uno::Reference< css::xml::dom::XNode > &refChild) override
 
virtual sal_Bool SAL_CALL isSupported (const OUString &feature, const OUString &ver) override
 
virtual void SAL_CALL normalize () override
 
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild (const css::uno::Reference< css::xml::dom::XNode > &oldChild) override
 
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild (const css::uno::Reference< css::xml::dom::XNode > &newChild, const css::uno::Reference< css::xml::dom::XNode > &oldChild) override
 
virtual void SAL_CALL setNodeValue (const OUString &nodeValue) override
 
virtual void SAL_CALL setPrefix (const OUString &prefix) override
 

Protected Member Functions

 CElement (CDocument const &rDocument, ::osl::Mutex const &rMutex, xmlNodePtr const pNode)
 

Private Member Functions

css::uno::Reference< css::xml::dom::XAttr > setAttributeNode_Impl_Lock (css::uno::Reference< css::xml::dom::XAttr > const &xNewAttr, bool const bNS)
 Adds a new attribute node. More...
 

Friends

class CDocument
 

Detailed Description

Definition at line 37 of file element.hxx.

Constructor & Destructor Documentation

◆ CElement()

DOM::CElement::CElement ( CDocument const &  rDocument,
::osl::Mutex const &  rMutex,
xmlNodePtr const  pNode 
)
protected

Definition at line 50 of file element.cxx.

Member Function Documentation

◆ appendChild()

virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL DOM::CElement::appendChild ( const css::uno::Reference< css::xml::dom::XNode > &  newChild)
inlineoverridevirtual

Definition at line 155 of file element.hxx.

◆ cloneNode()

virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL DOM::CElement::cloneNode ( sal_Bool  deep)
inlineoverridevirtual

Definition at line 159 of file element.hxx.

◆ fastSaxify()

void DOM::CElement::fastSaxify ( Context i_rContext)
overridevirtual

◆ getAttribute()

OUString SAL_CALL DOM::CElement::getAttribute ( const OUString &  name)
overridevirtual

Retrieves an attribute value by name.

return empty string if attribute is not set

Definition at line 231 of file element.cxx.

References m_rMutex, name, and OUStringToOString().

◆ getAttributeNode()

Reference< XAttr > SAL_CALL DOM::CElement::getAttributeNode ( const OUString &  name)
overridevirtual

Retrieves an attribute node by name.

Definition at line 253 of file element.cxx.

References get(), m_rMutex, name, OUStringToOString(), and pName.

Referenced by setAttribute().

◆ getAttributeNodeNS()

Reference< XAttr > SAL_CALL DOM::CElement::getAttributeNodeNS ( const OUString &  namespaceURI,
const OUString &  localName 
)
overridevirtual

Retrieves an Attr node by local name and namespace URI.

Definition at line 277 of file element.cxx.

References get(), m_rMutex, OUStringToOString(), and pName.

Referenced by setAttributeNS().

◆ getAttributeNS()

OUString SAL_CALL DOM::CElement::getAttributeNS ( const OUString &  namespaceURI,
const OUString &  localName 
)
overridevirtual

Retrieves an attribute value by local name and namespace URI.

return empty string if attribute is not set

Definition at line 307 of file element.cxx.

References m_rMutex, OUStringToOString(), and pName.

◆ getAttributes()

Reference< XNamedNodeMap > SAL_CALL DOM::CElement::getAttributes ( )
overridevirtual

Definition at line 721 of file element.cxx.

References m_rMutex.

◆ getChildNodes()

virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL DOM::CElement::getChildNodes ( )
inlineoverridevirtual

Definition at line 163 of file element.hxx.

◆ getElementsByTagName()

Reference< XNodeList > SAL_CALL DOM::CElement::getElementsByTagName ( const OUString &  name)
overridevirtual

Returns a NodeList of all descendant Elements with a given tag name, in the order in which they are encountered in a preorder traversal of this Element tree.

Definition at line 338 of file element.cxx.

References m_rMutex.

◆ getElementsByTagNameNS()

Reference< XNodeList > SAL_CALL DOM::CElement::getElementsByTagNameNS ( const OUString &  namespaceURI,
const OUString &  localName 
)
overridevirtual

Returns a NodeList of all the descendant Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of this Element tree.

Definition at line 353 of file element.cxx.

References m_rMutex.

◆ getFirstChild()

virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL DOM::CElement::getFirstChild ( )
inlineoverridevirtual

Definition at line 167 of file element.hxx.

◆ getLastChild()

virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL DOM::CElement::getLastChild ( )
inlineoverridevirtual

Definition at line 171 of file element.hxx.

◆ getLocalName()

OUString SAL_CALL DOM::CElement::getLocalName ( )
overridevirtual

Definition at line 735 of file element.cxx.

References aName, m_rMutex, and pName.

Referenced by getNodeName(), and saxify().

◆ getNamespaceURI()

virtual OUString SAL_CALL DOM::CElement::getNamespaceURI ( )
inlineoverridevirtual

Definition at line 175 of file element.hxx.

◆ getNextSibling()

virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL DOM::CElement::getNextSibling ( )
inlineoverridevirtual

Definition at line 179 of file element.hxx.

◆ getNodeName()

OUString SAL_CALL DOM::CElement::getNodeName ( )
overridevirtual

Definition at line 730 of file element.cxx.

References getLocalName().

◆ getNodeType()

virtual css::xml::dom::NodeType SAL_CALL DOM::CElement::getNodeType ( )
inlineoverridevirtual

Definition at line 183 of file element.hxx.

◆ getNodeValue()

OUString SAL_CALL DOM::CElement::getNodeValue ( )
overridevirtual

Definition at line 748 of file element.cxx.

◆ getOwnerDocument()

virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL DOM::CElement::getOwnerDocument ( )
inlineoverridevirtual

Definition at line 187 of file element.hxx.

Referenced by setAttribute(), setAttributeNode_Impl_Lock(), and setAttributeNS().

◆ getParentNode()

virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL DOM::CElement::getParentNode ( )
inlineoverridevirtual

Definition at line 191 of file element.hxx.

◆ getPrefix()

virtual OUString SAL_CALL DOM::CElement::getPrefix ( )
inlineoverridevirtual

Definition at line 195 of file element.hxx.

Referenced by saxify().

◆ getPreviousSibling()

virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL DOM::CElement::getPreviousSibling ( )
inlineoverridevirtual

Definition at line 199 of file element.hxx.

◆ getTagName()

OUString SAL_CALL DOM::CElement::getTagName ( )
overridevirtual

The name of the element.

Definition at line 366 of file element.cxx.

References m_rMutex.

◆ hasAttribute()

sal_Bool SAL_CALL DOM::CElement::hasAttribute ( const OUString &  name)
overridevirtual

Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.

Definition at line 383 of file element.cxx.

References m_rMutex, name, OUStringToOString(), and pName.

◆ hasAttributeNS()

sal_Bool SAL_CALL DOM::CElement::hasAttributeNS ( const OUString &  namespaceURI,
const OUString &  localName 
)
overridevirtual

Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.

Definition at line 396 of file element.cxx.

References m_rMutex, OUStringToOString(), and pName.

◆ hasAttributes()

virtual sal_Bool SAL_CALL DOM::CElement::hasAttributes ( )
inlineoverridevirtual

Definition at line 203 of file element.hxx.

◆ hasChildNodes()

virtual sal_Bool SAL_CALL DOM::CElement::hasChildNodes ( )
inlineoverridevirtual

Definition at line 207 of file element.hxx.

◆ insertBefore()

virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL DOM::CElement::insertBefore ( const css::uno::Reference< css::xml::dom::XNode > &  newChild,
const css::uno::Reference< css::xml::dom::XNode > &  refChild 
)
inlineoverridevirtual

Definition at line 211 of file element.hxx.

◆ IsChildTypeAllowed()

bool DOM::CElement::IsChildTypeAllowed ( css::xml::dom::NodeType const  nodeType,
css::xml::dom::NodeType const *   
)
overridevirtual

Definition at line 205 of file element.cxx.

◆ isSupported()

virtual sal_Bool SAL_CALL DOM::CElement::isSupported ( const OUString &  feature,
const OUString &  ver 
)
inlineoverridevirtual

Definition at line 216 of file element.hxx.

◆ normalize()

virtual void SAL_CALL DOM::CElement::normalize ( )
inlineoverridevirtual

Definition at line 220 of file element.hxx.

◆ removeAttribute()

void SAL_CALL DOM::CElement::removeAttribute ( const OUString &  name)
overridevirtual

Removes an attribute by name.

Definition at line 411 of file element.cxx.

References m_rMutex, name, OUStringToOString(), and pName.

◆ removeAttributeNode()

Reference< XAttr > SAL_CALL DOM::CElement::removeAttributeNode ( const css::uno::Reference< css::xml::dom::XAttr > &  oldAttr)
overridevirtual

Removes the specified attribute node.

Definition at line 464 of file element.cxx.

References m_rMutex.

◆ removeAttributeNS()

void SAL_CALL DOM::CElement::removeAttributeNS ( const OUString &  namespaceURI,
const OUString &  localName 
)
overridevirtual

Removes an attribute by local name and namespace URI.

Definition at line 434 of file element.cxx.

References m_rMutex, OUStringToOString(), and pName.

◆ removeChild()

virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL DOM::CElement::removeChild ( const css::uno::Reference< css::xml::dom::XNode > &  oldChild)
inlineoverridevirtual

Definition at line 224 of file element.hxx.

◆ replaceChild()

virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL DOM::CElement::replaceChild ( const css::uno::Reference< css::xml::dom::XNode > &  newChild,
const css::uno::Reference< css::xml::dom::XNode > &  oldChild 
)
inlineoverridevirtual

Definition at line 228 of file element.hxx.

◆ saxify()

void DOM::CElement::saxify ( const css::uno::Reference< css::xml::sax::XDocumentHandler > &  i_xHandler)
overridevirtual

Definition at line 56 of file element.cxx.

References getLocalName(), getPrefix(), name, and prefix.

◆ setAttribute()

void SAL_CALL DOM::CElement::setAttribute ( const OUString &  name,
const OUString &  value 
)
overridevirtual

Adds a new attribute.

Definition at line 599 of file element.cxx.

References getAttributeNode(), getOwnerDocument(), m_rMutex, name, OUStringToOString(), pName, and value.

◆ setAttributeNode()

Reference< XAttr > DOM::CElement::setAttributeNode ( const css::uno::Reference< css::xml::dom::XAttr > &  newAttr)
overridevirtual

Adds a new attribute node.

Definition at line 581 of file element.cxx.

References setAttributeNode_Impl_Lock().

◆ setAttributeNode_Impl_Lock()

Reference< XAttr > DOM::CElement::setAttributeNode_Impl_Lock ( css::uno::Reference< css::xml::dom::XAttr > const &  xNewAttr,
bool const  bNS 
)
private

Adds a new attribute node.

Definition at line 516 of file element.cxx.

References get(), DOM::CAttr::GetNamespace(), getOwnerDocument(), and m_rMutex.

Referenced by setAttributeNode(), and setAttributeNodeNS().

◆ setAttributeNodeNS()

Reference< XAttr > DOM::CElement::setAttributeNodeNS ( const css::uno::Reference< css::xml::dom::XAttr > &  newAttr)
overridevirtual

Adds a new attribute.

Definition at line 590 of file element.cxx.

References setAttributeNode_Impl_Lock().

◆ setAttributeNS()

void SAL_CALL DOM::CElement::setAttributeNS ( const OUString &  namespaceURI,
const OUString &  qualifiedName,
const OUString &  value 
)
overridevirtual

Adds a new attribute.

Definition at line 643 of file element.cxx.

References getAttributeNodeNS(), getOwnerDocument(), idx, m_rMutex, OUStringToOString(), and value.

◆ setNodeValue()

virtual void SAL_CALL DOM::CElement::setNodeValue ( const OUString &  nodeValue)
inlineoverridevirtual

Definition at line 233 of file element.hxx.

◆ setPrefix()

virtual void SAL_CALL DOM::CElement::setPrefix ( const OUString &  prefix)
inlineoverridevirtual

Definition at line 237 of file element.hxx.

References prefix.

Friends And Related Function Documentation

◆ CDocument

friend class CDocument
friend

Definition at line 41 of file element.hxx.


The documentation for this class was generated from the following files: