lib

KoOasisContext Class Reference

#include <KoOasisContext.h>

Inheritance diagram for KoOasisContext:

KoOasisLoadingContext

List of all members.


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@kde.org>

Definition at line 45 of file KoOasisContext.h.


Public Member Functions

 KoOasisContext (KoDocument *doc, KoVariableCollection &varColl, KoOasisStyles &styles, KoStore *store)
KoVariableCollection & variableCollection ()
KoListStyleStacklistStyleStack ()
QString currentListStyleName () const
void setCurrentListStyleName (const QString &s)
bool pushListLevelStyle (const QString &listStyleName, int level)
bool pushOutlineListLevelStyle (int level)
void setCursorPosition (KoTextParag *cursorTextParagraph, int cursorTextIndex)
KoTextParag * cursorTextParagraph () const
int cursorTextIndex () const

Constructor & Destructor Documentation

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:
doc KoDocument, needed by some field variables
varColl reference to the collection that creates and stores variables (fields)
styles reference to the KoOasisStyles parsed by KoDocument
store pointer to store, if available, for e.g. loading images.

Definition at line 28 of file KoOasisContext.cpp.


Member Function Documentation

bool KoOasisContext::pushListLevelStyle ( const QString &  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.

bool KoOasisContext::pushOutlineListLevelStyle ( int  level  ) 

Used for outline levels.

Definition at line 58 of file KoOasisContext.cpp.

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.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys