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

#include <attr.hxx>

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

Public Member Functions

xmlNsPtr GetNamespace (xmlNodePtr const pNode)
 return the libxml namespace corresponding to m_pNamespace on pNode More...
 
virtual bool IsChildTypeAllowed (css::xml::dom::NodeType const nodeType, css::xml::dom::NodeType const *) override
 
virtual OUString SAL_CALL getName () override
 Returns the name of this attribute. More...
 
virtual css::uno::Reference< css::xml::dom::XElement > SAL_CALL getOwnerElement () override
 The Element node this attribute is attached to or null if this attribute is not in use. More...
 
virtual sal_Bool SAL_CALL getSpecified () override
 If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false. More...
 
virtual OUString SAL_CALL getValue () override
 On retrieval, the value of the attribute is returned as a string. More...
 
virtual void SAL_CALL setValue (const OUString &value) override
 Sets the value of the attribute from a string. More...
 
virtual OUString SAL_CALL getNodeName () override
 
virtual OUString SAL_CALL getNodeValue () 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::XNamedNodeMap > SAL_CALL getAttributes () 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
 

Private Member Functions

 CAttr (CDocument const &rDocument, ::osl::Mutex const &rMutex, xmlAttrPtr const pAttr)
 

Private Attributes

xmlAttrPtr m_aAttrPtr
 
::std::optional< stringpair_tm_oNamespace
 

Friends

class CDocument
 

Detailed Description

Definition at line 41 of file attr.hxx.

Constructor & Destructor Documentation

◆ CAttr()

DOM::CAttr::CAttr ( CDocument const &  rDocument,
::osl::Mutex const &  rMutex,
xmlAttrPtr const  pAttr 
)
private

Definition at line 39 of file attr.cxx.

Member Function Documentation

◆ appendChild()

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

Definition at line 94 of file attr.hxx.

◆ cloneNode()

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

Definition at line 98 of file attr.hxx.

◆ getAttributes()

virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL DOM::CAttr::getAttributes ( )
inlineoverridevirtual

Definition at line 102 of file attr.hxx.

◆ getChildNodes()

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

Definition at line 106 of file attr.hxx.

◆ getFirstChild()

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

Definition at line 110 of file attr.hxx.

◆ getLastChild()

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

Definition at line 114 of file attr.hxx.

◆ getLocalName()

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

Definition at line 92 of file attr.cxx.

References getName().

◆ getName()

OUString SAL_CALL DOM::CAttr::getName ( )
overridevirtual

Returns the name of this attribute.

Definition at line 101 of file attr.cxx.

References aName, m_aAttrPtr, and m_rMutex.

Referenced by getLocalName(), getNodeName(), and setValue().

◆ GetNamespace()

xmlNsPtr DOM::CAttr::GetNamespace ( xmlNodePtr const  pNode)

return the libxml namespace corresponding to m_pNamespace on pNode

Definition at line 47 of file attr.cxx.

References m_oNamespace, and SAL_WARN.

Referenced by DOM::CElement::setAttributeNode_Impl_Lock().

◆ getNamespaceURI()

OUString SAL_CALL DOM::CAttr::getNamespaceURI ( )
overridevirtual

Definition at line 248 of file attr.cxx.

References m_oNamespace, and m_rMutex.

◆ getNextSibling()

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

Definition at line 119 of file attr.hxx.

◆ getNodeName()

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

Definition at line 84 of file attr.cxx.

References getName().

◆ getNodeType()

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

Definition at line 123 of file attr.hxx.

◆ getNodeValue()

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

Definition at line 88 of file attr.cxx.

References getValue().

◆ getOwnerDocument()

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

Definition at line 127 of file attr.hxx.

Referenced by setValue().

◆ getOwnerElement()

Reference< XElement > SAL_CALL DOM::CAttr::getOwnerElement ( )
overridevirtual

The Element node this attribute is attached to or null if this attribute is not in use.

Definition at line 117 of file attr.cxx.

References m_aAttrPtr, and m_rMutex.

◆ getParentNode()

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

Definition at line 131 of file attr.hxx.

◆ getPrefix()

OUString SAL_CALL DOM::CAttr::getPrefix ( )
overridevirtual

Definition at line 229 of file attr.cxx.

References m_oNamespace, and m_rMutex.

◆ getPreviousSibling()

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

Definition at line 136 of file attr.hxx.

◆ getSpecified()

sal_Bool SAL_CALL DOM::CAttr::getSpecified ( )
overridevirtual

If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false.

Definition at line 138 of file attr.cxx.

◆ getValue()

OUString SAL_CALL DOM::CAttr::getValue ( )
overridevirtual

On retrieval, the value of the attribute is returned as a string.

Definition at line 148 of file attr.cxx.

References m_aAttrPtr, and m_rMutex.

Referenced by getNodeValue(), and setValue().

◆ hasAttributes()

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

Definition at line 140 of file attr.hxx.

◆ hasChildNodes()

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

Definition at line 144 of file attr.hxx.

◆ insertBefore()

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

Definition at line 148 of file attr.hxx.

◆ IsChildTypeAllowed()

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

Definition at line 73 of file attr.cxx.

◆ isSupported()

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

Definition at line 153 of file attr.hxx.

◆ normalize()

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

Definition at line 157 of file attr.hxx.

◆ removeChild()

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

Definition at line 161 of file attr.hxx.

◆ replaceChild()

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

Definition at line 165 of file attr.hxx.

◆ setNodeValue()

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

Definition at line 170 of file attr.hxx.

References setValue().

◆ setPrefix()

void SAL_CALL DOM::CAttr::setPrefix ( const OUString &  prefix)
overridevirtual

Definition at line 211 of file attr.cxx.

References m_oNamespace, m_rMutex, OUStringToOString(), and prefix.

◆ setValue()

void SAL_CALL DOM::CAttr::setValue ( const OUString &  value)
overridevirtual

Sets the value of the attribute from a string.

Definition at line 165 of file attr.cxx.

References getName(), getOwnerDocument(), getValue(), m_aAttrPtr, m_rMutex, OUStringToOString(), and value.

Referenced by setNodeValue().

Friends And Related Function Documentation

◆ CDocument

friend class CDocument
friend

Definition at line 44 of file attr.hxx.

Member Data Documentation

◆ m_aAttrPtr

xmlAttrPtr DOM::CAttr::m_aAttrPtr
private

Definition at line 46 of file attr.hxx.

Referenced by getName(), getOwnerElement(), getValue(), and setValue().

◆ m_oNamespace

::std::optional< stringpair_t > DOM::CAttr::m_oNamespace
private

Definition at line 47 of file attr.hxx.

Referenced by GetNamespace(), getNamespaceURI(), getPrefix(), and setPrefix().


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