Mercurial > clickerconvert
comparison src/converter.cpp @ 81:f3481e9e44b2
Pre align number of votes
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 05 Oct 2016 14:28:53 +0200 |
parents | 2f81925b0eee |
children | 9e3c05a03a6f |
comparison
equal
deleted
inserted
replaced
80:2f81925b0eee | 81:f3481e9e44b2 |
---|---|
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 numVotesString = QString("<pre>%1% | %2 Number of votes</pre> "). |
341 arg(percentStr.isEmpty() ? QStringLiteral("0") : percentStr). | 341 arg(percentStr.isEmpty() ? QStringLiteral("0") : percentStr, 8). |
342 arg(numStr.isEmpty() ? QStringLiteral("0") : numStr); | 342 arg(numStr.isEmpty() ? QStringLiteral("0") : numStr, 3); |
343 html << mChoiceVotesStyle.arg(numVotesString.toHtmlEscaped()); | 343 html << mChoiceVotesStyle.arg(numVotesString); |
344 xlsx.write(row, 3, numVotesString, mChoiceVotesFmt); | 344 xlsx.write(row, 3, numVotesString, mChoiceVotesFmt); |
345 xlsx.setRowHeight(row, CHOICE_ROW_HEIGHT); | 345 xlsx.setRowHeight(row, CHOICE_ROW_HEIGHT); |
346 /* As long as we can match a choice which is either before the next question | 346 /* As long as we can match a choice which is either before the next question |
347 or before the end of the document */ | 347 or before the end of the document */ |
348 choiceMatch = choiceEx.match(input, cursor); | 348 choiceMatch = choiceEx.match(input, cursor); |