26#ifndef __kspread_autofill_h__
27#define __kspread_autofill_h__
29#include <tqdatetime.h>
30#include <tqmemarray.h>
33#include <tqstringlist.h>
37class AutoFillDeltaSequence;
38class AutoFillSequenceItem;
39class AutoFillSequence;
42class AutoFillSequenceItem
45 enum Type { INTEGER, FLOAT, STRING, DAY, SHORTDAY,
46 MONTH, SHORTMONTH, FORMULA, OTHER, DATE, TIME };
48 AutoFillSequenceItem( int _i );
49 AutoFillSequenceItem( double _d );
50 AutoFillSequenceItem( const TQString &_str );
52 bool getDelta( AutoFillSequenceItem *_seq, double &delta );
54 TQString getSuccessor( int _no, double _delta );
55 TQString getPredecessor( int _no, double _delta );
57 Type getType() const { return m_Type; }
58 int getIValue() const { return m_IValue; }
59 double getDValue() const { return m_DValue; }
60 TQString getString() const { return m_String; }
61 int getIOtherEnd() const { return m_OtherEnd; }
62 int getIOtherBegin() const { return m_OtherBegin; }
63 static TQStringList *other;
64 static TQStringList *month;
65 static TQStringList *day;
66 static TQStringList *shortMonth;
67 static TQStringList *shortDay;
82 AutoFillSequence( Cell *_obj );
84 int count() const { return sequence.count(); }
86 AutoFillSequenceItem* getFirst() { return sequence.first(); }
87 AutoFillSequenceItem* getNext() { return sequence.next(); }
89 bool matches( AutoFillSequence* _seq, AutoFillDeltaSequence *_delta );
91 void fillCell( Cell *src, Cell *dest, AutoFillDeltaSequence *delta, int _block, bool down = true );
94 TQPtrList<AutoFillSequenceItem> sequence;
97class AutoFillDeltaSequence
100 AutoFillDeltaSequence( AutoFillSequence *_first, AutoFillSequence *_next );
101 ~AutoFillDeltaSequence();
103 bool isOk() const { return m_ok; }
105 bool equals( AutoFillDeltaSequence *_delta );
107 TQMemArray<double>* getSequence() { return m_sequence; }
109 double getItemDelta( int _pos );
113 TQMemArray<double>* m_sequence;
For every cell in the spread sheet there is a Cell object.
|