LibreOffice Module oox (master) 1
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
oox::dump::NameListBase Class Referenceabstract

Base class of all classes providing names for specific values (name lists). More...

#include <dumperbase.hxx>

Inheritance diagram for oox::dump::NameListBase:
[legend]
Collaboration diagram for oox::dump::NameListBase:
[legend]

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
 
Baseoperator= (Base const &)=default
 
Baseoperator= (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 SharedConfigDatamrCfgData
 

Additional Inherited Members

- Static Public Member Functions inherited from oox::dump::Base
static bool isValid (const std::shared_ptr< Base > &rxBase)
 

Detailed Description

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.

Member Typedef Documentation

◆ const_iterator

typedef OUStringMap::const_iterator oox::dump::NameListBase::const_iterator

Definition at line 514 of file dumperbase.hxx.

◆ OUStringMap

typedef ::std::map< sal_Int64, OUString > oox::dump::NameListBase::OUStringMap

Definition at line 513 of file dumperbase.hxx.

Constructor & Destructor Documentation

◆ ~NameListBase()

oox::dump::NameListBase::~NameListBase ( )
overridevirtual

Definition at line 869 of file dumperbase.cxx.

◆ NameListBase()

oox::dump::NameListBase::NameListBase ( const SharedConfigData rCfgData)
inlineexplicitprotected

Definition at line 545 of file dumperbase.hxx.

Member Function Documentation

◆ begin()

const_iterator oox::dump::NameListBase::begin ( ) const
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().

◆ end()

const_iterator oox::dump::NameListBase::end ( ) const
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().

◆ exclude()

void oox::dump::NameListBase::exclude ( std::u16string_view  rKeys)
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().

◆ findRawName()

const OUString * oox::dump::NameListBase::findRawName ( sal_Int64  nKey) const
protected

Returns the name for the passed key, or 0, if nothing found.

Definition at line 915 of file dumperbase.cxx.

References end(), and maMap.

Referenced by oox::dump::ConstList::implGetName().

◆ getName() [1/2]

OUString oox::dump::NameListBase::getName ( const Config rCfg,
double  fValue 
) const
inline

Returns a display name for the passed double value.

Definition at line 536 of file dumperbase.hxx.

References implGetNameDbl().

◆ getName() [2/2]

template<typename Type >
OUString oox::dump::NameListBase::getName ( const Config rCfg,
Type  nKey 
) const
inline

Returns the name for the passed key.

Definition at line 532 of file dumperbase.hxx.

References implGetName().

◆ hasName()

template<typename Type >
bool oox::dump::NameListBase::hasName ( Type  nKey) const
inline

Returns true, if the map contains an entry for the passed key.

Definition at line 527 of file dumperbase.hxx.

References maMap.

◆ implGetName()

virtual OUString oox::dump::NameListBase::implGetName ( const Config rCfg,
sal_Int64  nKey 
) const
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().

◆ implGetNameDbl()

virtual OUString oox::dump::NameListBase::implGetNameDbl ( const Config rCfg,
double  fValue 
) const
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().

◆ implIncludeList()

virtual void oox::dump::NameListBase::implIncludeList ( const NameListBase rList)
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().

◆ implIsValid()

bool oox::dump::NameListBase::implIsValid ( ) const
overrideprotectedvirtual

Implements oox::dump::Base.

Definition at line 888 of file dumperbase.cxx.

◆ implProcessConfigItemInt()

void oox::dump::NameListBase::implProcessConfigItemInt ( TextInputStream rStrm,
sal_Int64  nKey,
const OUString &  rData 
)
overrideprotectedvirtual

Reimplemented from oox::dump::ConfigItemBase.

Definition at line 904 of file dumperbase.cxx.

References implSetName().

◆ implProcessConfigItemStr()

void oox::dump::NameListBase::implProcessConfigItemStr ( TextInputStream rStrm,
const OUString &  rKey,
const OUString &  rData 
)
overrideprotectedvirtual

◆ implSetName()

virtual void oox::dump::NameListBase::implSetName ( sal_Int64  nKey,
const OUString &  rName 
)
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().

◆ include()

void oox::dump::NameListBase::include ( std::u16string_view  rListKeys)
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().

◆ includeList()

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

◆ insertRawName()

void oox::dump::NameListBase::insertRawName ( sal_Int64  nKey,
const OUString &  rName 
)
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().

◆ setName()

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

Member Data Documentation

◆ maMap

OUStringMap oox::dump::NameListBase::maMap
private

Definition at line 580 of file dumperbase.hxx.

Referenced by begin(), end(), exclude(), findRawName(), hasName(), includeList(), and insertRawName().

◆ mrCfgData

const SharedConfigData& oox::dump::NameListBase::mrCfgData
private

Definition at line 581 of file dumperbase.hxx.

Referenced by include().


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