You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.3 KiB
56 lines
1.3 KiB
2 years ago
|
// xlsxcellformula.h
|
||
|
|
||
|
#ifndef QXLSX_XLSXCELLFORMULA_H
|
||
|
#define QXLSX_XLSXCELLFORMULA_H
|
||
|
|
||
|
#include "xlsxglobal.h"
|
||
|
|
||
|
#include <QExplicitlySharedDataPointer>
|
||
|
|
||
|
class QXmlStreamWriter;
|
||
|
class QXmlStreamReader;
|
||
|
|
||
|
QT_BEGIN_NAMESPACE_XLSX
|
||
|
|
||
|
class CellFormulaPrivate;
|
||
|
class CellRange;
|
||
|
class Worksheet;
|
||
|
class WorksheetPrivate;
|
||
|
|
||
|
class QXLSX_EXPORT CellFormula
|
||
|
{
|
||
|
public:
|
||
|
enum FormulaType { NormalType, ArrayType, DataTableType, SharedType };
|
||
|
|
||
|
public:
|
||
|
CellFormula();
|
||
|
CellFormula(const char *formula, FormulaType type=NormalType);
|
||
|
CellFormula(const QString &formula, FormulaType type=NormalType);
|
||
|
CellFormula(const QString &formula, const CellRange &ref, FormulaType type);
|
||
|
CellFormula(const CellFormula &other);
|
||
|
~CellFormula();
|
||
|
|
||
|
public:
|
||
|
CellFormula &operator =(const CellFormula &other);
|
||
|
bool isValid() const;
|
||
|
|
||
|
FormulaType formulaType() const;
|
||
|
QString formulaText() const;
|
||
|
CellRange reference() const;
|
||
|
int sharedIndex() const;
|
||
|
|
||
|
bool operator == (const CellFormula &formula) const;
|
||
|
bool operator != (const CellFormula &formula) const;
|
||
|
|
||
|
bool saveToXml(QXmlStreamWriter &writer) const;
|
||
|
bool loadFromXml(QXmlStreamReader &reader);
|
||
|
private:
|
||
|
friend class Worksheet;
|
||
|
friend class WorksheetPrivate;
|
||
|
QExplicitlySharedDataPointer<CellFormulaPrivate> d;
|
||
|
};
|
||
|
|
||
|
QT_END_NAMESPACE_XLSX
|
||
|
|
||
|
#endif // QXLSX_XLSXCELLFORMULA_H
|