21#include <tqtextstream.h>
30bool Document::analyse(TQPtrList<Element>* root)
36 _body. analyse(Latex::instance()->getEnv(root, "document"));
42 kdWarning(documentclass != NULL) << "no documentclass found !" << endl;
43 TQPtrList<Param> params = documentclass->getOptions();
45 for ( param = params.first(); param; param = params.next() )
47 if(param->getKey() == "a4paper")
50 else if(param->getKey() == "11pt")
56bool Document::generate(KoStore* store)
58 TQDomDocument doc( "KWORD");
59 doc.appendChild(doc.createProcessingInstruction( "xml",
60 "version=\"1.0\" encoding=\"UTF-8\""));
63 TQDomElement root = doc.createElement( "DOC");
64 root.setAttribute( "editor", "LaTex Import Filter");
65 root.setAttribute( "mime", "application/x-kword");
66 root.setAttribute( "syntaxVersion", "1");
67 doc.appendChild(root);
74 TQDomElement body = doc.createElement( "FRAMESETS");
75 root.appendChild(body);
80 kdDebug(30522) << "serialize" << endl;
87 TQCString str = doc.toCString();
89 if(store->open( "root"))
91 store->write(( const char *)str, str.length());
bool analyse(Element *elt) Analyse the latex tree and keep data.
bool generate(TQDomElement &framesets, TQDomDocument &doc) Generate a kword document.
void serialize(KoStore *store, TQDomDocument tree) Copy the DOM tree in a file.
bool analyseDocumentClass(Command *documentclass) Analyse and get all information in a documentclass command.
|