changeset 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
files src/converter.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/converter.cpp	Wed Oct 05 14:28:53 2016 +0200
+++ b/src/converter.cpp	Wed Oct 05 14:43:06 2016 +0200
@@ -407,6 +407,10 @@
                     const QString lastRow = xlsx.read(row - 1, 26).toString();
                     int unquotedLen = textMatch.capturedStart() - cursor;
                     const QString unquoted = input.mid(cursor, unquotedLen);
+                    if (unquoted.startsWith("\n\n")) {
+                        qDebug() << "Double newline outside quote. Assuming a question follows.";
+                        break;
+                    }
                     qDebug() << "Found inner quoted string: " << unquoted;
                     /* Now combine */
                     QString combined = QString("%1\"%2\"%3").arg(lastRow).
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)