]> git.lyx.org Git - lyx.git/blobdiff - src/convert/lyxconvert.cpp
Let paragraph::requestSpellcheck() consider contained insets
[lyx.git] / src / convert / lyxconvert.cpp
index 27f361f755cae9df10b40a8f14db582098be9917..52ad54bdad456e5b624038211cbe3de9c424bb8e 100644 (file)
@@ -1,8 +1,28 @@
-/*
-set cflags=`env PKG_CONFIG_PATH=/usr/local/qt5/lib/pkgconfig pkg-config --cflags Qt5Widgets`
-set libs=`env PKG_CONFIG_PATH=/usr/local/qt5/lib/pkgconfig pkg-config --libs --static Qt5Widgets`
-g++ -std=gnu++11 $cflags lyxconvert.cpp -o lyxconvert $libs
-*/
+/**
+ * \file lyxconvert.cpp
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Stephan Witt
+ * \author Enrico Forestieri
+ *
+ * Full author contact details are available in file CREDITS.
+ *
+ * The code implements an utility program using the Qt-Framework
+ * to convert an image from a given format to another one.
+ * The image format of the files is either auto detected by Qt or
+ * may explicitly specified with command line arguments.
+ *
+ * Syntax:
+ * lyxconvert [-d] [-f infmt] [-t outfmt] inputfile outputfile
+ *  -d   turn on debug messages
+ *  -f   format of input file (from)
+ *  -t   format of output file (to)
+ *
+ * Example to convert a compressed SVG image to PNG:
+ * lyxconvert image.svgz image.png
+ */
+
 #include <iostream>
 #include <QApplication>
 #include <QImage>
@@ -61,7 +81,7 @@ int main(int argc, char **argv)
                (char*)"-platform", (char*)"minimal",
                NULL };
        int  qtargsc = sizeof(qtargs) / sizeof(qtargs[0]) - 1;
-       bool debug = (1 == 0);
+       bool debug = false;
 
        while (arg < argc) {
                if ('-' == argv[arg][0] && !strcmp(argv[arg], "-platform")) {
@@ -71,7 +91,7 @@ int main(int argc, char **argv)
                } else if ('-' == argv[arg][0] && 't' == argv[arg][1]) {
                        oformat = argv[++arg]; arg++ ;
                } else if ('-' == argv[arg][0] && 'd' == argv[arg][1]) {
-                       debug = (1 == 1); arg++;
+                       debug = true; arg++;
                } else if ('-' == argv[arg][0] && 'V' == argv[arg][1]) {
                        version(myname);
                } else if ('-' == argv[arg][0]) {