LibreOffice Module oox (master)  1
Public Member Functions | Public Attributes | List of all members
oox::formulaimport::XmlStream::Tag Struct Reference

Structure representing a tag, including its attributes and content text immediately following it. More...

#include <importutils.hxx>

Collaboration diagram for oox::formulaimport::XmlStream::Tag:
[legend]

Public Member Functions

 Tag (int token=XML_TOKEN_INVALID, const css::uno::Reference< css::xml::sax::XFastAttributeList > &attributes=css::uno::Reference< css::xml::sax::XFastAttributeList >())
 
 Tag (int token, const AttributeList &attribs)
 
OUString attribute (int token, const OUString &def=OUString()) const
 This function returns value of the given attribute, or the passed default value if not found. More...
 
bool attribute (int token, bool def) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
sal_Unicode attribute (int token, sal_Unicode def) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
 operator bool () const
 Converts to true if the tag has a valid token, false otherwise. More...
 

Public Attributes

int token
 tag type, or XML_TOKEN_INVALID More...
 
AttributeList attributes
 
OUString text
 

Detailed Description

Structure representing a tag, including its attributes and content text immediately following it.

Definition at line 134 of file importutils.hxx.

Constructor & Destructor Documentation

oox::formulaimport::XmlStream::Tag::Tag ( int  token = XML_TOKEN_INVALID,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  attributes = css::uno::Reference< css::xml::sax::XFastAttributeList >() 
)
oox::formulaimport::XmlStream::Tag::Tag ( int  token,
const AttributeList attribs 
)

Definition at line 143 of file importutils.cxx.

Member Function Documentation

OUString oox::formulaimport::XmlStream::Tag::attribute ( int  token,
const OUString &  def = OUString() 
) const
inline

This function returns value of the given attribute, or the passed default value if not found.

The type of the default value selects the return type (OUString here).

Definition at line 236 of file importutils.hxx.

References oox::formulaimport::XmlStream::AttributeList::attribute(), and attributes.

bool oox::formulaimport::XmlStream::Tag::attribute ( int  token,
bool  def 
) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 241 of file importutils.hxx.

sal_Unicode oox::formulaimport::XmlStream::Tag::attribute ( int  token,
sal_Unicode  def 
) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 246 of file importutils.hxx.

oox::formulaimport::XmlStream::Tag::operator bool ( ) const

Converts to true if the tag has a valid token, false otherwise.

Allows simple usage in if(), for example 'if( XmlStream::Tag foo = stream.checkOpeningTag( footoken ))'.

Definition at line 149 of file importutils.cxx.

References XML_TOKEN_INVALID.

Member Data Documentation

AttributeList oox::formulaimport::XmlStream::Tag::attributes

Definition at line 141 of file importutils.hxx.

Referenced by attribute().

OUString oox::formulaimport::XmlStream::Tag::text

Definition at line 142 of file importutils.hxx.

int oox::formulaimport::XmlStream::Tag::token

tag type, or XML_TOKEN_INVALID

Definition at line 140 of file importutils.hxx.


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