lib

KoOasisContext Class Reference

#include <KoOasisContext.h>

Inheritance diagram for KoOasisContext:
KoOasisLoadingContext

Public Member Functions

 KoOasisContext (KoDocument *doc, KoVariableCollection &varColl, KoOasisStyles &styles, KoStore *store)
 
KoVariableCollection & variableCollection ()
 
KoListStyleStack & listStyleStack ()
 
TQString currentListStyleName () const
 
void setCurrentListStyleName (const TQString &s)
 
bool pushListLevelStyle (const TQString &listStyleName, int level)
 
bool pushOutlineListLevelStyle (int level)
 
void setCursorPosition (KoTextParag *cursorTextParagraph, int cursorTextIndex)
 
KoTextParag * cursorTextParagraph () const
 
int cursorTextIndex () const
 
- Public Member Functions inherited from KoOasisLoadingContext
 KoOasisLoadingContext (KoDocument *doc, KoOasisStyles &styles, KoStore *store)
 
KoDocument * koDocument ()
 
KoStore * store ()
 
KoOasisStyles & oasisStyles ()
 
KoStyleStack & styleStack ()
 
const TQDomDocument & manifestDocument () const
 
TQString generator () const
 
void fillStyleStack (const TQDomElement &element, const char *nsURI, const char *attrName, const char *family)
 
void addStyles (const TQDomElement *style, const char *family, bool usingStylesAutoStyles=false)
 
void setUseStylesAutoStyles (bool useStylesAutoStyles)
 

Detailed Description

Used during loading of Oasis format (and discarded at the end of the loading).

In addition to what KoOasisLoadingContext stores, this class has 'state' information: a stack with the currently used styles (with its ancestors in the stack), another one with the list styles currently applicable (one item in the stack per list level).

Author
David Faure faure.nosp@m.@kde.nosp@m..org

Definition at line 45 of file KoOasisContext.h.

Constructor & Destructor Documentation

◆ KoOasisContext()

KoOasisContext::KoOasisContext ( KoDocument *  doc,
KoVariableCollection &  varColl,
KoOasisStyles &  styles,
KoStore *  store 
)

Stores reference to the KoOasisStyles parsed by KoDocument.

Make sure that the KoOasisStyles instance outlives this KoOasisContext instance. (This is the case during loaiding, when using the KoOasisStyles given by KoDocument)

Parameters
docKoDocument, needed by some field variables
varCollreference to the collection that creates and stores variables (fields)
stylesreference to the KoOasisStyles parsed by KoDocument
storepointer to store, if available, for e.g. loading images.

Definition at line 28 of file KoOasisContext.cpp.

◆ ~KoOasisContext()

KoOasisContext::~KoOasisContext ( )

Definition at line 90 of file KoOasisContext.cpp.

Member Function Documentation

◆ currentListStyleName()

TQString KoOasisContext::currentListStyleName ( ) const
inline

Definition at line 66 of file KoOasisContext.h.

◆ cursorTextIndex()

int KoOasisContext::cursorTextIndex ( ) const
inline

Definition at line 80 of file KoOasisContext.h.

◆ cursorTextParagraph()

KoTextParag * KoOasisContext::cursorTextParagraph ( ) const
inline

Definition at line 79 of file KoOasisContext.h.

◆ listStyleStack()

KoListStyleStack & KoOasisContext::listStyleStack ( )
inline

Definition at line 65 of file KoOasisContext.h.

◆ pushListLevelStyle()

bool KoOasisContext::pushListLevelStyle ( const TQString &  listStyleName,
int  level 
)

Used for lists (numbered paragraphs)

Returns
true on success (a list style was found and pushed)

Definition at line 47 of file KoOasisContext.cpp.

◆ pushOutlineListLevelStyle()

bool KoOasisContext::pushOutlineListLevelStyle ( int  level)

Used for outline levels.

Definition at line 58 of file KoOasisContext.cpp.

◆ setCurrentListStyleName()

void KoOasisContext::setCurrentListStyleName ( const TQString &  s)
inline

Definition at line 67 of file KoOasisContext.h.

◆ setCursorPosition()

void KoOasisContext::setCursorPosition ( KoTextParag *  cursorTextParagraph,
int  cursorTextIndex 
)

Set cursor position (set by KoTextParag upon finding the processing instruction)

Definition at line 83 of file KoOasisContext.cpp.

◆ variableCollection()

KoVariableCollection & KoOasisContext::variableCollection ( )
inline

Definition at line 61 of file KoOasisContext.h.


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