/* insert your license here */

#include <excelexport.h>
#include <kdebug.h>
#include <kgenericfactory.h>


typedef KGenericFactory<ExcelExport, KoFilter> ExcelExportFactory;
//K_EXPORT_COMPONENT_FACTORY(libkspreadexcelexport, ExcelExportFactory("excelexport"))


ExcelExport::ExcelExport(KoFilter *, const char *, const TQStringList&) : KoFilter() {
}


KoFilter::ConversiontqStatus ExcelExport::convert(const TQCString& from, const TQCString& to) {
	// Double check that's we really what we want to do
	if ( ( (to != "application/excel") && (to != "application/msexcel") ) || from != "application/x-kspread") {
		kdWarning(0) << "Invalid mimetypes " << to << ", " << from << endl;
		return KoFilter::NotImplemented;
	}

	KSpreadLeader *leader = new KSpreadLeader(m_chain);
	ExcelWorker *worker = new ExcelWorker();
	leader->setWorker(worker);
	return leader->convert();
}


/*
KoFilter::ConversiontqStatus ExcelWorker::startDocument(KSpreadFilterProperty property) {
	return KoFilter::OK;
}


KoFilter::ConversiontqStatus ExcelWorker::startInfoLog(KSpreadFilterProperty property) {
	return KoFilter::OK;
}


KoFilter::ConversiontqStatus ExcelWorker::startInfoAuthor(KSpreadFilterProperty property) {
	return KoFilter::OK;
}


KoFilter::ConversiontqStatus ExcelWorker::startInfoAbout(KSpreadFilterProperty property) {
	return KoFilter::OK;
}


KoFilter::ConversiontqStatus ExcelWorker::startSpreadBook(KSpreadFilterProperty property) {
	return KoFilter::OK;
}


KoFilter::ConversiontqStatus ExcelWorker::startSpreadSheet(KSpreadFilterProperty property) {
	return KoFilter::OK;
}


KoFilter::ConversiontqStatus ExcelWorker::startSpreadCell(KSpreadFilterProperty property) {
	return KoFilter::OK;
}
*/

#include <excelexport.moc>
