Fix defineName bug
sheetId is used in application inside, when save to/load from xml file, which will convert to/from localSheetId
This commit is contained in:
@@ -142,12 +142,14 @@ bool Workbook::defineName(const QString &name, const QString &formula, const QSt
|
|||||||
formulaString = formula.mid(1);
|
formulaString = formula.mid(1);
|
||||||
|
|
||||||
int id=-1;
|
int id=-1;
|
||||||
|
if (!scope.isEmpty()) {
|
||||||
for (int i=0; i<d->worksheets.size(); ++i) {
|
for (int i=0; i<d->worksheets.size(); ++i) {
|
||||||
if (d->worksheets[i]->sheetName() == scope) {
|
if (d->worksheets[i]->sheetName() == scope) {
|
||||||
id = i;
|
id = d->worksheets[i]->sheetId();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
d->definedNamesList.append(XlsxDefineNameData(name, formulaString, comment, id));
|
d->definedNamesList.append(XlsxDefineNameData(name, formulaString, comment, id));
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user