LibreOffice Module sw (master)  1
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
SwCharFormats Class Referencefinal

#include <charformats.hxx>

Inheritance diagram for SwCharFormats:
[legend]
Collaboration diagram for SwCharFormats:
[legend]

Public Types

typedef SwCharFormatsBase::nth_index< 0 >::type ByPos
 
typedef SwCharFormatsBase::nth_index< 1 >::type ByName
 
typedef ByPos::iterator iterator
 
typedef ByPos::const_iterator const_iterator
 
typedef SwCharFormatsBase::size_type size_type
 
typedef SwCharFormatsBase::value_type value_type
 

Public Member Functions

 SwCharFormats ()
 
virtual ~SwCharFormats () override
 
bool empty () const
 
size_t size () const
 
void insert (SwCharFormat *x)
 
void erase (const_iterator const &position)
 
const_iterator find (const SwCharFormat *x) const
 
size_t GetPos (const SwCharFormat *p) const
 
ByName::const_iterator findByName (const OUString &name) const
 
SwCharFormatoperator[] (size_t index_) const
 
const_iterator begin () const
 
const_iterator end () const
 
void dumpAsXml (xmlTextWriterPtr pWriter) const
 
virtual size_t GetFormatCount () const override
 
virtual SwCharFormatGetFormat (size_t idx) const override
 
bool ContainsFormat (const SwCharFormat *pFormat) const
 fast check if given format is contained here pFormat must not have been deleted More...
 
void DeleteAndDestroyAll (bool keepDefault=false)
 
virtual SwCharFormatFindFormatByName (const OUString &rName) const override
 
void SetFormatNameAndReindex (SwCharFormat *v, const OUString &sNewName)
 Need to call this when the format name changes. More...
 
- Public Member Functions inherited from SwFormatsBase
virtual ~SwFormatsBase ()
 
 SwFormatsBase ()=default
 
 SwFormatsBase (SwFormatsBase const &)=default
 
 SwFormatsBase (SwFormatsBase &&)=default
 
SwFormatsBaseoperator= (SwFormatsBase const &)=default
 
SwFormatsBaseoperator= (SwFormatsBase &&)=default
 

Private Attributes

SwCharFormatsBase m_Array
 
ByPosm_PosIndex
 
ByNamem_NameIndex
 

Friends

void SwFormat::SetName (const OUString &, bool)
 

Detailed Description

Definition at line 46 of file charformats.hxx.

Member Typedef Documentation

typedef SwCharFormatsBase::nth_index<1>::type SwCharFormats::ByName

Definition at line 53 of file charformats.hxx.

typedef SwCharFormatsBase::nth_index<0>::type SwCharFormats::ByPos

Definition at line 52 of file charformats.hxx.

typedef ByPos::const_iterator SwCharFormats::const_iterator

Definition at line 62 of file charformats.hxx.

typedef ByPos::iterator SwCharFormats::iterator

Definition at line 54 of file charformats.hxx.

typedef SwCharFormatsBase::size_type SwCharFormats::size_type

Definition at line 63 of file charformats.hxx.

typedef SwCharFormatsBase::value_type SwCharFormats::value_type

Definition at line 64 of file charformats.hxx.

Constructor & Destructor Documentation

SwCharFormats::SwCharFormats ( )

Definition at line 53 of file chrfmt.cxx.

SwCharFormats::~SwCharFormats ( )
overridevirtual

Definition at line 59 of file chrfmt.cxx.

References DeleteAndDestroyAll().

Member Function Documentation

const_iterator SwCharFormats::begin ( ) const
inline

Definition at line 89 of file charformats.hxx.

Referenced by DeleteAndDestroyAll(), and GetPos().

bool SwCharFormats::ContainsFormat ( const SwCharFormat pFormat) const

fast check if given format is contained here pFormat must not have been deleted

Definition at line 109 of file chrfmt.cxx.

References end(), and find().

Referenced by SwNumRule::CopyNumRule(), insert(), and SwHistorySetText::SetInDoc().

void SwCharFormats::DeleteAndDestroyAll ( bool  keepDefault = false)

Definition at line 85 of file chrfmt.cxx.

References begin(), empty(), end(), m_Array, m_PosIndex, and u.

Referenced by ~SwCharFormats().

void SwCharFormats::dumpAsXml ( xmlTextWriterPtr  pWriter) const

Definition at line 45 of file chrfmt.cxx.

References SwCharFormat::dumpAsXml(), GetFormat(), i, size(), and void().

bool SwCharFormats::empty ( ) const
inline

Definition at line 70 of file charformats.hxx.

Referenced by DeleteAndDestroyAll().

const_iterator SwCharFormats::end ( ) const
inline

Definition at line 90 of file charformats.hxx.

Referenced by ContainsFormat(), DeleteAndDestroyAll(), and GetPos().

void SwCharFormats::erase ( const_iterator const &  position)

Definition at line 107 of file chrfmt.cxx.

References m_PosIndex.

Referenced by SetFormatNameAndReindex().

SwCharFormats::const_iterator SwCharFormats::find ( const SwCharFormat x) const

Definition at line 65 of file chrfmt.cxx.

References SwFormat::GetName(), m_Array, and m_NameIndex.

Referenced by ContainsFormat(), GetPos(), and SetFormatNameAndReindex().

SwCharFormats::ByName::const_iterator SwCharFormats::findByName ( const OUString &  name) const

Definition at line 72 of file chrfmt.cxx.

References m_NameIndex.

Referenced by FindFormatByName().

SwCharFormat * SwCharFormats::FindFormatByName ( const OUString &  rName) const
overridevirtual

Reimplemented from SwFormatsBase.

Definition at line 77 of file chrfmt.cxx.

References findByName(), and m_NameIndex.

virtual SwCharFormat* SwCharFormats::GetFormat ( size_t  idx) const
inlineoverridevirtual

Implements SwFormatsBase.

Definition at line 95 of file charformats.hxx.

Referenced by dumpAsXml().

virtual size_t SwCharFormats::GetFormatCount ( ) const
inlineoverridevirtual

Implements SwFormatsBase.

Definition at line 94 of file charformats.hxx.

size_t SwCharFormats::GetPos ( const SwCharFormat p) const

Definition at line 120 of file chrfmt.cxx.

References begin(), end(), and find().

void SwCharFormats::insert ( SwCharFormat x)

Definition at line 101 of file chrfmt.cxx.

References ContainsFormat(), and m_PosIndex.

Referenced by SetFormatNameAndReindex().

SwCharFormat* SwCharFormats::operator[] ( size_t  index_) const
inline

Definition at line 88 of file charformats.hxx.

void SwCharFormats::SetFormatNameAndReindex ( SwCharFormat v,
const OUString &  sNewName 
)

Need to call this when the format name changes.

Definition at line 112 of file chrfmt.cxx.

References erase(), find(), insert(), and SwFormat::SetName().

size_t SwCharFormats::size ( ) const
inline

Friends And Related Function Documentation

void SwFormat::SetName ( const OUString &  ,
bool   
)
friend

Member Data Documentation

SwCharFormatsBase SwCharFormats::m_Array
private

Definition at line 57 of file charformats.hxx.

Referenced by DeleteAndDestroyAll(), and find().

ByName& SwCharFormats::m_NameIndex
private

Definition at line 59 of file charformats.hxx.

Referenced by find(), findByName(), and FindFormatByName().

ByPos& SwCharFormats::m_PosIndex
private

Definition at line 58 of file charformats.hxx.

Referenced by DeleteAndDestroyAll(), erase(), and insert().


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