LibreOffice Module oox (master) 1
|
Base class of all classes providing names for specific values (name lists). More...
#include <dumperbase.hxx>
Public Types | |
typedef ::std::map< sal_Int64, OUString > | OUStringMap |
typedef OUStringMap::const_iterator | const_iterator |
Public Member Functions | |
virtual | ~NameListBase () override |
void | setName (sal_Int64 nKey, const String &rName) |
Sets a name for the specified key. More... | |
void | includeList (const NameListRef &rxList) |
Include all names of the passed list. More... | |
template<typename Type > | |
bool | hasName (Type nKey) const |
Returns true, if the map contains an entry for the passed key. More... | |
template<typename Type > | |
OUString | getName (const Config &rCfg, Type nKey) const |
Returns the name for the passed key. More... | |
OUString | getName (const Config &rCfg, double fValue) const |
Returns a display name for the passed double value. More... | |
const_iterator | begin () const |
Returns a map iterator pointing to the first contained name. More... | |
const_iterator | end () const |
Returns a map iterator pointing one past the last contained name. More... | |
Public Member Functions inherited from oox::dump::Base | |
virtual | ~Base () |
Base (Base const &)=default | |
Base (Base &&)=default | |
Base & | operator= (Base const &)=default |
Base & | operator= (Base &&)=default |
bool | isValid () const |
Public Member Functions inherited from oox::dump::ConfigItemBase | |
virtual | ~ConfigItemBase () |
void | readConfigBlock (TextInputStream &rStrm) |
Protected Member Functions | |
NameListBase (const SharedConfigData &rCfgData) | |
virtual bool | implIsValid () const override |
virtual void | implProcessConfigItemStr (TextInputStream &rStrm, const OUString &rKey, const OUString &rData) override |
virtual void | implProcessConfigItemInt (TextInputStream &rStrm, sal_Int64 nKey, const OUString &rData) override |
virtual void | implSetName (sal_Int64 nKey, const OUString &rName)=0 |
Derived classes set the name for the passed key. More... | |
virtual OUString | implGetName (const Config &rCfg, sal_Int64 nKey) const =0 |
Derived classes generate and return the name for the passed key. More... | |
virtual OUString | implGetNameDbl (const Config &rCfg, double fValue) const =0 |
Derived classes generate and return the name for the passed double value. More... | |
virtual void | implIncludeList (const NameListBase &rList)=0 |
Derived classes insert all names and other settings from the passed list. More... | |
void | insertRawName (sal_Int64 nKey, const OUString &rName) |
Inserts the passed name into the internal map. More... | |
const OUString * | findRawName (sal_Int64 nKey) const |
Returns the name for the passed key, or 0, if nothing found. More... | |
Protected Member Functions inherited from oox::dump::Base | |
Base () | |
virtual bool | implIsValid () const =0 |
Protected Member Functions inherited from oox::dump::ConfigItemBase | |
ConfigItemBase () | |
virtual void | implProcessConfigItemStr (TextInputStream &rStrm, const OUString &rKey, const OUString &rData) |
virtual void | implProcessConfigItemInt (TextInputStream &rStrm, sal_Int64 nKey, const OUString &rData) |
void | readConfigBlockContents (TextInputStream &rStrm) |
Private Member Functions | |
void | include (std::u16string_view rListKeys) |
Includes name lists, given in a comma separated list of names of the lists. More... | |
void | exclude (std::u16string_view rKeys) |
Excludes names from the list, given in a comma separated list of their keys. More... | |
Private Attributes | |
OUStringMap | maMap |
const SharedConfigData & | mrCfgData |
Additional Inherited Members | |
Static Public Member Functions inherited from oox::dump::Base | |
static bool | isValid (const std::shared_ptr< Base > &rxBase) |
Base class of all classes providing names for specific values (name lists).
The idea is to provide a unique interface for all different methods to write specific names for any values. This can be enumerations (dedicated names for a subset of values), or names for bits in bit fields. Classes derived from this base class implement the specific behaviour for the desired purpose.
Definition at line 510 of file dumperbase.hxx.
typedef OUStringMap::const_iterator oox::dump::NameListBase::const_iterator |
Definition at line 514 of file dumperbase.hxx.
typedef ::std::map< sal_Int64, OUString > oox::dump::NameListBase::OUStringMap |
Definition at line 513 of file dumperbase.hxx.
|
overridevirtual |
Definition at line 869 of file dumperbase.cxx.
|
inlineexplicitprotected |
Definition at line 545 of file dumperbase.hxx.
|
inline |
Returns a map iterator pointing to the first contained name.
Definition at line 540 of file dumperbase.hxx.
References maMap.
Referenced by oox::dump::FlagsList::implGetName().
|
inline |
Returns a map iterator pointing one past the last contained name.
Definition at line 542 of file dumperbase.hxx.
References maMap.
Referenced by findRawName(), and oox::dump::FlagsList::implGetName().
|
private |
Excludes names from the list, given in a comma separated list of their keys.
Definition at line 929 of file dumperbase.cxx.
References oox::dump::StringHelper::convertStringToIntList(), and maMap.
Referenced by implProcessConfigItemStr().
|
protected |
Returns the name for the passed key, or 0, if nothing found.
Definition at line 915 of file dumperbase.cxx.
Referenced by oox::dump::ConstList::implGetName().
|
inline |
Returns a display name for the passed double value.
Definition at line 536 of file dumperbase.hxx.
References implGetNameDbl().
|
inline |
Returns the name for the passed key.
Definition at line 532 of file dumperbase.hxx.
References implGetName().
Returns true, if the map contains an entry for the passed key.
Definition at line 527 of file dumperbase.hxx.
References maMap.
|
protectedpure virtual |
Derived classes generate and return the name for the passed key.
Implemented in oox::dump::ConstList, oox::dump::FlagsList, oox::dump::CombiList, and oox::dump::UnitConverter.
Referenced by getName().
|
protectedpure virtual |
Derived classes generate and return the name for the passed double value.
Implemented in oox::dump::ConstList, oox::dump::FlagsList, and oox::dump::UnitConverter.
Referenced by getName().
|
protectedpure virtual |
Derived classes insert all names and other settings from the passed list.
Implemented in oox::dump::ConstList, oox::dump::FlagsList, oox::dump::CombiList, and oox::dump::UnitConverter.
Referenced by includeList().
|
overrideprotectedvirtual |
Implements oox::dump::Base.
Definition at line 888 of file dumperbase.cxx.
|
overrideprotectedvirtual |
Reimplemented from oox::dump::ConfigItemBase.
Definition at line 904 of file dumperbase.cxx.
References implSetName().
|
overrideprotectedvirtual |
Reimplemented from oox::dump::ConfigItemBase.
Reimplemented in oox::dump::ConstList, oox::dump::MultiList, and oox::dump::FlagsList.
Definition at line 893 of file dumperbase.cxx.
References exclude(), oox::dump::ConfigItemBase::implProcessConfigItemStr(), include(), and rStrm.
Referenced by oox::dump::ConstList::implProcessConfigItemStr(), and oox::dump::FlagsList::implProcessConfigItemStr().
|
protectedpure virtual |
Derived classes set the name for the passed key.
Implemented in oox::dump::ConstList, oox::dump::MultiList, oox::dump::FlagsList, oox::dump::CombiList, and oox::dump::UnitConverter.
Referenced by implProcessConfigItemInt(), and setName().
|
private |
Includes name lists, given in a comma separated list of names of the lists.
Definition at line 921 of file dumperbase.cxx.
References oox::dump::StringHelper::convertStringToStringList(), oox::dump::SharedConfigData::getNameList(), includeList(), and mrCfgData.
Referenced by implProcessConfigItemStr().
void oox::dump::NameListBase::includeList | ( | const NameListRef & | rxList | ) |
Include all names of the passed list.
Definition at line 878 of file dumperbase.cxx.
References implIncludeList(), and maMap.
Referenced by include().
|
protected |
Inserts the passed name into the internal map.
Definition at line 910 of file dumperbase.cxx.
References maMap.
Referenced by oox::dump::ConstList::implSetName(), oox::dump::FlagsList::implSetName(), and oox::dump::MultiList::setNamesFromVec().
void oox::dump::NameListBase::setName | ( | sal_Int64 | nKey, |
const String & | rName | ||
) |
Sets a name for the specified key.
Definition at line 873 of file dumperbase.cxx.
References implSetName().
|
private |
Definition at line 580 of file dumperbase.hxx.
Referenced by begin(), end(), exclude(), findRawName(), hasName(), includeList(), and insertRawName().
|
private |
Definition at line 581 of file dumperbase.hxx.
Referenced by include().