20#include <filterbase.h>
22FilterBase::FilterBase() : TQObject() {
27FilterBase::FilterBase(TQStringList &oleStreams) : TQObject() {
29 m_oleStreams = oleStreams;
32bool FilterBase::filter() {
37 const unsigned height = 841;
38 const unsigned width = 595;
39 const unsigned hMargin = 28;
40 const unsigned vMargin = 42;
42 newstr = TQString( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE DOC >\n"
43 "<DOC author=\"Reginald Stadlbauer and Torben Weis\" email=\"reggie@kde.org and weis@kde.org\" editor=\"KWord\" mime=\"application/x-kword\">\n"
44 " <PAPER format=\"1\" ptWidth=\"595\" ptHeight=\"841\" mmWidth =\"210\" mmHeight=\"297\" inchWidth =\"8.26772\" inchHeight=\"11.6929\" orientation=\"0\" columns=\"1\" ptColumnspc=\"2\" mmColumnspc=\"1\" inchColumnspc=\"0.0393701\" hType=\"0\" fType=\"0\" ptHeadBody=\"9\" ptFootBody=\"9\" mmHeadBody=\"3.5\" mmFootBody=\"3.5\" inchHeadBody=\"0.137795\" inchFootBody=\"0.137795\">\n"
45 " <PAPERBORDERS mmLeft=\"10\" mmTop=\"15\" mmRight=\"10\" mmBottom=\"15\" ptLeft=\"");
46 newstr.append(TQString::number(hMargin));
47 newstr.append( "\" ptTop=\"");
48 newstr.append(TQString::number(vMargin));
49 newstr.append( "\" ptRight=\"");
50 newstr.append(TQString::number(hMargin));
51 newstr.append( "\" ptBottom=\"");
52 newstr.append(TQString::number(vMargin));
53 newstr.append( "\" inchLeft=\"0.393701\" inchTop=\"0.590551\" inchRight=\"0.393701\" inchBottom=\"0.590551\"/>\n"
55 " <ATTRIBUTES processing=\"0\" standardpage=\"1\" hasHeader=\"0\" hasFooter=\"0\" unit=\"mm\"/>\n"
57 " <START value=\"1\"/>\n"
58 " <FORMAT superscript=\"1\" type=\"1\"/>\n"
59 " <FIRSTPARAG ref=\"(null)\"/>\n"
63 " <FRAMESET frameType=\"1\" frameInfo=\"0\" removeable=\"0\" visible=\"1\">\n"
65 newstr.append(TQString::number(hMargin));
66 newstr.append( "\" top=\"");
67 newstr.append(TQString::number(vMargin));
68 newstr.append( "\" right=\"");
69 newstr.append(TQString::number(width - hMargin));
70 newstr.append( "\" bottom=\"");
71 newstr.append(TQString::number(height - vMargin));
72 newstr.append( "\" runaround=\"1\" runaGapPT=\"2\" runaGapMM=\"1\" runaGapINCH=\"0.0393701\" lWidth=\"1\" lRed=\"255\" lGreen=\"255\" lBlue=\"255\" lStyle=\"0\" rWidth=\"1\" rRed=\"255\" rGreen=\"255\" rBlue=\"255\" rStyle=\"0\" tWidth=\"1\" tRed=\"255\" tGreen=\"255\" tBlue=\"255\" tStyle=\"0\" bWidth=\"1\" bRed=\"255\" bGreen=\"255\" bBlue=\"255\" bStyle=\"0\" bkRed=\"255\" bkGreen=\"255\" bkBlue=\"255\" bleftpt=\"0\" bleftmm=\"0\" bleftinch=\"0\" brightpt=\"0\" brightmm=\"0\" brightinch=\"0\" btoppt=\"0\" btopmm=\"0\" btopinch=\"0\" bbottompt=\"0\" bbottommm=\"0\" bbottominch=\"0");
73 newstr.append( "\" autoCreateNewFrame=\"1\" newFrameBehaviour=\"0\"/>\n"
76 newstr.append( "Cannot import OLE streams of type: ");
77 newstr.append(m_oleStreams.join( ","));
78 newstr.append( "</TEXT>\n"
84 m_part=TQDomDocument( "doc");
85 m_part.setContent(newstr);
91#include <filterbase.moc>
|