LibreOffice Module svl (master) 1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
StylePool Class Referencefinal

#include <stylepool.hxx>

Public Member Functions

 StylePool (SfxItemSet const *pIgnorableItems=nullptr)
 
std::shared_ptr< SfxItemSetinsertItemSet (const SfxItemSet &rSet, const OUString *pParentName=nullptr)
 Insert a SfxItemSet into the style pool. More...
 
std::unique_ptr< IStylePoolIteratorAccesscreateIterator (const bool bSkipUnusedItemSets=false, const bool bSkipIgnorableItems=false)
 Create an iterator. More...
 
 ~StylePool ()
 

Static Public Member Functions

static OUString nameOf (const std::shared_ptr< SfxItemSet > &pSet)
 This static method creates a unique name from a shared pointer to a SfxItemSet The name is the memory address of the SfxItemSet itself. More...
 

Private Attributes

std::unique_ptr< StylePoolImplpImpl
 

Detailed Description

Definition at line 29 of file stylepool.hxx.

Constructor & Destructor Documentation

◆ StylePool()

StylePool::StylePool ( SfxItemSet const *  pIgnorableItems = nullptr)
explicit

Definition at line 451 of file stylepool.cxx.

◆ ~StylePool()

StylePool::~StylePool ( )

Definition at line 465 of file stylepool.cxx.

Member Function Documentation

◆ createIterator()

std::unique_ptr< IStylePoolIteratorAccess > StylePool::createIterator ( const bool  bSkipUnusedItemSets = false,
const bool  bSkipIgnorableItems = false 
)

Create an iterator.

The iterator walks through the StylePool OD 2008-03-07 #i86923# introduce optional parameter to control, if unused SfxItemsSet are skipped or not introduce optional parameter to control, if ignorable items are skipped or not

Attention: \n every change, e.g. destruction, of the StylePool could cause undefined effects.
Parameters
bSkipUnusedItemSetsinput parameter - boolean, indicating if unused SfxItemSets are skipped or not
bSkipIgnorableItemsinput parameter - boolean, indicating if ignorable items are skipped or not

@postcond the iterator "points before the first" SfxItemSet of the pool. The first StylePoolIterator::getNext() call will deliver the first SfxItemSet.

Definition at line 459 of file stylepool.cxx.

References pImpl.

◆ insertItemSet()

std::shared_ptr< SfxItemSet > StylePool::insertItemSet ( const SfxItemSet rSet,
const OUString *  pParentName = nullptr 
)

Insert a SfxItemSet into the style pool.

The pool makes a copy of the provided SfxItemSet.

Parameters
SfxItemSetthe SfxItemSet to insert
pParentNameName of the parent of rSet. If set, createIterator() can be more deterministic by iterating over item sets ordered by parent names.
Returns
a shared pointer to the SfxItemSet

Definition at line 455 of file stylepool.cxx.

References pImpl, and rSet.

◆ nameOf()

OUString StylePool::nameOf ( const std::shared_ptr< SfxItemSet > &  pSet)
static

This static method creates a unique name from a shared pointer to a SfxItemSet The name is the memory address of the SfxItemSet itself.

Definition at line 327 of file stylepool.cxx.

Member Data Documentation

◆ pImpl

std::unique_ptr<StylePoolImpl> StylePool::pImpl
private

Definition at line 32 of file stylepool.hxx.

Referenced by createIterator(), and insertItemSet().


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