changeset 20:df7936065450

Add default title
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 30 Mar 2016 16:56:18 +0200
parents 4ecb91aaf33f
children 0b66b10a287d
files src/constants.h src/converter.cpp
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/constants.h	Wed Mar 30 16:56:05 2016 +0200
+++ b/src/constants.h	Wed Mar 30 16:56:18 2016 +0200
@@ -77,4 +77,6 @@
 
 #define TEXT_IDENTIFIER "Answer"
 
+#define DEFAULT_TITLE QStringLiteral("Clicker-Fragen und Antworten")
+
 #endif // CONSTANTS_H
--- a/src/converter.cpp	Wed Mar 30 16:56:05 2016 +0200
+++ b/src/converter.cpp	Wed Mar 30 16:56:18 2016 +0200
@@ -117,9 +117,11 @@
     if (!mTitle.isEmpty()) {
         // Set the title of the Questionaire
         xlsx.write(row++, 1, mTitle, mTitleFmt);
-        xlsx.mergeCells("A1:C1");
-        xlsx.setRowHeight(1, TITLE_ROW_HEIGHT);
+    } else {
+        xlsx.write(row++, 1, DEFAULT_TITLE, mTitleFmt);
     }
+    xlsx.mergeCells("A1:C1");
+    xlsx.setRowHeight(1, TITLE_ROW_HEIGHT);
 
     const QString input = instream.readAll();
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)