MCPcopy Create free account
hub / github.com/KDE/labplot / dataRangeCanBeExportedToMatrix

Method dataRangeCanBeExportedToMatrix

src/backend/datasources/filters/XLSXFilter.cpp:751–767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749
750#ifdef HAVE_QXLSX
751bool XLSXFilterPrivate::dataRangeCanBeExportedToMatrix(const QXlsx::CellRange& range) const {
752 for (int i = range.firstRow(); i <= range.lastRow(); ++i) {
753 for (int j = range.firstColumn(); j <= range.lastColumn(); ++j) {
754 const auto cell = m_document->cellAt(i, j);
755 if (cell && cell->cellType() != QXlsx::Cell::CellType::NumberType) {
756 if (cell->cellType() == QXlsx::Cell::CellType::CustomType) {
757 bool ok = false;
758 cell->value().toDouble(&ok);
759 if (ok)
760 continue;
761 }
762 return false;
763 }
764 }
765 }
766 return true;
767}
768#endif
769
770QStringList XLSXFilterPrivate::sheets() const {

Callers

nothing calls this directly

Calls 4

cellTypeMethod · 0.80
firstColumnMethod · 0.45
cellAtMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected