20#ifndef KOOASISCONTEXT_H
21#define KOOASISCONTEXT_H
23#include <KoOasisLoadingContext.h>
25class KoVariableSettings;
29class KoVariableCollection;
31#include "KoListStyleStack.h"
32#include "KoTextBookmark.h"
61 KoVariableCollection& variableCollection() { return m_varColl; }
66 TQString currentListStyleName() const { return m_currentListStyleName; }
67 void setCurrentListStyleName( const TQString& s ) { m_currentListStyleName = s; }
77 int cursorTextIndex );
79 KoTextParag* cursorTextParagraph() const { return m_cursorTextParagraph; }
80 int cursorTextIndex() const { return m_cursorTextIndex; }
84 bool pushListLevelStyle( const TQString& listStyleName, const TQDomElement& fullListStyle, int level );
88 TQString m_currentListStyleName;
89 KoVariableCollection& m_varColl;
91 KoTextParag* m_cursorTextParagraph;
92 int m_cursorTextIndex;
114 enum SavingMode { Store, Flat };
132 void setCursorPosition( KoTextParag* cursorTextParagraph,
133 int cursorTextIndex );
135 KoTextParag* cursorTextParagraph() const { return m_cursorTextParagraph; }
136 int cursorTextIndex() const { return m_cursorTextIndex; }
140 struct BookmarkPosition {
141 BookmarkPosition() : name(), pos( -1 ), startEqualsEnd( false ) {}
142 BookmarkPosition( const TQString& nm, int p, bool simple )
143 : name( nm ), pos( p ), startEqualsEnd( simple ) {}
147 bool operator<( BookmarkPosition& rhs ) const {
148 return pos < rhs.pos;
151 typedef TQValueList<BookmarkPosition> BookmarkPositions;
152 void setBookmarkPositions( const BookmarkPositions& bkStarts,
153 const BookmarkPositions& bkEnds ) {
154 m_bookmarkStarts = bkStarts;
155 m_bookmarkEnds = bkEnds;
157 const BookmarkPositions& bookmarkStarts() const { return m_bookmarkStarts; }
158 const BookmarkPositions& bookmarkEnds() const { return m_bookmarkEnds; }
160 void addFontFace( const TQString& fontName );
161 typedef TQMap<TQString, bool> FontFaces;
162 void writeFontFaces( KoXmlWriter& writer );
165 bool hasColumns() const { return m_hasColumns; }
168 KoVariableSettings* variableSettings() const { return m_variableSettings; }
171 KoGenStyles& m_mainStyles;
172 SavingMode m_savingMode;
174 BookmarkPositions m_bookmarkStarts, m_bookmarkEnds;
176 KoTextParag* m_cursorTextParagraph;
177 int m_cursorTextIndex;
178 FontFaces m_fontFaces;
179 KoVariableSettings* m_variableSettings;
The KOffice document class.
Repository of styles used during saving of OASIS/OOo file.
This class implements the list styles currently active at a given point.
bool pushListLevelStyle(const TQString &listStyleName, int level) Used for lists (numbered paragraphs).
bool pushOutlineListLevelStyle(int level) Used for outline levels.
KoOasisContext(KoDocument *doc, KoVariableCollection &varColl, KoOasisStyles &styles, KoStore *store) Stores reference to the KoOasisStyles parsed by KoDocument.
void setCursorPosition(KoTextParag *cursorTextParagraph, int cursorTextIndex) Set cursor position (set by KoTextParag upon finding the processing instruction).
KoOasisLoadingContext(KoDocument *doc, KoOasisStyles &styles, KoStore *store) Stores reference to the KoOasisStyles and stored passed by KoDocument.
Repository of styles used during loading of OASIS/OOo file.
A paragraph style is a combination of a character style and paragraph-layout attributes,...
SavingMode savingMode() const
KoSavingContext(KoGenStyles &mainStyles, KoVariableSettings *settings=0, bool hasColumns=false, SavingMode savingMode=Store) Constructor.
Saves and loads KOffice documents using various backends.
|