kword
KWDocument Class Reference
List of all members.Detailed Description
Definition at line 104 of file KWDocument.h.
Public Types | |
enum | ProcessingType { WP = 0, DTP = 1 } |
enum | { STYLE_FRAME_AUTO = 20, STYLE_FRAME_USER, STYLE_TABLE_CELL_AUTO, STYLE_TABLE_CELL_USER, STYLE_TABLE, STYLE_TABLE_COLUMN, STYLE_TABLE_ROW } |
enum | SaveFlag { SaveAll, SaveSelected } |
Public Slots | |
void | slotRepaintChanged (KWFrameSet *frameset) |
void | framesChanged (const QValueList< KWFrame * > &frames) |
void | invalidate (const KWFrameSet *skipThisFrameSet=0) |
virtual void | initEmpty () |
Signals | |
void | pageLayoutChanged (const KoPageLayout &) |
void | newContentsSize () |
void | mainTextHeightChanged () |
void | numPagesChanged () |
void | docStructureChanged (int) |
void | sig_terminateEditing (KWFrameSet *fs) |
void | sig_refreshMenuCustomVariable () |
void | sigFrameSetAdded (KWFrameSet *) |
void | sigFrameSetRemoved (KWFrameSet *) |
Public Member Functions | |
KWDocument (QWidget *parentWidget=0, const char *widname=0, QObject *parent=0, const char *name=0, bool singleViewMode=false) | |
~KWDocument () | |
virtual bool | initDoc (InitDocFlags flags, QWidget *parentWidget=0) |
virtual bool | loadOasis (const QDomDocument &doc, KoOasisStyles &oasisStyles, const QDomDocument &settings, KoStore *store) |
virtual bool | saveOasis (KoStore *store, KoXmlWriter *manifestWriter) |
virtual int | supportedSpecialFormats () const |
QDragObject * | dragSelected (const QValueList< KWFrameView * > &selectedFrames) |
QDragObject * | dragSelected (QWidget *parent, KWTextFrameSet *fs) |
virtual bool | loadXML (QIODevice *, const QDomDocument &dom) |
virtual bool | loadChildren (KoStore *store) |
virtual QDomDocument | saveXML () |
void | processPictureRequests () |
void | processAnchorRequests () |
bool | processFootNoteRequests () |
int | syntaxVersion () const |
void | progressItemLoaded () |
virtual void | paintContent (QPainter &painter, const QRect &rect, bool transparent=false, double zoomX=1.0, double zoomY=1.0) |
virtual QPixmap | generatePreview (const QSize &size) |
void | createEmptyRegion (const QRect &crect, QRegion &emptyRegion, KWViewMode *viewMode) |
void | eraseEmptySpace (QPainter *painter, const QRegion &emptySpaceRegion, const QBrush &brush) |
virtual void | setEmpty () |
virtual void | addView (KoView *view) |
virtual void | removeView (KoView *view) |
virtual void | addShell (KoMainWindow *shell) |
KWPartFrameSet * | insertObject (const KoRect &rect, KoDocumentEntry &e, QWidget *parentWidget) |
KWDocumentChild * | createChildDoc (const KoRect &rect, KoDocument *childDoc) |
void | setPageLayout (const KoPageLayout &layout, const KoColumns &cl, const KoKWHeaderFooter &hf, bool updateViews=true) |
void | getPageLayout (KoPageLayout &layout, KoColumns &cl, KoKWHeaderFooter &hf) |
KWTextFrameSet * | textFrameSet (unsigned int num) const |
KWFrameSet * | frameSet (unsigned int num) |
KWFrameSet * | frameSetByName (const QString &name) |
unsigned int | frameSetCount () const |
QString | generateFramesetName (const QString &templateName) |
QPtrListIterator< KWFrameSet > | framesetsIterator () const |
QValueList< KoTextObject * > | visibleTextObjects (KWViewMode *viewmode) const |
void | addFrameSet (KWFrameSet *f, bool finalize=true) |
void | removeFrameSet (KWFrameSet *f) |
void | deleteTable (KWTableFrameSet *groupManager) |
void | deleteFrame (KWFrame *frame) |
unsigned int | paperHeight (int pageNum) const |
unsigned int | paperWidth (int pageNum) const |
unsigned int | pageTop (int pgNum) const |
double | ptColumnWidth () const |
double | ptColumnSpacing () const |
double | ptFootnoteBodySpacing () const |
unsigned int | numColumns () const |
void | repaintAllViews (bool erase=false) |
void | repaintAllViewsExcept (KWView *view, bool erase=false) |
void | delayedRepaintAllViews () |
void | delayedRecalcFrames (int fromPage) |
QPixmap * | doubleBufferPixmap (const QSize &) |
void | maybeDeleteDoubleBufferPixmap () |
void | frameChanged (KWFrame *frame) |
void | framesChanged (const QPtrList< KWFrame > &frames, KWView *view=0L) |
QString | uniqueFramesetName (const QString &oldName) |
void | pasteFrames (QDomElement topElem, KMacroCommand *macroCmd, bool copyFootNote=false, bool dontCreateFootNote=false, bool selectFrames=true) |
void | insertEmbedded (KoStore *store, QDomElement topElem, KMacroCommand *macroCmd, double offset) |
void | completePasting () |
void | completeOasisPasting () |
void | saveOasisDocumentStyles (KoStore *store, KoGenStyles &mainStyles, KoSavingContext &savingContext, SaveFlag saveFlag, const QByteArray &headerFooterContent) const |
KoStyleCollection * | styleCollection () const |
KWFrameStyleCollection * | frameStyleCollection () const |
KWTableStyleCollection * | tableStyleCollection () const |
KWTableTemplateCollection * | tableTemplateCollection () const |
QFont | defaultFont () const |
void | setDefaultFont (const QFont &newFont) |
int | pageCount () const |
int | startPage () const |
int | lastPage () const |
KoPictureCollection * | pictureCollection () |
KoVariableFormatCollection * | variableFormatCollection () const |
QValueList< KWView * > | getAllViews () const |
KWPage * | insertPage (int afterPageNum) |
KWPage * | appendPage () |
void | afterInsertPage (int num) |
QPtrList< KWFrame > | framesToCopyOnNewPage (int afterPageNum) const |
void | removePage (int num) |
void | afterRemovePages () |
bool | tryRemovingPages () |
ProcessingType | processingType () const |
int | frameSetNum (KWFrameSet *fs) |
void | lowerMainFrames (int pageNum) |
void | lowerMainFrames (int pageNum, int lowestZOrder) |
QPtrList< KWTextFrameSet > | allTextFramesets (bool onlyReadWrite) const |
int | numberOfTextFrameSet (KWFrameSet *fs, bool onlyReadWrite) |
KWFrameSet * | textFrameSetFromIndex (unsigned int num, bool onlyReadWrite) |
virtual QValueList< KoTextDocument * > | allTextDocuments () const |
QPtrList< KWFrame > | framesInPage (int pageNum, bool sorted=true) const |
int | maxZOrder (int pageNum) const |
void | updateAllFrames (int flags=0xff) |
double | gridX () const |
double | gridY () const |
void | setGridX (double gridx) |
void | setGridY (double gridy) |
void | updateGridButton () |
bool | showGrid () const |
void | setShowGrid (bool grid) |
bool | snapToGrid () const |
void | setSnapToGrid (bool b) |
void | applyStyleChange (KoStyleChangeDefMap changed) |
void | updateAllStyleLists () |
void | updateStyleListOrder (const QStringList &list) |
void | updateAllFrameStyleLists () |
void | updateAllTableStyleLists () |
bool | isHeaderVisible () const |
bool | isFooterVisible () const |
void | setHeaderVisible (bool h) |
void | setFooterVisible (bool f) |
bool | hasEndNotes () const |
void | recalcFrames (int fromPage=0, int toPage=-1, uint flags=0) |
KoHFType | headerType () const |
KoHFType | footerType () const |
const KoKWHeaderFooter & | headerFooterInfo () const |
void | setFrameCoords (double x, double y, double w, double h) |
void | addCommand (KCommand *cmd) |
KoCommandHistory * | commandHistory () const |
KoAutoFormat * | autoFormat () const |
void | addTextImageRequest (KWTextImage *img) |
void | addPictureRequest (KWPictureFrameSet *fs) |
void | addAnchorRequest (const QString &framesetName, const KWAnchorPosition &anchorPos) |
void | addFootNoteRequest (const QString &framesetName, KWFootNoteVariable *var) |
KWFrameSet * | loadFrameSet (QDomElement framesetElem, bool loadFrames=true, bool loadFootnote=true) |
void | loadEmbeddedObjects (QDomElement &word) |
void | saveEmbeddedObjects (QDomElement &parentElem, const QPtrList< KoDocumentChild > &childList) |
void | loadEmbedded (const QDomElement &embedded) |
void | recalcVariables (int type) |
KWVariableCollection * | variableCollection () const |
KWMailMergeDataBase * | mailMergeDataBase () const |
int | mailMergeRecord () const |
void | setMailMergeRecord (int r) |
bool | backgroundSpellCheckEnabled () const |
void | enableBackgroundSpellCheck (bool b) |
bool | canRemovePage (int num) |
virtual void | setZoomAndResolution (int zoom, int dpiX, int dpiY) |
void | newZoomAndResolution (bool updateViews, bool forPrint) |
QString | viewModeType () const |
KWViewMode * | layoutViewMode () const |
void | switchViewMode (const QString &newViewMode) |
void | printStyleDebug () |
void | printDebug () |
void | layout () |
bool | viewFormattingChars () const |
void | setViewFormattingChars (bool b) |
bool | viewFormattingEndParag () const |
void | setViewFormattingEndParag (bool b) |
bool | viewFormattingSpace () const |
void | setViewFormattingSpace (bool b) |
bool | viewFormattingTabs () const |
void | setViewFormattingTabs (bool b) |
bool | viewFormattingBreak () const |
void | setViewFormattingBreak (bool b) |
bool | viewFrameBorders () const |
void | setViewFrameBorders (bool b) |
void | setShowRuler (bool ruler) |
bool | showRuler () const |
bool | showStatusBar () const |
void | setShowStatusBar (bool status) |
bool | showScrollBar () const |
void | setShowScrollBar (bool status) |
bool | pgUpDownMovesCaret () const |
void | setPgUpDownMovesCaret (bool b) |
bool | showdocStruct () const |
void | setShowDocStruct (bool b) |
bool | allowAutoFormat () const |
void | setAllowAutoFormat (bool b) |
bool | insertDirectCursor () const |
void | setInsertDirectCursor (bool b) |
double | indentValue () const |
void | setIndentValue (double ind) |
int | nbPagePerRow () const |
void | setNbPagePerRow (int nb) |
int | maxRecentFiles () const |
double | defaultColumnSpacing () const |
void | setDefaultColumnSpacing (double val) |
KFormula::Document * | formulaDocument (bool init=true) |
void | reorganizeGUI () |
void | terminateEditing (KWFrameSet *frameSet) |
void | clearUndoRedoInfos () |
void | refreshDocStructure (FrameSetType) |
void | refreshDocStructure (int) |
int | typeItemDocStructure (FrameSetType type) |
void | refreshMenuExpression () |
void | refreshMenuCustomVariable () |
void | updateZoomRuler () |
void | setTocPresent (bool hasToc) |
bool | tocPresent () |
QString | sectionTitle (int pageNum) const |
void | updateRulerFrameStartEnd () |
virtual DCOPObject * | dcopObject () |
int | undoRedoLimit () const |
void | setUndoRedoLimit (int val) |
void | updateContentsSize () |
void | refreshGUIButton () |
void | initConfig () |
void | saveConfig () |
void | startBackgroundSpellCheck () |
void | reactivateBgSpellChecking () |
void | updateHeaderButton () |
void | updateFooterButton () |
QStringList | spellCheckIgnoreList () const |
void | setSpellCheckIgnoreList (const QStringList &lst) |
void | addSpellCheckIgnoreWord (const QString &) |
void | updateTextFrameSetEdit () |
void | changeFootNoteConfig () |
void | displayFootNoteFieldCode () |
double | tabStopValue () const |
void | setTabStopValue (double tabStop) |
void | changeBgSpellCheckingState (bool b) |
QString | initialFrameSet () const |
int | initialCursorParag () const |
int | initialCursorIndex () const |
void | deleteInitialEditingInfo () |
bool | cursorInProtectedArea () const |
void | setCursorInProtectedArea (bool b) |
SeparatorLinePos | footNoteSeparatorLinePosition () const |
void | setFootNoteSeparatorLinePosition (SeparatorLinePos pos) |
int | footNoteSeparatorLineLength () const |
void | setFootNoteSeparatorLineLength (int length) |
double | footNoteSeparatorLineWidth () const |
void | setFootNoteSeparatorLineWidth (double width) |
SeparatorLineLineType | footNoteSeparatorLineType () const |
void | setFootNoteSeparatorLineType (SeparatorLineLineType type) |
const KoTextBookmarkList * | bookmarkList () const |
void | insertBookmark (const QString &name, KoTextParag *startparag, KoTextParag *endparag, int start, int end) |
void | deleteBookmark (const QString &name) |
void | renameBookmark (const QString &oldname, const QString &newName) |
const KoTextBookmark * | bookmarkByName (const QString &name) const |
QStringList | listOfBookmarkName (KWViewMode *viewMode) const |
void | paragraphDeleted (KoTextParag *parag, KWFrameSet *frm) |
void | paragraphModified (KoTextParag *parag, inttype, int start, int lenght) |
void | initBookmarkList () |
void | loadImagesFromStore (KoStore *store) |
void | loadPictureMap (QDomElement &domElement) |
void | testAndCloseAllFrameSetProtectedContent () |
void | updateRulerInProtectContentMode () |
KoPageLayout | pageLayout (int pageNumber=0) const |
QStringList | personalExpressionPath () const |
void | setPersonalExpressionPath (const QStringList &) |
void | updateDirectCursorButton () |
QString | globalLanguage () const |
void | setGlobalLanguage (const QString &lang) |
void | addWordToDictionary (const QString &) |
bool | globalHyphenation () const |
void | setGlobalHyphenation (bool hyphen) |
KWLoadingInfo * | createLoadingInfo () |
KWLoadingInfo * | loadingInfo () const |
void | deleteLoadingInfo () |
KFormula::DocumentWrapper * | formulaDocumentWrapper () |
KWPageManager * | pageManager () const |
KWBgSpellCheck * | backSpeller () const |
bool | loadOasisPageLayout (const QString &masterPageName, KoOasisContext &context) |
Static Public Member Functions | |
static QString | getAttribute (QDomElement &element, const char *attributeName, const QString &defaultValue) |
static int | getAttribute (QDomElement &element, const char *attributeName, int defaultValue) |
static double | getAttribute (QDomElement &element, const char *attributeName, double defaultValue) |
static QColor | resolveTextColor (const QColor &col, QPainter *painter) |
static QColor | defaultTextColor (QPainter *painter) |
static QColor | resolveBgColor (const QColor &col, QPainter *painter=0) |
static QBrush | resolveBgBrush (const QBrush &brush, QPainter *painter=0) |
static QColor | defaultBgColor (QPainter *painter) |
Static Public Attributes | |
static const int | CURRENT_SYNTAX_VERSION |
Protected Slots | |
void | slotRecalcFrames () |
void | slotRepaintAllViews () |
void | slotDocumentRestored () |
void | slotCommandExecuted () |
void | slotDocumentInfoModifed () |
void | slotChapterParagraphFormatted (KoTextParag *parag) |
void | saveDialogShown () |
virtual void | openExistingFile (const QString &file) |
virtual void | openTemplate (const QString &file) |
Protected Member Functions | |
void | nextParagraphNeedingCheck () |
void | fixZOrders () |
QString | checkSectionTitleInParag (KoTextParag *parag, KWTextFrameSet *, int pageNum) const |
KoView * | createViewInstance (QWidget *parent, const char *name) |
virtual bool | completeLoading (KoStore *store) |
virtual bool | completeSaving (KoStore *store) |
void | loadFrameSets (const QDomElement &framesets) |
void | loadStyleTemplates (const QDomElement &styles) |
void | saveStyle (KoParagStyle *sty, QDomElement parentElem) |
void | saveFrameStyle (KWFrameStyle *sty, QDomElement parentElem) |
void | saveTableStyle (KWTableStyle *sty, QDomElement parentElem) |
void | loadFrameStyleTemplates (const QDomElement &styles) |
void | loadDefaultFrameStyleTemplates () |
void | loadTableStyleTemplates (const QDomElement &styles) |
void | loadDefaultTableStyleTemplates () |
void | loadDefaultTableTemplates () |
bool | loadMasterPageStyle (const QString &masterPageName, KoOasisContext &context) |
void | saveOasisBody (KoXmlWriter &writer, KoSavingContext &context) const |
void | saveOasisCustomFied (KoXmlWriter &writer) const |
QValueList< KoPictureKey > | savePictureList () |
QDragObject * | dragSelectedPrivate (QWidget *parent, const QValueList< KWFrameView * > &selectedFrames, KWTextFrameSet *fs) |
bool | saveOasisHelper (KoStore *store, KoXmlWriter *manifestWriter, SaveFlag saveFlag, const QValueList< KWFrameView * > &selectedFrames, QString *plainText=0, KoPicture *picture=0, KWTextFrameSet *fs=0) |
void | saveOasisSettings (KoXmlWriter &settingsWriter) const |
void | saveSelectedFrames (KoXmlWriter &bodyWriter, KoSavingContext &savingContext, QValueList< KoPictureKey > &pictureList, const QValueList< KWFrameView * > &selectedFrames, QString *plainText) const |
QWidget * | createCustomDocumentWidget (QWidget *parent) |
Properties | |
double | ptColumnWidth [] |
double | ptColumnSpacing [] |
double | gridX [] |
double | gridY [] |
bool | snapToGrid [] |
double | indentValue [] |
int | nbPagePerRow [] |
double | defaultColumnSpacing [] |
int | maxRecentFiles [] |
QString | globalLanguage [] |
bool | globalHyphenation [] |
bool | insertDirectCursor [] |
QStringList | personalExpressionPath [] |
bool | viewFormattingBreak [] |
bool | viewFormattingTabs [] |
bool | viewFormattingSpace [] |
bool | viewFormattingEndParag [] |
bool | cursorInProtectedArea [] |
bool | pgUpDownMovesCaret [] |
bool | allowAutoFormat [] |
int | undoRedoLimit [] |
Friends | |
class | KWOasisLoader |
class | KWStartupWidget |
Member Enumeration Documentation
anonymous enum |
Those values are used as KoGenStyle types.
STYLE_FRAME_AUTO: for frame styles (family="graphic") used by actual frames, saved into content.xml STYLE_FRAME_USER: for frame styles (family="graphic") defined by the user, saved into styles.xml STYLE_TABLE_CELL_AUTO: for table-cell styles (family="table-cell") used by actual tables, saved into content.xml STYLE_TABLE_CELL_USER: for table-cell styles (family="table-cell") defined by the user, saved into styles.xml ...
Definition at line 154 of file KWDocument.h.
Member Function Documentation
QDragObject * KWDocument::dragSelected | ( | const QValueList< KWFrameView * > & | selectedFrames | ) |
QDragObject * KWDocument::dragSelected | ( | QWidget * | parent, | |
KWTextFrameSet * | fs | |||
) |
void KWDocument::progressItemLoaded | ( | ) |
Called by KWFrame*'s loading code to emit correct progress info.
Definition at line 2266 of file KWDocument.cpp.
void KWDocument::paintContent | ( | QPainter & | painter, | |
const QRect & | rect, | |||
bool | transparent = false , |
|||
double | zoomX = 1.0 , |
|||
double | zoomY = 1.0 | |||
) | [virtual] |
void KWDocument::createEmptyRegion | ( | const QRect & | crect, | |
QRegion & | emptyRegion, | |||
KWViewMode * | viewMode | |||
) |
- Parameters:
-
emptyRegion The region is modified to subtract the areas painted, thus allowing the caller to determine which areas remain to be painted.
Definition at line 3820 of file KWDocument.cpp.
void KWDocument::eraseEmptySpace | ( | QPainter * | painter, | |
const QRegion & | emptySpaceRegion, | |||
const QBrush & | brush | |||
) |
Erase the empty space defined by emptySpaceRegion
.
Usually used to clear the space where there is no frame (e.g. page margins).
Definition at line 3831 of file KWDocument.cpp.
KWDocumentChild * KWDocument::createChildDoc | ( | const KoRect & | rect, | |
KoDocument * | childDoc | |||
) |
Create an embedded document; used by KWPartFrameSet but is defined here because KoDocument:insertChild is protected.
Definition at line 3843 of file KWDocument.cpp.
KWFrameSet* KWDocument::frameSet | ( | unsigned int | num | ) | [inline] |
KWFrameSet * KWDocument::frameSetByName | ( | const QString & | name | ) |
unsigned int KWDocument::frameSetCount | ( | ) | const [inline] |
QString KWDocument::generateFramesetName | ( | const QString & | templateName | ) |
Generate a new name for a frameset. templateName
must contain a 1 [for a number].
Definition at line 4187 of file KWDocument.cpp.
QPtrListIterator<KWFrameSet> KWDocument::framesetsIterator | ( | ) | const [inline] |
Prefer this over frameSet(i), if iterating over all of them.
Definition at line 236 of file KWDocument.h.
void KWDocument::addFrameSet | ( | KWFrameSet * | f, | |
bool | finalize = true | |||
) |
void KWDocument::removeFrameSet | ( | KWFrameSet * | f | ) |
void KWDocument::deleteTable | ( | KWTableFrameSet * | groupManager | ) |
Frame/table deletion - with undo/redo support Moved to KWDocument so that dialogs can call them if necessary.
Definition at line 4587 of file KWDocument.cpp.
unsigned int KWDocument::paperHeight | ( | int | pageNum | ) | const |
return the height of one page in pixels in the current zoom level (normal coord system)
Definition at line 5389 of file KWDocument.cpp.
unsigned int KWDocument::paperWidth | ( | int | pageNum | ) | const |
return the width of one page in pixels in the current zoom level (normal coord system)
Definition at line 5393 of file KWDocument.cpp.
unsigned int KWDocument::pageTop | ( | int | pgNum | ) | const |
Top of the page number pgNum, in pixels (in the normal coord system).
Definition at line 5397 of file KWDocument.cpp.
void KWDocument::repaintAllViewsExcept | ( | KWView * | view, | |
bool | erase = false | |||
) |
Update all views of this document, area can be cleared before redrawing with the erase flag.
(false implied). All views EXCEPT the argument view are updated ( give 0L for all )
Definition at line 3905 of file KWDocument.cpp.
void KWDocument::delayedRepaintAllViews | ( | ) |
schedule a repaint of all views but don't execute immediately
Definition at line 3876 of file KWDocument.cpp.
void KWDocument::delayedRecalcFrames | ( | int | fromPage | ) |
schedule a frame layout (e.g.
for footnotes) but don't execute immediately
Definition at line 3888 of file KWDocument.cpp.
QPixmap * KWDocument::doubleBufferPixmap | ( | const QSize & | ) |
Return a double-buffer pixmap of (at least) the given size.
Definition at line 5280 of file KWDocument.cpp.
void KWDocument::maybeDeleteDoubleBufferPixmap | ( | ) |
Call this when you're done with the double-buffer pixmap (at the end of the current painting, for all objects that need to be painted).
If it's too big, KWDocument will delete it to save memory.
Definition at line 5297 of file KWDocument.cpp.
void KWDocument::frameChanged | ( | KWFrame * | frame | ) |
Tell this method when a frame is moved / resized / created / deleted and everything will be update / repainted accordingly.
Definition at line 4312 of file KWDocument.cpp.
void KWDocument::pasteFrames | ( | QDomElement | topElem, | |
KMacroCommand * | macroCmd, | |||
bool | copyFootNote = false , |
|||
bool | dontCreateFootNote = false , |
|||
bool | selectFrames = true | |||
) |
- Parameters:
-
copyFootNote .
..
- Parameters:
-
dontCreateFootNote true when we copy footnote into an other frameset than mainFrameSet => footnote is removed ! selectFrames if true, pasted frames are auto-selected. Set to false when loading from a file etc.
Definition at line 2561 of file KWDocument.cpp.
int KWDocument::pageCount | ( | ) | const |
returns the amount of pages in the document.
- See also:
- startPage()
Definition at line 5401 of file KWDocument.cpp.
int KWDocument::startPage | ( | ) | const |
returns the page number of the first page in this document, this is the page number that will be shown on prints and used in the TOC and user-variables.
- See also:
- pageCount()
Definition at line 5405 of file KWDocument.cpp.
int KWDocument::lastPage | ( | ) | const |
Returns the last page number in this document.
With a higher startPage and a constante pagecount this number will also get higher.
Definition at line 5408 of file KWDocument.cpp.
KWPage * KWDocument::insertPage | ( | int | afterPageNum | ) |
Insert a new page after another, creating followup frames (but not headers/footers),.
- Parameters:
-
afterPageNum the page is inserted after the one specified here If afterPageNum is -1, a page is inserted before page 0. In all cases, the new page will have the number afterPageNum+1. Use appendPage in WP mode, insertPage in DTP mode.
Definition at line 4003 of file KWDocument.cpp.
KWPage * KWDocument::appendPage | ( | ) |
Append a new page, creating followup frames (but not headers/footers), and return the page number.
Definition at line 4045 of file KWDocument.cpp.
void KWDocument::afterInsertPage | ( | int | num | ) |
Call this after appendPage, to get headers/footers on the new page, and all the caches properly updated.
This is separate from appendPage so that KWFrameLayout can call appendPage() only.
Definition at line 4053 of file KWDocument.cpp.
QPtrList< KWFrame > KWDocument::framesToCopyOnNewPage | ( | int | afterPageNum | ) | const |
- Returns:
- list of frames that will be copied onto the new page Used by insertPage but also by KWTextFrameSet to check if it's worth auto-inserting a new page (to avoid infinite loops if not)
Definition at line 3956 of file KWDocument.cpp.
void KWDocument::removePage | ( | int | num | ) |
Remove a page.
Call afterRemovePages() after removing one or more pages.
Definition at line 4091 of file KWDocument.cpp.
void KWDocument::afterRemovePages | ( | ) |
bool KWDocument::tryRemovingPages | ( | ) |
Check if we can remove empty page(s) from the end If so, do it and return true.
Note that this doesn't call afterRemovePages, this is up to the caller.
Definition at line 4153 of file KWDocument.cpp.
QPtrList< KWTextFrameSet > KWDocument::allTextFramesets | ( | bool | onlyReadWrite | ) | const |
- Note:
- This method considers _all_ text framesets, even table cells
Definition at line 4963 of file KWDocument.cpp.
int KWDocument::numberOfTextFrameSet | ( | KWFrameSet * | fs, | |
bool | onlyReadWrite | |||
) |
- Note:
- This method considers _all_ text framesets, even table cells
Definition at line 4985 of file KWDocument.cpp.
KWFrameSet * KWDocument::textFrameSetFromIndex | ( | unsigned int | num, | |
bool | onlyReadWrite | |||
) |
- Note:
- This method considers _all_ text framesets, even table cells
Definition at line 4991 of file KWDocument.cpp.
QValueList< KoTextDocument * > KWDocument::allTextDocuments | ( | ) | const [virtual] |
Reimplementation from KoDocument.
- Note:
- This method considers _all_ text framesets, even table cells
Definition at line 4974 of file KWDocument.cpp.
QPtrList< KWFrame > KWDocument::framesInPage | ( | int | pageNum, | |
bool | sorted = true | |||
) | const |
Gather all the frames which are on a certain page and return them.
The list is ordered.
- See also:
- KWFrameSet::framesInPage
- Parameters:
-
pageNum the number of the page sorted if true the list is ordered per z-order. should be true always.
Definition at line 4269 of file KWDocument.cpp.
int KWDocument::maxZOrder | ( | int | pageNum | ) | const |
Max z-order among all frames on the given page.
- Note:
- There is no minZOrder() method, because of the main frameset, see kwview::lowerFrame
Definition at line 4948 of file KWDocument.cpp.
void KWDocument::recalcFrames | ( | int | fromPage = 0 , |
|
int | toPage = -1 , |
|||
uint | flags = 0 | |||
) |
void KWDocument::addTextImageRequest | ( | KWTextImage * | img | ) |
This is used upon loading, to delay certain things until completeLoading, for KWTextImage.
Definition at line 4385 of file KWDocument.cpp.
void KWDocument::addPictureRequest | ( | KWPictureFrameSet * | fs | ) |
This is used upon loading, to delay certain things until completeLoading, for KWPictureFrameSet.
Definition at line 4390 of file KWDocument.cpp.
void KWDocument::addAnchorRequest | ( | const QString & | framesetName, | |
const KWAnchorPosition & | anchorPos | |||
) |
This is used upon loading, to delay certain things until completeLoading, for KWTextParag.
Definition at line 4395 of file KWDocument.cpp.
void KWDocument::addFootNoteRequest | ( | const QString & | framesetName, | |
KWFootNoteVariable * | var | |||
) |
This is used upon loading, to delay certain things until completeLoading, for KWFootNoteVariable.
Definition at line 4400 of file KWDocument.cpp.
KWFrameSet * KWDocument::loadFrameSet | ( | QDomElement | framesetElem, | |
bool | loadFrames = true , |
|||
bool | loadFootnote = true | |||
) |
This is used by loadFrameSets() and by KWCanvas to paste framesets.
Definition at line 2307 of file KWDocument.cpp.
void KWDocument::setZoomAndResolution | ( | int | zoom, | |
int | dpiX, | |||
int | dpiY | |||
) | [virtual] |
Change the zoom factor to z
(e.g.
150 for 150%) and/or change the resolution, given in DPI. This is done on startup and when printing. The same call combines both so that all the updating done behind the scenes is done only once, even if both zoom and DPI must be changed.
Definition at line 450 of file KWDocument.cpp.
QString KWDocument::viewModeType | ( | ) | const [inline] |
Due to the way the text formatter works (it caches layout information in the paragraphs and characters), we currently can't have one viewmode per view.
It has to be the same for all views.
Definition at line 525 of file KWDocument.h.
KWViewMode* KWDocument::layoutViewMode | ( | ) | const [inline] |
void KWDocument::switchViewMode | ( | const QString & | newViewMode | ) |
Changes m_viewMode, and updates all views to this viewmode.
Definition at line 5084 of file KWDocument.cpp.
static QString KWDocument::getAttribute | ( | QDomElement & | element, | |
const char * | attributeName, | |||
const QString & | defaultValue | |||
) | [inline, static] |
void KWDocument::layout | ( | ) |
KFormula::Document * KWDocument::formulaDocument | ( | bool | init = true |
) |
- Returns:
- the document for the formulas
- Parameters:
-
init if true mathematical fonts may be installed if needed. Should be true unless no real document is being used (i. e. in configuration dialog>
Definition at line 4559 of file KWDocument.cpp.
void KWDocument::terminateEditing | ( | KWFrameSet * | frameSet | ) | [inline] |
Tell all views to stop editing this frameset, if they were doing so.
Definition at line 635 of file KWDocument.h.
void KWDocument::setTocPresent | ( | bool | hasToc | ) |
Mark the document to have a table of contents and update the view-menu-item text.
Definition at line 4723 of file KWDocument.cpp.
bool KWDocument::tocPresent | ( | ) | [inline] |
static QColor KWDocument::resolveTextColor | ( | const QColor & | col, | |
QPainter * | painter | |||
) | [static] |
Convert a color into a color to be displayed for it (when using color schemes, we still want to print black on white).
See also KoTextFormat::defaultTextColor.
QString KWDocument::initialFrameSet | ( | ) | const |
void KWDocument::deleteInitialEditingInfo | ( | ) |
bool KWDocument::loadOasisPageLayout | ( | const QString & | masterPageName, | |
KoOasisContext & | context | |||
) |
void KWDocument::pageLayoutChanged | ( | const KoPageLayout & | ) | [signal] |
This is emitted by setPageLayout if updateViews=true.
void KWDocument::newContentsSize | ( | ) | [signal] |
Emitted when the scrollview contents must be resized (e.g. new page, new layout...).
void KWDocument::mainTextHeightChanged | ( | ) | [signal] |
This is emitted when the height of the text in the main frameset changes.
- Note:
- Mostly useful for the text viewmode.
void KWDocument::numPagesChanged | ( | ) | [signal] |
This is emitted when the number of pages changes.
void KWDocument::invalidate | ( | const KWFrameSet * | skipThisFrameSet = 0 |
) | [slot] |
void KWDocument::saveDialogShown | ( | ) | [protected, slot] |
void KWDocument::fixZOrders | ( | ) | [protected] |
fix up Z-order for import from older kword versions.
Definition at line 4200 of file KWDocument.cpp.
QDragObject * KWDocument::dragSelectedPrivate | ( | QWidget * | parent, | |
const QValueList< KWFrameView * > & | selectedFrames, | |||
KWTextFrameSet * | fs | |||
) | [protected] |
helper method for the 2 different dragSelected() versions
Definition at line 3002 of file KWDocument.cpp.
bool KWDocument::saveOasisHelper | ( | KoStore * | store, | |
KoXmlWriter * | manifestWriter, | |||
SaveFlag | saveFlag, | |||
const QValueList< KWFrameView * > & | selectedFrames, | |||
QString * | plainText = 0 , |
|||
KoPicture * | picture = 0 , |
|||
KWTextFrameSet * | fs = 0 | |||
) | [protected] |
Save the whole document, or just the selection, into OASIS format When saving the selection, also return the data as plain text and/or plain picture, which are used to insert into the KMultipleDrag drag object.
- Parameters:
-
store the KoStore to save into manifestWriter pointer to a koxmlwriter to add entries to the manifest saveFlag either the whole document, or only the selected text/objects. plainText must be set when saveFlag==SaveSelected. It returns the plain text format of the saved data, when available. picture must be set when saveFlag==SaveSelected. It returns the selected picture, when exactly one picture was selected. fs the text frameset, which must be set when saveFlag==SaveSelected.
Definition at line 2792 of file KWDocument.cpp.
The documentation for this class was generated from the following files: