diff src/main.cpp @ 38:5354cbda7188

Fix HTML Layout. Support multiple formats at once. More handling. This commit is a bad mix of multiple changes. It addresses: - HTML Width is now relative and should fix some pdf creation problems. - Format is now taken from the extension of the file names provided. - Multiple file names are accepted at once. - Parser now handles missing values in Multiple choice answers - Parser now handles unfilled multiple choice values
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 15 Apr 2016 15:19:04 +0200
parents 927794e3cc52
children 36ee5dd46fd3
line wrap: on
line diff
--- a/src/main.cpp	Fri Apr 15 15:15:44 2016 +0200
+++ b/src/main.cpp	Fri Apr 15 15:19:04 2016 +0200
@@ -129,24 +129,11 @@
         parser.showHelp(1);
     }
 
-    ConvertFormat fmt = Format_XLSX;
-    /* Initialize the converter. */
-    const QString format = parser.value("format").toLower();
-    if (format == "xlsx" || format.isEmpty()) {
-        fmt = Format_XLSX;
-    } else if (format == "html") {
-        fmt = Format_HTML;
-    } else if (format == "pdf") {
-        fmt = Format_PDF;
-    } else {
-        qCritical() << "Format: " << parser.value("format") << "not supported";
-        exit(1);
-    }
     QString infile;
     if (args.size()) {
         infile = args.first();
     }
-    Converter conv(infile, parser.value("output"), fmt,
+    Converter conv(infile, parser.values("output"),
                    parser.value("title"));
 
     conv.start();
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)