Add a private sheetId() member for Worksheet

This commit is contained in:
Debao Zhang
2013-10-24 17:04:25 +08:00
parent afbf4effbf
commit 92a415425e
6 changed files with 36 additions and 19 deletions
+11 -3
View File
@@ -195,13 +195,15 @@ int WorksheetPrivate::checkDimensions(int row, int col, bool ignore_row, bool ig
/*!
* \brief Worksheet::Worksheet
* \param name Name of the worksheet
* \param index Index of the worksheet in the workbook
* \param parent
* \param id : An integer representing the internal id of the
* sheet which is used by .xlsx revision part.
* (Note: id is not the index of the sheet in workbook)
*/
Worksheet::Worksheet(const QString &name, Workbook *workbook) :
Worksheet::Worksheet(const QString &name, int id, Workbook *workbook) :
d_ptr(new WorksheetPrivate(this))
{
d_ptr->name = name;
d_ptr->id = id;
if (!workbook) //For unit test propose only. Ignore the memery leak.
workbook = new Workbook;
d_ptr->workbook = workbook;
@@ -253,6 +255,12 @@ void Worksheet::setSelected(bool select)
d->selected = select;
}
int Worksheet::sheetId() const
{
Q_D(const Worksheet);
return d->id;
}
void Worksheet::setRightToLeft(bool enable)
{
Q_D(Worksheet);