filters
document.cc00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <kdebug.h>
00025
00026 #include "document.h"
00027
00028 Document::Document(const KoStore* in, QString fileOut):
00029 XmlParser(in), _file(fileOut), _in( in )
00030 {
00031
00032 kdDebug(30522) << fileOut.latin1() << endl;
00033 _filename = fileOut;
00034
00035
00036 Config::instance()->setEmbeded(false);
00037
00038 }
00039
00040 Document::~Document()
00041 {
00042
00043 }
00044
00045 void Document::analyse()
00046 {
00047 QDomNode balise;
00048 balise = init();
00049 kdDebug(30522) << "ANALYSE A DOC" << endl;
00050 _document.analyse(balise);
00051 kdDebug(30522) << "END ANALYSE" << endl;
00052 }
00053
00054 void Document::generate()
00055 {
00056 if(_file.open(IO_WriteOnly))
00057 {
00058 kdDebug(30522) << "GENERATION" << endl;
00059 _out.setDevice(&_file);
00060 _document.generate(_out, !isEmbeded());
00061
00062 _file.close();
00063 }
00064 else
00065 kdDebug(30522) << "Can't use the file ..." << endl;
00066 }
|