LibreOffice Module oox (master) 1
Public Member Functions | Public Attributes | List of all members
oox::dump::ItemFormat Struct Reference

Describes the output format of a data item. More...

#include <dumperbase.hxx>

Inheritance diagram for oox::dump::ItemFormat:
[legend]

Public Member Functions

 ItemFormat ()
 
void set (DataType eDataType, FormatType eFmtType, const OUString &rItemName)
 
OUStringVector::const_iterator parse (const OUStringVector &rFormatVec)
 Initializes the struct from a vector of strings containing the item format. More...
 
OUStringVector parse (std::u16string_view rFormatStr)
 Initializes the struct from a string containing the item format. More...
 

Public Attributes

DataType meDataType
 Data type of the item. More...
 
FormatType meFmtType
 Output format for the value. More...
 
OUString maItemName
 Name of the item. More...
 
OUString maListName
 Name of a name list to be used for this item. More...
 

Detailed Description

Describes the output format of a data item.

Data items are written in the following format:

<NAME>=

=<NAME-FROM-LIST>

NAME is the name of the data item. The name is contained in the member maItemName. If the name is empty, only the value is written (without a leading equality sign).

VALUE is the numeric value of the data item. Its format is dependent on the output format given in the member meFmtType. If the format type is FORMATTYPE_NONE, no value is written.

NAME-FROM-LIST is a symbolic name for the current value of the data item. Various types of name lists produce different names for values, which can be used for enumerations or names for single bits in bitfields (see class NameListBase and derived classes). The name of the list is given in the member maListName. If it is empty, no name is written for the value.

Definition at line 203 of file dumperbase.hxx.

Constructor & Destructor Documentation

◆ ItemFormat()

oox::dump::ItemFormat::ItemFormat ( )
explicit

Definition at line 148 of file dumperbase.cxx.

Member Function Documentation

◆ parse() [1/2]

OUStringVector::const_iterator oox::dump::ItemFormat::parse ( const OUStringVector rFormatVec)

Initializes the struct from a vector of strings containing the item format.

The vector must contain at least 2 strings. The struct is filled from the strings in the vector in the following order: 1) Data type (one of: [u]int8, [u]int16, [u]int32, [u]int64, float, double). 2) Format type (one of: dec, hex, shorthex, bin, fix, bool, unused, unknown). 3) Item name (optional). 4) Name list name (optional).

Returns
Iterator pointing to the first unhandled string.

Definition at line 162 of file dumperbase.cxx.

References oox::dump::StringHelper::convertToDataType(), oox::dump::StringHelper::convertToFormatType(), oox::dump::DATATYPE_VOID, oox::dump::FORMATTYPE_HEX, oox::dump::FORMATTYPE_NONE, maItemName, maListName, meDataType, meFmtType, oox::dump::OOX_DUMP_UNKNOWN, oox::dump::OOX_DUMP_UNUSED, and set().

Referenced by parse().

◆ parse() [2/2]

OUStringVector oox::dump::ItemFormat::parse ( std::u16string_view  rFormatStr)

Initializes the struct from a string containing the item format.

The string must have the following format: DATATYPE,FORMATTYPE[,ITEMNAME[,LISTNAME]]

DATATYPE is the data type of the item (see above for possible values). FORMATTYPE is the format type of the item (see above for possible values). ITEMNAME is the name of the item (optional). LISTNAME is the name of a name list (optional).

Returns
List containing remaining unhandled format strings.

Definition at line 187 of file dumperbase.cxx.

References oox::dump::StringHelper::convertStringToStringList(), end, and parse().

◆ set()

void oox::dump::ItemFormat::set ( DataType  eDataType,
FormatType  eFmtType,
const OUString &  rItemName 
)

Definition at line 154 of file dumperbase.cxx.

References maItemName, maListName, meDataType, and meFmtType.

Referenced by parse().

Member Data Documentation

◆ maItemName

OUString oox::dump::ItemFormat::maItemName

Name of the item.

Definition at line 207 of file dumperbase.hxx.

Referenced by oox::dump::CombiList::implGetName(), parse(), set(), and oox::dump::OutputObjectBase::writeValueItem().

◆ maListName

OUString oox::dump::ItemFormat::maListName

Name of a name list to be used for this item.

Definition at line 208 of file dumperbase.hxx.

Referenced by oox::dump::CombiList::implGetName(), parse(), set(), and oox::dump::OutputObjectBase::writeValueItem().

◆ meDataType

DataType oox::dump::ItemFormat::meDataType

Data type of the item.

Definition at line 205 of file dumperbase.hxx.

Referenced by oox::dump::InputObjectBase::dumpItem(), oox::dump::CombiList::implGetName(), parse(), and set().

◆ meFmtType

FormatType oox::dump::ItemFormat::meFmtType

Output format for the value.

Definition at line 206 of file dumperbase.hxx.

Referenced by oox::dump::CombiList::implGetName(), parse(), set(), and oox::dump::OutputObjectBase::writeValueItem().


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