filters
gnumericimport.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GNUMERICFILTER_H
00021 #define GNUMERICFILTER_H
00022
00023 #include <KoFilter.h>
00024
00025 #include <qdatetime.h>
00026 #include <qdom.h>
00027
00028 namespace KSpread
00029 {
00030 class Cell;
00031 class Sheet;
00032 }
00033
00034 class GNUMERICFilter : public KoFilter
00035 {
00036 Q_OBJECT
00037 public:
00038 GNUMERICFilter(KoFilter *parent, const char *name, const QStringList&);
00039 virtual ~GNUMERICFilter() {}
00040
00041 virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
00042
00043 enum borderStyle { Left, Right, Top, Bottom, Diagonal, Revdiagonal};
00044 private:
00045 class GnumericDate : public QDate
00046 {
00047 public:
00048 static uint greg2jul( int y, int m, int d );
00049 static void jul2greg( double num, int & y, int & m, int & d );
00050 static QTime getTime( double num );
00051
00052 };
00053
00054 void dateInit();
00055 QString convertVars( QString const & str, KSpread::Sheet * table ) const;
00056 void ParsePrintInfo( QDomNode const & printInfo, KSpread::Sheet * table );
00057 void ParseFormat(QString const & formatString, KSpread::Cell* kspread_cell);
00058 void setStyleInfo(QDomNode * sheet, KSpread::Sheet * table);
00059 bool setType( KSpread::Cell* kspread_cell, QString const & formatString, QString & cell_content );
00060 void convertFormula( QString & formula ) const;
00061 void importBorder( QDomElement border, borderStyle _style, KSpread::Cell*cell);
00062 void ParseBorder( QDomElement & gmr_styleborder, KSpread::Cell* kspread_cell );
00063 double parseAttribute( const QDomElement &_element );
00064
00065 };
00066 #endif // GNUMERICFILTER_H
|