kword

KWCommand.h
1/* This file is part of the KDE project
2 Copyright (C) 2001 David Faure <faure@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KWORD_COMMAND_H
21#define KWORD_COMMAND_H
22#include <kcommand.h>
23#include <kurl.h>
24#include <KoCommandHistory.h>
25#include <KoPageLayout.h>
26#include <KoRect.h>
27#include <KoBorder.h>
28#include <KoParagLayout.h>
29#include <KoParagCounter.h>
30#include "KWFrameStyle.h"
31#include <KoTextCommand.h>
32#include "KWVariable.h"
33#include <KoPoint.h>
34#include <KoPictureKey.h>
35
36class KWFrameSet;
37class KWTableStyle;
38class KWTableTemplate;
39class KWTableFrameSet;
40class RemovedRow;
41class RemovedColumn;
42class KWPartFrameSet;
43class KWDocument;
44class KoCustomVariable;
45class KoLinkVariable;
46class KWFieldVariable;
47class KWTimeVariable;
48class KWDateVariable;
49class KWPgNumVariable;
51
52// TODO: change most KNamedCommands into KCommands, removing name arguments
53// and implementing name() instead (less memory used).
54
58class KWOasisPasteCommand : public KoTextDocCommand
59{
60public:
61 KWOasisPasteCommand( KoTextDocument *d, int parag, int idx,
62 const TQByteArray & data );
63 KoTextCursor *execute( KoTextCursor *c );
64 KoTextCursor *unexecute( KoTextCursor *c );
65protected:
66 int m_parag;
67 int m_idx;
68 TQByteArray m_data;
69 // filled in by execute(), for unexecute()
70 int m_lastParag;
71 int m_lastIndex;
72 KoParagLayout* m_oldParagLayout;
73};
74
75struct ParagBookmark {
76 TQString m_bookName;
77 int m_startParagIndex;
78 int m_endParagIndex;
79};
80
81class KWTextDeleteCommand : public KoTextDeleteCommand
82{
83public:
84 KWTextDeleteCommand( KoTextDocument *d, int i, int idx, const TQMemArray<KoTextStringChar> &str,
85 const CustomItemsMap & customItemsMap,
86 const TQValueList<KoParagLayout> & oldParagLayouts );
87 KoTextCursor *execute( KoTextCursor *c );
88 KoTextCursor *unexecute( KoTextCursor *c );
89 void createBookmarkList();
90private:
91 TQValueList<ParagBookmark> m_listParagBookmark;
92};
93
94
96
98struct FrameIndex {
99 FrameIndex() {}
100 FrameIndex( KWFrame *frame );
101
102 KWFrameSet * m_pFrameSet;
103 unsigned int m_iFrameIndex;
104};
105
106
110class KWFrameBorderCommand : public KNamedCommand
111{
112public:
113 //enum FrameBorderType { FBLeft=0, FBRight=1, FBTop=2, FBBottom=3};
114 struct FrameBorderTypeStruct {
115 KoBorder::BorderType m_EFrameType;
116 KoBorder m_OldBorder;
117 };
118
119 KWFrameBorderCommand( const TQString &name, TQPtrList<FrameIndex> &_listFrameIndex, TQPtrList<FrameBorderTypeStruct> &_frameTypeBorder,const KoBorder & _newBorder ) ;
120 ~ KWFrameBorderCommand();
121
122 void execute();
123 void unexecute();
124
125protected:
126 TQPtrList<FrameIndex> m_indexFrame;
127 TQPtrList<FrameBorderTypeStruct> m_oldBorderFrameType;
128 KoBorder m_newBorder;
129};
130
134class KWFrameBackGroundColorCommand : public KNamedCommand
135{
136public:
137 KWFrameBackGroundColorCommand( const TQString &name, TQPtrList<FrameIndex> &_listFrameIndex, TQPtrList<TQBrush> &_oldBrush, const TQBrush & _newColor ) ;
138 ~KWFrameBackGroundColorCommand();
139
140 void execute();
141 void unexecute();
142
143protected:
144 TQPtrList<FrameIndex> m_indexFrame;
145 TQPtrList<TQBrush> m_oldBackGroundColor;
146 TQBrush m_newColor;
147};
148
152class KWFrameStyleCommand : public KNamedCommand
153{
154public:
155 KWFrameStyleCommand( const TQString &name, KWFrame *_frame, KWFrameStyle *_fs, bool _repaintViews = true );
156 ~ KWFrameStyleCommand() { if (m_oldValues) delete m_oldValues; }
157
158 void execute();
159 void unexecute();
160
161protected:
162 void applyFrameStyle( KWFrameStyle * _sty );
163 KWFrame *m_frame ;
164 KWFrameStyle * m_fs;
165 KWFrameStyle * m_oldValues;
166 bool repaintViews;
167};
168
169
173class KWTableStyleCommand : public KNamedCommand
174{
175public:
176 KWTableStyleCommand( const TQString &name, KWFrame *_frame, KWTableStyle *_ts, bool _repaintViews = true );
177 ~ KWTableStyleCommand();
178
179 void execute();
180 void unexecute();
181
182protected:
183 KWFrame *m_frame ;
184 KWTableStyle * m_ts;
185 KWFrameStyleCommand * m_fsc;
186 KCommand * m_sc;
187 bool repaintViews;
188};
189
193class KWTableTemplateCommand : public KNamedCommand
194{
195public:
196 KWTableTemplateCommand( const TQString &name, KWTableFrameSet *_table, KWTableTemplate *_tt );
197 ~ KWTableTemplateCommand();
198
199 void execute();
200 void unexecute();
201
202protected:
203 KWTableFrameSet *m_table;
204 KWTableTemplate * m_tt;
205 KMacroCommand * m_tableCommands;
206};
207
208struct FrameResizeStruct {
209 // Note that the new "minimum frame height" is always s2.height(),
210 // since this is called when the user manually resizes a frame (not when
211 // some text changes the size of a frame).
212 FrameResizeStruct() { } // default constructor;
213 FrameResizeStruct( const KoRect& s1, double min1, const KoRect& s2 )
214 : oldRect(s1), oldMinHeight(min1),
215 newRect( s2), newMinHeight(s2.height()) {
216 }
217 KoRect oldRect;
218 double oldMinHeight;
219 KoRect newRect;
220 double newMinHeight;
221};
222
227class KWFrameResizeCommand : public KNamedCommand
228{
229public:
230 KWFrameResizeCommand(const TQString &name, const TQValueList<FrameIndex> &frameIndex, const TQValueList<FrameResizeStruct> &frameResize );
231 KWFrameResizeCommand(const TQString &name, FrameIndex frameIndex, const FrameResizeStruct &frameResize );
232 ~KWFrameResizeCommand() {}
233
234 void execute();
235 void unexecute();
236
237protected:
238 TQValueList<FrameIndex> m_indexFrame;
239 TQValueList<FrameResizeStruct> m_frameResize;
240};
241
245class KWFrameChangePictureCommand : public KNamedCommand
246{
247public:
248 KWFrameChangePictureCommand( const TQString &name, FrameIndex _frameIndex, const KoPictureKey & _oldFile, const KoPictureKey & _newFile) ;
249 ~KWFrameChangePictureCommand() {}
250
251 void execute();
252 void unexecute();
253
254protected:
255 FrameIndex m_indexFrame;
256 KoPictureKey m_oldKey;
257 KoPictureKey m_newKey;
258};
259
260struct FrameMoveStruct {
261 FrameMoveStruct() {} // for TQValueList
262 FrameMoveStruct( const KoPoint& p1, const KoPoint& p2 )
263 : oldPos(p1), newPos(p2) {
264 }
265 KoPoint oldPos;
266 KoPoint newPos;
267};
268
272class KWFrameMoveCommand : public KNamedCommand
273{
274public:
275 KWFrameMoveCommand( const TQString &name,
276 const TQValueList<FrameIndex> & _frameIndex,
277 const TQValueList<FrameMoveStruct> & _frameMove );
278 ~KWFrameMoveCommand() {}
279
280 void execute();
281 void unexecute();
282 TQValueList<FrameMoveStruct> & listFrameMoved() { return m_frameMove; }
283protected:
284 TQValueList<FrameIndex> m_indexFrame;
285 TQValueList<FrameMoveStruct> m_frameMove;
286};
287
296class KWFramePropertiesCommand : public KNamedCommand
297{
298public:
302 KWFramePropertiesCommand( const TQString &name, KWFrame *_frameBefore, KWFrame *_frameAfter );
304 void execute();
305 void unexecute();
306protected:
307 FrameIndex m_frameIndex;
308 KWFrame *m_frameBefore;
309 KWFrame *m_frameAfter;
310};
311
312
316class KWFramePartMoveCommand : public KNamedCommand
317{
318public:
319 KWFramePartMoveCommand( const TQString &name,FrameIndex _frameIndex,FrameResizeStruct _frameMove ) ;
320 ~KWFramePartMoveCommand() {}
321
322 void execute();
323 void unexecute();
324 FrameResizeStruct & listFrameMoved() { return m_frameMove; }
325 bool frameMoved();
326protected:
327 FrameIndex m_indexFrame;
328 FrameResizeStruct m_frameMove;
329};
330
334class KWFramePartInternalCommand : public KNamedCommand
335{
336public:
337 KWFramePartInternalCommand( const TQString &name, KWPartFrameSet *part ) ;
338 ~KWFramePartInternalCommand() {}
339
340 void execute();
341 void unexecute();
342protected:
343 KWPartFrameSet *m_part;
344 KURL m_url;
345};
346
350class KWFramePartExternalCommand : public KNamedCommand
351{
352public:
353 KWFramePartExternalCommand( const TQString &name, KWPartFrameSet *part ) ;
354 ~KWFramePartExternalCommand() {}
355
356 void execute();
357 void unexecute();
358protected:
359 KWPartFrameSet *m_part;
360};
361
365class KWFrameSetInlineCommand : public KNamedCommand
366{
367public:
368 KWFrameSetInlineCommand( const TQString &name, KWFrameSet *frameset,
369 bool value );
370 ~KWFrameSetInlineCommand() {}
371
372 void execute();
373 void unexecute();
374
375protected:
376 void setValue( bool value );
377
378 KWFrameSet* m_pFrameSet;
379 bool m_value;
380 bool m_oldValue;
381};
382
384struct KWPageLayoutStruct {
385 KWPageLayoutStruct( const KoPageLayout& pgLayout, const KoColumns& cl, const KoKWHeaderFooter& hf )
386 : _pgLayout(pgLayout), _cl(cl), _hf(hf) {
387 }
388 KoPageLayout _pgLayout;
389 KoColumns _cl;
390 KoKWHeaderFooter _hf;
391};
392
396class KWPageLayoutCommand : public KNamedCommand
397{
398public:
399 KWPageLayoutCommand( const TQString &name, KWDocument *_doc, KWPageLayoutStruct &_oldLayout, KWPageLayoutStruct &_newLayout);
400 ~KWPageLayoutCommand() {}
401
402 void execute();
403 void unexecute();
404protected:
405 KWDocument *m_pDoc;
406 KWPageLayoutStruct m_oldLayout;
407 KWPageLayoutStruct m_newLayout;
408};
409
410
414class KWDeleteFrameCommand : public KNamedCommand
415{
416public:
417 KWDeleteFrameCommand( const TQString &name, KWFrame * frame) ;
422 KWDeleteFrameCommand( const FrameIndex &frameIndex) ;
423 ~KWDeleteFrameCommand();
424
425 void execute();
426 void unexecute();
427protected:
428 FrameIndex m_frameIndex;
429 KWFrame *m_copyFrame;
430};
431
435class KWCreateFrameCommand : public KWDeleteFrameCommand
436{
437public:
438 KWCreateFrameCommand( const TQString &name, KWFrame * frame);
439 ~KWCreateFrameCommand() {}
440
441 void execute() { KWDeleteFrameCommand::unexecute(); }
442 void unexecute() { KWDeleteFrameCommand::execute(); }
443};
444
448class KWUngroupTableCommand : public KNamedCommand
449{
450public:
451 KWUngroupTableCommand( const TQString &name, KWTableFrameSet * _table) ;
452 ~KWUngroupTableCommand() {}
453
454 void execute();
455 void unexecute();
456protected:
457 KWTableFrameSet *m_pTable;
458 TQPtrList<KWFrameSet> m_ListFrame;
459};
460
464class KWDeleteTableCommand : public KNamedCommand
465{
466public:
467 KWDeleteTableCommand( const TQString &name, KWTableFrameSet * _table) ;
468 ~KWDeleteTableCommand() {}
469
470 void execute();
471 void unexecute();
472protected:
473 KWTableFrameSet *m_pTable;
474};
475
476
480class KWCreateTableCommand : public KWDeleteTableCommand
481{
482public:
483 KWCreateTableCommand( const TQString &name, KWTableFrameSet * _table)
484 : KWDeleteTableCommand( name, _table ) {}
485 ~KWCreateTableCommand() {}
486
487 void execute() { KWDeleteTableCommand::unexecute(); }
488 void unexecute() { KWDeleteTableCommand::execute(); }
489};
490
494class KWInsertColumnCommand : public KNamedCommand
495{
496public:
497 /* for the last parameter, _maxRight, you should pass the maximum offset that the table can use at its right (normally m_maxRight - m_pTable->boundingRect().left())*/
498 KWInsertColumnCommand( const TQString &name, KWTableFrameSet * _table, int _pos, double _maxRight);
499 ~KWInsertColumnCommand();
500
501 void execute();
502 void unexecute();
503protected:
504 KWTableFrameSet *m_pTable;
505 RemovedColumn *m_rc;
506 unsigned int m_colPos;
507 double m_maxRight; // this is the maximum x of the right part of the table (used so that the table does no go off the page)
508 double m_oldWidth; // will be 0 after execute() if the width of the table was not changed by the operation
509 bool m_inserted;
510};
511
512
516class KWInsertRowCommand : public KNamedCommand
517{
518public:
519 KWInsertRowCommand( const TQString &name, KWTableFrameSet * _table, int _pos);
520 ~KWInsertRowCommand();
521
522 void execute();
523 void unexecute();
524protected:
525 KWTableFrameSet *m_pTable;
526 RemovedRow *m_rr;
527 unsigned int m_rowPos;
528 bool m_inserted;
529};
530
534class KWRemoveRowCommand : public KNamedCommand
535{
536public:
537 KWRemoveRowCommand( const TQString &name, KWTableFrameSet * _table, int _pos);
538 ~KWRemoveRowCommand();
539
540 void execute();
541 void unexecute();
542protected:
543 KWTableFrameSet *m_pTable;
544 RemovedRow *m_rr;
545 uint m_rowPos;
546};
547
551class KWRemoveColumnCommand : public KNamedCommand
552{
553public:
554 KWRemoveColumnCommand( const TQString &name, KWTableFrameSet * _table, int _pos);
555 ~KWRemoveColumnCommand();
556
557 void execute();
558 void unexecute();
559protected:
560 KWTableFrameSet *m_pTable;
561 RemovedColumn *m_rc;
562 uint m_colPos;
563};
564
568class KWSplitCellCommand : public KNamedCommand
569{
570public:
571 KWSplitCellCommand( const TQString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd );
572 ~KWSplitCellCommand() {}
573
574 void execute();
575 void unexecute();
576protected:
577 KWTableFrameSet *m_pTable;
578 unsigned int m_colBegin;
579 unsigned int m_rowBegin;
580 unsigned int m_colEnd;
581 unsigned int m_rowEnd;
582 TQPtrList<KWFrameSet> m_ListFrameSet;
583};
584
588class KWJoinCellCommand : public KNamedCommand
589{
590public:
591 KWJoinCellCommand( const TQString &name, KWTableFrameSet * _table,unsigned int colBegin,unsigned int rowBegin, unsigned int colEnd,unsigned int rowEnd, TQPtrList<KWFrameSet> listFrameSet,TQPtrList<KWFrame> listCopyFrame);
592 ~KWJoinCellCommand();
593
594 void execute();
595 void unexecute();
596protected:
597 KWTableFrameSet *m_pTable;
598 unsigned int m_colBegin;
599 unsigned int m_rowBegin;
600 unsigned int m_colEnd;
601 unsigned int m_rowEnd;
602 TQPtrList<KWFrameSet> m_ListFrameSet;
603 TQPtrList<KWFrame> m_copyFrame;
604};
605
609class KWChangeStartingPageCommand : public KNamedCommand
610{
611public:
612 KWChangeStartingPageCommand( const TQString &name, KWDocument *_doc, int _oldStartingPage, int _newStartingPage);
613 ~KWChangeStartingPageCommand(){}
614
615 void execute();
616 void unexecute();
617protected:
618 KWDocument *m_doc;
619 int oldStartingPage;
620 int newStartingPage;
621};
622
626class KWChangeVariableSettingsCommand : public KNamedCommand
627{
628public:
629 enum VariableProperties { VS_DISPLAYLINK, VS_UNDERLINELINK, VS_DISPLAYCOMMENT, VS_DISPLAYFIELDCODE};
630 KWChangeVariableSettingsCommand( const TQString &name, KWDocument *_doc, bool _oldDisplay, bool _newDisplay, VariableProperties _type);
631 ~KWChangeVariableSettingsCommand(){}
632
633 void execute();
634 void unexecute();
635protected:
636 void changeValue( bool b );
637 KWDocument *m_doc;
638 VariableProperties type;
639 bool m_bOldValue;
640 bool m_bNewValue;
641};
642
643class KWChangeCustomVariableValue : public KNamedCommand
644{
645 public:
646 KWChangeCustomVariableValue( const TQString &name, KWDocument *_doc,const TQString & _oldValue, const TQString & _newValue, KoCustomVariable *var);
647 ~KWChangeCustomVariableValue();
648 void execute();
649 void unexecute();
650 protected:
651 KWDocument *m_doc;
652 TQString newValue;
653 TQString oldValue;
654 KoCustomVariable *m_var;
655};
656
657class KWChangeVariableNoteText : public KNamedCommand
658{
659 public:
660 KWChangeVariableNoteText( const TQString &name, KWDocument *_doc, const TQString &_oldValue,const TQString &_newValue, KoNoteVariable *var);
661 ~KWChangeVariableNoteText();
662 void execute();
663 void unexecute();
664 protected:
665 KWDocument *m_doc;
666 TQString newValue;
667 TQString oldValue;
668 KoNoteVariable *m_var;
669};
670
671class KWChangeLinkVariable : public KNamedCommand
672{
673 public:
674 KWChangeLinkVariable( const TQString &name, KWDocument *_doc,const TQString & _oldHref, const TQString & _newHref, const TQString & _oldLink,const TQString &_newLink, KoLinkVariable *var);
675 ~KWChangeLinkVariable(){};
676 void execute();
677 void unexecute();
678 protected:
679 KWDocument *m_doc;
680 TQString oldHref;
681 TQString newHref;
682 TQString oldLink;
683 TQString newLink;
684 KoLinkVariable *m_var;
685};
686
687class KWHideShowHeader : public KNamedCommand
688{
689 public:
690 KWHideShowHeader( const TQString &name, KWDocument *_doc, bool _newValue);
691 ~KWHideShowHeader(){};
692 void execute();
693 void unexecute();
694 protected:
695 KWDocument *m_doc;
696 bool newValue;
697};
698
699class KWHideShowFooter : public KNamedCommand
700{
701 public:
702 KWHideShowFooter( const TQString &name, KWDocument *_doc, bool _newValue);
703 ~KWHideShowFooter(){};
704 void execute();
705 void unexecute();
706 protected:
707 KWDocument *m_doc;
708 bool newValue;
709};
710
711
712class KWProtectContentCommand : public KNamedCommand
713{
714public:
715 KWProtectContentCommand( const TQString &name, KWTextFrameSet*frameset,bool protect );
716 ~KWProtectContentCommand() {}
717
718 void execute();
719 void unexecute();
720
721protected:
722 KWTextFrameSet* m_pFrameSet;
723 bool m_bProtect;
724};
725
726class KWInsertRemovePageCommand : public KCommand
727{
728 public:
729 enum Command { Insert, Remove };
730 KWInsertRemovePageCommand( KWDocument *_doc, Command cmd, int pgNum);
731 ~KWInsertRemovePageCommand();
732 virtual TQString name() const;
733 void execute();
734 void unexecute();
735 protected:
736 KWDocument *m_doc;
737 Command m_cmd;
738 int m_pgNum;
739 TQValueList<KCommand*> childCommands;
740
741 void doRemove(int pageNumber);
742 void doInsert(int pageNumber);
743
744 private:
745 static bool compareIndex(const FrameIndex &index1, const FrameIndex &index2);
746};
747
748struct FramePaddingStruct {
749 FramePaddingStruct() {}
750 FramePaddingStruct( KWFrame *frame );
751 FramePaddingStruct( double _left, double top, double right, double bottom );
752 double topPadding;
753 double bottomPadding;
754 double leftPadding;
755 double rightPadding;
756};
757
758class KWFrameChangeFramePaddingCommand :public KNamedCommand
759{
760public:
761 KWFrameChangeFramePaddingCommand( const TQString &name, FrameIndex _frameIndex, FramePaddingStruct _framePaddingBegin, FramePaddingStruct _framePaddingEnd );
762 ~KWFrameChangeFramePaddingCommand() {}
763 void execute();
764 void unexecute();
765protected:
766 FrameIndex m_indexFrame;
767 FramePaddingStruct m_framePaddingBegin;
768 FramePaddingStruct m_framePaddingEnd;
769};
770
771
772class KWChangeFootEndNoteSettingsCommand : public KNamedCommand
773{
774public:
775 KWChangeFootEndNoteSettingsCommand( const TQString &name, KoParagCounter _oldCounter, KoParagCounter _newCounter ,bool _footNote ,KWDocument *_doc );
776 ~KWChangeFootEndNoteSettingsCommand() {}
777
778 void execute();
779 void unexecute();
780
781protected:
782 void changeCounter( KoParagCounter counter);
783 KoParagCounter m_oldCounter;
784 KoParagCounter m_newCounter;
785 bool m_footNote;
786 KWDocument *m_doc;
787};
788
789class KWChangeTabStopValueCommand : public KNamedCommand
790{
791public:
792 KWChangeTabStopValueCommand( const TQString &name, double _oldValue, double _newValue, KWDocument *_doc);
793
794 ~KWChangeTabStopValueCommand() {}
795
796 virtual void execute();
797 virtual void unexecute();
798protected:
799 KWDocument *m_doc;
800 double m_oldValue;
801 double m_newValue;
802};
803
804
805struct FootNoteParameter {
806 FootNoteParameter() {}
807 FootNoteParameter( KWFootNoteVariable *_var );
808 FootNoteParameter( NoteType _noteType, KWFootNoteVariable::Numbering _numberingType, const TQString &_manualString);
809 NoteType noteType;
810 KWFootNoteVariable::Numbering numberingType;
811 TQString manualString;
812};
813
814class KWChangeFootNoteParametersCommand : public KNamedCommand
815{
816public:
817 KWChangeFootNoteParametersCommand( const TQString &name, KWFootNoteVariable * _var, FootNoteParameter _oldParameter, FootNoteParameter _newParameter, KWDocument *_doc);
818
819 ~KWChangeFootNoteParametersCommand() {}
820
821 virtual void execute();
822 virtual void unexecute();
823protected:
824 void changeVariableParameter( FootNoteParameter _param );
825 KWDocument *m_doc;
826 KWFootNoteVariable *m_var;
827 FootNoteParameter m_oldParameter;
828 FootNoteParameter m_newParameter;
829};
830
831
832class KWChangeFootNoteLineSeparatorParametersCommand : public KNamedCommand
833{
834public:
835 KWChangeFootNoteLineSeparatorParametersCommand( const TQString &name, SeparatorLinePos _oldValuePos, SeparatorLinePos _newValuePos, int _oldLength, int _newLength, double _oldWidth, double _newWidth,SeparatorLineLineType _oldLineType, SeparatorLineLineType _newLineType, KWDocument *_doc);
836
837 ~KWChangeFootNoteLineSeparatorParametersCommand() {}
838
839 virtual void execute();
840 virtual void unexecute();
841protected:
842 void changeLineSeparatorParameter( SeparatorLinePos _pos, int length, double _width, SeparatorLineLineType _type);
843 KWDocument *m_doc;
844 SeparatorLinePos m_oldValuePos;
845 SeparatorLinePos m_newValuePos;
846 int m_oldLength;
847 int m_newLength;
848 double m_oldWidth;
849 double m_newWidth;
850 SeparatorLineLineType m_oldLineType;
851 SeparatorLineLineType m_newLineType;
852};
853
854class KWRenameBookmarkCommand : public KNamedCommand
855{
856public:
857 KWRenameBookmarkCommand( const TQString &name, const TQString & _oldname, const TQString & _newName, KWDocument *_doc);
858
859 ~KWRenameBookmarkCommand() {}
860
861 virtual void execute();
862 virtual void unexecute();
863protected:
864 KWDocument *m_doc;
865 TQString m_oldName;
866 TQString m_newName;
867};
868
869class KWResizeColumnCommand : public KNamedCommand
870{
871public:
872 KWResizeColumnCommand( KWTableFrameSet *table, int col, double oldSize, double newSize );
873
874 ~KWResizeColumnCommand() {}
875
876 virtual void execute();
877 virtual void unexecute();
878protected:
879 KWTableFrameSet *m_table;
880 double m_oldSize;
881 double m_newSize;
882 int m_col;
883};
884
885class KWResizeRowCommand : public KNamedCommand
886{
887 public:
888 KWResizeRowCommand( KWTableFrameSet *table, int row, double oldSize, double newSize );
889
890 ~KWResizeRowCommand() {}
891
892 virtual void execute();
893 virtual void unexecute();
894 protected:
895 KWTableFrameSet *m_table;
896 double m_oldSize;
897 double m_newSize;
898 int m_row;
899};
900
901#endif
The variable showing the footnote number in superscript, in the text.
Definition KWVariable.h:106
KWFramePropertiesCommand(const TQString &name, KWFrame *_frameBefore, KWFrame *_frameAfter)
A copy of frameAfter is done internally.
Class: KWFrameSet Base type, a frameset holds content as well as frames to show that content.
Definition KWFrameSet.h:62
Command created when applying a framestyle.
Definition KWCommand.h:153
The user-visible style for frames (borders and background).
This class represents a single frame.
Definition KWFrame.h:68
A frameset that contains an embedded object (a KWDocumentChild).
"current page number" and "number of pages" variables
Definition KWVariable.h:75
This class implements tables by acting as the manager for the frame(set)s which make up the table cel...
Table style (can created/modified/deleted by the user) A table style is simply a paragraph style and ...
RemovedRow and RemovedColumn implement the Memento design pattern.
Identifies a frame.
Definition KWCommand.h:98