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 @precond 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 size_t GetFormatCount () const =0
 
virtual SwFormatGetFormat (size_t idx) const =0
 
virtual ~SwFormatsBase ()
 
virtual SwFormatFindFormatByName (const OUString &rName) const
 
virtual void Rename (const SwFrameFormat &, const OUString &)
 
 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::SetFormatName (const OUString &, bool)
 

Detailed Description

Definition at line 46 of file charformats.hxx.

Member Typedef Documentation

◆ ByName

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

Definition at line 53 of file charformats.hxx.

◆ ByPos

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

Definition at line 52 of file charformats.hxx.

◆ const_iterator

typedef ByPos::const_iterator SwCharFormats::const_iterator

Definition at line 62 of file charformats.hxx.

◆ iterator

typedef ByPos::iterator SwCharFormats::iterator

Definition at line 54 of file charformats.hxx.

◆ size_type

typedef SwCharFormatsBase::size_type SwCharFormats::size_type

Definition at line 63 of file charformats.hxx.

◆ value_type

typedef SwCharFormatsBase::value_type SwCharFormats::value_type

Definition at line 64 of file charformats.hxx.

Constructor & Destructor Documentation

◆ SwCharFormats()

SwCharFormats::SwCharFormats ( )

Definition at line 71 of file chrfmt.cxx.

◆ ~SwCharFormats()

SwCharFormats::~SwCharFormats ( )
overridevirtual

Definition at line 77 of file chrfmt.cxx.

References DeleteAndDestroyAll().

Member Function Documentation

◆ begin()

const_iterator SwCharFormats::begin ( ) const
inline

Definition at line 89 of file charformats.hxx.

Referenced by DeleteAndDestroyAll(), and GetPos().

◆ ContainsFormat()

bool SwCharFormats::ContainsFormat ( const SwCharFormat pFormat) const

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

Definition at line 127 of file chrfmt.cxx.

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

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

◆ DeleteAndDestroyAll()

void SwCharFormats::DeleteAndDestroyAll ( bool  keepDefault = false)

Definition at line 103 of file chrfmt.cxx.

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

Referenced by ~SwCharFormats().

◆ dumpAsXml()

void SwCharFormats::dumpAsXml ( xmlTextWriterPtr  pWriter) const

Definition at line 63 of file chrfmt.cxx.

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

◆ empty()

bool SwCharFormats::empty ( ) const
inline

Definition at line 70 of file charformats.hxx.

Referenced by DeleteAndDestroyAll().

◆ end()

const_iterator SwCharFormats::end ( ) const
inline

Definition at line 90 of file charformats.hxx.

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

◆ erase()

void SwCharFormats::erase ( const_iterator const &  position)

Definition at line 125 of file chrfmt.cxx.

References m_PosIndex, and position().

Referenced by SetFormatNameAndReindex().

◆ find()

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

Definition at line 83 of file chrfmt.cxx.

References m_Array, m_NameIndex, and x.

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

◆ findByName()

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

Definition at line 90 of file chrfmt.cxx.

References m_NameIndex, and name.

Referenced by FindFormatByName().

◆ FindFormatByName()

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

Reimplemented from SwFormatsBase.

Definition at line 95 of file chrfmt.cxx.

References findByName(), and m_NameIndex.

◆ GetFormat()

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

Implements SwFormatsBase.

Definition at line 95 of file charformats.hxx.

References idx.

Referenced by dumpAsXml().

◆ GetFormatCount()

virtual size_t SwCharFormats::GetFormatCount ( ) const
inlineoverridevirtual

Implements SwFormatsBase.

Definition at line 94 of file charformats.hxx.

◆ GetPos()

size_t SwCharFormats::GetPos ( const SwCharFormat p) const

Definition at line 138 of file chrfmt.cxx.

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

◆ insert()

void SwCharFormats::insert ( SwCharFormat x)

Definition at line 119 of file chrfmt.cxx.

References ContainsFormat(), m_PosIndex, and x.

Referenced by SetFormatNameAndReindex().

◆ operator[]()

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

Definition at line 88 of file charformats.hxx.

References index_.

◆ SetFormatNameAndReindex()

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

Need to call this when the format name changes.

Definition at line 130 of file chrfmt.cxx.

References erase(), find(), insert(), and v.

◆ size()

size_t SwCharFormats::size ( ) const
inline

Friends And Related Function Documentation

◆ SwFormat::SetFormatName

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

Member Data Documentation

◆ m_Array

SwCharFormatsBase SwCharFormats::m_Array
private

Definition at line 57 of file charformats.hxx.

Referenced by DeleteAndDestroyAll(), and find().

◆ m_NameIndex

ByName& SwCharFormats::m_NameIndex
private

Definition at line 59 of file charformats.hxx.

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

◆ m_PosIndex

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: