26#include "fileheader.h"
31TQString Layout::_last_name;
32EType Layout::_last_counter;
39 _last_name = "STANDARD";
40 _last_counter = TL_NONE;
42 _counterType = TL_NONE;
47 _useHardBreakAfter = false;
48 _useHardBreak = false;
49 _keepLinesTogether = false;
60 kdDebug(30522) << "ANALYSE OF THE BEGINING OF A LAYOUT" << endl;
63 for( int index= 0; index < getNbChild(balise); index++)
65 if(getChildName(balise, index).compare( "NAME")== 0)
67 kdDebug(30522) << "NAME : " << endl;
68 analyseName(getChild(balise, index));
70 else if(getChildName(balise, index).compare( "FOLLOWING")== 0)
72 kdDebug(30522) << "FOLLOWING : " << endl;
73 analyseFollowing(getChild(balise, index));
75 else if(getChildName(balise, index).compare( "FLOW")== 0)
77 kdDebug(30522) << "FLOW : " << endl;
78 analyseEnv(getChild(balise, index));
80 else if(getChildName(balise, index).compare( "PAGEBREAKING")== 0)
82 kdDebug(30522) << "PAGEBREAKING : " << endl;
83 analyseBreakLine(getChild(balise, index));
85 else if(getChildName(balise, index).compare( "COUNTER")== 0)
87 kdDebug(30522) << "COUNTER : " << endl;
88 analyseCounter(getChild(balise, index));
90 else if(getChildName(balise, index).compare( "FORMAT")== 0)
92 kdDebug(30522) << "FORMAT : " << endl;
93 analyseFormat(getChild(balise, index));
96 kdDebug(30522) << "END OF THE BEGINING OF A LAYOUT" << endl;
99void Layout::analyseName( const TQDomNode balise)
102 kdDebug(30522) << "PARAM" << endl;
103 setName(getAttr(balise, "value"));
111void Layout::analyseFollowing( const TQDomNode balise)
114 kdDebug(30522) << "PARAM" << endl;
115 setFollowing(getAttr(balise, "name"));
123void Layout::analyseEnv( const TQDomNode balise)
127 kdDebug(30522) << "PARAM" << endl;
128 if(getAttr(balise, "align").compare( "justify")== 0)
130 else if(getAttr(balise, "align").compare( "left")== 0)
132 else if(getAttr(balise, "align").compare( "right")== 0)
134 else if(getAttr(balise, "align").compare( "center")== 0)
138void Layout::analyseBreakLine( const TQDomNode balise)
141 kdDebug(30522) << "PARAM" << endl;
142 if(getAttr(balise, "linesTogether") != 0)
144 else if(getAttr(balise, "hardFrameBreak") != 0)
146 else if(getAttr(balise, "hardFrameBreakAfter") != 0)
157void Layout::analyseCounter( const TQDomNode balise)
160 kdDebug(30522) << "PARAM" << endl;
161 setCounterType(getAttr(balise, "type").toInt());
162 if(getCounterType() > TL_ARABIC && getCounterType() < TL_DISC_BULLET)
164 kdDebug(30522) << getCounterType() << endl;
165 FileHeader::instance()->useEnumerate();
167 setCounterDepth(getAttr(balise, "depth").toInt());
168 setCounterBullet(getAttr(balise, "bullet").toInt());
169 setCounterStart(getAttr(balise, "start").toInt());
170 setNumberingType(getAttr(balise, "numberingtype").toInt());
void analyseLayout(const TQDomNode) Helpfull functions.
void setName(TQString name) Modifiers.
|