Changeset View
Changeset View
Standalone View
Standalone View
filters/sheets/excel/sidewinder/formulas.cpp
Context not available. | |||||
284 | case 0: s = ""; break; // NOPE... | 284 | case 0: s = ""; break; // NOPE... | ||
---|---|---|---|---|---|
285 | default: | 285 | default: | ||
286 | s = "Unknown"; | 286 | s = "Unknown"; | ||
287 | printf("Unhandled formula id %i as string\n", d->id); | 287 | qCDebug(lcSidewinder) << QString("Unhandled formula id %1 as string").arg(d->id); | ||
288 | break; | 288 | break; | ||
289 | } | 289 | } | ||
290 | 290 | | |||
Context not available. | |||||
393 | default: | 393 | default: | ||
394 | if (d->data.empty()) | 394 | if (d->data.empty()) | ||
395 | // WARNING this is unhandled case | 395 | // WARNING this is unhandled case | ||
396 | printf("Unhandled formula token with id %i\n", d->id); | 396 | qCDebug(lcSidewinder) << "Unhandled formula token with id" << d->id; | ||
397 | else | 397 | else | ||
398 | s = d->data.size(); | 398 | s = d->data.size(); | ||
399 | break; | 399 | break; | ||
Context not available. | |||||
1210 | unsigned cce = readU16(buf); | 1210 | unsigned cce = readU16(buf); | ||
1211 | //printf( "SIZE=%i\n", cce ); | 1211 | //printf( "SIZE=%i\n", cce ); | ||
1212 | if (cce < 7) { | 1212 | if (cce < 7) { | ||
1213 | printf("Error: Invalid size %i for formula areaMap of type %i\n", cce, type); | 1213 | qCDebug(lcSidewinder) << QString("Error: Invalid size %1 for formula areaMap of type %2").arg(cce).arg(type); | ||
1214 | return QString(); | 1214 | return QString(); | ||
1215 | } | 1215 | } | ||
1216 | 1216 | | |||
Context not available. | |||||
1400 | #warning TODO Implement FormulaToken::array() | 1400 | #warning TODO Implement FormulaToken::array() | ||
1401 | #endif | 1401 | #endif | ||
1402 | 1402 | | |||
1403 | printf("Unhandled formula array-token with row=%i and column=%i\n", row, col); | 1403 | qCDebug(lcSidewinder) << QString("Unhandled formula array-token with row=%1 and column=%2").arg(row).arg(col); | ||
1404 | 1404 | | |||
1405 | /* | 1405 | /* | ||
1406 | unsigned char buf[2]; | 1406 | unsigned char buf[2]; | ||
Context not available. | |||||
1478 | FormulaTokens tokens; | 1478 | FormulaTokens tokens; | ||
1479 | const unsigned formula_len = readU16(data + pos); | 1479 | const unsigned formula_len = readU16(data + pos); | ||
1480 | if (formula_len + pos + 2 > size) { | 1480 | if (formula_len + pos + 2 > size) { | ||
1481 | std::cerr << "formula is longer than available data" << std::endl; | 1481 | qCWarning(lcSidewinder) << "formula is longer than available data"; | ||
1482 | return tokens; | 1482 | return tokens; | ||
1483 | } | 1483 | } | ||
1484 | for (unsigned j = pos + 2; j < size;) { | 1484 | for (unsigned j = pos + 2; j < size;) { | ||
Context not available. | |||||
1772 | } else { | 1772 | } else { | ||
1773 | // "2.5.198.58 PtgExp" says that if its not a sharedFormula then it's an indication that the | 1773 | // "2.5.198.58 PtgExp" says that if its not a sharedFormula then it's an indication that the | ||
1774 | // result is an reference to cells. So, we can savly ignore that case... | 1774 | // result is an reference to cells. So, we can savly ignore that case... | ||
1775 | std::cout << "MATRIX first=%i second=" << formulaCellPos.first << " " << formulaCellPos.second << std::endl; | 1775 | qCDebug(lcSidewinder) << "MATRIX first=%i second=" << formulaCellPos.first << formulaCellPos.second; | ||
1776 | } | 1776 | } | ||
1777 | break; | 1777 | break; | ||
1778 | } | 1778 | } | ||
Context not available. | |||||
1784 | if(dt) | 1784 | if(dt) | ||
1785 | stack.push_back(dataTableFormula(row, col, dt)); | 1785 | stack.push_back(dataTableFormula(row, col, dt)); | ||
1786 | } else { | 1786 | } else { | ||
1787 | std::cout << "TABLE first=%i second=" << formulaCellPos.first << " " << formulaCellPos.second << std::endl; | 1787 | qCDebug(lcSidewinder) << "TABLE first=%i second=" << formulaCellPos.first << formulaCellPos.second; | ||
1788 | } | 1788 | } | ||
1789 | break; | 1789 | break; | ||
1790 | } | 1790 | } | ||
Context not available. | |||||
1821 | case FormulaToken::MemNoMemN: | 1821 | case FormulaToken::MemNoMemN: | ||
1822 | default: | 1822 | default: | ||
1823 | // FIXME handle this ! | 1823 | // FIXME handle this ! | ||
1824 | std::cout << "Unhandled token=" << token.idAsString() << std::endl; | 1824 | qCDebug(lcSidewinder) << "Unhandled token=" << token.idAsString(); | ||
1825 | stack.push_back(QString("Unknown")); | 1825 | stack.push_back(QString("Unknown")); | ||
1826 | break; | 1826 | break; | ||
1827 | }; | 1827 | }; | ||
Context not available. |