Mercurial > clickerconvert
comparison src/converter.cpp @ 82:9e3c05a03a6f
Check for double newline in unquoted strings
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 05 Oct 2016 14:43:06 +0200 |
parents | f3481e9e44b2 |
children | f505df84380d |
comparison
equal
deleted
inserted
replaced
81:f3481e9e44b2 | 82:9e3c05a03a6f |
---|---|
405 break; | 405 break; |
406 } | 406 } |
407 const QString lastRow = xlsx.read(row - 1, 26).toString(); | 407 const QString lastRow = xlsx.read(row - 1, 26).toString(); |
408 int unquotedLen = textMatch.capturedStart() - cursor; | 408 int unquotedLen = textMatch.capturedStart() - cursor; |
409 const QString unquoted = input.mid(cursor, unquotedLen); | 409 const QString unquoted = input.mid(cursor, unquotedLen); |
410 if (unquoted.startsWith("\n\n")) { | |
411 qDebug() << "Double newline outside quote. Assuming a question follows."; | |
412 break; | |
413 } | |
410 qDebug() << "Found inner quoted string: " << unquoted; | 414 qDebug() << "Found inner quoted string: " << unquoted; |
411 /* Now combine */ | 415 /* Now combine */ |
412 QString combined = QString("%1\"%2\"%3").arg(lastRow). | 416 QString combined = QString("%1\"%2\"%3").arg(lastRow). |
413 arg(unquoted). | 417 arg(unquoted). |
414 arg(textMatch.captured(1).trimmed()); | 418 arg(textMatch.captured(1).trimmed()); |