kpresenter

KPrDocument.h

00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00004    Copyright (C) 2005-2006 Thorsten Zachmann <zachmann@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef __kpresenter_doc_h__
00023 #define __kpresenter_doc_h__
00024 
00025 
00026 #ifdef HAVE_CONFIG_H
00027 #include <config.h>
00028 #endif
00029 
00030 class KoGenStyles;
00031 class KPrView;
00032 class DCOPObject;
00033 class KCommand;
00034 class KMacroCommand;
00035 class KoCommandHistory;
00036 class KoTextZoomHandler;
00037 class KoAutoFormat;
00038 class KoVariable;
00039 class KoVariableFormatCollection;
00040 class KPrVariableCollection;
00041 class KTempFile;
00042 class KoParagStyle;
00043 class KPrBgSpellCheck;
00044 class KoTextParag;
00045 class KoTextObject;
00046 class KPrLoadingInfo;
00047 class KPrGroupObject;
00048 
00049 class KoOasisContext;
00050 class KoOasisSettings;
00051 class KoXmlWriter;
00052 class QFile;
00053 class KoSavingContext;
00054 
00055 #include <KoDocument.h>
00056 #include <KoDocumentChild.h>
00057 
00058 #include <qptrlist.h>
00059 #include <qobject.h>
00060 #include <qstring.h>
00061 #include <qvaluelist.h>
00062 #include <qdatetime.h>
00063 #include <qdict.h>
00064 #include <KoPageLayoutDia.h>
00065 
00066 #include "global.h"
00067 #include <KoStyleStack.h>
00068 #include <KoPictureCollection.h>
00069 #include "KPrGradientCollection.h"
00070 #include <KoTextZoomHandler.h>
00071 #include <KoStyleCollection.h> // for KoStyleChangeDefMap
00072 #include <KoCommandHistory.h>
00073 
00074 class KoDocumentEntry;
00075 class KPrTextObject;
00076 class KPrPartObject;
00077 class KPrPage;
00078 class KPrObject;
00079 class KPrDocument;
00080 
00081 class KoParagStyle;
00082 class KoStyleCollection;
00083 
00084 class KPrChild : public KoDocumentChild
00085 {
00086 public:
00087 
00088     // constructor - destructor
00089     KPrChild( KPrDocument *_kpr, KoDocument* _doc, const QRect& _rect );
00090     KPrChild( KPrDocument *_kpr );
00091     ~KPrChild();
00092 
00093     // get parent
00094     KPrDocument* parent()const { return m_parent; }
00095 
00096     virtual KoDocument *hitTest( const QPoint &, const QWMatrix & );
00097 
00098 protected:
00099     KPrDocument *m_parent;
00100 };
00101 
00102 class KPrDocument : public KoDocument
00103 {
00104     Q_OBJECT
00105     Q_PROPERTY( int maxRecentFiles READ maxRecentFiles )
00106     Q_PROPERTY( int undoRedoLimit READ undoRedoLimit WRITE setUndoRedoLimit )
00107     Q_PROPERTY( double indentValue READ getIndentValue WRITE setIndentValue )
00108     Q_PROPERTY( int getLeftBorder READ getLeftBorder )
00109     Q_PROPERTY( int getTopBorder READ getTopBorder )
00110     Q_PROPERTY( int getBottomBorder READ getBottomBorder )
00111     Q_PROPERTY( int getRightBorder READ getRightBorder )
00112     Q_PROPERTY( bool cursorInProtectedArea READ cursorInProtectedArea WRITE setCursorInProtectedArea )
00113     Q_PROPERTY( bool insertDirectCursor READ insertDirectCursor WRITE setInsertDirectCursor )
00114     Q_PROPERTY( QString picturePath READ picturePath WRITE setPicturePath )
00115     Q_PROPERTY( QString globalLanguage READ globalLanguage WRITE setGlobalLanguage )
00116     Q_PROPERTY( bool globalHyphenation READ globalHyphenation WRITE setGlobalHyphenation )
00117     Q_PROPERTY( double tabStopValue READ tabStopValue WRITE setTabStopValue )
00118     Q_PROPERTY( bool snapToGrid READ snapToGrid WRITE setSnapToGrid )
00119     Q_PROPERTY( bool backgroundSpellCheckEnabled READ backgroundSpellCheckEnabled WRITE enableBackgroundSpellCheck )
00120     Q_PROPERTY( bool spInfiniteLoop READ spInfiniteLoop WRITE setInfiniteLoop )
00121     Q_PROPERTY( bool spShowEndOfPresentationSlide READ spShowEndOfPresentationSlide WRITE setShowEndOfPresentationSlide )
00122     Q_PROPERTY( bool spManualSwitch READ spManualSwitch WRITE setManualSwitch )
00123     Q_PROPERTY( bool presentationDuration READ presentationDuration WRITE setPresentationDuration )
00124     Q_PROPERTY( QColor gridColor READ gridColor WRITE setGridColor )
00125     Q_PROPERTY( QColor txtBackCol READ txtBackCol WRITE setTxtBackCol )
00126 
00127 
00128   public:
00129     // constructor - destructor
00130     KPrDocument( QWidget *parentWidget = 0, const char *widgetName = 0, QObject* doc = 0,
00131                    const char* name = 0, bool singleViewMode = false );
00132     ~KPrDocument();
00133 
00134     // Drawing
00135     virtual void paintContent( QPainter& painter, const QRect& rect, bool transparent = false,
00136                                double zoomX = 1.0, double zoomY = 1.0 );
00137 
00138     // save
00139     virtual QDomDocument saveXML();
00140     virtual bool completeSaving( KoStore* _store );
00141     virtual bool saveOasis( KoStore* store, KoXmlWriter* manifestWriter );
00142 
00143     enum SaveFlag { SaveAll, SaveSelected, SavePage };
00144     void saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, QFile* masterStyles, 
00145                                   KoSavingContext & savingContext, SaveFlag saveFlag = SaveAll ) const;
00146     enum { STYLE_BACKGROUNDPAGE = 20, STYLE_BACKGROUNDPAGEAUTO, STYLE_GRADIENT,STYLE_OBJECTANIMATION, STYLE_STROKE, STYLE_MARKER, STYLE_PICTURE, STYLE_PRESENTATIONSTICKYOBJECT };
00147 
00148     // load
00149     virtual bool loadOasis( const QDomDocument& doc, KoOasisStyles& styles, const QDomDocument&, KoStore* store );
00150     /*
00151      * Load oasis object
00152      * @param pos: we use -1 for sticky page.
00153      */
00154     void loadOasisObject( KPrPage * page, QDomNode & drawPage, KoOasisContext & context, KPrGroupObject *groupObject = 0L);
00155 
00156     virtual bool loadXML( const QDomDocument& doc );
00157     virtual bool loadXML( QIODevice *, const QDomDocument & doc );
00158     virtual bool loadChildren( KoStore* _store );
00159 
00160     virtual int supportedSpecialFormats() const;
00161 
00162     virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0);
00163     virtual void setEmpty();
00164 
00165     virtual void addView( KoView *_view );
00166     virtual void removeView( KoView *_view );
00167 
00168     // page layout
00169     void setPageLayout( const KoPageLayout &);
00170 
00171     virtual QPixmap generatePreview( const QSize &size );
00172 
00173     virtual void addShell( KoMainWindow *shell );
00174 
00175     //header-footer
00176     void createHeaderFooter();
00177     void updateHeaderFooterPosition();
00178 
00179     const QPtrList<KPrPage> & getPageList() const {return m_pageList;}
00180 
00181     // @return the master page
00182     KPrPage * masterPage() const { return m_masterPage; }
00183     KPrPage * activePage()const;
00184     // We need one that's not const, due to QPtrList::at() not being const
00185     QPtrList<KPrPage>& pageList() { return m_pageList;}
00186 
00187     void insertPixmapKey( KoPictureKey key );
00188 
00189     void insertObjectInPage(double offset, KPrObject *_obj, int pos = -1);
00190 
00191     void setGridValue( double rx, double ry, bool _replace = true );
00192 
00193     // get - set options for editmodi
00194     QColor txtBackCol() const { return _txtBackCol; }
00195     void setTxtBackCol( const QColor &c ) { _otxtBackCol = _txtBackCol; _txtBackCol = c; }
00196 
00197     // get - set roundedness
00198     unsigned int getRndX() const { return _xRnd; }
00199     unsigned int getRndY() const { return _yRnd; }
00200 
00201     // get values for screenpresentations
00202     bool spInfiniteLoop() const { return _spInfiniteLoop; }
00203     bool spShowEndOfPresentationSlide() const { return _spShowEndOfPresentationSlide; }
00204     bool spManualSwitch() const { return _spManualSwitch; }
00205     bool presentationDuration() const { return _showPresentationDuration; }
00206     void setInfiniteLoop( bool il ) { _spInfiniteLoop = il; }
00207     void setShowEndOfPresentationSlide( bool shw ) { _spShowEndOfPresentationSlide = shw; }
00208     void setManualSwitch( bool ms ) { _spManualSwitch = ms; }
00209     void setPresentationDuration( bool pd ) { _showPresentationDuration = pd; }
00210 
00211 
00212     // size of page
00213     QRect getPageRect( bool decBorders = true ) const;
00214 
00215     void insertObject(KPrChild* ch ){ insertChild(ch);}
00216 
00217     void savePage( const QString &file, int pgnum, bool ignore = false );
00218 
00219     void pastePage( const QMimeSource * data, int pgnum );
00220 
00221     QString templateFileName(bool chooseTemplate, const QString &theFile );
00222 
00223     int insertNewPage( const QString &cmdName,int _page, InsertPos _insPos, bool chooseTemplate, const QString &theFile );
00224 
00229     void insertPage( KPrPage *page, int currentPageNum, int insertPageNum );
00234     void takePage( KPrPage *page, int pageNum );
00235     void deletePage( int _page );
00236     void copyPageToClipboard( int pgnum );
00237 
00238     // repaint all views
00239     void repaint( bool );
00240 
00241     void repaint( const QRect& );
00242     void repaint( KPrObject* );
00243 
00244     // stuff for screen-presentations
00249     QValueList<int> getPageEffectSteps( unsigned int );
00250 
00251     QPen presPen() const { return _presPen; }
00252     void setPresPen( QPen p ) {_presPen = p; }
00253 
00254     void restoreBackground( KPrPage * );
00255     KCommand * loadPastedObjs( const QString &in, KPrPage* _page );
00256 
00257     void deSelectAllObj();
00258     void deSelectObj(KPrObject *obj);
00259     void updateHeaderFooterButton();
00260 
00261     KoPictureCollection *pictureCollection(){ return &m_pictureCollection; }
00262     KPrGradientCollection *gradientCollection() { return &_gradientCollection; }
00263 
00264     KoAutoFormat * getAutoFormat()const { return m_autoFormat; }
00265 
00266     void replaceObjs( bool createUndoRedo = true );
00267 
00268     int getLeftBorder() const;
00269     int getTopBorder() const;
00270     int getBottomBorder() const;
00271     int getRightBorder() const;
00272 
00273     void enableEmbeddedParts( bool f );
00274 
00275     KPrTextObject *header()const { return _header; }
00276     KPrTextObject *footer()const { return _footer; }
00277 
00278     void setHeader( bool b );
00279     void setFooter( bool b );
00280 
00281     void setDisplayObjectMasterPage( bool b );
00282     void setDisplayBackground( bool b );
00283 
00284     bool isHeader(const KPrObject *obj)const;
00285     bool isFooter(const KPrObject *obj)const;
00286     bool isHeaderFooter(const KPrObject *obj)const;
00287 
00288     // Returns true if the slide pgNum (0 based)
00289     bool isSlideSelected( int pgNum) ;
00290     // Returns the list of selected slides. Slide numbers are 0-based.
00291     QValueList<int> selectedSlides();
00292     QString selectedForPrinting();
00293 
00294     virtual DCOPObject* dcopObject();
00295 
00296     void initConfig();
00297     void saveConfig();
00298 
00299     KoStyleCollection * styleCollection()const { return m_styleColl;}
00300 
00301 
00302     void updateAllStyleLists();
00303     void applyStyleChange( KoStyleChangeDefMap changed );
00304     void updateStyleListOrder( const QStringList &list );
00305 
00306     void addCommand( KCommand * cmd );
00307 
00308     KoTextZoomHandler* zoomHandler() const { return m_zoomHandler; }
00309     QFont defaultFont() const { return m_defaultFont; }
00310     void setDefaultFont( const QFont & newFont) {
00311         m_defaultFont = newFont;
00312     }
00313 
00318     bool showStatusBar() const { return m_bShowStatusBar;}
00319     void setShowStatusBar( bool _status ) { m_bShowStatusBar = _status;}
00320 
00321     bool showGrid() const { return m_bShowGrid; }
00322     void setShowGrid ( bool _grid ) { m_bShowGrid = _grid; }
00323 
00324     double tabStopValue() const { return m_tabStop; }
00325     void setTabStopValue ( double _tabStop );
00326 
00327     // in pt
00328     double getIndentValue()const { return m_indent; }
00329     void setIndentValue(double _ind) { m_indent=_ind; }
00330 
00331     int maxRecentFiles() const { return m_maxRecentFiles; }
00332 
00333     KoVariableFormatCollection *variableFormatCollection()const { return m_varFormatCollection; }
00334 
00335     void recalcVariables( int type );
00336 
00337     void recalcPageNum();
00338 
00339     KPrVariableCollection *getVariableCollection()const {return m_varColl;}
00340 
00341     void refreshMenuCustomVariable();
00342 
00343     void setShowRuler(bool _ruler){ m_bShowRuler=_ruler; }
00344     bool showRuler() const { return m_bShowRuler; }
00345 
00346     void reorganizeGUI();
00347 
00348     int undoRedoLimit() const;
00349     void setUndoRedoLimit(int _val);
00350 
00351 
00352     void updateRuler();
00353     void updateRulerPageLayout();
00354 
00355     unsigned int getPageNums() const { return m_pageList.count(); }
00356 
00357     // Tell all views to stop editing this frameset, if they were doing so
00358     void terminateEditing( KPrTextObject * textObj )
00359         { emit sig_terminateEditing( textObj ); }
00360     KPrPage * initialActivePage() const;
00361 
00362     KPrView *firstView() const;
00363 
00364     void displayActivePage(KPrPage * _page);
00365 
00366     void updateZoomRuler();
00367     void newZoomAndResolution( bool updateViews, bool forPrint );
00368 
00369     void movePageTo( int oldPos, int newPos );
00370 
00371     void updateSideBarItem( KPrPage * page );
00372     KPrPage * findPage(KPrObject *object);
00373     KPrPage * findPage(QPtrList<KPrObject> &objects);
00374 
00375     void refreshAllNoteBar(int page, const QString &text, KPrView *exceptView);
00376     void refreshAllNoteBarMasterPage(const QString &text, KPrView *exceptView);
00377 
00378 
00379     bool backgroundSpellCheckEnabled() const;
00380     void enableBackgroundSpellCheck( bool b );
00381 
00382     void startBackgroundSpellCheck();
00383 
00384     //refresh obj when we active or disactive
00385     void reactivateBgSpellChecking(bool refreshTextObj=false);
00386     QPtrList<KoTextObject> allTextObjects() const;
00387     QValueList<KoTextObject *> visibleTextObjects( ) const;
00388 
00390     virtual QValueList<KoTextDocument *> allTextDocuments() const;
00391 
00392     bool allowAutoFormat() const { return m_bAllowAutoFormat; }
00393     void setAllowAutoFormat(bool _b){ m_bAllowAutoFormat=_b; }
00394 
00395     // This setting has to be here [instead of the view] because we need to
00396     // format paragraphs slightly differently (to add room for the CR char)
00397     bool viewFormattingChars() const { return m_bViewFormattingChars; }
00398     void setViewFormattingChars(bool _b) { m_bViewFormattingChars=_b; }
00399 
00400 
00401     bool showGuideLines() const { return m_bShowGuideLines; }
00402     void setShowGuideLines( bool b );
00403 
00409     QValueList<double> &horizontalGuideLines() { return m_hGuideLines; }
00410 
00416     QValueList<double> &verticalGuideLines() { return m_vGuideLines; }
00417 
00423     void horizontalGuideLines( const QValueList<double> &lines );
00424 
00430     void verticalGuideLines( const QValueList<double> &lines );
00431 
00438     void addGuideLine( Qt::Orientation o, double pos );
00439 
00440     void updateGuideLineButton();
00441 
00442     void updateGridButton();
00443 
00444     double getGridX()const { return m_gridX; }
00445     void setGridX(double _x) { m_gridX=_x; }
00446 
00447     double getGridY()const { return m_gridY; }
00448     void setGridY(double _y) { m_gridY=_y; }
00449 
00450     bool snapToGrid() const { return m_bSnapToGrid; }
00451     void setSnapToGrid( bool _b ) { m_bSnapToGrid = _b; }
00452 
00453     QColor gridColor() const { return m_gridColor; }
00454     void setGridColor( const QColor & _col ) { m_gridColor = _col; }
00455 
00456     QStringList spellCheckIgnoreList() const { return m_spellCheckIgnoreList; }
00457     void setSpellCheckIgnoreList( const QStringList& lst );
00458     void addSpellCheckIgnoreWord( const QString & );
00459 
00460     KoCommandHistory * commandHistory()const { return m_commandHistory; }
00461     void updateObjectStatusBarItem();
00462     void updateObjectSelected();
00463     void layout(KPrObject *kpobject);
00464     void layout();
00465     void changeBgSpellCheckingState( bool b );
00466 
00467     bool cursorInProtectedArea()const;
00468     void setCursorInProtectedArea( bool b );
00469 
00470     void insertFile(const QString & file );
00471 
00472     void spellCheckParagraphDeleted( KoTextParag *_parag,  KPrTextObject *frm);
00473 
00474     void loadPictureMap ( const QDomElement& domElement );
00475     void updateRulerInProtectContentMode();
00476     void updatePresentationButton();
00477     void refreshGroupButton();
00478 
00479     QString picturePath()const { return m_picturePath; }
00480     void setPicturePath( const QString & _path ) { m_picturePath = _path ; }
00481 
00482     bool insertDirectCursor() const { return m_bInsertDirectCursor; }
00483     void setInsertDirectCursor(bool _b);
00484     void updateDirectCursorButton();
00485 
00486     QString globalLanguage()const { return m_globalLanguage; }
00487     void setGlobalLanguage( const QString & _lang ){m_globalLanguage = _lang;}
00488 
00489     bool globalHyphenation() const { return m_bGlobalHyphenation; }
00490     void setGlobalHyphenation ( bool _hyphen ) { m_bGlobalHyphenation = _hyphen; }
00491 
00492     void addWordToDictionary( const QString & word);
00493 
00494     void loadImagesFromStore( KoStore *_store );
00495     void saveEmbeddedObject(KPrPage *page, const QPtrList<KoDocumentChild>& childList ,QDomDocument &doc,QDomElement &presenter );
00496     void insertEmbedded( KoStore *store, QDomElement elem, KMacroCommand * macroCmd, KPrPage *page, int pos );
00497 
00498     KPrBgSpellCheck* backSpeller() const { return m_bgSpellCheck; }
00499 
00500     void setCustomSlideShows( const CustomSlideShowMap & customSlideShows );
00501     QValueList <KPrPage *> customListPage( const QStringList & lst, bool loadOasis=false );
00502 
00503 
00504     QString presentationName() const { return m_presentationName; }
00505     void setPresentationName( const QString &_name ) { m_presentationName = _name; }
00506 
00507     QStringList presentationList();
00508     //return list of slide which be displaying:
00509     //return selected slide when presentation name is empty
00510     //otherwise return list of custom slide show
00511     QValueList<int> displaySelectedSlides();
00512     QValueList<int> listOfDisplaySelectedSlides( const QValueList<KPrPage*>& lst );
00513     void testCustomSlideShow( const QValueList<KPrPage *> &pages, KPrView *view );
00514     void clearTestCustomSlideShow();
00515 
00516     const CustomSlideShowMap & customSlideShows() { return m_customListSlideShow; }
00517 
00518 public slots:
00519     void movePage( int from, int to );
00520     void copyPage( int from );
00521 
00522     void selectPage( int pgNum, bool select );
00523     void clipboardDataChanged();
00524 
00525     void slotRepaintChanged( KPrTextObject * );
00526 
00527     static void writeAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyles& mainStyles, KoSavingContext& context, bool stylesDotXml );
00528 
00529     void slotGuideLinesChanged( KoView *view );
00530 
00531     virtual void initEmpty();
00532 
00533 signals:
00534     void enablePaste( bool );
00535     void sig_refreshMenuCustomVariable();
00536     void pageNumChanged();
00537     void sig_updateRuler();
00538     void sig_terminateEditing( KPrTextObject * );
00539     void sig_updateMenuBar();
00540 
00541 protected slots:
00542     void slotDocumentRestored();
00543     void slotCommandExecuted();
00544     void slotDocumentInfoModifed();
00545 
00546     virtual void openExistingFile( const QString& file );
00547     virtual void openTemplate( const QString& file );
00548 
00549 protected:
00550     KoView* createViewInstance( QWidget* parent, const char* name );
00551     void testAndCloseAllTextObjectProtectedContent();
00552     // ************ functions ************
00556     virtual bool saveChildren( KoStore* _store );
00557 
00558     void loadStyleTemplates( const QDomElement &styles );
00559     void saveStyle( KoParagStyle *sty, QDomElement parentElem );
00560 
00561     QDomDocumentFragment saveBackground( QDomDocument& );
00562     QDomElement saveObjects( QDomDocument &doc );
00563     QDomElement saveTitle( QDomDocument &doc );
00564     QDomElement saveNote( QDomDocument &doc );
00565     QDomElement saveAttribute( QDomDocument &doc );
00566     QDomElement saveUsedSoundFileToXML( QDomDocument &_doc, QStringList _list );
00567     void loadTextStyle( const QDomElement& domElement );
00568     void saveEmbeddedObject(KPrPage *page, KoDocumentChild *chl,QDomDocument &doc,QDomElement &presenter, double offset );
00569     void saveGuideLines( QDomDocument &doc, QDomElement& element );
00570 
00571     void loadBackground( const QDomElement &element );
00572     void loadGuideLines( const QDomElement &element );
00573     KCommand * loadObjects( const QDomElement &element,bool paste=false );
00574     void loadTitle( const QDomElement &element );
00575     void loadNote( const QDomElement &element );
00576     void loadUsedSoundFileFromXML( const QDomElement &element );
00577 
00578     virtual bool completeLoading( KoStore* /* _store */ );
00579     void makeUsedPixmapList();
00580     void makeUsedSoundFileList();
00581 
00582     void saveUsedSoundFileToStore( KoStore *_store, QStringList _list );
00583     void loadUsedSoundFileFromStore( KoStore *_store, QStringList _list );
00584     void fillStyleStack( const QDomElement& object, KoOasisContext & context, const char* family );
00585     /*
00586      * increaseOrder = true by default, put to false when we have group of animation
00587      */
00588     int createPresentationAnimation(const QDomElement& element, int order = 0 ,bool increaseOrder = true);
00589 
00590     void saveOasisPresentationSettings( KoXmlWriter &contentTmpWriter, QMap<int, QString> &page2name );
00591     void loadOasisPresentationSettings( QDomNode &settingsDoc );
00592     void saveOasisPresentationCustomSlideShow( KoXmlWriter &contentTmpWriter, QMap<int, QString> &page2name );
00593     void loadOasisPresentationCustomSlideShow( QDomNode &settingsDoc );
00594 
00595     void loadOasisHeaderFooter( QDomNode & drawPage, KoOasisContext & context);
00596 
00597     void saveOasisSettings( KoXmlWriter &contentTmpWriter );
00598     void loadOasisSettings( const QDomDocument&settingsDoc );
00599 
00600     void saveOasisCustomFied( KoXmlWriter &writer )const;
00601 
00602     void loadOasisIgnoreList( const KoOasisSettings& settings );
00603 
00604     //we move presSpeed to each table => compatibility with old file format
00605     void compatibilityFromOldFileFormat();
00606 
00607     void parseOasisGuideLines( const QString &str );
00608 
00613     void pageOrderChanged();
00614     // ************ variables ************
00615 
00616     // screenpresentations
00617     bool _spInfiniteLoop, _spShowEndOfPresentationSlide, _spManualSwitch, _showPresentationDuration;
00618 
00619     // options
00620     int _xRnd, _yRnd;
00621 
00622     // options for editmode
00623     QColor _txtBackCol;
00624     QColor _otxtBackCol;
00625 
00626     bool _clean;
00627     int objStartY, objStartNum;
00628 
00629     QPen _presPen;
00630 
00631     KoPictureCollection m_pictureCollection;
00632     KPrGradientCollection _gradientCollection;
00633 
00634     KPrTextObject *_header, *_footer;
00635 
00636     QMap<KoPictureKey, QString> m_pictureMap;
00637 
00638     CustomSlideShowMap m_customListSlideShow;
00639 
00640 
00641     KoPageLayout __pgLayout;
00642     int lastObj;
00643 
00644     QString urlIntern;
00645 
00646     QValueList<KoPictureKey> usedPictures;
00647     QStringList usedSoundFile, haveNotOwnDiskSoundFile;
00648     QPtrList<KTempFile> tmpSoundFileList;
00649     DCOPObject *dcop;
00650 
00651     int saveOnlyPage;
00652     QString m_tempFileInClipboard;
00653     bool ignoreSticky;
00654 
00655     KoCommandHistory * m_commandHistory;
00656     KoTextZoomHandler* m_zoomHandler;
00657     QFont m_defaultFont;
00658     KoAutoFormat * m_autoFormat;
00659 
00660     bool m_bShowRuler;
00661     bool m_bShowStatusBar;
00662     bool m_bAllowAutoFormat;
00663     bool m_bShowGuideLines;
00664     bool m_bViewFormattingChars;
00665 
00666     bool m_bShowGrid;
00667 
00668     bool m_bSnapToGrid;
00669     double m_indent; // in pt
00670 
00671     double m_tabStop;
00672     int m_maxRecentFiles;
00673     bool m_cursorInProtectectedArea;
00674     KoVariableFormatCollection *m_varFormatCollection;
00675     KPrVariableCollection *m_varColl;
00676     QColor m_gridColor;
00677     bool _duplicatePage;
00678 private:
00680     QValueList<double> m_hGuideLines;
00682     QValueList<double> m_vGuideLines;
00683 
00684     QPtrList<KPrPage> m_pageList;
00685     QPtrList<KPrPage> m_deletedPageList;
00686 
00687     QStringList m_spellCheckIgnoreList; // per-document
00688     QStringList m_spellCheckPersonalDict; // per-user
00689 
00690     double m_gridX;
00691     double m_gridY;
00692     double oldGridX;
00693     double oldGridY;
00694     int m_insertFilePage;
00695     KPrPage *m_initialActivePage;
00696     KPrPage *m_pageWhereLoadObject;
00697     KPrPage *m_masterPage;
00698     KPrBgSpellCheck *m_bgSpellCheck;
00699     KoStyleCollection *m_styleColl;
00700     KPrObject *bgObjSpellChecked;
00701     QString m_picturePath;
00702     bool  m_bInsertDirectCursor;
00703     QString m_globalLanguage;
00704     QString m_presentationName;
00705     bool m_bGlobalHyphenation;
00706     KPrLoadingInfo *m_loadingInfo;
00707     QValueList<int> *m_customListTest;
00708 
00711     int m_childCountBeforeInsert;
00712 };
00713 
00714 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys