[Uml-devel] KDE/kdesdk/umbrello/umbrello

Ralf Habacker Ralf.Habacker at freenet.de
Fri Feb 20 12:54:31 UTC 2009


SVN commit 928936 by habacker:

added option "export-formats", which prints out a list of all supported export formats to stderr
The list gives the answer for bug 180031 - pdf isn't a supported export format
BUG:180031

 M  +8 -0      main.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/main.cpp #928935:928936
@@ -10,6 +10,7 @@
  ***************************************************************************/
 
 #include <unistd.h>
+#include <stdio.h>
 
 // kde includes
 #include <kaboutdata.h>
@@ -26,6 +27,7 @@
 #include "version.h"
 #include "umldoc.h"
 #include "cmdlineexportallviewsevent.h"
+#include "umlviewimageexportermodel.h"
 #include "umbrellosettings.h"
 
 
@@ -81,6 +83,7 @@
     KCmdLineOptions options;
     options.add("+[File]", ki18n("File to open"));
     options.add("export <extension>", ki18n("export diagrams to extension and exit"));
+    options.add("export-formats", ki18n("list available export extensions"));
     options.add("directory <url>", ki18n("the local directory to save the exported diagrams in"), I18N_NOOP("the directory of the file"));
     options.add("use-folders", ki18n("keep the tree structure used to store the views in the document in the target directory"));
     KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
@@ -101,6 +104,11 @@
 
         initDocument(args);
 
+        if (args->isSet("export-formats")) {
+            foreach(QString type, UMLViewImageExporterModel::supportedImageTypes())
+                fprintf(stderr,"%s\n",qPrintable(type));
+            return 0;
+        }
         // export option
         QStringList exportOpt = args->getOptionList("export");
         if (exportOpt.size() > 0) {




More information about the umbrello-devel mailing list