20#include "aiparserbase.h"
21#include "ai88handler.h"
22#include "ai3handler.h"
24#include <tqstringlist.h>
38 CommentOperation action;
39} CommentOperationMapping;
41static AIOperationMapping aiMappings[] = {
42 {
"k", AIO_SetFillColorCMYK },
43 {
"K", AIO_SetStrokeColorCMYK },
44 {
"g", AIO_SetFillColorGray },
45 {
"G", AIO_SetStrokeColorGray },
46 {
"x", AIO_SetFillColorCustom },
47 {
"X", AIO_SetStrokeColorCustom },
48 {
"p", AIO_SetFillPattern },
49 {
"P", AIO_SetStrokePattern },
50 {
"O", AIO_SetFillOverprinting },
51 {
"R", AIO_SetStrokeOverprinting },
52 {
"i", AIO_SetFlatness },
53 {
"J", AIO_SetLineCap },
54 {
"j", AIO_SetLineJoin },
55 {
"M", AIO_SetMiterLimit },
56 {
"w", AIO_SetLineWidth },
58 {
"q", AIO_BeginGroupClip },
59 {
"Q", AIO_EndGroupClip },
61 {
"l", AIO_LineToSmooth },
62 {
"L", AIO_LineToCorner },
63 {
"c", AIO_CurveToSmooth },
64 {
"C", AIO_CurveToCorner },
66 {
"v", AIO_CurveToOmitC1Smooth },
67 {
"V", AIO_CurveToOmitC1Corner },
68 {
"y", AIO_CurveToOmitC2Smooth },
69 {
"Y", AIO_CurveToOmitC2Corner },
71 {
"H", AIO_PathIgnoreNoReset },
72 {
"h", AIO_PathIgnoreNoResetClose },
73 {
"W", AIO_PathClipPath },
74 {
"N", AIO_PathIgnoreReset },
75 {
"n", AIO_PathIgnoreResetClose },
76 {
"F", AIO_PathFillNonZero },
77 {
"f", AIO_PathFillNonZeroClose },
78 {
"B", AIO_PathFillNoReset },
79 {
"b", AIO_PathFillNoResetClose },
80 {
"S", AIO_PathStroke },
81 {
"s", AIO_PathStrokeClose },
82 {
"D", AIO_SetWindingOrder },
83 {
"Z", AIO_FontEncoding },
84 {
"E", AIO_PatternDefinition },
85 {
"A", AIO_LockElement },
87 {
"z", AIO_SetCurrentText },
88 {
"a", AIO_TextBlockFillStroke },
89 {
"e", AIO_TextBlockFill },
90 {
"I", AIO_TextBlockAppend },
91 {
"o", AIO_TextBlockIgnore },
92 {
"r", AIO_TextBlockStroke },
93 {
"t", AIO_TextOutput },
94 {
"T", AIO_TextBlockEnd },
95 {
"`", AIO_GsaveIncludeDocument },
96 {
"~", AIO_Grestore },
98 {
"u", AIO_BeginGroupNoClip },
99 {
"U", AIO_EndGroupNoClip },
100 {
"*u", AIO_BeginCombination },
101 {
"*U", AIO_EndCombination },
103 {
"XR", AIO_SetFillMode },
108static PSOperationMapping psMappings[] = {
110 {
"exec", PSO_Exec },
111 {
"string", PSO_String },
112 {
"bind", PSO_Bind },
114 {
"userdict", PSO_Userdict },
115 {
"dict", PSO_Dict },
117 {
"begin", PSO_Begin },
122static CommentOperationMapping commentMappings[] = {
123 {
"BeginProlog", CO_BeginProlog },
124 {
"BeginSetup", CO_BeginSetup },
125 {
"BeginProcSet", CO_BeginProcSet },
126 {
"BeginResource", CO_BeginResource },
127 {
"BeginEncoding", CO_BeginEncoding },
128 {
"BeginPattern", CO_BeginPattern },
129 {
"BeginDocument", CO_BeginPattern },
130 {
"Trailer", CO_Trailer },
131 {
"EndProlog", CO_EndProlog },
132 {
"EndSetup", CO_EndSetup },
133 {
"EndProcSet", CO_EndProcSet },
134 {
"EndResource", CO_EndResource },
135 {
"EndEncoding", CO_EndEncoding },
136 {
"EndPattern", CO_EndPattern },
137 {
"EndDocument", CO_EndDocument },
139 {
"Title", CO_Title },
140 {
"Creator", CO_Creator },
142 {
"EOF", CO_Ignore },
143 {
"Note", CO_Ignore },
144 {
"EndComments", CO_Ignore },
145 {
"PS-Adobe", CO_Ignore },
147 {
"BoundingBox", CO_BoundingBox },
148 {
"TemplateBox", CO_TemplateBox },
149 {
"AI3_Margin", CO_Margin },
152 {
"CreationDate", CO_CreationDate },
153 {
"DocumentFonts", CO_DocumentFonts },
154 {
"DocumentFiles", CO_DocumentFiles },
155 {
"ColorUsage", CO_ColorUsage },
156 {
"DocumentProcSets", CO_DocumentProcSets },
157 {
"DocumentSuppliedProcSets", CO_DocumentSuppliedProcSets },
159 {
"DocumentProcessColors", CO_DocumentProcessColors },
160 {
"DocumentCustomColors", CO_DocumentCustomColors },
161 {
"CMYKCustomColor", CO_CMYKCustomColor },
162 {
"TileBox", CO_TileBox },
163 {
"%+", CO_Continuation },
165 {
"Template", CO_Template },
166 {
"PageOrigin", CO_PageOrigin },
167 {
"PrinterName", CO_PrinterName },
168 {
"PrinterRect", CO_PrinterRect },
171 {
"DocumentNeededResources", CO_DocumentNeededResources },
174 {
"IncludeFont", CO_IncludeFont },
175 {
"BeginBrushPattern", CO_BeginBrushPattern },
176 {
"EndBrushPattern", CO_EndBrushPattern },
177 {
"BeginGradient", CO_BeginGradient },
178 {
"EndGradient", CO_EndGradient },
179 {
"BeginPalette", CO_BeginPalette },
180 {
"EndPalette", CO_EndPalette },
182 {
"IncludeFile", CO_IncludeFile },
183 {
"IncludeResource", CO_IncludeResource },
188AIParserBase::AIParserBase() : m_debug(false), m_ignoring(false), m_sink (DS_Other), m_continuationMode(CM_None)
190 m_gstateHandler = NULL;
191 m_structureHandler = NULL;
192 m_pathHandler = NULL;
193 m_miscGStateHandler = NULL;
194 m_documentHandler = NULL;
195 m_moduleHandler = NULL;
196 m_embeddedHandler = NULL;
201AIParserBase::~AIParserBase(){
202 delete m_ai88Handler;
207bool AIParserBase::parse (TQIODevice& fin){
208 return AILexer::parse (fin);
211void AIParserBase::gotComment (
const char *value) {
212 int llx, lly, urx, ury;
214 CommentOperation cop = getCommentOperation (value);
216 case CO_BeginDocument :
217 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_Document, value);
219 case CO_EndDocument :
220 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_Document, value);
222 case CO_BeginPattern :
223 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_Pattern, value);
226 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_Pattern, value);
228 case CO_BeginProlog :
229 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_Prolog, value);
231 case CO_BeginProcSet :
232 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_ProcSet, value);
233 if (m_debug) tqDebug (
"start ignoring");
236 case CO_BeginResource :
237 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_Resource, value);
238 if (m_debug) tqDebug (
"start ignoring");
241 case CO_BeginEncoding :
242 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_Encoding, value);
245 case CO_IncludeFont :
246 if (m_debug) tqDebug (
"start ignoring");
249 case CO_BeginBrushPattern :
250 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_BrushPattern, value);
252 case CO_BeginGradient :
253 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_Gradient, value);
256 if (m_debug) tqDebug (
"start ignoring");
259 case CO_BeginPalette :
260 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_Palette, value);
263 if (m_moduleHandler) m_moduleHandler->gotBeginSection (ST_Setup, value);
267 if (m_moduleHandler) m_moduleHandler->gotEndSection (ST_Setup, value);
270 if (m_moduleHandler) m_moduleHandler->gotEndSection (ST_Prolog, value);
273 if (m_moduleHandler) m_moduleHandler->gotEndSection (ST_ProcSet, value);
274 if (m_debug) tqDebug (
"stop ignoring");
277 case CO_EndResource :
278 if (m_moduleHandler) m_moduleHandler->gotEndSection (ST_Resource, value);
279 if (m_debug) tqDebug (
"stop ignoring");
282 case CO_EndEncoding :
284 if (m_moduleHandler) m_moduleHandler->gotEndSection (ST_Encoding, value);
286 case CO_EndBrushPattern :
288 if (m_moduleHandler) m_moduleHandler->gotEndSection (ST_BrushPattern, value);
290 case CO_EndGradient :
292 if (m_moduleHandler) m_moduleHandler->gotEndSection (ST_Gradient, value);
296 if (m_moduleHandler) m_moduleHandler->gotEndSection (ST_Palette, value);
300 case CO_BoundingBox :
301 if (getRectangle (value, llx, lly, urx, ury))
303 if (m_documentHandler) m_documentHandler->gotBoundingBox (llx, lly, urx, ury);
306 case CO_TemplateBox :
307 if (getRectangle (value, llx, lly, urx, ury))
309 if (m_documentHandler) m_documentHandler->gotTemplateBox (llx, lly, urx, ury);
313 if (getRectangle (value, llx, lly, urx, ury))
315 if (m_documentHandler) m_documentHandler->gotMargin (llx, lly, urx, ury);
319 if (m_documentHandler) m_documentHandler->gotTitle (getValue (value));
322 if (m_documentHandler) m_documentHandler->gotCreator (getValue (value));
324 case CO_DocumentFonts :
325 _handleDocumentFonts (value);
326 m_continuationMode = CM_DocumentFonts;
328 case CO_DocumentFiles :
329 _handleDocumentFiles (value);
330 m_continuationMode = CM_DocumentFiles;
332 case CO_DocumentCustomColors :
333 _handleDocumentCustomColors (value);
334 m_continuationMode = CM_DocumentFiles;
336 case CO_CMYKCustomColor :
337 _handleCMYKCustomColor (value);
338 m_continuationMode = CM_CMYKCustomColor;
340 case CO_DocumentNeededResources :
341 _handleDocumentNeededResources (value);
342 m_continuationMode = CM_DocumentNeededResources;
344 case CO_DocumentProcessColors :
345 _handleDocumentProcessColors (value);
347 case CO_CreationDate :
348 _handleCreationDate (value);
350 case CO_IncludeFile :
352 case CO_IncludeResource :
353 _handleIncludeResource (value);
355 case CO_Continuation :
356 switch (m_continuationMode) {
357 case CM_DocumentFonts : _handleDocumentFonts (value);
break;
358 case CM_DocumentFiles : _handleDocumentFiles (value);
break;
359 case CM_DocumentCustomColors : _handleDocumentCustomColors (value);
break;
360 case CM_CMYKCustomColor : _handleCMYKCustomColor (value);
break;
361 case CM_DocumentNeededResources : _handleDocumentNeededResources (value);
break;
363 default : tqWarning (
"unknown continuation mode %d",m_continuationMode);
368 tqWarning(
"unhandled comment: %s", value );
372void AIParserBase::handleElement (
AIElement &element)
374 if (m_ignoring)
return;
376 if (m_sink == DS_Array)
378 if (m_debug) tqDebug (
"in mode array");
379 TQValueVector<AIElement> &elementArray = m_arrayStack.top();
380 elementArray.push_back(element);
382 if (m_sink == DS_Block)
384 if (m_debug) tqDebug (
"in mode block");
385 TQValueVector<AIElement> &elementArray = m_blockStack.top();
386 elementArray.push_back(element);
390 if (m_debug) tqDebug (
"in mode stack");
391 m_stack.push (element);
395void AIParserBase::gotIntValue (
int value) {
396 if (m_debug) tqDebug (
"got int value");
397 if (m_ignoring)
return;
398 AIElement element (value);
399 handleElement (element);
400 if (m_debug) tqDebug (
"/got int value");
403void AIParserBase::gotDoubleValue (
double value) {
404 if (m_debug) tqDebug (
"got double value");
405 if (m_ignoring)
return;
406 AIElement element (value);
407 handleElement (element);
408 if (m_debug) tqDebug (
"/got double value");
411void AIParserBase::gotStringValue (
const char *value) {
412 if (m_debug) tqDebug (
"got string value");
413 if (m_ignoring)
return;
414 if (value == NULL) value =
"";
415 if (m_debug) tqDebug (
"string: %s", value);
416 AIElement element (value);
417 handleElement (element);
418 if (m_debug) tqDebug (
"/got string value");
422void AIParserBase::gotReference (
const char *value) {
423 if (m_debug) tqDebug (
"got reference value");
425 if (m_ignoring)
return;
426 if (value == NULL) value =
"";
427 if (m_debug) tqDebug (
"reference: %s", value);
428 TQString string(value);
429 AIElement element (
string, AIElement::Reference);
430 handleElement (element);
431 if (m_debug) tqDebug (
"/got reference value");
435void AIParserBase::gotByte (uchar value) {
436 if (m_debug) tqDebug (
"got byte value");
438 if (m_ignoring)
return;
439 AIElement element (value);
440 handleElement (element);
441 if (m_debug) tqDebug (
"/got byte value");
444void AIParserBase::gotByteArray (
const TQByteArray &data) {
445 if (m_ignoring)
return;
446 AIElement element (data);
447 handleElement (element);
451void AIParserBase::gotArrayStart () {
452 if (m_ignoring)
return;
453 if (m_debug) tqDebug (
"got array start");
455 TQValueVector<AIElement> array;
456 m_arrayStack.push (array);
461void AIParserBase::gotBlockStart () {
462 if (m_ignoring)
return;
463 if (m_debug) tqDebug (
"got block start");
465 TQValueVector<AIElement> array;
466 m_blockStack.push (array);
471void AIParserBase::gotArrayEnd () {
472 if (m_ignoring)
return;
473 if (m_debug) tqDebug (
"got array end");
475 TQValueVector<AIElement> stackArray = m_arrayStack.pop();
477 if (m_arrayStack.empty())
479 if (m_debug) tqDebug (
"put elements to stack");
480 AIElement realElement (stackArray);
483 tqDebug (
"going to stack");
484 elementtoa (realElement);
487 m_stack.push (realElement);
493 if (m_debug) tqDebug (
"put elements to nest stack level");
494 TQValueVector<AIElement> currentTOS = m_arrayStack.top();
495 currentTOS.push_back (stackArray);
499void AIParserBase::gotBlockEnd () {
500 if (m_ignoring)
return;
501 if (m_debug) tqDebug (
"got block end");
503 TQValueVector<AIElement> stackArray = m_blockStack.pop();
505 if (m_blockStack.empty())
507 if (m_debug) tqDebug (
"put elements to stack");
508 AIElement realElement (stackArray, AIElement::Block);
511 tqDebug (
"going to stack");
512 elementtoa (realElement);
515 m_stack.push (realElement);
521 if (m_debug) tqDebug (
"put elements to nest stack level");
522 TQValueVector<AIElement> currentTOS = m_blockStack.top();
523 currentTOS.push_back (stackArray);
647void AIParserBase::_handlePSGet() {
651 TQString name (
"xxx");
652 AIElement ref (name,AIElement::Reference);
656void AIParserBase::_handlePSExec() {
660void AIParserBase::_handlePSString() {
663 TQString name (
"stringval");
664 AIElement ref (name,AIElement::Reference);
668void AIParserBase::_handlePSBind() {
671 TQString name (
"bindentry");
672 AIElement ref (name,AIElement::Reference);
676void AIParserBase::_handlePSUserdict() {
677 TQString name (
"userdict");
678 AIElement ref (name,AIElement::Reference);
682void AIParserBase::_handlePSDict() {
687 TQString name (
"dict");
688 AIElement ref (name,AIElement::Reference);
692void AIParserBase::_handlePSDup() {
693 AIElement &tos = m_stack.top();
695 AIElement copy (tos);
699void AIParserBase::_handlePSBegin() {
702 TQString name (
"dictionary begin");
703 AIElement ref (name,AIElement::Reference);
707void AIParserBase::_handlePSPut() {
732void AIParserBase::_handlePSDef() {
755void AIParserBase::_handleDocumentFonts(
const char *) {
758void AIParserBase::_handleDocumentFiles(
const char *) {
761void AIParserBase::_handleDocumentCustomColors(
const char *) {
764void AIParserBase::_handleDocumentNeededResources(
const char *data) {
766 TQStringList items = TQStringList::split (
' ', data);
768 TQString itemType = items[1];
769 TQString name = items[2];
770 TQString version = items[3];
771 TQString release = items[4];
774void AIParserBase::_handleIncludeResource(
const char *data) {
776 TQStringList items = TQStringList::split (
' ', data);
778 TQString itemType = items[1];
779 TQString name = items[2];
780 TQString version = items[3];
781 TQString release = items[4];
783 m_modules.push_back (name);
786void AIParserBase::_handleDocumentProcessColors(
const char *data) {
794 index = tmp.find (
"Cyan");
795 if (index > 0) colorSet |= PC_Cyan;
797 index = tmp.find (
"Magenta");
798 if (index > 0) colorSet |= PC_Magenta;
800 index = tmp.find (
"Yellow");
801 if (index > 0) colorSet |= PC_Yellow;
803 index = tmp.find (
"Black");
804 if (index > 0) colorSet |= PC_Black;
806 if (m_documentHandler) m_documentHandler->gotProcessColors (colorSet);
809void AIParserBase::_handleCMYKCustomColor(
const char *) {
887void AIParserBase::_handleCreationDate (
const char *data)
891 TQRegExp test (
"\\((.+)\\) \\((.+)\\)");
892 if (test.search (data))
894 TQString val1 = test.cap(1);
895 TQString val2 = test.cap(2);
897 if (m_documentHandler) m_documentHandler->gotCreationDate (val1.latin1(),val2.latin1());
901void AIParserBase::gotToken (
const char *value) {
902 if (m_debug) tqDebug (
"got token");
904 if (m_ignoring)
return;
905 if (m_debug) tqDebug (
"token: %s", value);
907 if (m_sink == DS_Array)
909 if (m_debug) tqDebug (
"token in array");
911 AIElement realElement (op, AIElement::Operator);
912 handleElement (realElement);
916 if (m_sink == DS_Block)
918 if (m_debug) tqDebug (
"token in block");
920 AIElement realElement (op, AIElement::Operator);
921 handleElement (realElement);
926 if (m_debug) tqDebug (
"get ai operation");
928 AIOperation op = getAIOperation (value);
933 bool handled =
false;
935 handled = m_ai88Handler->handleAIOperation (op);
936 if (!handled) handled = m_ai3Handler->handleAIOperation (op);
940 if (m_sink == DS_Other)
942 if (handlePS (value))
return;
944 tqWarning (
"unknown operator: %s", value );
946 TQString string(value);
948 if (m_modules.findIndex(
string) != -1)
950 AIElement element (
string, AIElement::Reference);
951 handleElement (element);
955 if (m_debug) stacktoa (m_stack);
956 tqWarning (
"pushing %s to stack", value );
957 AIElement element (
string, AIElement::Operator);
958 handleElement (element);
961 if (m_debug) tqDebug (
"/got token value");
964bool AIParserBase::handlePS (
const char *operand){
965 if (m_ignoring)
return false;
967 PSOperation psop = getPSOperation (operand);
987 _handlePSUserdict ();
1006const double AIParserBase::getDoubleValue(
void) {
1007 const AIElement &elem = m_stack.pop();
1012const int AIParserBase::getIntValue(
void) {
1013 const AIElement &elem = m_stack.pop();
1015 return elem.
toInt();
1018const bool AIParserBase::getBoolValue(
void) {
1019 return getIntValue() == 1;
1022const TQString AIParserBase::getStringValue(
void) {
1023 const AIElement &elem = m_stack.pop();
1028const TQString AIParserBase::getOperatorValue(
void) {
1029 const AIElement &elem = m_stack.pop();
1031 return elem.toOperator();
1034AIOperation AIParserBase::getAIOperation (
const char *operand)
1037 TQString cmpValue (operand);
1039 for(;;) { AIOperationMapping map = aiMappings[i];
1040 if (map.op == NULL)
return AIO_Other;
1041 if (cmpValue.compare (map.op) == 0)
return map.action;
1047PSOperation AIParserBase::getPSOperation (
const char *operand)
1050 TQString cmpValue (operand);
1052 for(;;) { PSOperationMapping map = psMappings[i];
1053 if (map.op == NULL)
return PSO_Other;
1054 if (cmpValue.compare (map.op) == 0)
return map.action;
1060CommentOperation AIParserBase::getCommentOperation (
const char *command) {
1061 TQString data (command);
1068 CommentOperationMapping map = commentMappings[i];
1069 if (map.op == NULL)
return CO_Other;
1070 index = data.find (map.op);
1071 if (index >= 0)
return map.action;
1076void GStateHandlerBase::gotFillPattern (
const char *pname,
double px,
double py,
double sx,
double sy,
double angle,
double rf,
double r,
double k,
double ka,
const TQValueVector<AIElement>& transformData) {
1077 tqDebug (
"got fill pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka);
1078 arraytoa (transformData);
1079 tqDebug (
"/got fill pattern");
1082void GStateHandlerBase::gotStrokePattern (
const char *pname,
double px,
double py,
double sx,
double sy,
double angle,
double rf,
double r,
double k,
double ka,
const TQValueVector<AIElement>& transformData) {
1083 tqDebug (
"got stroke pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka);
1084 arraytoa (transformData);
1085 tqDebug (
"/got stroke pattern");
1088const char *AIParserBase::getValue (
const char *input) {
1089 TQString data(input);
1091 signed int index = data.find (
':');
1092 if (index < 0)
return "";
1094 while (data.at(index) ==
' ') index++;
1095 return data.mid(index).latin1();
1098bool AIParserBase::getRectangle (
const char* input,
int &llx,
int &lly,
int &urx,
int &ury) {
1099 if (input == NULL)
return false;
1102 if (s.contains (
"(atend)"))
return false;
1103 TQStringList values = TQStringList::split (
" ", input);
1104 if (values.size() < 5)
return false;
1105 llx = values[1].toInt();
1106 lly = values[2].toInt();
1107 urx = values[3].toInt();
1108 ury = values[4].toInt();
1113bool AIParserBase::getPoint (
const char* input,
int &x,
int &y) {
1114 if (input == NULL)
return false;
1117 TQStringList values = TQStringList::split (
" ", input);
1119 if (values.size() < 3)
return false;
1121 x = values[1].toInt();
1122 y = values[2].toInt();
1127void AIParserBase::cleanupArrays()
1129 if (m_sink == DS_Array) tqDebug (
"unclosed array(s).");
1130 while (m_sink == DS_Array) gotArrayEnd ();
1155void TextHandlerBase::gotFontEncoding (
const TQValueVector<AIElement>& encodingData,
const char*oldFontName,
const char*newFontName)
1157 tqDebug (
"font encoding %s to %s",oldFontName, newFontName);
1158 arraytoa (encodingData);
1159 tqDebug (
"/font encoding");
1162void TextHandlerBase::gotFontDefinition (
const char*fontName,
double size,
double leading,
double kerning, TextAlign align)
1164 tqDebug (
"font definition: name %s size %f leading %f kerning %f align %d", fontName, size, leading, kerning, align);
1167void TextHandlerBase::gotTextBlockBegin (
const TQValueVector<AIElement>& transData, TextOperation mode)
1169 tqDebug (
"text block begin %d",mode);
1170 arraytoa (transData);
1171 tqDebug (
"/text block begin");
1174void TextHandlerBase::gotTextOutput (
const char*text,
int length)
1176 tqDebug (
"text output (%s) %d",text,length);
1179void TextHandlerBase::gotTextBlockEnd ()
1181 tqDebug (
"text block end");
1184const void elementtoa (
const AIElement &)
1216const void arraytoa (
const TQValueVector<AIElement> &)
1230const void stacktoa (
const TQValueStack<AIElement> &)
1244const void stacktoa2 (
const TQValueStack<TQValueVector<AIElement> >&)
1259const void aiotoa (AIOperation &data)
1263 case AIO_SetFillColorCMYK : tqDebug (
"AIO_SetFillColorCMYK");
break;
1264 case AIO_SetStrokeColorCMYK : tqDebug (
"AIO_SetStrokeColorCMYK");
break;
1265 case AIO_SetFillColorGray : tqDebug (
"AIO_SetFillColorGray");
break;
1266 case AIO_SetStrokeColorGray : tqDebug (
"AIO_SetStrokeColorGray");
break;
1267 case AIO_SetFillColorCustom : tqDebug (
"AIO_SetFillColorCustom");
break;
1268 case AIO_SetStrokeColorCustom : tqDebug (
"AIO_SetStrokeColorCustom");
break;
1269 case AIO_SetFillPattern : tqDebug (
"AIO_SetFillPattern");
break;
1270 case AIO_SetStrokePattern : tqDebug (
"AIO_SetStrokePattern");
break;
1271 case AIO_SetFillOverprinting : tqDebug (
"AIO_SetFillOverprinting");
break;
1272 case AIO_SetStrokeOverprinting : tqDebug (
"AIO_SetStrokeOverprinting");
break;
1273 case AIO_SetFlatness : tqDebug (
"AIO_SetFlatness");
break;
1274 case AIO_SetLineCap : tqDebug (
"AIO_SetLineCap");
break;
1275 case AIO_SetLineJoin : tqDebug (
"AIO_SetLineJoin");
break;
1276 case AIO_SetLineWidth : tqDebug (
"AIO_SetLineWidth");
break;
1277 case AIO_SetMiterLimit : tqDebug (
"AIO_SetMiterLimit");
break;
1278 case AIO_SetDash : tqDebug (
"AIO_SetDash");
break;
1279 case AIO_BeginGroupClip : tqDebug (
"AIO_BeginGroupClip");
break;
1280 case AIO_EndGroupClip : tqDebug (
"AIO_EndGroupClip");
break;
1281 case AIO_MoveTo : tqDebug (
"AIO_MoveTo");
break;
1282 case AIO_LineToCorner : tqDebug (
"AIO_LineToCorner");
break;
1283 case AIO_LineToSmooth : tqDebug (
"AIO_LineToSmooth");
break;
1284 case AIO_CurveToSmooth : tqDebug (
"AIO_CurveToSmooth");
break;
1285 case AIO_CurveToCorner : tqDebug (
"AIO_CurveToCorner");
break;
1286 case AIO_CurveToOmitC1Smooth : tqDebug (
"AIO_CurveToOmitC1Smooth");
break;
1287 case AIO_CurveToOmitC1Corner : tqDebug (
"AIO_CurveToOmitC1Corner");
break;
1288 case AIO_CurveToOmitC2Smooth : tqDebug (
"AIO_CurveToOmitC2Smooth");
break;
1289 case AIO_CurveToOmitC2Corner : tqDebug (
"AIO_CurveToOmitC2Corner");
break;
1290 case AIO_PathIgnoreNoReset : tqDebug (
"AIO_PathIgnoreNoReset");
break;
1291 case AIO_PathIgnoreNoResetClose : tqDebug (
"AIO_PathIgnoreNoResetClose");
break;
1292 case AIO_PathClipPath : tqDebug (
"AIO_PathClipPath");
break;
1293 case AIO_PathIgnoreReset : tqDebug (
"AIO_PathIgnoreReset");
break;
1294 case AIO_PathIgnoreResetClose : tqDebug (
"AIO_PathIgnoreResetClose");
break;
1295 case AIO_PathFillNonZero : tqDebug (
"AIO_PathFillNonZero");
break;
1296 case AIO_PathFillNonZeroClose : tqDebug (
"AIO_PathFillNonZeroClose");
break;
1297 case AIO_PathStroke : tqDebug (
"AIO_PathStroke");
break;
1298 case AIO_PathStrokeClose : tqDebug (
"AIO_PathStrokeClose");
break;
1299 case AIO_PathFillNoReset : tqDebug (
"AIO_PathFillNoReset");
break;
1300 case AIO_PathFillNoResetClose : tqDebug (
"AIO_PathFillNoResetClose");
break;
1301 case AIO_FontEncoding : tqDebug (
"AIO_FontEncoding");
break;
1302 case AIO_PatternDefinition : tqDebug (
"AIO_PatternDefinition");
break;
1303 case AIO_SetCurrentText : tqDebug (
"AIO_SetCurrentText");
break;
1304 case AIO_TextBlockFillStroke : tqDebug (
"AIO_TextBlockFillStroke");
break;
1305 case AIO_TextBlockFill : tqDebug (
"AIO_TextBlockFill");
break;
1306 case AIO_TextBlockAppend : tqDebug (
"AIO_TextBlockAppend");
break;
1307 case AIO_TextBlockIgnore : tqDebug (
"AIO_TextBlockIgnore");
break;
1308 case AIO_TextBlockStroke : tqDebug (
"AIO_TextBlockStroke");
break;
1309 case AIO_TextOutput : tqDebug (
"AIO_TextOutput");
break;
1310 case AIO_TextBlockEnd : tqDebug (
"AIO_TextBlockEnd");
break;
1311 case AIO_GsaveIncludeDocument : tqDebug (
"AIO_GsaveIncludeDocument");
break;
1312 case AIO_Grestore : tqDebug (
"AIO_Grestore");
break;
1313 case AIO_LockElement : tqDebug (
"AIO_LockElement");
break;
1314 case AIO_SetWindingOrder : tqDebug (
"AIO_SetWindingOrder");
break;
1315 default : tqDebug (
"unknown");
1319const void sttoa (SectionType &data,
bool begin)
1323 case ST_Setup : begin ? tqDebug (
"start setup") : tqDebug (
"end setup");
break;
1324 case ST_Prolog : begin ? tqDebug (
"start prolog") : tqDebug (
"end prolog");
break;
1325 case ST_ProcSet : begin ? tqDebug (
"start procset") : tqDebug (
"end procset");
break;
1326 case ST_Encoding : begin ? tqDebug (
"start encoding") : tqDebug (
"end encoding");
break;
1327 case ST_Pattern : begin ? tqDebug (
"start pattern") : tqDebug (
"end pattern");
break;
1328 case ST_Document : begin ? tqDebug (
"start document") : tqDebug (
"end document");
break;
1329 case ST_BrushPattern : begin ? tqDebug (
"start brush pattern") : tqDebug (
"end brush pattern");
break;
1330 case ST_Gradient : begin ? tqDebug (
"start gradient") : tqDebug (
"end gradient");
break;
1331 case ST_Palette : begin ? tqDebug (
"start palette") : tqDebug (
"end palette");
break;
1332 case ST_Resource : begin ? tqDebug (
"start resource") : tqDebug (
"end resouce");
break;
1334 default : begin ? tqDebug (
"unknown") : tqDebug (
"end unknown");
double toDouble(bool *ok=0) const
const TQString toString() const
int toInt(bool *ok=0) const