15
15
You should have received a copy of the GNU Library General Public License
16
16
along with this library; see the file COPYING.LIB. If not, write to
17
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
Boston, MA 02111-1307, USA.
17
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
* Boston, MA 02110-1301, USA.
21
21
#ifndef OpenCalc_IMPORT_H__
22
22
#define OpenCalc_IMPORT_H__
25
25
#include "kspread_format.h"
33
class KSpreadValidity;
34
30
class KoStyleStack;
35
class KSpreadConditional;
38
42
class OpenCalcImport : public KoFilter
80
84
void insertStyles( QDomElement const & element );
81
85
bool createStyleMap( QDomDocument const & styles );
82
86
bool readRowFormat( QDomElement & rowNode, QDomElement * rowStyle,
83
KSpreadSheet * table, int & row, int & number, bool last );
84
bool readColLayouts( QDomElement & content, KSpreadSheet * table );
85
bool readRowsAndCells( QDomElement & content, KSpreadSheet * table );
86
bool readCells( QDomElement & rowNode, KSpreadSheet * table, int row, int & columns );
87
KSpread::Sheet * table, int & row, int & number, bool last );
88
bool readColLayouts( QDomElement & content, KSpread::Sheet * table );
89
bool readRowsAndCells( QDomElement & content, KSpread::Sheet * table );
90
bool readCells( QDomElement & rowNode, KSpread::Sheet * table, int row, int & columns );
87
91
void convertFormula( QString & text, QString const & f ) const;
88
void loadFontStyle( KSpreadFormat * layout, QDomElement const * font ) const;
89
void readInStyle( KSpreadFormat * layout, QDomElement const & style );
90
void loadStyleProperties( KSpreadFormat * layout, QDomElement const & property ) const;
91
void loadBorder( KSpreadFormat * layout, QString const & borderDef, bPos pos ) const;
92
void loadTableMasterStyle( KSpreadSheet * table, QString const & stylename );
92
void loadFontStyle( KSpread::Format * layout, QDomElement const * font ) const;
93
void readInStyle( KSpread::Format * layout, QDomElement const & style );
94
void loadStyleProperties( KSpread::Format * layout, QDomElement const & property ) const;
95
void loadBorder( KSpread::Format * layout, QString const & borderDef, bPos pos ) const;
96
void loadTableMasterStyle( KSpread::Sheet * table, QString const & stylename );
93
97
QString * loadFormat( QDomElement * element,
94
FormatType & formatType,
98
KSpread::FormatType & formatType,
96
100
void checkForNamedAreas( QString & formula ) const;
97
101
void loadOasisCellValidation( const QDomElement&body );
98
void loadOasisValidation( KSpreadValidity* val, const QString& validationName );
99
void loadOasisValidationCondition( KSpreadValidity* val,QString &valExpression );
102
void loadOasisValidation( KSpread::Validity* val, const QString& validationName );
103
void loadOasisValidationCondition( KSpread::Validity* val,QString &valExpression );
100
104
void loadOasisAreaName( const QDomElement&body );
101
void loadOasisMasterLayoutPage( KSpreadSheet * table,KoStyleStack &styleStack );
102
void loadOasisValidationValue( KSpreadValidity* val, const QStringList &listVal );
105
void loadOasisMasterLayoutPage( KSpread::Sheet * table,KoStyleStack &styleStack );
106
void loadOasisValidationValue( KSpread::Validity* val, const QStringList &listVal );
103
107
QString translatePar( QString & par ) const;
104
void loadCondition( KSpreadCell *cell,const QDomElement &property );
105
void loadOasisCondition(KSpreadCell *cell,const QDomElement &property );
106
void loadOasisConditionValue( const QString &styleCondition, KSpreadConditional &newCondition );
107
void loadOasisCondition( QString &valExpression, KSpreadConditional &newCondition );
108
void loadOasisValidationValue( const QStringList &listVal, KSpreadConditional &newCondition );
108
void loadCondition( KSpread::Cell*cell,const QDomElement &property );
109
void loadOasisCondition(KSpread::Cell*cell,const QDomElement &property );
110
void loadOasisConditionValue( const QString &styleCondition, KSpread::Conditional &newCondition );
111
void loadOasisCondition( QString &valExpression, KSpread::Conditional &newCondition );
112
void loadOasisValidationValue( const QStringList &listVal, KSpread::Conditional &newCondition );
109
113
KoFilter::ConversionStatus loadAndParse( QDomDocument& doc, const QString& fileName,KoStore *m_store );
111
115
KoFilter::ConversionStatus openFile();