LibreOffice Module sw (master)  1
Public Member Functions | Private Attributes | List of all members
SwStyleManager Class Reference
Inheritance diagram for SwStyleManager:
[legend]
Collaboration diagram for SwStyleManager:
[legend]

Public Member Functions

 SwStyleManager (SfxItemSet const *pIgnorableParagraphItems)
 
virtual std::shared_ptr< SfxItemSetgetAutomaticStyle (const SfxItemSet &rSet, IStyleAccess::SwAutoStyleFamily eFamily, const OUString *pParentName=nullptr) override
 
virtual std::shared_ptr< SfxItemSetgetByName (const OUString &rName, IStyleAccess::SwAutoStyleFamily eFamily) override
 It's slow to iterate through a stylepool looking for a special name, but if the style has been inserted via "cacheAutomaticStyle" instead of "getAutomaticStyle", it's faster. More...
 
virtual void getAllStyles (std::vector< std::shared_ptr< SfxItemSet >> &rStyles, IStyleAccess::SwAutoStyleFamily eFamily) override
 
virtual std::shared_ptr< SfxItemSetcacheAutomaticStyle (const SfxItemSet &rSet, SwAutoStyleFamily eFamily) override
 insert the style to the pool and the cache (used during import) More...
 
virtual void clearCaches () override
 To release the cached styles (shared_pointer!) More...
 
- Public Member Functions inherited from IStyleAccess
virtual ~IStyleAccess ()
 

Private Attributes

StylePool aAutoCharPool
 
StylePool aAutoParaPool
 
std::unique_ptr< SwStyleCachempCharCache
 
std::unique_ptr< SwStyleCachempParaCache
 

Additional Inherited Members

- Public Types inherited from IStyleAccess
enum  SwAutoStyleFamily {
  AUTO_STYLE_CHAR,
  AUTO_STYLE_RUBY,
  AUTO_STYLE_PARA,
  AUTO_STYLE_NOTXT
}
 

Detailed Description

Definition at line 56 of file swstylemanager.cxx.

Constructor & Destructor Documentation

SwStyleManager::SwStyleManager ( SfxItemSet const *  pIgnorableParagraphItems)
inlineexplicit

Definition at line 65 of file swstylemanager.cxx.

Member Function Documentation

std::shared_ptr< SfxItemSet > SwStyleManager::cacheAutomaticStyle ( const SfxItemSet rSet,
SwAutoStyleFamily  eFamily 
)
overridevirtual

insert the style to the pool and the cache (used during import)

Implements IStyleAccess.

Definition at line 100 of file swstylemanager.cxx.

References aAutoCharPool, aAutoParaPool, IStyleAccess::AUTO_STYLE_CHAR, StylePool::insertItemSet(), mpCharCache, and mpParaCache.

void SwStyleManager::clearCaches ( )
overridevirtual

To release the cached styles (shared_pointer!)

Implements IStyleAccess.

Definition at line 86 of file swstylemanager.cxx.

References mpCharCache, and mpParaCache.

void SwStyleManager::getAllStyles ( std::vector< std::shared_ptr< SfxItemSet >> &  rStyles,
IStyleAccess::SwAutoStyleFamily  eFamily 
)
overridevirtual
std::shared_ptr< SfxItemSet > SwStyleManager::getAutomaticStyle ( const SfxItemSet rSet,
IStyleAccess::SwAutoStyleFamily  eFamily,
const OUString *  pParentName = nullptr 
)
overridevirtual
std::shared_ptr< SfxItemSet > SwStyleManager::getByName ( const OUString &  rName,
IStyleAccess::SwAutoStyleFamily  eFamily 
)
overridevirtual

It's slow to iterate through a stylepool looking for a special name, but if the style has been inserted via "cacheAutomaticStyle" instead of "getAutomaticStyle", it's faster.

Implements IStyleAccess.

Definition at line 120 of file swstylemanager.cxx.

References aAutoCharPool, aAutoParaPool, IStyleAccess::AUTO_STYLE_CHAR, mpCharCache, and mpParaCache.

Member Data Documentation

StylePool SwStyleManager::aAutoCharPool
private

Definition at line 58 of file swstylemanager.cxx.

Referenced by cacheAutomaticStyle(), getAllStyles(), getAutomaticStyle(), and getByName().

StylePool SwStyleManager::aAutoParaPool
private

Definition at line 59 of file swstylemanager.cxx.

Referenced by cacheAutomaticStyle(), getAllStyles(), getAutomaticStyle(), and getByName().

std::unique_ptr<SwStyleCache> SwStyleManager::mpCharCache
private

Definition at line 60 of file swstylemanager.cxx.

Referenced by cacheAutomaticStyle(), clearCaches(), and getByName().

std::unique_ptr<SwStyleCache> SwStyleManager::mpParaCache
private

Definition at line 61 of file swstylemanager.cxx.

Referenced by cacheAutomaticStyle(), clearCaches(), and getByName().


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