changeset 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
files src/converter.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/converter.cpp	Wed Oct 05 14:26:03 2016 +0200
+++ b/src/converter.cpp	Wed Oct 05 14:28:53 2016 +0200
@@ -337,10 +337,10 @@
                 makeBar(html, percent, doc);
                 xlsx.write(row, 2, percent == 0 ? QVariant() : percent);
                 const QString numStr = choiceMatch.captured("num");
-                const QString numVotesString = QString("%1% | %2 Number of votes").
-                           arg(percentStr.isEmpty() ? QStringLiteral("0") : percentStr).
-                           arg(numStr.isEmpty() ? QStringLiteral("0") : numStr);
-                html << mChoiceVotesStyle.arg(numVotesString.toHtmlEscaped());
+                const QString numVotesString = QString("<pre>%1% | %2 Number of votes</pre> ").
+                           arg(percentStr.isEmpty() ? QStringLiteral("0") : percentStr, 8).
+                           arg(numStr.isEmpty() ? QStringLiteral("0") : numStr, 3);
+                html << mChoiceVotesStyle.arg(numVotesString);
                 xlsx.write(row, 3, numVotesString, mChoiceVotesFmt);
                 xlsx.setRowHeight(row, CHOICE_ROW_HEIGHT);
                 /* As long as we can match a choice which is either before the next question
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)