Add new worksheet() API for Document class
This commit is contained in:
@@ -592,6 +592,15 @@ Workbook *Document::workbook() const
|
||||
return d->workbook.data();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Returns the worksheet object named \a sheetName.
|
||||
*/
|
||||
Worksheet *Document::worksheet(const QString &sheetName) const
|
||||
{
|
||||
Q_D(const Document);
|
||||
return d->workbook->worksheet(worksheetNames().indexOf(sheetName));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Creates and append an document with name \a name.
|
||||
* Return true if success.
|
||||
|
||||
@@ -92,6 +92,7 @@ public:
|
||||
bool deleteWorksheet(const QString &name);
|
||||
|
||||
Workbook *workbook() const;
|
||||
Worksheet *worksheet(const QString &sheetName) const;
|
||||
Worksheet *currentWorksheet() const;
|
||||
Q_DECL_DEPRECATED bool setSheetName(const QString &name);
|
||||
Q_DECL_DEPRECATED void setCurrentWorksheet(int index);
|
||||
|
||||
Reference in New Issue
Block a user