StarItemPool Class Reference

the main class to read/. More...

#include <StarItemPool.hxx>

Public Types

enum  Type {
  T_ChartPool , T_EditEnginePool , T_SpreadsheetPool , T_VCControlPool ,
  T_WriterPool , T_XOutdevPool , T_Unknown
}
 the known item pool More...
 

Public Member Functions

 StarItemPool (StarObject &document, Type type)
 constructor
 
virtual ~StarItemPool ()
 destructor
 
void clean ()
 clean the pool's list of attributes, ...
 
void addSecondaryPool (std::shared_ptr< StarItemPool > secondary)
 add a secondary pool
 
bool isSecondaryPool () const
 returns true if a pool is a secondary pool
 
bool read (StarZone &zone)
 try to read a "ItemPool" zone
 
int getVersion () const
 returns the pool version
 
Type getType () const
 returns the pool type
 
bool isInside () const
 returns true if we are reading the pool
 
bool readStyles (StarZone &zone, StarObject &doc)
 try to read the styles, ie a "StyleItemPool" zone
 
void updateStyles ()
 try to update the style
 
void updateUsingStyles (StarItemSet &itemSet) const
 update a itemset by adding attribute corresponding to its styles
 
void defineGraphicStyle (STOFFListenerPtr &listener, librevenge::RVNGString const &styleName, StarObject &object) const
 define a graphic style
 
void defineParagraphStyle (STOFFListenerPtr &listener, librevenge::RVNGString const &styleName, StarObject &object) const
 define a paragraph style
 
StarItemStyle const * findStyleWithFamily (librevenge::RVNGString const &style, int family) const
 try to find a style with a name and a family style
 
std::shared_ptr< StarAttributereadAttribute (StarZone &zone, int which, int vers, long endPos)
 try to read an attribute
 
std::shared_ptr< StarItemreadItem (StarZone &zone, bool isDirect, long endPos)
 read a item
 
std::shared_ptr< StarItemloadSurrogate (StarZone &zone, uint16_t &nWhich, bool localId, libstoff::DebugStream &f)
 try to load a surrogate
 
bool loadSurrogate (StarItem &item)
 try to load a surrogate
 
void setRelativeUnit (double relUnit)
 set the item pool relative unit (if this is different to the default one)
 
double getRelativeUnit () const
 returns the set relative unit if this is set, or the default unit corresponding to this pool
 

Protected Member Functions

void defineGraphicStyle (STOFFListenerPtr listener, librevenge::RVNGString const &styleName, StarObject &object, std::set< librevenge::RVNGString > &done) const
 define a graphic style
 
void defineParagraphStyle (STOFFListenerPtr listener, librevenge::RVNGString const &styleName, StarObject &object, std::set< librevenge::RVNGString > &done) const
 define a paragraph style
 
bool readV1 (StarZone &zone, StarItemPool *master)
 try to read a "ItemPool" zone (version 1)
 
bool readV2 (StarZone &zone, StarItemPool *master)
 try to read a "ItemPool" zone (version 2)
 
std::shared_ptr< StarItemcreateItem (int which, int surrogateId, bool localId)
 create an item for futher reading
 

Private Attributes

bool m_isInside
 true if the pool is open
 
std::shared_ptr< StarItemPoolInternal::Statem_state
 the state
 

Friends

struct StarItemPoolInternal::State
 

Detailed Description

the main class to read/.

. some basic StarOffice SfxItemItemPool itemPools

Member Enumeration Documentation

◆ Type

the known item pool

Enumerator
T_ChartPool 
T_EditEnginePool 
T_SpreadsheetPool 
T_VCControlPool 
T_WriterPool 
T_XOutdevPool 
T_Unknown 

Constructor & Destructor Documentation

◆ StarItemPool()

StarItemPool::StarItemPool ( StarObject document,
StarItemPool::Type  type 
)

constructor

◆ ~StarItemPool()

StarItemPool::~StarItemPool ( )
virtual

destructor

Member Function Documentation

◆ addSecondaryPool()

void StarItemPool::addSecondaryPool ( std::shared_ptr< StarItemPool secondary)

add a secondary pool

◆ clean()

void StarItemPool::clean ( )

clean the pool's list of attributes, ...

◆ createItem()

std::shared_ptr< StarItem > StarItemPool::createItem ( int  which,
int  surrogateId,
bool  localId 
)
protected

create an item for futher reading

Referenced by loadSurrogate().

◆ defineGraphicStyle() [1/2]

void StarItemPool::defineGraphicStyle ( STOFFListenerPtr listener,
librevenge::RVNGString const &  styleName,
StarObject object 
) const
inline

define a graphic style

Referenced by defineGraphicStyle().

◆ defineGraphicStyle() [2/2]

void StarItemPool::defineGraphicStyle ( STOFFListenerPtr  listener,
librevenge::RVNGString const &  styleName,
StarObject object,
std::set< librevenge::RVNGString > &  done 
) const
protected

define a graphic style

◆ defineParagraphStyle() [1/2]

void StarItemPool::defineParagraphStyle ( STOFFListenerPtr listener,
librevenge::RVNGString const &  styleName,
StarObject object 
) const
inline

define a paragraph style

Referenced by defineParagraphStyle().

◆ defineParagraphStyle() [2/2]

void StarItemPool::defineParagraphStyle ( STOFFListenerPtr  listener,
librevenge::RVNGString const &  styleName,
StarObject object,
std::set< librevenge::RVNGString > &  done 
) const
protected

define a paragraph style

◆ findStyleWithFamily()

StarItemStyle const * StarItemPool::findStyleWithFamily ( librevenge::RVNGString const &  style,
int  family 
) const

try to find a style with a name and a family style

Referenced by defineGraphicStyle(), defineParagraphStyle(), and updateUsingStyles().

◆ getRelativeUnit()

double StarItemPool::getRelativeUnit ( ) const

returns the set relative unit if this is set, or the default unit corresponding to this pool

◆ getType()

StarItemPool::Type StarItemPool::getType ( ) const

returns the pool type

◆ getVersion()

int StarItemPool::getVersion ( ) const

returns the pool version

◆ isInside()

bool StarItemPool::isInside ( ) const
inline

returns true if we are reading the pool

Referenced by loadSurrogate().

◆ isSecondaryPool()

bool StarItemPool::isSecondaryPool ( ) const

returns true if a pool is a secondary pool

◆ loadSurrogate() [1/2]

bool StarItemPool::loadSurrogate ( StarItem item)

try to load a surrogate

◆ loadSurrogate() [2/2]

std::shared_ptr< StarItem > StarItemPool::loadSurrogate ( StarZone zone,
uint16_t &  nWhich,
bool  localId,
libstoff::DebugStream f 
)

try to load a surrogate

Referenced by read(), and readItem().

◆ read()

bool StarItemPool::read ( StarZone zone)

try to read a "ItemPool" zone

◆ readAttribute()

std::shared_ptr< StarAttribute > StarItemPool::readAttribute ( StarZone zone,
int  which,
int  vers,
long  endPos 
)

try to read an attribute

Referenced by readItem(), readV1(), and readV2().

◆ readItem()

std::shared_ptr< StarItem > StarItemPool::readItem ( StarZone zone,
bool  isDirect,
long  endPos 
)

read a item

Referenced by StarObject::readItemSet().

◆ readStyles()

bool StarItemPool::readStyles ( StarZone zone,
StarObject doc 
)

try to read the styles, ie a "StyleItemPool" zone

◆ readV1()

bool StarItemPool::readV1 ( StarZone zone,
StarItemPool master 
)
protected

try to read a "ItemPool" zone (version 1)

◆ readV2()

bool StarItemPool::readV2 ( StarZone zone,
StarItemPool master 
)
protected

try to read a "ItemPool" zone (version 2)

◆ setRelativeUnit()

void StarItemPool::setRelativeUnit ( double  relUnit)

set the item pool relative unit (if this is different to the default one)

◆ updateStyles()

void StarItemPool::updateStyles ( )

try to update the style

Note
must be called after all styles have been updated

◆ updateUsingStyles()

void StarItemPool::updateUsingStyles ( StarItemSet itemSet) const

update a itemset by adding attribute corresponding to its styles

Friends And Related Function Documentation

◆ StarItemPoolInternal::State

friend struct StarItemPoolInternal::State
friend

Member Data Documentation

◆ m_isInside

bool StarItemPool::m_isInside
private

true if the pool is open

Referenced by isInside(), and read().

◆ m_state


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

Generated on Fri Apr 14 2023 04:41:10 for libstaroffice by doxygen 1.9.6