00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KWORD_COMMAND_H
00021 #define KWORD_COMMAND_H
00022 #include <kcommand.h>
00023 #include <kurl.h>
00024 #include <KoCommandHistory.h>
00025 #include <KoPageLayout.h>
00026 #include <KoRect.h>
00027 #include <KoBorder.h>
00028 #include <KoParagLayout.h>
00029 #include <KoParagCounter.h>
00030 #include "KWFrameStyle.h"
00031 #include <KoTextCommand.h>
00032 #include "KWVariable.h"
00033 #include <KoPoint.h>
00034 #include <KoPictureKey.h>
00035
00036 class KWFrameSet;
00037 class KWTableStyle;
00038 class KWTableTemplate;
00039 class KWTableFrameSet;
00040 class RemovedRow;
00041 class RemovedColumn;
00042 class KWPartFrameSet;
00043 class KWDocument;
00044 class KoCustomVariable;
00045 class KoLinkVariable;
00046 class KWFieldVariable;
00047 class KWTimeVariable;
00048 class KWDateVariable;
00049 class KWPgNumVariable;
00050 class KWFootNoteVariable;
00051
00052
00053
00054
00058 class KWOasisPasteCommand : public KoTextDocCommand
00059 {
00060 public:
00061 KWOasisPasteCommand( KoTextDocument *d, int parag, int idx,
00062 const QByteArray & data );
00063 KoTextCursor *execute( KoTextCursor *c );
00064 KoTextCursor *unexecute( KoTextCursor *c );
00065 protected:
00066 int m_parag;
00067 int m_idx;
00068 QByteArray m_data;
00069
00070 int m_lastParag;
00071 int m_lastIndex;
00072 KoParagLayout* m_oldParagLayout;
00073 };
00074
00075 struct ParagBookmark {
00076 QString m_bookName;
00077 int m_startParagIndex;
00078 int m_endParagIndex;
00079 };
00080
00081 class KWTextDeleteCommand : public KoTextDeleteCommand
00082 {
00083 public:
00084 KWTextDeleteCommand( KoTextDocument *d, int i, int idx, const QMemArray<KoTextStringChar> &str,
00085 const CustomItemsMap & customItemsMap,
00086 const QValueList<KoParagLayout> & oldParagLayouts );
00087 KoTextCursor *execute( KoTextCursor *c );
00088 KoTextCursor *unexecute( KoTextCursor *c );
00089 void createBookmarkList();
00090 private:
00091 QValueList<ParagBookmark> m_listParagBookmark;
00092 };
00093
00094
00096
00098 struct FrameIndex {
00099 FrameIndex() {}
00100 FrameIndex( KWFrame *frame );
00101
00102 KWFrameSet * m_pFrameSet;
00103 unsigned int m_iFrameIndex;
00104 };
00105
00106
00110 class KWFrameBorderCommand : public KNamedCommand
00111 {
00112 public:
00113
00114 struct FrameBorderTypeStruct {
00115 KoBorder::BorderType m_EFrameType;
00116 KoBorder m_OldBorder;
00117 };
00118
00119 KWFrameBorderCommand( const QString &name, QPtrList<FrameIndex> &_listFrameIndex, QPtrList<FrameBorderTypeStruct> &_frameTypeBorder,const KoBorder & _newBorder ) ;
00120 ~ KWFrameBorderCommand();
00121
00122 void execute();
00123 void unexecute();
00124
00125 protected:
00126 QPtrList<FrameIndex> m_indexFrame;
00127 QPtrList<FrameBorderTypeStruct> m_oldBorderFrameType;
00128 KoBorder m_newBorder;
00129 };
00130
00134 class KWFrameBackGroundColorCommand : public KNamedCommand
00135 {
00136 public:
00137 KWFrameBackGroundColorCommand( const QString &name, QPtrList<FrameIndex> &_listFrameIndex, QPtrList<QBrush> &_oldBrush, const QBrush & _newColor ) ;
00138 ~KWFrameBackGroundColorCommand();
00139
00140 void execute();
00141 void unexecute();
00142
00143 protected:
00144 QPtrList<FrameIndex> m_indexFrame;
00145 QPtrList<QBrush> m_oldBackGroundColor;
00146 QBrush m_newColor;
00147 };
00148
00152 class KWFrameStyleCommand : public KNamedCommand
00153 {
00154 public:
00155 KWFrameStyleCommand( const QString &name, KWFrame *_frame, KWFrameStyle *_fs, bool _repaintViews = true );
00156 ~ KWFrameStyleCommand() { if (m_oldValues) delete m_oldValues; }
00157
00158 void execute();
00159 void unexecute();
00160
00161 protected:
00162 void applyFrameStyle( KWFrameStyle * _sty );
00163 KWFrame *m_frame ;
00164 KWFrameStyle * m_fs;
00165 KWFrameStyle * m_oldValues;
00166 bool repaintViews;
00167 };
00168
00169
00173 class KWTableStyleCommand : public KNamedCommand
00174 {
00175 public:
00176 KWTableStyleCommand( const QString &name, KWFrame *_frame, KWTableStyle *_ts, bool _repaintViews = true );
00177 ~ KWTableStyleCommand();
00178
00179 void execute();
00180 void unexecute();
00181
00182 protected:
00183 KWFrame *m_frame ;
00184 KWTableStyle * m_ts;
00185 KWFrameStyleCommand * m_fsc;
00186 KCommand * m_sc;
00187 bool repaintViews;
00188 };
00189
00193 class KWTableTemplateCommand : public KNamedCommand
00194 {
00195 public:
00196 KWTableTemplateCommand( const QString &name, KWTableFrameSet *_table, KWTableTemplate *_tt );
00197 ~ KWTableTemplateCommand();
00198
00199 void execute();
00200 void unexecute();
00201
00202 protected:
00203 KWTableFrameSet *m_table;
00204 KWTableTemplate * m_tt;
00205 KMacroCommand * m_tableCommands;
00206 };
00207
00208 struct FrameResizeStruct {
00209
00210
00211
00212 FrameResizeStruct() { }
00213 FrameResizeStruct( const KoRect& s1, double min1, const KoRect& s2 )
00214 : oldRect(s1), oldMinHeight(min1),
00215 newRect( s2), newMinHeight(s2.height()) {
00216 }
00217 KoRect oldRect;
00218 double oldMinHeight;
00219 KoRect newRect;
00220 double newMinHeight;
00221 };
00222
00227 class KWFrameResizeCommand : public KNamedCommand
00228 {
00229 public:
00230 KWFrameResizeCommand(const QString &name, const QValueList<FrameIndex> &frameIndex, const QValueList<FrameResizeStruct> &frameResize );
00231 KWFrameResizeCommand(const QString &name, FrameIndex frameIndex, const FrameResizeStruct &frameResize );
00232 ~KWFrameResizeCommand() {}
00233
00234 void execute();
00235 void unexecute();
00236
00237 protected:
00238 QValueList<FrameIndex> m_indexFrame;
00239 QValueList<FrameResizeStruct> m_frameResize;
00240 };
00241
00245 class KWFrameChangePictureCommand : public KNamedCommand
00246 {
00247 public:
00248 KWFrameChangePictureCommand( const QString &name, FrameIndex _frameIndex, const KoPictureKey & _oldFile, const KoPictureKey & _newFile) ;
00249 ~KWFrameChangePictureCommand() {}
00250
00251 void execute();
00252 void unexecute();
00253
00254 protected:
00255 FrameIndex m_indexFrame;
00256 KoPictureKey m_oldKey;
00257 KoPictureKey m_newKey;
00258 };
00259
00260 struct FrameMoveStruct {
00261 FrameMoveStruct() {}
00262 FrameMoveStruct( const KoPoint& p1, const KoPoint& p2 )
00263 : oldPos(p1), newPos(p2) {
00264 }
00265 KoPoint oldPos;
00266 KoPoint newPos;
00267 };
00268
00272 class KWFrameMoveCommand : public KNamedCommand
00273 {
00274 public:
00275 KWFrameMoveCommand( const QString &name,
00276 const QValueList<FrameIndex> & _frameIndex,
00277 const QValueList<FrameMoveStruct> & _frameMove );
00278 ~KWFrameMoveCommand() {}
00279
00280 void execute();
00281 void unexecute();
00282 QValueList<FrameMoveStruct> & listFrameMoved() { return m_frameMove; }
00283 protected:
00284 QValueList<FrameIndex> m_indexFrame;
00285 QValueList<FrameMoveStruct> m_frameMove;
00286 };
00287
00296 class KWFramePropertiesCommand : public KNamedCommand
00297 {
00298 public:
00302 KWFramePropertiesCommand( const QString &name, KWFrame *_frameBefore, KWFrame *_frameAfter );
00303 ~KWFramePropertiesCommand();
00304 void execute();
00305 void unexecute();
00306 protected:
00307 FrameIndex m_frameIndex;
00308 KWFrame *m_frameBefore;
00309 KWFrame *m_frameAfter;
00310 };
00311
00312
00316 class KWFramePartMoveCommand : public KNamedCommand
00317 {
00318 public:
00319 KWFramePartMoveCommand( const QString &name,FrameIndex _frameIndex,FrameResizeStruct _frameMove ) ;
00320 ~KWFramePartMoveCommand() {}
00321
00322 void execute();
00323 void unexecute();
00324 FrameResizeStruct & listFrameMoved() { return m_frameMove; }
00325 bool frameMoved();
00326 protected:
00327 FrameIndex m_indexFrame;
00328 FrameResizeStruct m_frameMove;
00329 };
00330
00334 class KWFramePartInternalCommand : public KNamedCommand
00335 {
00336 public:
00337 KWFramePartInternalCommand( const QString &name, KWPartFrameSet *part ) ;
00338 ~KWFramePartInternalCommand() {}
00339
00340 void execute();
00341 void unexecute();
00342 protected:
00343 KWPartFrameSet *m_part;
00344 KURL m_url;
00345 };
00346
00350 class KWFramePartExternalCommand : public KNamedCommand
00351 {
00352 public:
00353 KWFramePartExternalCommand( const QString &name, KWPartFrameSet *part ) ;
00354 ~KWFramePartExternalCommand() {}
00355
00356 void execute();
00357 void unexecute();
00358 protected:
00359 KWPartFrameSet *m_part;
00360 };
00361
00365 class KWFrameSetInlineCommand : public KNamedCommand
00366 {
00367 public:
00368 KWFrameSetInlineCommand( const QString &name, KWFrameSet *frameset,
00369 bool value );
00370 ~KWFrameSetInlineCommand() {}
00371
00372 void execute();
00373 void unexecute();
00374
00375 protected:
00376 void setValue( bool value );
00377
00378 KWFrameSet* m_pFrameSet;
00379 bool m_value;
00380 bool m_oldValue;
00381 };
00382
00384 struct KWPageLayoutStruct {
00385 KWPageLayoutStruct( const KoPageLayout& pgLayout, const KoColumns& cl, const KoKWHeaderFooter& hf )
00386 : _pgLayout(pgLayout), _cl(cl), _hf(hf) {
00387 }
00388 KoPageLayout _pgLayout;
00389 KoColumns _cl;
00390 KoKWHeaderFooter _hf;
00391 };
00392
00396 class KWPageLayoutCommand : public KNamedCommand
00397 {
00398 public:
00399 KWPageLayoutCommand( const QString &name, KWDocument *_doc, KWPageLayoutStruct &_oldLayout, KWPageLayoutStruct &_newLayout);
00400 ~KWPageLayoutCommand() {}
00401
00402 void execute();
00403 void unexecute();
00404 protected:
00405 KWDocument *m_pDoc;
00406 KWPageLayoutStruct m_oldLayout;
00407 KWPageLayoutStruct m_newLayout;
00408 };
00409
00410
00414 class KWDeleteFrameCommand : public KNamedCommand
00415 {
00416 public:
00417 KWDeleteFrameCommand( const QString &name, KWFrame * frame) ;
00422 KWDeleteFrameCommand( const FrameIndex &frameIndex) ;
00423 ~KWDeleteFrameCommand();
00424
00425 void execute();
00426 void unexecute();
00427 protected:
00428 FrameIndex m_frameIndex;
00429 KWFrame *m_copyFrame;
00430 };
00431
00435 class KWCreateFrameCommand : public KWDeleteFrameCommand
00436 {
00437 public:
00438 KWCreateFrameCommand( const QString &name, KWFrame * frame);
00439 ~KWCreateFrameCommand() {}
00440
00441 void execute() { KWDeleteFrameCommand::unexecute(); }
00442 void unexecute() { KWDeleteFrameCommand::execute(); }
00443 };
00444
00448 class KWUngroupTableCommand : public KNamedCommand
00449 {
00450 public:
00451 KWUngroupTableCommand( const QString &name, KWTableFrameSet * _table) ;
00452 ~KWUngroupTableCommand() {}
00453
00454 void execute();
00455 void unexecute();
00456 protected:
00457 KWTableFrameSet *m_pTable;
00458 QPtrList<KWFrameSet> m_ListFrame;
00459 };
00460
00464 class KWDeleteTableCommand : public KNamedCommand
00465 {
00466 public:
00467 KWDeleteTableCommand( const QString &name, KWTableFrameSet * _table) ;
00468 ~KWDeleteTableCommand() {}
00469
00470 void execute();
00471 void unexecute();
00472 protected:
00473 KWTableFrameSet *m_pTable;
00474 };
00475
00476
00480 class KWCreateTableCommand : public KWDeleteTableCommand
00481 {
00482 public:
00483 KWCreateTableCommand( const QString &name, KWTableFrameSet * _table)
00484 : KWDeleteTableCommand( name, _table ) {}
00485 ~KWCreateTableCommand() {}
00486
00487 void execute() { KWDeleteTableCommand::unexecute(); }
00488 void unexecute() { KWDeleteTableCommand::execute(); }
00489 };
00490
00494 class KWInsertColumnCommand : public KNamedCommand
00495 {
00496 public:
00497
00498 KWInsertColumnCommand( const QString &name, KWTableFrameSet * _table, int _pos, double _maxRight);
00499 ~KWInsertColumnCommand();
00500
00501 void execute();
00502 void unexecute();
00503 protected:
00504 KWTableFrameSet *m_pTable;
00505 RemovedColumn *m_rc;
00506 unsigned int m_colPos;
00507 double m_maxRight;
00508 double m_oldWidth;
00509 bool m_inserted;
00510 };
00511
00512
00516 class KWInsertRowCommand : public KNamedCommand
00517 {
00518 public:
00519 KWInsertRowCommand( const QString &name, KWTableFrameSet * _table, int _pos);
00520 ~KWInsertRowCommand();
00521
00522 void execute();
00523 void unexecute();
00524 protected:
00525 KWTableFrameSet *m_pTable;
00526 RemovedRow *m_rr;
00527 unsigned int m_rowPos;
00528 bool m_inserted;
00529 };
00530
00534 class KWRemoveRowCommand : public KNamedCommand
00535 {
00536 public:
00537 KWRemoveRowCommand( const QString &name, KWTableFrameSet * _table, int _pos);
00538 ~KWRemoveRowCommand();
00539
00540 void execute();
00541 void unexecute();
00542 protected:
00543 KWTableFrameSet *m_pTable;
00544 RemovedRow *m_rr;
00545 uint m_rowPos;
00546 };
00547
00551 class KWRemoveColumnCommand : public KNamedCommand
00552 {
00553 public:
00554 KWRemoveColumnCommand( const QString &name, KWTableFrameSet * _table, int _pos);
00555 ~KWRemoveColumnCommand();
00556
00557 void execute();
00558 void unexecute();
00559 protected:
00560 KWTableFrameSet *m_pTable;
00561 RemovedColumn *m_rc;
00562 uint m_colPos;
00563 };
00564
00568 class KWSplitCellCommand : public KNamedCommand
00569 {
00570 public:
00571 KWSplitCellCommand( const QString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd );
00572 ~KWSplitCellCommand() {}
00573
00574 void execute();
00575 void unexecute();
00576 protected:
00577 KWTableFrameSet *m_pTable;
00578 unsigned int m_colBegin;
00579 unsigned int m_rowBegin;
00580 unsigned int m_colEnd;
00581 unsigned int m_rowEnd;
00582 QPtrList<KWFrameSet> m_ListFrameSet;
00583 };
00584
00588 class KWJoinCellCommand : public KNamedCommand
00589 {
00590 public:
00591 KWJoinCellCommand( const QString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd, QPtrList<KWFrameSet> listFrameSet,QPtrList<KWFrame> listCopyFrame);
00592 ~KWJoinCellCommand();
00593
00594 void execute();
00595 void unexecute();
00596 protected:
00597 KWTableFrameSet *m_pTable;
00598 unsigned int m_colBegin;
00599 unsigned int m_rowBegin;
00600 unsigned int m_colEnd;
00601 unsigned int m_rowEnd;
00602 QPtrList<KWFrameSet> m_ListFrameSet;
00603 QPtrList<KWFrame> m_copyFrame;
00604 };
00605
00609 class KWChangeStartingPageCommand : public KNamedCommand
00610 {
00611 public:
00612 KWChangeStartingPageCommand( const QString &name, KWDocument *_doc, int _oldStartingPage, int _newStartingPage);
00613 ~KWChangeStartingPageCommand(){}
00614
00615 void execute();
00616 void unexecute();
00617 protected:
00618 KWDocument *m_doc;
00619 int oldStartingPage;
00620 int newStartingPage;
00621 };
00622
00626 class KWChangeVariableSettingsCommand : public KNamedCommand
00627 {
00628 public:
00629 enum VariableProperties { VS_DISPLAYLINK, VS_UNDERLINELINK, VS_DISPLAYCOMMENT, VS_DISPLAYFIELDCODE};
00630 KWChangeVariableSettingsCommand( const QString &name, KWDocument *_doc, bool _oldDisplay, bool _newDisplay, VariableProperties _type);
00631 ~KWChangeVariableSettingsCommand(){}
00632
00633 void execute();
00634 void unexecute();
00635 protected:
00636 void changeValue( bool b );
00637 KWDocument *m_doc;
00638 VariableProperties type;
00639 bool m_bOldValue;
00640 bool m_bNewValue;
00641 };
00642
00643 class KWChangeCustomVariableValue : public KNamedCommand
00644 {
00645 public:
00646 KWChangeCustomVariableValue( const QString &name, KWDocument *_doc,const QString & _oldValue, const QString & _newValue, KoCustomVariable *var);
00647 ~KWChangeCustomVariableValue();
00648 void execute();
00649 void unexecute();
00650 protected:
00651 KWDocument *m_doc;
00652 QString newValue;
00653 QString oldValue;
00654 KoCustomVariable *m_var;
00655 };
00656
00657 class KWChangeVariableNoteText : public KNamedCommand
00658 {
00659 public:
00660 KWChangeVariableNoteText( const QString &name, KWDocument *_doc, const QString &_oldValue,const QString &_newValue, KoNoteVariable *var);
00661 ~KWChangeVariableNoteText();
00662 void execute();
00663 void unexecute();
00664 protected:
00665 KWDocument *m_doc;
00666 QString newValue;
00667 QString oldValue;
00668 KoNoteVariable *m_var;
00669 };
00670
00671 class KWChangeLinkVariable : public KNamedCommand
00672 {
00673 public:
00674 KWChangeLinkVariable( const QString &name, KWDocument *_doc,const QString & _oldHref, const QString & _newHref, const QString & _oldLink,const QString &_newLink, KoLinkVariable *var);
00675 ~KWChangeLinkVariable(){};
00676 void execute();
00677 void unexecute();
00678 protected:
00679 KWDocument *m_doc;
00680 QString oldHref;
00681 QString newHref;
00682 QString oldLink;
00683 QString newLink;
00684 KoLinkVariable *m_var;
00685 };
00686
00687 class KWHideShowHeader : public KNamedCommand
00688 {
00689 public:
00690 KWHideShowHeader( const QString &name, KWDocument *_doc, bool _newValue);
00691 ~KWHideShowHeader(){};
00692 void execute();
00693 void unexecute();
00694 protected:
00695 KWDocument *m_doc;
00696 bool newValue;
00697 };
00698
00699 class KWHideShowFooter : public KNamedCommand
00700 {
00701 public:
00702 KWHideShowFooter( const QString &name, KWDocument *_doc, bool _newValue);
00703 ~KWHideShowFooter(){};
00704 void execute();
00705 void unexecute();
00706 protected:
00707 KWDocument *m_doc;
00708 bool newValue;
00709 };
00710
00711
00712 class KWProtectContentCommand : public KNamedCommand
00713 {
00714 public:
00715 KWProtectContentCommand( const QString &name, KWTextFrameSet*frameset,bool protect );
00716 ~KWProtectContentCommand() {}
00717
00718 void execute();
00719 void unexecute();
00720
00721 protected:
00722 KWTextFrameSet* m_pFrameSet;
00723 bool m_bProtect;
00724 };
00725
00726 class KWInsertRemovePageCommand : public KCommand
00727 {
00728 public:
00729 enum Command { Insert, Remove };
00730 KWInsertRemovePageCommand( KWDocument *_doc, Command cmd, int pgNum);
00731 ~KWInsertRemovePageCommand();
00732 virtual QString name() const;
00733 void execute();
00734 void unexecute();
00735 protected:
00736 KWDocument *m_doc;
00737 Command m_cmd;
00738 int m_pgNum;
00739 QValueList<KCommand*> childCommands;
00740
00741 void doRemove(int pageNumber);
00742 void doInsert(int pageNumber);
00743
00744 private:
00745 static bool compareIndex(const FrameIndex &index1, const FrameIndex &index2);
00746 };
00747
00748 struct FramePaddingStruct {
00749 FramePaddingStruct() {}
00750 FramePaddingStruct( KWFrame *frame );
00751 FramePaddingStruct( double _left, double top, double right, double bottom );
00752 double topPadding;
00753 double bottomPadding;
00754 double leftPadding;
00755 double rightPadding;
00756 };
00757
00758 class KWFrameChangeFramePaddingCommand :public KNamedCommand
00759 {
00760 public:
00761 KWFrameChangeFramePaddingCommand( const QString &name, FrameIndex _frameIndex, FramePaddingStruct _framePaddingBegin, FramePaddingStruct _framePaddingEnd );
00762 ~KWFrameChangeFramePaddingCommand() {}
00763 void execute();
00764 void unexecute();
00765 protected:
00766 FrameIndex m_indexFrame;
00767 FramePaddingStruct m_framePaddingBegin;
00768 FramePaddingStruct m_framePaddingEnd;
00769 };
00770
00771
00772 class KWChangeFootEndNoteSettingsCommand : public KNamedCommand
00773 {
00774 public:
00775 KWChangeFootEndNoteSettingsCommand( const QString &name, KoParagCounter _oldCounter, KoParagCounter _newCounter ,bool _footNote ,KWDocument *_doc );
00776 ~KWChangeFootEndNoteSettingsCommand() {}
00777
00778 void execute();
00779 void unexecute();
00780
00781 protected:
00782 void changeCounter( KoParagCounter counter);
00783 KoParagCounter m_oldCounter;
00784 KoParagCounter m_newCounter;
00785 bool m_footNote;
00786 KWDocument *m_doc;
00787 };
00788
00789 class KWChangeTabStopValueCommand : public KNamedCommand
00790 {
00791 public:
00792 KWChangeTabStopValueCommand( const QString &name, double _oldValue, double _newValue, KWDocument *_doc);
00793
00794 ~KWChangeTabStopValueCommand() {}
00795
00796 virtual void execute();
00797 virtual void unexecute();
00798 protected:
00799 KWDocument *m_doc;
00800 double m_oldValue;
00801 double m_newValue;
00802 };
00803
00804
00805 struct FootNoteParameter {
00806 FootNoteParameter() {}
00807 FootNoteParameter( KWFootNoteVariable *_var );
00808 FootNoteParameter( NoteType _noteType, KWFootNoteVariable::Numbering _numberingType, const QString &_manualString);
00809 NoteType noteType;
00810 KWFootNoteVariable::Numbering numberingType;
00811 QString manualString;
00812 };
00813
00814 class KWChangeFootNoteParametersCommand : public KNamedCommand
00815 {
00816 public:
00817 KWChangeFootNoteParametersCommand( const QString &name, KWFootNoteVariable * _var, FootNoteParameter _oldParameter, FootNoteParameter _newParameter, KWDocument *_doc);
00818
00819 ~KWChangeFootNoteParametersCommand() {}
00820
00821 virtual void execute();
00822 virtual void unexecute();
00823 protected:
00824 void changeVariableParameter( FootNoteParameter _param );
00825 KWDocument *m_doc;
00826 KWFootNoteVariable *m_var;
00827 FootNoteParameter m_oldParameter;
00828 FootNoteParameter m_newParameter;
00829 };
00830
00831
00832 class KWChangeFootNoteLineSeparatorParametersCommand : public KNamedCommand
00833 {
00834 public:
00835 KWChangeFootNoteLineSeparatorParametersCommand( const QString &name, SeparatorLinePos _oldValuePos, SeparatorLinePos _newValuePos, int _oldLength, int _newLength, double _oldWidth, double _newWidth,SeparatorLineLineType _oldLineType, SeparatorLineLineType _newLineType, KWDocument *_doc);
00836
00837 ~KWChangeFootNoteLineSeparatorParametersCommand() {}
00838
00839 virtual void execute();
00840 virtual void unexecute();
00841 protected:
00842 void changeLineSeparatorParameter( SeparatorLinePos _pos, int length, double _width, SeparatorLineLineType _type);
00843 KWDocument *m_doc;
00844 SeparatorLinePos m_oldValuePos;
00845 SeparatorLinePos m_newValuePos;
00846 int m_oldLength;
00847 int m_newLength;
00848 double m_oldWidth;
00849 double m_newWidth;
00850 SeparatorLineLineType m_oldLineType;
00851 SeparatorLineLineType m_newLineType;
00852 };
00853
00854 class KWRenameBookmarkCommand : public KNamedCommand
00855 {
00856 public:
00857 KWRenameBookmarkCommand( const QString &name, const QString & _oldname, const QString & _newName, KWDocument *_doc);
00858
00859 ~KWRenameBookmarkCommand() {}
00860
00861 virtual void execute();
00862 virtual void unexecute();
00863 protected:
00864 KWDocument *m_doc;
00865 QString m_oldName;
00866 QString m_newName;
00867 };
00868
00869 class KWResizeColumnCommand : public KNamedCommand
00870 {
00871 public:
00872 KWResizeColumnCommand( KWTableFrameSet *table, int col, double oldSize, double newSize );
00873
00874 ~KWResizeColumnCommand() {}
00875
00876 virtual void execute();
00877 virtual void unexecute();
00878 protected:
00879 KWTableFrameSet *m_table;
00880 double m_oldSize;
00881 double m_newSize;
00882 int m_col;
00883 };
00884
00885 class KWResizeRowCommand : public KNamedCommand
00886 {
00887 public:
00888 KWResizeRowCommand( KWTableFrameSet *table, int row, double oldSize, double newSize );
00889
00890 ~KWResizeRowCommand() {}
00891
00892 virtual void execute();
00893 virtual void unexecute();
00894 protected:
00895 KWTableFrameSet *m_table;
00896 double m_oldSize;
00897 double m_newSize;
00898 int m_row;
00899 };
00900
00901 #endif