]> Git trees. - libqmvoc.git/commitdiff
kvtml 2 format is the default for writing now. old format can be written by passing...
authorJeremy Paul Whiting <jpwhiting@kde.org>
Sat, 11 Aug 2007 16:10:12 +0000 (16:10 +0000)
committerJeremy Paul Whiting <jpwhiting@kde.org>
Sat, 11 Aug 2007 16:10:12 +0000 (16:10 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=698955

keduvocdocument/keduvocdocument.cpp
keduvocdocument/keduvocdocument.h

index c35078fa600e53dbcfd3903ce8717a43d117e859..19683b881f7bf83470a698976f4f035bd956cfe3 100644 (file)
@@ -335,10 +335,17 @@ bool KEduVocDocument::saveAs(const KUrl & url, FileType ft, const QString & gene
 
     switch (ft) {
       case kvtml: {
-        KEduVocKvtmlWriter kvtmlWriter(&f);
+               // write version 2 file
+        KEduVocKvtml2Writer kvtmlWriter(&f);
         saved = kvtmlWriter.writeDoc(this, generator);
       }
       break;
+         case kvtml1: {
+               // write old version 1 file
+               KEduVocKvtmlWriter kvtmlWriter(&f);
+               saved = kvtmlWriter.writeDoc(this, generator);
+           }
+               break;
 /** @todo include the csv write again, as soon as it's ported to the new classes
       case csv: {
         KEduVocCsvWriter csvWriter(&f);
index 6cc338aa4051c0cdb2e12ecdd3e6ab6761074454..b162326dda25b221cffaf881addb5be168e93fea 100644 (file)
@@ -56,7 +56,8 @@ public:
                   pauker,
                   vokabeln,
                   xdxf,
-                  csv };
+                  csv,
+                                 kvtml1 };
 
   /**
    * Constructor for a KdeEdu vocabulary document