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,10 +142,12 @@ bool Workbook::defineName(const QString &name, const QString &formula, const QSt
|
||||
formulaString = formula.mid(1);
|
||||
|
||||
int id=-1;
|
||||
for (int i=0; i<d->worksheets.size(); ++i) {
|
||||
if (d->worksheets[i]->sheetName() == scope) {
|
||||
id = i;
|
||||
break;
|
||||
if (!scope.isEmpty()) {
|
||||
for (int i=0; i<d->worksheets.size(); ++i) {
|
||||
if (d->worksheets[i]->sheetName() == scope) {
|
||||
id = d->worksheets[i]->sheetId();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user