# HG changeset patch # User Andre Heinecke # Date 1475675069 -7200 # Node ID 80ff6591101afca9ed90ddd92dc8898b4d1998e0 # Parent d944cc7caf2de136c2ce40db9bd7e602d44adf64 Fix numVotesString containing spaces in xlsx diff -r d944cc7caf2d -r 80ff6591101a src/converter.cpp --- a/src/converter.cpp Wed Oct 05 15:43:30 2016 +0200 +++ b/src/converter.cpp Wed Oct 05 15:44:29 2016 +0200 @@ -337,11 +337,14 @@ 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"). + const QString numVotesStringHtml = QString("%1% | %2 Number of votes"). arg(percentStr.isEmpty() ? QStringLiteral("0") : percentStr, 8). arg(numStr.isEmpty() ? QStringLiteral("0") : numStr, 3); - html << mChoiceVotesStyle.arg(numVotesString); - xlsx.write(row, 3, numVotesString, mChoiceVotesFmt); + const QString numVotesStringXls = QString("%1% | %2 Number of votes"). + arg(percentStr.isEmpty() ? QStringLiteral("0") : percentStr). + arg(numStr.isEmpty() ? QStringLiteral("0") : numStr); + html << mChoiceVotesStyle.arg(numVotesStringHtml); + xlsx.write(row, 3, numVotesStringXls, mChoiceVotesFmt); xlsx.setRowHeight(row, CHOICE_ROW_HEIGHT); /* As long as we can match a choice which is either before the next question or before the end of the document */ diff -r d944cc7caf2d -r 80ff6591101a src/l10n/main_de_DE.ts --- a/src/l10n/main_de_DE.ts Wed Oct 05 15:43:30 2016 +0200 +++ b/src/l10n/main_de_DE.ts Wed Oct 05 15:44:29 2016 +0200 @@ -31,12 +31,12 @@ Die Datei "%1" konnte nicht geƶffnet werden. - + Failed to parse input document. Fehler bei der verarbeitung des Eingabedokuments. - + Saving the XLSX document failed. Das erstellen des XLSX Dokuments ist fehlgeschlagen.