Mercurial > clickerconvert
diff src/converter.cpp @ 86:08cca723e37d
Move pre into html style to keep it out of xlsx
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 05 Oct 2016 14:59:20 +0200 |
parents | f505df84380d |
children | 80ff6591101a |
line wrap: on
line diff
--- a/src/converter.cpp Wed Oct 05 14:58:49 2016 +0200 +++ b/src/converter.cpp Wed Oct 05 14:59:20 2016 +0200 @@ -73,7 +73,7 @@ "><hr/>%1<hr/></td></tr>"); mAnswerChoiceStyle= QStringLiteral("<tr><td colspan='3' style='text-align: left; font-size: 11pt;'>Answer</td></tr>"); mChoiceTextStyle= QStringLiteral("<tr><td align='right' style='vertical-align: middle; font-size:11pt;'>%1</td>"); - mChoiceVotesStyle = QStringLiteral("<td align='left' style='vertical-align: middle; font-size:10pt;'>%1</td></tr>"); + mChoiceVotesStyle = QStringLiteral("<td align='left' style='vertical-align: middle; font-size:10pt;'><pre>%1</pre></td></tr>"); mAnswerTextStyle = QStringLiteral("<tr><td colspan='3' style='font-weight: bold;vertical-algin: middle;" "font-size:11pt;'>Answer<hr/></td></tr>"); mFreeTextStyle = QStringLiteral("<tr><td colspan='3'; style='font-size:11pt;'>%1<hr/></td></tr>"); @@ -337,7 +337,7 @@ makeBar(html, percent, doc); xlsx.write(row, 2, percent == 0 ? QVariant() : percent); const QString numStr = choiceMatch.captured("num"); - const QString numVotesString = QString("<pre>%1% | %2 Number of votes</pre> "). + const QString numVotesString = QString("%1% | %2 Number of votes"). arg(percentStr.isEmpty() ? QStringLiteral("0") : percentStr, 8). arg(numStr.isEmpty() ? QStringLiteral("0") : numStr, 3); html << mChoiceVotesStyle.arg(numVotesString);