24 #include <qtextstream.h>
52 const QDateTime &d = QDateTime::currentDateTime();
54 result.sprintf(
"\\yr%d\\mo%d\\dy%d\\hr%d\\min%d\\sec%d",
55 d.date().year(), d.date().month(), d.date().day(),
56 d.time().hour(),d.time().minute(),d.time().second());
100 t <<
"# This file describes styles used for generating RTF output.\n";
101 t <<
"# All text after a hash (#) is considered a comment and will be ignored.\n";
102 t <<
"# Remove a hash to activate a line.\n\n";
117 t <<
"# This file describes extensions used for generating RTF output.\n";
118 t <<
"# All text after a hash (#) is considered a comment and will be ignored.\n";
119 t <<
"# Remove a hash to activate a line.\n\n";
121 t <<
"# Overrides the project title.\n";
123 t <<
"#Title = \n\n";
125 t <<
"# Name of the company that produced this document.\n";
126 t <<
"#Company = \n\n";
128 t <<
"# Filename of a company or project logo.\n";
129 t <<
"#LogoFilename = \n\n";
131 t <<
"# Author of the document.\n";
132 t <<
"#Author = \n\n";
134 t <<
"# Type of document (e.g. Design Specification, User Manual, etc.).\n";
135 t <<
"#DocumentType = \n\n";
137 t <<
"# Document tracking number.\n";
138 t <<
"#DocumentId = \n\n";
140 t <<
"# Name of the author's manager.\n";
141 t <<
"# This field is not displayed in the document itself, but it is \n";
142 t <<
"# available in the information block of the rtf file. In Microsoft \n";
143 t <<
"# Word, it is available under File:Properties.\n";
144 t <<
"#Manager = \n\n";
146 t <<
"# Subject of the document.\n";
147 t <<
"# This field is not displayed in the document itself, but it is \n";
148 t <<
"# available in the information block of the rtf file. In Microsoft \n";
149 t <<
"# Word, it is available under File:Properties.\n";
150 t <<
"#Subject = \n\n";
152 t <<
"# Comments regarding the document.\n";
153 t <<
"# This field is not displayed in the document itself, but it is \n";
154 t <<
"# available in the information block of the rtf file. In Microsoft \n";
155 t <<
"# Word, it is available under File:Properties.\n";
156 t <<
"#Comments = \n\n";
158 t <<
"# Keywords associated with the document.\n";
159 t <<
"# This field is not displayed in the document itself, but it is \n";
160 t <<
"# available in the information block of the rtf file. In Microsoft \n";
161 t <<
"# Word, it is available under File:Properties.\n";
162 t <<
"#Keywords = \n\n";
170 if (!d.exists() && !d.mkdir(dir))
172 err(
"Could not create output directory %s\n",dir.data());
182 err(
"Internal: rtf_Style_Default[%s] has no definition.\n", def->
name);
190 if (!rtfStyleSheetFile.isEmpty())
197 if (!rtfExtensionsFile.isEmpty())
208 result+=(char)(i+
'0');
218 t <<
"\\uc1 \\deff0\\deflang1033\\deflangfe1033\n";
220 DBG_RTF(
t <<
"{\\comment Beginning font list}\n")
223 t <<
"\\fprq2{\\*\\panose 02020603050405020304}Times New Roman;}\n";
225 t <<
"\\fprq2{\\*\\panose 020b0604020202020204}Arial;}\n";
227 t <<
"\\fprq1{\\*\\panose 02070309020205020404}Courier New;}\n";
228 t <<
"{\\f3\\froman\\fcharset2\\fprq2{\\*\\panose 05050102010706020507}Symbol;}\n";
230 DBG_RTF(
t <<
"{\\comment begin colors}\n")
232 t <<
"\\red0\\green0\\blue0;";
233 t <<
"\\red0\\green0\\blue255;";
234 t <<
"\\red0\\green255\\blue255;";
235 t <<
"\\red0\\green255\\blue0;";
236 t <<
"\\red255\\green0\\blue255;";
237 t <<
"\\red255\\green0\\blue0;";
238 t <<
"\\red255\\green255\\blue0;";
239 t <<
"\\red255\\green255\\blue255;";
240 t <<
"\\red0\\green0\\blue128;";
241 t <<
"\\red0\\green128\\blue128;";
242 t <<
"\\red0\\green128\\blue0;";
243 t <<
"\\red128\\green0\\blue128;";
244 t <<
"\\red128\\green0\\blue0;";
245 t <<
"\\red128\\green128\\blue0;";
246 t <<
"\\red128\\green128\\blue128;";
247 t <<
"\\red192\\green192\\blue192;}" <<
endl;
249 DBG_RTF(
t <<
"{\\comment Beginning style list}\n")
250 t <<
"{\\stylesheet\n";
251 t <<
"{\\widctlpar\\adjustright \\fs20\\cgrid \\snext0 Normal;}\n";
254 QArray<const StyleData*> array(128);
256 QDictIterator<StyleData> iter(
rtf_Style);
258 for(; (style = iter.current()); ++iter)
260 unsigned index = style->
index;
261 unsigned size = array.size();
265 array.resize((index + 1 + 7) & ~7);
267 ASSERT(index < array.size());
269 if (array.at(index) != 0)
271 QCString key(iter.currentKey());
272 msg(
"Style '%s' redefines \\s%d.\n", key.data(), index);
274 array.at(index) = style;
278 unsigned size = array.size();
279 for(
unsigned i = 0; i < size; i++)
288 t <<
"{\\comment begin body}" <<
endl;
295 DBG_RTF(
t <<
"{\\comment BeginRTFChapter}\n")
302 t <<
"\\sect\\sbknone\n";
306 t <<
"\\sect\\sbkpage\n";
309 t <<
rtf_Style[
"Heading1"]->reference <<
"\n";
315 DBG_RTF(
t <<
"{\\comment BeginRTFSection}\n")
322 t <<
"\\sect\\sbknone\n";
326 t <<
"\\sect\\sbkpage\n";
329 t <<
rtf_Style[
"Heading2"]->reference <<
"\n";
338 if (fileName.right(4)!=
".rtf" ) fileName+=
".rtf";
345 DBG_RTF(
t <<
"{\\comment endFile}\n")
375 t <<
"{\\title {\\comment ";
410 DBG_RTF(
t <<
"{\\comment start classhierarchy}\n")
431 for (gli.toFirst();(gd=gli.current()) && !found;++gli)
447 for (dli.toFirst();(dd=dli.current()) && !found;++dli)
463 for (nli.toFirst();(nd=nli.current()) && !found;++nli)
479 for (cli.toFirst();(cd=cli.current()) && !found;++cli)
498 for (fnli.toFirst();(fn=fnli.current());++fnli)
502 for (;(fd=fni.current());++fni)
553 t <<
"}" << projectName;
559 DBG_RTF(
t <<
"{\\comment end of infoblock}\n");
562 t <<
"\\sectd\\pgnlcrm\n";
563 t <<
"{\\footer "<<
rtf_Style[
"Footer"]->reference <<
"{\\chpgn}}\n";
565 DBG_RTF(
t <<
"{\\comment begin title page}\n")
570 t <<
"\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n";
574 t <<
"\" \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
584 t <<
"{\\field\\fldedit {\\*\\fldinst " << rtf_title <<
" \\\\*MERGEFORMAT}{\\fldrslt " << rtf_title <<
"}}\\par" <<
endl;
588 t <<
"{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt ";
590 t <<
"}}\\par" <<
endl;
604 t <<
"\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\n";
608 t <<
"{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt "<<
rtf_author <<
" }}\\par" <<
endl;
610 t <<
"{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par" <<
endl;
613 t <<
"{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
616 DBG_RTF(
t <<
"{\\comment End title page}" << endl)
619 DBG_RTF(
t <<
"{\\comment Table of contents}\n")
621 t << rtf_Style_Reset <<
endl;
624 t << rtf_Style_Reset <<
"\\par" <<
endl;
625 t <<
"{\\field\\fldedit {\\*\\fldinst TOC \\\\f \\\\*MERGEFORMAT}{\\fldrslt Table of contents}}\\par\n";
626 t << rtf_Style_Reset <<
endl;
639 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
642 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
652 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"modules.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
657 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"dirs.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
670 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
675 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"hierarchy.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
691 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"annotated.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
696 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"files.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
701 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"pages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
708 for (gli.toFirst();(gd=gli.current());++gli)
713 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
715 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
725 for (dli.toFirst();(dd=dli.current());++dli)
730 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
732 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
742 for (nli.toFirst();(nd=nli.current()) && !found;++nli)
747 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
749 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
753 while ((nd=nli.current()))
759 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
761 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
780 for (cli.toFirst();(cd=cli.current()) && !found;++cli)
788 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
790 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
794 for (;(cd=cli.current());++cli)
803 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
805 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
817 for (fnli.toFirst();(fn=fnli.current());++fnli)
821 for (;(fd=fni.current());++fni)
828 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
830 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
834 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"" << fd->
getSourceFileBase() <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
842 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
844 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
848 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"" << fd->
getSourceFileBase() <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
865 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
867 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
869 for (++pdi;(pd=pdi.current());++pdi)
873 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
875 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
912 t <<
"{\\field\\fldedit {\\*\\fldinst INDEX \\\\c2 \\\\*MERGEFORMAT}{\\fldrslt INDEX}}\n";
921 t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
923 t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
928 DBG_RTF(
t <<
"{\\comment Beginning Body of RTF Document}\n")
930 t <<
"\\sect \\sbkpage \\pgndec \\pgnrestart\n";
931 t <<
"\\sect \\sectd \\sbknone\n";
934 t <<
"{\\footer "<<
rtf_Style[
"Footer"]->reference <<
"{\\chpgn}}\n";
946 t <<
"\\par" <<
endl;
959 t <<
"\\par" <<
endl;
1020 DBG_RTF(
t <<
"{\\comment (startItemListItem)}" <<
endl)
1047 t <<
"\\par" <<
endl;
1080 t <<
"{\\field {\\*\\fldinst { HYPERLINK \"";
1083 t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1111 const char *path,
const char *
name)
1113 DBG_RTF(
t <<
"{\\comment (writeStartAnnoItem)}" <<
endl)
1118 t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1121 t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1165 if (hasBrief)
t <<
"(";
1171 if (hasBrief)
t <<
")";
1191 DBG_RTF(
t <<
"{\\comment Begin SubSection}\n")
1193 t <<
rtf_Style[
"Heading3"]->reference <<
"\n";
1206 DBG_RTF(
t <<
"{\\comment Begin SubSubSection}\n")
1308 t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1311 t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1324 const char *anchor,
const char *text)
1339 t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1342 t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1380 const char *anchor,
const char *
name,
1396 t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1399 t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1426 t <<
"{\\tc\\tcl2 \\v ";
1463 else if (extraIndent==1)
1477 t <<
"\\par" <<
endl;
1482 const char *memname,
1490 if (memname && memname[0]!=
'@')
1515 const char *,
const char *,
1536 t <<
"{\\bkmkstart ";
1610 DBG_RTF(
t <<
"{\\comment (startMemberDescription)}" <<
endl)
1619 DBG_RTF(
t <<
"{\\comment (endMemberDescription)}" <<
endl)
1649 DBG_RTF(
t <<
"{\\comment (startDescForItem) }" <<
endl)
1680 default: ASSERT(0);
break;
1683 heading.sprintf(
"Heading%d",num);
1687 t <<
"{\\tc\\tcl" << num <<
" \\v ";
1748 const unsigned char *p=(
const unsigned char *)str;
1759 t << getMultiByte( c );
1766 t << getMultiByte( c );
1773 case '{':
t <<
"\\{";
break;
1774 case '}':
t <<
"\\}";
break;
1775 case '\\':
t <<
"\\\\";
break;
1796 const unsigned char *p=(
const unsigned char *)str;
1798 int spacesToNextTabStop;
1810 col+=spacesToNextTabStop;
1815 case '{':
t <<
"\\{";
col++;
break;
1816 case '}':
t <<
"\\}";
col++;
break;
1817 case '\\':
t <<
"\\\\";
col++;
break;
1818 default: p=(
const unsigned char *)
writeUtf8Char(
t,(
const char *)p-1);
col++;
break;
1838 const char *fileName,
const char *)
1848 t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
1849 t << fileName <<
".png\"";
1850 t <<
" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" <<
endl;
1878 if (fileName && name)
1887 DBG_RTF(
t <<
"{\\comment writeAnchor (" << anchor <<
")}" <<
endl)
1894 t <<
"{\\field\\fldedit {\\*\\fldinst PAGEREF ";
1896 t <<
" \\\\*MERGEFORMAT}{\\fldrslt pagenum}}";
1901 DBG_RTF(
t <<
"{\\comment (startCodeFragment) }" <<
endl)
1928 DBG_RTF(
t <<
"{\\comment (startMemberList) }" << endl)
1932 t <<
"\\begin{CompactItemize}" <<
endl;
1942 t <<
"\\end{CompactItemize}" <<
endl;
1989 t <<
"{\\par" <<
endl;
1992 t <<
":\\par}" <<
endl;
1994 t <<
"\\trowd \\trgaph108\\trleft426\\tblind426"
1995 "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
1996 "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
1997 "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
1998 "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
1999 "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
2000 "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<<
endl;
2001 int i,columnPos[2] = { 25, 100 };
2004 t <<
"\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
2005 "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
2006 "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
2007 "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
2011 t <<
"\\pard \\widctlpar\\intbl\\adjustright" <<
endl;
2030 DBG_RTF(
t <<
"{\\comment (startDescTableTitle) }" <<
endl)
2036 DBG_RTF(
t <<
"{\\comment (endDescTableTitle) }" <<
endl)
2042 DBG_RTF(
t <<
"{\\comment (startDescTableData) }" <<
endl)
2048 DBG_RTF(
t <<
"{\\comment (endDescTableData) }" <<
endl)
2049 t <<
"\\cell }{\\row }" <<
endl;
2069 err(
"Negative indent level while generating RTF output!\n");
2142 t <<
"\\par" <<
endl;
2157 t <<
"}\\par" <<
endl;
2163 DBG_RTF(
t <<
"{\\comment startMemberSubtitle}" <<
endl)
2292 if (codePage ==
"932")
2294 result = (0x81<=c && c<=0x9f) || (0xe0<=c && c<=0xfc);
2296 else if (codePage ==
"936")
2298 result = 0x81<=c && c<=0xFE;
2300 else if (codePage ==
"949")
2302 result = 0x81<=c && c<=0xFE;
2304 else if (codePage ==
"950")
2306 result = 0x81<=c && c<=0xFE;
2322 bool converted=FALSE;
2324 static QByteArray enc;
2325 if (l*4>(
int)enc.size()) enc.resize(l*4);
2327 if (!encoding.isEmpty())
2331 if (cd!=(
void *)(-1))
2334 size_t oLeft=enc.size();
2335 char *inputPtr = (
char*)s;
2336 char *outputPtr = enc.data();
2339 enc.resize(enc.size()-(
unsigned int)oLeft);
2347 memcpy(enc.data(),s,l);
2351 bool multiByte = FALSE;
2353 for (i=0;i<enc.size();i++)
2355 uchar c = (uchar)enc.at(i);
2357 if (c>=0x80 || multiByte)
2360 sprintf(esc,
"\\'%X",c);
2386 if (!f.open(IO_ReadOnly))
2388 err(
"problems opening rtf file %s for reading\n",infName.data());
2392 const int maxLineLength = 10240;
2393 static QCString lineBuf(maxLineLength);
2402 lineBuf.resize(maxLineLength);
2403 if ((len=f.readLine(lineBuf.rawData(),maxLineLength))==-1)
2405 err(
"read error in %s before end of RTF header!\n",infName.data());
2408 lineBuf.resize(len+1);
2409 if (lineBuf.find(
"\\comment begin body")!=-1)
break;
2414 lineBuf.resize(maxLineLength);
2415 while ((len=f.readLine(lineBuf.rawData(),maxLineLength))!=-1)
2417 lineBuf.resize(len+1);
2419 if ((pos=lineBuf.find(
"INCLUDETEXT"))!=-1)
2421 int startNamePos = lineBuf.find(
'"',pos)+1;
2422 int endNamePos = lineBuf.find(
'"',startNamePos);
2423 QCString fileName = lineBuf.mid(startNamePos,endNamePos-startNamePos);
2424 DBG_RTF(t <<
"{\\comment begin include " << fileName <<
"}" <<
endl)
2426 DBG_RTF(t <<
"{\\comment end include " << fileName <<
"}" <<
endl)
2432 if (!f.atEnd() || bIncludeHeader)
2440 int pos = lineBuf.findRev(
'}');
2443 lineBuf.at(pos) =
'\0';
2445 err(
"Strange, the last char was not a '}'\n");
2449 lineBuf.resize(maxLineLength);
2472 t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2474 t << fn <<
"." << imgExt;
2475 t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" <<
endl;
2478 DBG_RTF(
t <<
"{\\comment (endDotGraph)}" << endl)
2483 DBG_RTF(
t <<
"{\\comment (startInclDepGraph)}" <<
endl)
2496 t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2498 t << fn <<
"." << imgExt;
2499 t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" <<
endl;
2501 DBG_RTF(
t <<
"{\\comment (endInclDepGraph)}" << endl)
2527 t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2529 t << fn <<
"." << imgExt;
2530 t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" <<
endl;
2532 DBG_RTF(
t <<
"{\\comment (endCallGraph)}" << endl)
2550 t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2552 t << fn <<
"." << imgExt;
2553 t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" <<
endl;
2555 DBG_RTF(
t <<
"{\\comment (endDirDepGraph)}" << endl)
2567 if (f.open(IO_ReadOnly))
2569 while ((c=f.getch())!=-1)
2595 if (bcount==0)
return;
2597 err(
"RTF integrity test failed at line %d of %s due to a bracket mismatch.\n"
2598 " Please try to create a small code example that produces this error \n"
2599 " and send that to dimitri@stack.nl.\n",line,name);
2612 err(
"Output dir %s does not exist!\n",path);
2615 QCString oldDir = QDir::currentDirPath().utf8();
2618 QDir::setCurrent(d.absPath());
2621 QCString combinedName = (QCString)path+
"/combined.rtf";
2622 QCString mainRTFName = (QCString)path+
"/"+name;
2624 QFile outf(combinedName);
2625 if (!outf.open(IO_WriteOnly))
2627 err(
"Failed to open %s for writing!\n",combinedName.data());
2628 QDir::setCurrent(oldDir);
2637 thisDir.remove(combinedName);
2638 QDir::setCurrent(oldDir);
2644 thisDir.remove(mainRTFName);
2645 thisDir.rename(combinedName,mainRTFName);
2649 QDir::setCurrent(oldDir);
2655 DBG_RTF(
t <<
"{\\comment startMemberGroupHeader}" <<
endl)
2663 DBG_RTF(
t <<
"{\\comment endMemberGroupHeader}" <<
endl)
2670 DBG_RTF(
t <<
"{\\comment startMemberGroupDocs}" <<
endl)
2752 DBG_RTF(
t <<
"{\\comment (startParameterType)}" <<
endl)
2755 t <<
" " << key <<
" ";
2770 else if (closeBracket)
2785 DBG_RTF(
t <<
"{\\comment (rtfwriteRuler_doubleline)}" <<
endl)
2786 t <<
"{\\pard\\widctlpar\\brdrb\\brdrdb\\brdrw15\\brsp20 \\adjustright \\par}" <<
endl;
2791 DBG_RTF(
t <<
"{\\comment (rtfwriteRuler_emboss)}" <<
endl)
2792 t <<
"{\\pard\\widctlpar\\brdrb\\brdremboss\\brdrw15\\brsp20 \\adjustright \\par}" <<
endl;
2797 DBG_RTF(
t <<
"{\\comment (rtfwriteRuler_thick)}" <<
endl)
2798 t <<
"{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw75\\brsp20 \\adjustright \\par}" <<
endl;
2803 DBG_RTF(
t <<
"{\\comment (rtfwriteRuler_thin)}" <<
endl)
2804 t <<
"{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" <<
endl;
2810 QByteArray enc(a.size()*4);
2814 for (i=0;i<a.size();i++)
2816 unsigned char c = (
unsigned char)a.at(i);
2820 if (c>0x80 || (mbFlag && c!=
'\\' && c!=
'{' && c!=
'}'))
2823 sprintf(s,
"\\'%X",c);
2824 qstrcpy(enc.data()+off,s);
2840 DBG_RTF(
t <<
"{\\comment (startConstraintList)}" <<
endl)
2855 DBG_RTF(
t <<
"{\\comment (startConstraintParam)}" <<
endl)
2861 DBG_RTF(
t <<
"{\\comment (endConstraintParam)}" <<
endl)
2868 DBG_RTF(
t <<
"{\\comment (startConstraintType)}" <<
endl)
2874 DBG_RTF(
t <<
"{\\comment (endConstraintType)}" <<
endl)
2881 DBG_RTF(
t <<
"{\\comment (startConstraintDocs)}" <<
endl)
2886 DBG_RTF(
t <<
"{\\comment (endConstraintDocs)}" <<
endl)
2892 DBG_RTF(
t <<
"{\\comment (endConstraintList)}" <<
endl)
2901 DBG_RTF(
t <<
"{\\comment (startIndexListItem)}" <<
endl)
2907 t <<
"\\par" <<
endl;
2912 DBG_RTF(
t <<
"{\\comment (startInlineHeader)}" <<
endl)
2928 DBG_RTF(
t <<
"{\\comment (startMemberDocSimple)}" <<
endl)
2929 t <<
"{\\par" <<
endl;
2939 t <<
":\\par}" <<
endl;
2941 t <<
"\\trowd \\trgaph108\\trleft426\\tblind426"
2942 "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
2943 "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
2944 "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
2945 "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
2946 "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
2947 "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<<
endl;
2948 int i,n=3,columnPos[3] = { 25, 50, 100 };
2957 t <<
"\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
2958 "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
2959 "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
2960 "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
2964 t <<
"\\pard \\widctlpar\\intbl\\adjustright" <<
endl;
2969 DBG_RTF(
t <<
"{\\comment (endMemberDocSimple)}" <<
endl)
2975 DBG_RTF(
t <<
"{\\comment (startInlineMemberType)}" <<
endl)
2981 DBG_RTF(
t <<
"{\\comment (endInlineMemberType)}" <<
endl)
2987 DBG_RTF(
t <<
"{\\comment (startInlineMemberName)}" <<
endl)
2993 DBG_RTF(
t <<
"{\\comment (endInlineMemberName)}" <<
endl)
2999 DBG_RTF(
t <<
"{\\comment (startInlineMemberDoc)}" <<
endl)
3005 DBG_RTF(
t <<
"{\\comment (endInlineMemberDoc)}" <<
endl)
3006 t <<
"\\cell }{\\row }" <<
endl;
3015 t <<
"{\\f2 [" << l <<
"]}";
3016 if (!isLast)
t <<
", ";