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, 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

◆ Tag() [1/2]

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 >() 
)

◆ Tag() [2/2]

oox::formulaimport::XmlStream::Tag::Tag ( int  token,
AttributeList  attribs 
)

Definition at line 144 of file importutils.cxx.

References a, and t.

Member Function Documentation

◆ attribute() [1/3]

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.

References t.

◆ attribute() [2/3]

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(), attributes, and t.

◆ attribute() [3/3]

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.

References t.

◆ operator bool()

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 150 of file importutils.cxx.

References XML_TOKEN_INVALID.

Member Data Documentation

◆ attributes

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

Definition at line 141 of file importutils.hxx.

Referenced by attribute().

◆ text

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

Definition at line 142 of file importutils.hxx.

◆ token

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: