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 ()
 
- Protected Member Functions inherited from oox::dump::ConfigItemBase
 ConfigItemBase ()
 
void readConfigBlockContents (TextInputStream &rStrm)
 

Private Member Functions

void include (const OUString &rListKeys)
 Includes name lists, given in a comma separated list of names of the lists. More...
 
void exclude (const OUString &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

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.

Constructor & Destructor Documentation

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

Definition at line 861 of file dumperbase.cxx.

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

Definition at line 545 of file dumperbase.hxx.

Member Function Documentation

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

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

void oox::dump::NameListBase::exclude ( const OUString &  rKeys)
private

Excludes names from the list, given in a comma separated list of their keys.

Definition at line 921 of file dumperbase.cxx.

References oox::dump::StringHelper::convertStringToIntList(), and maMap.

Referenced by implProcessConfigItemStr().

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 907 of file dumperbase.cxx.

References end(), and maMap.

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

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

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

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.

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::UnitConverter, oox::dump::CombiList, oox::dump::FlagsList, and oox::dump::ConstList.

Referenced by getName().

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::UnitConverter, oox::dump::FlagsList, and oox::dump::ConstList.

Referenced by getName().

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::UnitConverter, oox::dump::CombiList, oox::dump::FlagsList, and oox::dump::ConstList.

Referenced by includeList().

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

Implements oox::dump::Base.

Definition at line 880 of file dumperbase.cxx.

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

Reimplemented from oox::dump::ConfigItemBase.

Definition at line 896 of file dumperbase.cxx.

References implSetName().

void oox::dump::NameListBase::implProcessConfigItemStr ( TextInputStream rStrm,
const OUString &  rKey,
const OUString &  rData 
)
overrideprotectedvirtual
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::UnitConverter, oox::dump::CombiList, oox::dump::FlagsList, oox::dump::MultiList, and oox::dump::ConstList.

Referenced by implProcessConfigItemInt(), and setName().

void oox::dump::NameListBase::include ( const OUString &  rListKeys)
private

Includes name lists, given in a comma separated list of names of the lists.

Definition at line 913 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 870 of file dumperbase.cxx.

References implIncludeList(), and maMap.

Referenced by include().

void oox::dump::NameListBase::insertRawName ( sal_Int64  nKey,
const OUString &  rName 
)
protected

Inserts the passed name into the internal map.

Definition at line 902 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 865 of file dumperbase.cxx.

References implSetName().

Member Data Documentation

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

Definition at line 580 of file dumperbase.hxx.

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

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: