Browse Source

Fix issue #65 :Don't give warning when empty format exists in style table

master
Debao Zhang 10 years ago
parent
commit
eeb9683924
  1. 5
      src/xlsx/xlsxworksheet.cpp

5
src/xlsx/xlsxworksheet.cpp

@ -1953,8 +1953,9 @@ void WorksheetPrivate::loadXmlSheetData(QXmlStreamReader &reader)
if (attributes.hasAttribute(QLatin1String("s"))) { //"s" == style index if (attributes.hasAttribute(QLatin1String("s"))) { //"s" == style index
int idx = attributes.value(QLatin1String("s")).toString().toInt(); int idx = attributes.value(QLatin1String("s")).toString().toInt();
format = workbook->styles()->xfFormat(idx); format = workbook->styles()->xfFormat(idx);
if (!format.isValid()) ////Empty format exists in styles xf table of real .xlsx files, see issue #65.
qDebug()<<QStringLiteral("<c s=\"%1\">Invalid style index: ").arg(idx)<<idx; //if (!format.isValid())
// qDebug()<<QStringLiteral("<c s=\"%1\">Invalid style index: ").arg(idx)<<idx;
} }
Cell::CellType cellType = Cell::NumberType; Cell::CellType cellType = Cell::NumberType;

Loading…
Cancel
Save