Add basic url type support for Worksheet::write()

This commit is contained in:
Debao Zhang
2013-09-02 14:22:42 +08:00
parent 26e099bd06
commit 7f7fa7e9fa
5 changed files with 157 additions and 1 deletions
+17
View File
@@ -51,6 +51,20 @@ struct XlsxCellData
Format *format;
};
struct XlsxUrlData
{
XlsxUrlData(int linkType=1, const QString &url=QString(), const QString &location=QString(), const QString &tip=QString()) :
linkType(linkType), url(url), location(location), tip(tip)
{
}
int linkType;
QString url;
QString location; //location string
QString tip;
};
struct XlsxRowInfo
{
XlsxRowInfo(double height, Format *format, bool hidden) :
@@ -89,10 +103,13 @@ public:
void calculateSpans();
void writeSheetData(XmlStreamWriter &writer);
void writeCellData(XmlStreamWriter &writer, int row, int col, XlsxCellData *cell);
void writeHyperlinks(XmlStreamWriter &writer);
Workbook *workbook;
QMap<int, QMap<int, XlsxCellData *> > cellTable;
QMap<int, QMap<int, QString> > comments;
QMap<int, QMap<int, XlsxUrlData *> > urlTable;
QStringList externUrlList;
QMap<int, XlsxRowInfo *> rowsInfo;
QList<XlsxColumnInfo *> colsInfo;
QMap<int, XlsxColumnInfo *> colsInfoHelper;//Not owns the XlsxColumnInfo