Mercurial > clickerconvert
comparison src/converter.cpp @ 89:80ff6591101a
Fix numVotesString containing spaces in xlsx
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 05 Oct 2016 15:44:29 +0200 |
parents | 08cca723e37d |
children | ccd1dbea2536 |
comparison
equal
deleted
inserted
replaced
88:d944cc7caf2d | 89:80ff6591101a |
---|---|
335 /* PercentStr was not a number. */ | 335 /* PercentStr was not a number. */ |
336 } | 336 } |
337 makeBar(html, percent, doc); | 337 makeBar(html, percent, doc); |
338 xlsx.write(row, 2, percent == 0 ? QVariant() : percent); | 338 xlsx.write(row, 2, percent == 0 ? QVariant() : percent); |
339 const QString numStr = choiceMatch.captured("num"); | 339 const QString numStr = choiceMatch.captured("num"); |
340 const QString numVotesString = QString("%1% | %2 Number of votes"). | 340 const QString numVotesStringHtml = QString("%1% | %2 Number of votes"). |
341 arg(percentStr.isEmpty() ? QStringLiteral("0") : percentStr, 8). | 341 arg(percentStr.isEmpty() ? QStringLiteral("0") : percentStr, 8). |
342 arg(numStr.isEmpty() ? QStringLiteral("0") : numStr, 3); | 342 arg(numStr.isEmpty() ? QStringLiteral("0") : numStr, 3); |
343 html << mChoiceVotesStyle.arg(numVotesString); | 343 const QString numVotesStringXls = QString("%1% | %2 Number of votes"). |
344 xlsx.write(row, 3, numVotesString, mChoiceVotesFmt); | 344 arg(percentStr.isEmpty() ? QStringLiteral("0") : percentStr). |
345 arg(numStr.isEmpty() ? QStringLiteral("0") : numStr); | |
346 html << mChoiceVotesStyle.arg(numVotesStringHtml); | |
347 xlsx.write(row, 3, numVotesStringXls, mChoiceVotesFmt); | |
345 xlsx.setRowHeight(row, CHOICE_ROW_HEIGHT); | 348 xlsx.setRowHeight(row, CHOICE_ROW_HEIGHT); |
346 /* As long as we can match a choice which is either before the next question | 349 /* As long as we can match a choice which is either before the next question |
347 or before the end of the document */ | 350 or before the end of the document */ |
348 choiceMatch = choiceEx.match(input, cursor); | 351 choiceMatch = choiceEx.match(input, cursor); |
349 row++; | 352 row++; |