浏览该文件的文档.
58 auto now = std::chrono::system_clock::now();
59 auto time = std::chrono::system_clock::to_time_t(now);
60 auto tm = *localtime(&time);
63 result.
sprintf(
"\\yr%d\\mo%d\\dy%d\\hr%d\\min%d\\sec%d",
64 tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
65 tm.tm_hour, tm.tm_min, tm.tm_sec);
85 return std::make_unique<RTFGenerator>(*
this);
104 t <<
"# Generated by doxygen " << getDoxygenVersion() <<
"\n\n";
105 t <<
"# This file describes styles used for generating RTF output.\n";
106 t <<
"# All text after a hash (#) is considered a comment and will be ignored.\n";
107 t <<
"# Remove a hash to activate a line.\n\n";
120 t <<
"# Generated by doxygen " << getDoxygenVersion() <<
"\n\n";
121 t <<
"# This file describes extensions used for generating RTF output.\n";
122 t <<
"# All text after a hash (#) is considered a comment and will be ignored.\n";
123 t <<
"# Remove a hash to activate a line.\n\n";
125 t <<
"# Overrides the project title.\n";
127 t <<
"#Title = \n\n";
129 t <<
"# Name of the company that produced this document.\n";
130 t <<
"#Company = \n\n";
132 t <<
"# Filename of a company or project logo.\n";
133 t <<
"#LogoFilename = \n\n";
135 t <<
"# Author of the document.\n";
136 t <<
"#Author = \n\n";
138 t <<
"# Type of document (e.g. Design Specification, User Manual, etc.).\n";
139 t <<
"#DocumentType = \n\n";
141 t <<
"# Document tracking number.\n";
142 t <<
"#DocumentId = \n\n";
144 t <<
"# Name of the author's manager.\n";
145 t <<
"# This field is not displayed in the document itself, but it is \n";
146 t <<
"# available in the information block of the rtf file. In Microsoft \n";
147 t <<
"# Word, it is available under File:Properties.\n";
148 t <<
"#Manager = \n\n";
150 t <<
"# Subject of the document.\n";
151 t <<
"# This field is not displayed in the document itself, but it is \n";
152 t <<
"# available in the information block of the rtf file. In Microsoft \n";
153 t <<
"# Word, it is available under File:Properties.\n";
154 t <<
"#Subject = \n\n";
156 t <<
"# Comments regarding the document.\n";
157 t <<
"# This field is not displayed in the document itself, but it is \n";
158 t <<
"# available in the information block of the rtf file. In Microsoft \n";
159 t <<
"# Word, it is available under File:Properties.\n";
160 t <<
"#Comments = \n\n";
162 t <<
"# Keywords associated with the document.\n";
163 t <<
"# This field is not displayed in the document itself, but it is \n";
164 t <<
"# available in the information block of the rtf file. In Microsoft \n";
165 t <<
"# Word, it is available under File:Properties.\n";
166 t <<
"#Keywords = \n\n";
185 err(
"Internal: rtf_Style_Default[%s] has no definition.\n", def->
name);
196 if (!rtfStyleSheetFile.
isEmpty())
203 if (!rtfExtensionsFile.
isEmpty())
221 result+=(char)(i+
'0');
231 m_t <<
"\\uc1 \\deff0\\deflang1033\\deflangfe1033\n";
233 DBG_RTF(
m_t <<
"{\\comment Beginning font list}\n")
234 m_t <<
"{\\fonttbl ";
236 m_t <<
"\\fprq2{\\*\\panose 02020603050405020304}Times New Roman;}\n";
238 m_t <<
"\\fprq2{\\*\\panose 020b0604020202020204}Arial;}\n";
240 m_t <<
"\\fprq1{\\*\\panose 02070309020205020404}Courier New;}\n";
241 m_t <<
"{\\f3\\froman\\fcharset2\\fprq2{\\*\\panose 05050102010706020507}Symbol;}\n";
244 m_t <<
"{\\colortbl;";
245 m_t <<
"\\red0\\green0\\blue0;";
246 m_t <<
"\\red0\\green0\\blue255;";
247 m_t <<
"\\red0\\green255\\blue255;";
248 m_t <<
"\\red0\\green255\\blue0;";
249 m_t <<
"\\red255\\green0\\blue255;";
250 m_t <<
"\\red255\\green0\\blue0;";
251 m_t <<
"\\red255\\green255\\blue0;";
252 m_t <<
"\\red255\\green255\\blue255;";
253 m_t <<
"\\red0\\green0\\blue128;";
254 m_t <<
"\\red0\\green128\\blue128;";
255 m_t <<
"\\red0\\green128\\blue0;";
256 m_t <<
"\\red128\\green0\\blue128;";
257 m_t <<
"\\red128\\green0\\blue0;";
258 m_t <<
"\\red128\\green128\\blue0;";
259 m_t <<
"\\red128\\green128\\blue128;";
260 m_t <<
"\\red192\\green192\\blue192;";
263 m_t <<
"\\red0\\green128\\blue0;";
264 m_t <<
"\\red96\\green64\\blue32;";
265 m_t <<
"\\rede0\\green128\\blue0;";
266 m_t <<
"\\red128\\green0\\blue0;";
267 m_t <<
"\\red128\\green96\\blue32;";
268 m_t <<
"\\red0\\green32\\blue128;";
269 m_t <<
"\\red0\\green128\\blue128;";
270 m_t <<
"\\red255\\green0\\blue255;";
271 m_t <<
"\\red0\\green0\\blue0;";
272 m_t <<
"\\red112\\green0\\blue112;";
273 m_t <<
"\\red255\\green0\\blue0;";
277 DBG_RTF(
m_t <<
"{\\comment Beginning style list}\n")
278 m_t <<
"{\\stylesheet\n";
279 m_t <<
"{\\widctlpar\\adjustright \\fs20\\cgrid \\snext0 Normal;}\n";
287 case PAPER_TYPE_t::a4:
m_t <<
"\\paperw11900\\paperh16840";
break;
288 case PAPER_TYPE_t::letter:
m_t <<
"\\paperw12240\\paperh15840";
break;
289 case PAPER_TYPE_t::legal:
m_t <<
"\\paperw12240\\paperh20160";
break;
290 case PAPER_TYPE_t::executive:
m_t <<
"\\paperw10440\\paperh15120";
break;
292 m_t <<
"\\margl1800\\margr1800\\margt1440\\margb1440\\gutter0\\ltrsect}\n";
295 unsigned maxIndex = 0;
298 uint index = kv.second.index();
299 if (index > maxIndex) maxIndex = index;
301 std::vector<const StyleData*> array(maxIndex + 1, 0);
302 ASSERT(maxIndex < array.size());
306 uint index = kv.second.index();
307 if (array[index] != 0)
309 msg(
"Style '%s' redefines \\s%d.\n", kv.first.c_str(), index);
311 array[index] = &kv.second;
315 size_t size = array.size();
316 for(
size_t i = 0; i < size; i++)
327 m_t <<
"{\\comment begin body}\n";
334 DBG_RTF(
m_t <<
"{\\comment BeginRTFChapter}\n")
341 m_t <<
"\\sect\\sbknone\n";
345 m_t <<
"\\sect\\sbkpage\n";
354 DBG_RTF(
m_t <<
"{\\comment BeginRTFSection}\n")
360 m_t <<
"\\sect\\sbknone\n";
365 m_t <<
"\\sect\\sbkpage\n";
395 DBG_RTF(
m_t <<
"{\\comment startProjectNumber }\n")
401 DBG_RTF(
m_t <<
"{\\comment endProjectNumber }\n")
417 m_t <<
"{\\title {\\comment ";
428 m_t <<
"{\\comment ";
456 DBG_RTF(
m_t <<
"{\\comment start classhierarchy}\n")
476 if (!gd->isReference())
489 if (dd->isLinkableInProject())
502 if (nd->isLinkableInProject())
515 if (cd->isLinkableInProject())
528 if (cd->isLinkableInProject() &&
529 cd->templateMaster()==0 &&
530 !cd->isEmbeddedInOuterScope() &&
546 for (
const auto &fd : *fn)
548 if (fd->isLinkableInProject() || fd->generateSourceFile())
600 m_t <<
"}" << projectName;
604 m_t <<
" doxygen" << getDoxygenVersion() <<
".}\n";
606 DBG_RTF(
m_t <<
"{\\comment end of infoblock}\n");
609 m_t <<
"\\sectd\\pgnlcrm\n";
610 m_t <<
"{\\footer "<<
rtf_Style[
"Footer"].reference() <<
"{\\chpgn}}\n";
612 DBG_RTF(
m_t <<
"{\\comment begin title page}\n")
617 m_t <<
"\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n";
621 m_t <<
"\" \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
632 m_t <<
"{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt " <<
rtf_title <<
"}}\\par\n";
638 m_t <<
"{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt ";
653 m_t <<
"\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\n";
658 m_t <<
"{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt "<<
rtf_author <<
" }}\\par\n";
662 m_t <<
"{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par\n";
666 m_t <<
"{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
668 m_t <<
"\\page\\page";
669 DBG_RTF(
m_t <<
"{\\comment End title page}\n")
672 DBG_RTF(
m_t <<
"{\\comment Table of contents}\n")
673 m_t <<
"\\vertalt\n";
678 m_t <<
"{\\field\\fldedit {\\*\\fldinst TOC \\\\f \\\\*MERGEFORMAT}{\\fldrslt Table of contents}}\\par\n";
692 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
695 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
705 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"modules.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
710 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"dirs.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
723 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
728 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"concepts.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
733 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"hierarchy.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
749 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"annotated.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
754 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"files.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
759 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"pages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
767 if (!gd->isReference())
775 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
776 m_t << gd->getOutputFileBase();
777 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
788 if (dd->isLinkableInProject())
796 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
797 m_t << dd->getOutputFileBase();
798 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
808 if (nd->isLinkableInProject() && !nd->isAlias())
816 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
817 m_t << nd->getOutputFileBase();
818 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
828 if (cd->isLinkableInProject() && !cd->isAlias())
836 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
837 m_t << cd->getOutputFileBase();
838 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
856 if (cd->isLinkableInProject() &&
857 cd->templateMaster()==0 &&
858 !cd->isEmbeddedInOuterScope() &&
868 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
869 m_t << cd->getOutputFileBase();
870 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
882 for (
const auto &fd : *fn)
884 if (fd->isLinkableInProject())
892 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
893 m_t << fd->getOutputFileBase();
894 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
896 if (fd->generateSourceFile())
904 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
905 m_t << fd->getSourceFileBase();
906 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
925 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
926 m_t << pd->getOutputFileBase();
927 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
962 m_t <<
"{\\field\\fldedit {\\*\\fldinst INDEX \\\\c2 \\\\*MERGEFORMAT}{\\fldrslt INDEX}}\n";
971 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
973 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
978 DBG_RTF(
m_t <<
"{\\comment Beginning Body of RTF Document}\n")
980 m_t <<
"\\sect \\sbkpage \\pgndec \\pgnrestart\n";
981 m_t <<
"\\sect \\sectd \\sbknone\n";
984 m_t <<
"{\\footer "<<
rtf_Style[
"Footer"].reference() <<
"{\\chpgn}}\n";
994 DBG_RTF(
m_t <<
"{\\comment (lineBreak)}" <<
"\n")
1006 DBG_RTF(
m_t <<
"{\\comment (startIndexList)}\n")
1016 DBG_RTF(
m_t <<
"{\\comment (endIndexList)}\n")
1032 DBG_RTF(
m_t <<
"{\\comment (startItemList level=" << level <<
") }\n")
1052 DBG_RTF(
m_t <<
"{\\comment (startItemListItem)}\n")
1071 DBG_RTF(
m_t <<
"{\\comment (endItemListItem)}\n")
1076 DBG_RTF(
m_t <<
"{\\comment (startIndexItem)}\n")
1087 DBG_RTF(
m_t <<
"{\\comment (endIndexItem)}\n")
1106 m_t <<
"{\\field {\\*\\fldinst { HYPERLINK \"";
1109 m_t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1132 DBG_RTF(
m_t <<
"{\\comment (writeStartAnnoItem)}\n")
1137 m_t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1140 m_t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1155 DBG_RTF(
m_t <<
"{\\comment (writeEndAnnoItem)}\n")
1156 if (!
name.isEmpty())
1171 DBG_RTF(
m_t <<
"{\\comment (startIndexKey)}\n")
1177 DBG_RTF(
m_t <<
"{\\comment (endIndexKey)}\n")
1182 DBG_RTF(
m_t <<
"{\\comment (startIndexValue)}\n")
1184 if (hasBrief)
m_t <<
"(";
1189 DBG_RTF(
m_t <<
"{\\comment (endIndexValue)}\n")
1190 if (hasBrief)
m_t <<
")";
1192 if (!
name.isEmpty())
1210 DBG_RTF(
m_t <<
"{\\comment Begin SubSection}\n")
1225 DBG_RTF(
m_t <<
"{\\comment Begin SubSubSection}\n")
1251 m_t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1254 m_t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1282 m_t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1285 m_t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1340 m_t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1343 m_t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1357 DBG_RTF(
m_t <<
"{\\comment startTitleHead}\n")
1367 if (!
name.isEmpty())
1370 m_t <<
"{\\tc\\tcl2 \\v ";
1394 DBG_RTF(
m_t <<
"{\\comment startGroupHeader}\n")
1401 else if (extraIndent==1)
1414 DBG_RTF(
m_t <<
"{\\comment endGroupHeader}\n")
1427 DBG_RTF(
m_t <<
"{\\comment startMemberDoc}\n")
1428 if (!memname.
isEmpty() && memname[0]!=
'@')
1457 DBG_RTF(
m_t <<
"{\\comment startDoxyAnchor}\n")
1473 DBG_RTF(
m_t <<
"{\\comment endDoxyAnchor}\n")
1474 m_t <<
"{\\bkmkstart ";
1477 m_t <<
"{\\bkmkend ";
1486 m_t <<
"{\\xe \\v ";
1500 DBG_RTF(
m_t <<
"{\\comment (startIndent) }\n")
1514 DBG_RTF(
m_t <<
"{\\comment (startDescription)}" <<
"\n")
1521 DBG_RTF(
m_t <<
"{\\comment (endDescription)}" <<
"\n")
1529 DBG_RTF(
m_t <<
"{\\comment (startDescItem)}\n")
1535 DBG_RTF(
m_t <<
"{\\comment (endDescItem)}\n")
1542 DBG_RTF(
m_t <<
"{\\comment (startMemberDescription)}\n")
1551 DBG_RTF(
m_t <<
"{\\comment (endMemberDescription)}\n")
1562 DBG_RTF(
m_t <<
"{\\comment (startDescList)}\n")
1571 DBG_RTF(
m_t <<
"{\\comment (startDescForItem) }\n")
1576 DBG_RTF(
m_t <<
"{\\comment (endDescForItem) }\n")
1581 DBG_RTF(
m_t <<
"{\\comment (startSection)}\n")
1592 default:
ASSERT(0);
break;
1595 heading.
sprintf(
"Heading%d",num);
1599 m_t <<
"{\\tc\\tcl" << num <<
" \\v ";
1618 const unsigned char *p=(
const unsigned char *)str.
data();
1628 case '{':
m_t <<
"\\{";
break;
1629 case '}':
m_t <<
"\\}";
break;
1630 case '\\':
m_t <<
"\\\\";
break;
1651 const unsigned char *p=(
const unsigned char *)str.
data();
1653 int spacesToNextTabStop;
1665 m_col+=spacesToNextTabStop;
1670 case '{':
m_t <<
"\\{";
m_col++;
break;
1671 case '}':
m_t <<
"\\}";
m_col++;
break;
1672 case '\\':
m_t <<
"\\\\";
m_col++;
break;
1689 DBG_RTF(
m_t <<
"{\\comment startClassDiagram }\n")
1703 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
1705 m_t <<
" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
1711 DBG_RTF(
m_t <<
"{\\comment startMemberItem }\n")
1717 DBG_RTF(
m_t <<
"{\\comment endMemberItem }\n")
1732 if (!
name.isEmpty())
1738 DBG_RTF(
m_t <<
"{\\comment writeAnchor (" << anchor <<
")}\n")
1745 m_t <<
"{\\field\\fldedit {\\*\\fldinst PAGEREF ";
1747 m_t <<
" \\\\*MERGEFORMAT}{\\fldrslt pagenum}}";
1752 DBG_RTF(
m_t <<
"{\\comment (startCodeFragment) }\n")
1761 DBG_RTF(
m_t <<
"{\\comment (endCodeFragment) }\n")
1775 DBG_RTF(
m_t <<
"{\\comment (startMemberList) }\n")
1779 m_t <<
"\\begin{CompactItemize}\n";
1785 DBG_RTF(
m_t <<
"{\\comment (endMemberList) }\n")
1789 m_t <<
"\\end{CompactItemize}\n";
1795 DBG_RTF(
m_t <<
"{\\comment (startDescTable) }\n")
1797 m_t <<
"{" <<
rtf_Style[
"Heading5"].reference() <<
"\n";
1801 m_t <<
"\\trowd \\trgaph108\\trleft426\\tblind426"
1802 "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
1803 "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
1804 "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
1805 "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
1806 "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
1807 "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 \n";
1808 int i,columnPos[2] = { 25, 100 };
1811 m_t <<
"\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
1812 "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
1813 "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
1814 "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
1818 m_t <<
"\\pard \\widctlpar\\intbl\\adjustright\n";
1823 DBG_RTF(
m_t <<
"{\\comment (endDescTable)}\n")
1837 DBG_RTF(
m_t <<
"{\\comment (startDescTableTitle) }\n")
1843 DBG_RTF(
m_t <<
"{\\comment (endDescTableTitle) }\n")
1849 DBG_RTF(
m_t <<
"{\\comment (startDescTableData) }\n")
1855 DBG_RTF(
m_t <<
"{\\comment (endDescTableData) }\n")
1856 m_t <<
"\\cell }{\\row }\n";
1871 err(
"Maximum indent level (%d) exceeded while generating RTF output!\n",
maxIndentLevels);
1880 err(
"Negative indent level while generating RTF output!\n");
1927 DBG_RTF(
m_t <<
"{\\comment startTextBlock}\n")
1952 DBG_RTF(
m_t <<
"{\\comment (newParagraph)}\n")
1960 DBG_RTF(
m_t <<
"{\\comment startParagraph}\n")
1963 if (
QCString(txt) ==
"reference")
m_t <<
"\\ql\n";
1975 DBG_RTF(
m_t <<
"{\\comment startMemberSubtitle}\n")
1982 DBG_RTF(
m_t <<
"{\\comment endMemberSubtitle}\n")
1993 if (codePage ==
"932")
1995 result = (0x81<=c && c<=0x9f) || (0xe0<=c && c<=0xfc);
1997 else if (codePage ==
"936")
1999 result = 0x81<=c && c<=0xFE;
2001 else if (codePage ==
"949")
2003 result = 0x81<=c && c<=0xFE;
2005 else if (codePage ==
"950")
2007 result = 0x81<=c && c<=0xFE;
2023 bool converted=
FALSE;
2025 static std::vector<char> enc;
2026 if (l*4>(
int)enc.size()) enc.resize(l*4);
2032 if (cd!=(
void *)(-1))
2035 size_t oLeft=enc.size();
2036 const char *inputPtr = s.
data();
2037 char *outputPtr = &enc[0];
2040 enc.resize(enc.size()-(
unsigned int)oLeft);
2048 memcpy(enc.data(),s.
data(),l);
2052 bool multiByte =
FALSE;
2054 for (i=0;i<enc.size();i++)
2058 if (c>=0x80 || multiByte)
2061 sprintf(esc,
"\\'%X",c);
2087 std::ifstream f(infName.
str(),std::ifstream::in);
2090 err(
"problems opening rtf file '%s' for reading\n",infName.
data());
2094 const int maxLineLength = 10240;
2095 static QCString lineBuf(maxLineLength);
2102 while (getline(f,line))
2105 if (line.find(
"\\comment begin body")!=std::string::npos)
break;
2109 std::string prevLine;
2111 while (getline(f,line))
2115 if ((pos=prevLine.find(
"INCLUDETEXT \""))!=std::string::npos)
2117 size_t startNamePos = prevLine.find(
'"',pos)+1;
2118 size_t endNamePos = prevLine.find(
'"',startNamePos);
2119 std::string fileName = prevLine.substr(startNamePos,endNamePos-startNamePos);
2120 DBG_RTF(m_t <<
"{\\comment begin include " << fileName <<
"}\n")
2122 DBG_RTF(m_t <<
"{\\comment end include " << fileName <<
"}\n")
2131 if (!bIncludeHeader)
2133 size_t pos = line.rfind(
'}');
2134 if (pos==std::string::npos)
2136 err(
"Strange, the last char was not a '}'\n");
2137 pos = line.length();
2153 DBG_RTF(
m_t <<
"{\\comment (startDotGraph)}\n")
2166 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2168 m_t << fn <<
"." << imgExt;
2169 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2172 DBG_RTF(
m_t <<
"{\\comment (endDotGraph)}\n")
2177 DBG_RTF(
m_t <<
"{\\comment (startInclDepGraph)}\n")
2189 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2191 m_t << fn <<
"." << imgExt;
2192 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2194 DBG_RTF(
m_t <<
"{\\comment (endInclDepGraph)}\n")
2207 DBG_RTF(
m_t <<
"{\\comment (startCallGraph)}\n")
2219 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2221 m_t << fn <<
"." << imgExt;
2222 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2224 DBG_RTF(
m_t <<
"{\\comment (endCallGraph)}\n")
2229 DBG_RTF(
m_t <<
"{\\comment (startDirDepGraph)}\n")
2241 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2243 m_t << fn <<
"." << imgExt;
2244 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2246 DBG_RTF(
m_t <<
"{\\comment (endDirDepGraph)}\n")
2257 std::ifstream f(
name.data(),std::ifstream::in);
2260 while ((c=f.get())!=-1)
2286 if (bcount==0)
return;
2288 err(
"RTF integrity test failed at line %d of %s due to a bracket mismatch.\n"
2289 " Please try to create a small code example that produces this error \n"
2290 " and send that to doxygen@gmail.com.\n",line,
qPrint(
name));
2304 err(
"Output dir %s does not exist!\n",
qPrint(path));
2313 QCString combinedName = path+
"/combined.rtf";
2316 std::ofstream f(combinedName.
str(),std::ofstream::out | std::ofstream::binary);
2319 err(
"Failed to open %s for writing!\n",combinedName.
data());
2330 if (!rtfDebug) thisDir.
remove(combinedName.
str());
2344 thisDir.
rename(mainRTFName.
str(),mainRTFName.
str() +
".org");
2356 DBG_RTF(
m_t <<
"{\\comment startMemberGroupHeader}\n")
2364 DBG_RTF(
m_t <<
"{\\comment endMemberGroupHeader}\n")
2371 DBG_RTF(
m_t <<
"{\\comment startMemberGroupDocs}\n")
2377 DBG_RTF(
m_t <<
"{\\comment endMemberGroupDocs}\n")
2384 DBG_RTF(
m_t <<
"{\\comment startMemberGroup}\n")
2390 DBG_RTF(
m_t <<
"{\\comment endMemberGroup}\n")
2397 DBG_RTF(
m_t <<
"{\\comment (startExamples)}\n")
2412 DBG_RTF(
m_t <<
"{\\comment (endExamples)}\n")
2422 DBG_RTF(
m_t <<
"{\\comment (startParamList)}\n")
2437 DBG_RTF(
m_t <<
"{\\comment (endParamList)}\n")
2446 DBG_RTF(
m_t <<
"{\\comment (startParameterType)}\n")
2449 m_t <<
" " << key <<
" ";
2455 DBG_RTF(
m_t <<
"{\\comment (endParameterType)}\n")
2461 DBG_RTF(
m_t <<
"{\\comment (exceptionEntry)}\n")
2464 m_t <<
" " << prefix <<
"(";
2466 else if (closeBracket)
2483 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_doubleline)}\n")
2484 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdrdb\\brdrw15\\brsp20 \\adjustright \\par}\n";
2489 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_emboss)}\n")
2490 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdremboss\\brdrw15\\brsp20 \\adjustright \\par}\n";
2495 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_thick)}\n")
2496 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw75\\brsp20 \\adjustright \\par}\n";
2501 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_thin)}\n")
2502 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}\n";
2507 DBG_RTF(
m_t <<
"{\\comment (startConstraintList)}\n")
2522 DBG_RTF(
m_t <<
"{\\comment (startConstraintParam)}\n")
2528 DBG_RTF(
m_t <<
"{\\comment (endConstraintParam)}\n")
2535 DBG_RTF(
m_t <<
"{\\comment (startConstraintType)}\n")
2541 DBG_RTF(
m_t <<
"{\\comment (endConstraintType)}\n")
2548 DBG_RTF(
m_t <<
"{\\comment (startConstraintDocs)}\n")
2553 DBG_RTF(
m_t <<
"{\\comment (endConstraintDocs)}\n")
2559 DBG_RTF(
m_t <<
"{\\comment (endConstraintList)}\n")
2568 DBG_RTF(
m_t <<
"{\\comment (startIndexListItem)}\n")
2573 DBG_RTF(
m_t <<
"{\\comment (endIndexListItem)}\n")
2579 DBG_RTF(
m_t <<
"{\\comment (startInlineHeader)}\n")
2587 DBG_RTF(
m_t <<
"{\\comment (endInlineHeader)}\n")
2595 DBG_RTF(
m_t <<
"{\\comment (startMemberDocSimple)}\n")
2597 m_t <<
"{" <<
rtf_Style[
"Heading5"].reference() <<
"\n";
2608 m_t <<
"\\trowd \\trgaph108\\trleft426\\tblind426"
2609 "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
2610 "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
2611 "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
2612 "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
2613 "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
2614 "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 \n";
2615 int i,n=3,columnPos[3] = { 25, 50, 100 };
2624 m_t <<
"\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
2625 "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
2626 "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
2627 "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
2631 m_t <<
"\\pard \\widctlpar\\intbl\\adjustright\n";
2636 DBG_RTF(
m_t <<
"{\\comment (endMemberDocSimple)}\n")
2642 DBG_RTF(
m_t <<
"{\\comment (startInlineMemberType)}\n")
2648 DBG_RTF(
m_t <<
"{\\comment (endInlineMemberType)}\n")
2654 DBG_RTF(
m_t <<
"{\\comment (startInlineMemberName)}\n")
2660 DBG_RTF(
m_t <<
"{\\comment (endInlineMemberName)}\n")
2666 DBG_RTF(
m_t <<
"{\\comment (startInlineMemberDoc)}\n")
2672 DBG_RTF(
m_t <<
"{\\comment (endInlineMemberDoc)}\n")
2673 m_t <<
"\\cell }{\\row }\n";
2689 lineAnchor.
sprintf(
"_l%05d",l);
2692 bool showTarget = rtfHyperlinks && !lineAnchor.
isEmpty() && writeLineAnchor;
2695 m_t <<
"{\\bkmkstart ";
2698 m_t <<
"{\\bkmkend ";
2735 m_t <<
"{\\f2 [" << l <<
"]}";
2736 if (!isLast)
m_t <<
", ";
2747 if (qname ==
"keyword") cod = 17;
2748 else if (qname ==
"keywordtype") cod = 18;
2749 else if (qname ==
"keywordflow") cod = 19;
2750 else if (qname ==
"comment") cod = 20;
2751 else if (qname ==
"preprocessor") cod = 21;
2752 else if (qname ==
"stringliteral") cod = 22;
2753 else if (qname ==
"charliteral") cod = 23;
2754 else if (qname ==
"vhdldigit") cod = 24;
2755 else if (qname ==
"vhdlchar") cod = 25;
2756 else if (qname ==
"vhdlkeyword") cod = 26;
2757 else if (qname ==
"vhdllogic") cod = 27;
2758 m_t <<
"{\\cf" << cod <<
" ";
QCString getDotImageExtension()
virtual QCString getDefFileExtension() const =0
void writeStartAnnoItem(const QCString &type, const QCString &file, const QCString &path, const QCString &name)
void rtfwriteRuler_doubleline()
QCString fileName() const
virtual QCString trRTFGeneralIndex()=0
static std::string currentDirPath()
size_t portable_iconv(void *cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
void startInlineMemberName()
void endMemberDescription()
virtual QCString trCompoundMembers()=0
RTFListItemInfo m_listItemInfo[maxIndentLevels]
static std::unique_ptr< PageDef > mainPage
void startHtmlLink(const QCString &url)
QCString stripExtensionGeneral(const QCString &fName, const QCString &ext)
#define Config_getEnum(name)
Representation of an directory dependency graph
void writeLabel(const QCString &l, bool isLast)
The common base class of all entity definitions found in the sources.
bool remove(const std::string &path, bool acceptsAbsPath=true) const
virtual std::unique_ptr< OutputGenerator > clone() const
QCString relativePathToRoot(const QCString &name)
QCString rtf_EList_DepthStyle()
QCString rtf_CList_DepthStyle()
Class representing a directory in the file system
virtual QCString trClassDocumentation()=0
QCString rtf_BList_DepthStyle()
void endDoxyAnchor(const QCString &, const QCString &)
uint length() const
Returns the length of the string, not counting the 0-terminator.
void rtfwriteRuler_emboss()
void writeImage(TextStream &t, const QCString &path, const QCString &relPath, const QCString &file, bool generateMap=true) const
void endIndexSection(IndexSections)
static ConceptLinkedMap * conceptLinkedMap
static const int maxIndentLevels
bool isEmpty() const
Returns TRUE iff the string is empty
void endCodeFragment(const QCString &style)
Generator for RTF output.
Abstract node interface with type information.
static void writeStyleSheetFile(TextStream &t)
void docify(const QCString &text)
void startConstraintDocs()
void startIndexValue(bool)
virtual QCString trTypeDocumentation()=0
void exceptionEntry(const QCString &, bool)
void startParamList(ParamListTypes, const QCString &)
void startSection(const QCString &, const QCString &, SectionType)
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool TBRank=TRUE, bool imageMap=TRUE, int graphId=-1)
void startFontClass(const QCString &)
virtual QCString trEnumerationValues()=0
void startProjectNumber()
virtual QCString trConceptIndex()=0
void err(const char *fmt,...)
void endDotGraph(DotClassGraph &)
Text streaming class that buffers data.
static DirLinkedMap * dirLinkedMap
void * portable_iconv_open(const char *tocode, const char *fromcode)
virtual QCString trRTFTableOfContents()=0
void writeStyleInfo(int part)
void startCodeFragment(const QCString &style)
void startMemberGroupDocs()
void codify(const QCString &text)
void flush()
Flushes the buffer.
QCString writeGraph(TextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1, bool linkRelations=TRUE)
void endInlineMemberDoc()
SectionType
enum representing the various types of sections and entities that can be referred to.
void startGroupHeader(int)
virtual QCString trFileDocumentation()=0
void startDescTable(const QCString &title)
void startMemberDoc(const QCString &, const QCString &, const QCString &, const QCString &, int, int, bool)
static bool isFlagSet(DebugMask mask)
void endIndexValue(const QCString &, bool)
const char * definition() const
static bool preProcessFile(Dir &d, const QCString &infName, TextStream &t, bool bIncludeHeader=TRUE)
VERY brittle routine inline RTF's included by other RTF's.
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
void startIndexSection(IndexSections)
void setSourceFileName(const QCString &sourceFileName)
static FileNameLinkedMap * inputNameLinkedMap
void endMemberGroup(bool)
void testRTFOutput(const QCString &name)
Tests the integrity of the result by counting brackets.
QCString rtfFormatBmkStr(const QCString &name)
QCString rtf_DList_DepthStyle()
void endInlineMemberName()
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
QCString m_sourceFileName
A model of a class/file/namespace member symbol.
QCString dateToString(bool includeTime)
void startDescList(SectionTypes)
@ isNamespaceDocumentation
bool rename(const std::string &orgName, const std::string &newName, bool acceptsAbsPath=true) const
virtual QCString trDirDocumentation()=0
void writeDoc(DocNode *, const Definition *, const MemberDef *, int)
#define Config_getInt(name)
virtual QCString trVersion()=0
RTFGenerator & operator=(const RTFGenerator &)
QCString left(size_t len) const
virtual QCString trDirIndex()=0
QCString rtf_LCList_DepthStyle()
void startMemberDocSimple(bool)
void endPageRef(const QCString &, const QCString &)
Representation of an call graph
void addIndexItem(const QCString &, const QCString &)
void loadExtensions(const QCString &name)
void loadStylesheet(const QCString &name, StyleDataMap &map)
void startParameterType(bool, const QCString &)
Translator * theTranslator
std::string absPath() const
void writeLineNumber(const QCString &, const QCString &, const QCString &, int l, bool)
void startFile(const QCString &name, const QCString &manName, const QCString &title, int id)
static GroupLinkedMap * groupLinkedMap
void startTitleHead(const QCString &)
QCString rtf_documentType
void startMemberDescription(const QCString &, const QCString &, bool)
void startMemberItem(const QCString &, int, const QCString &)
void startDescTableTitle()
QCString stripPath(const QCString &s)
void writeString(const QCString &text)
void startInlineMemberDoc()
void writeEndAnnoItem(const QCString &name)
virtual QCString trPageIndex()=0
void startIndexListItem()
void endMemberDocSimple(bool)
virtual QCString trMainPage()=0
void endMemberGroupHeader()
void startConstraintList(const QCString &)
void endCallGraph(DotCallGraph &)
static bool setCurrent(const std::string &path)
void endDirDepGraph(DotDirDeps &g)
void endInlineMemberType()
static QCString dateToRTFDateString()
void writeNonBreakableSpace(int)
void rtfwriteRuler_thick()
DocText * validatingParseText(IDocParser &parserIntf, const QCString &input)
Class representing a built-in class diagram.
Representation of a class inheritance or dependency graph
void endMemberGroupDocs()
QCString rtf_logoFilename
void writeRTFReference(const QCString &label)
void startIndexItem(const QCString &ref, const QCString &file)
void startParagraph(const QCString &classDef)
void clearSubDirs(const Dir &d)
void endConstraintParam()
Various UTF8 related helper functions.
const char * writeUTF8Char(TextStream &t, const char *s)
Writes the UTF8 character pointed to by s to stream t and returns a pointer to the next character.
void startTextBlock(bool dense)
void startDoxyAnchor(const QCString &, const QCString &, const QCString &, const QCString &, const QCString &)
Abstract output generator.
void startConstraintType()
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
virtual QCString trRTFCharSet()=0
virtual QCString trModuleDocumentation()=0
void startGroupCollaboration()
static bool preProcessFileInplace(const QCString &path, const QCString &name)
This is an API to a VERY brittle RTF preprocessor that combines nested RTF files.
#define Config_getBool(name)
void rtfwriteRuler_thin()
virtual QCString trRTFansicp()=0
void msg(const char *fmt,...)
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
void endGroupCollaboration(DotGroupCollaboration &g)
void term(const char *fmt,...)
void startInlineMemberType()
void startDescTableData()
virtual QCString trModulesIndex()=0
void startConstraintParam()
virtual QCString trExampleDocumentation()=0
const char * qPrint(const char *s)
QCString rtf_Code_DepthStyle()
Rtf_Style_Default rtf_Style_Default[]
#define Config_getString(name)
void writePageLink(const QCString &, bool)
Representation of a group collaboration graph
static NamespaceLinkedMap * namespaceLinkedMap
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
static QCString makeIndexName(const QCString &s, int i)
void startSubsubsection()
Representation of an include dependency graph
virtual void accept(DocVisitor *v)=0
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip)
OutputGenerator & operator=(const OutputGenerator &o)
Concrete visitor implementation for RTF output.
virtual QCString trDesignUnitIndex()=0
void startMemberGroupHeader(bool)
void lineBreak(const QCString &style=QCString())
void writeAnchor(const QCString &fileName, const QCString &name)
Portable versions of functions that are platform dependent.
void startTextLink(const QCString &f, const QCString &anchor)
void endTitleHead(const QCString &, const QCString &name)
int portable_iconv_close(void *cd)
virtual QCString trExamples()=0
virtual QCString trCompoundIndexFortran()=0
static ClassLinkedMap * classLinkedMap
const char * reference() const
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
virtual QCString trNamespaceIndex()=0
A bunch of utility functions.
void createSubDirs(const Dir &d)
virtual QCString trFileIndex()=0
virtual QCString trModuleIndex()=0
void endIndexItem(const QCString &ref, const QCString &file)
QCString right(size_t len) const
void startPlainFile(const QCString &name)
QCString & prepend(const char *s)
virtual QCString trCompoundIndex()=0
static void encodeForOutput(TextStream &t, const QCString &s)
QCString & sprintf(const char *format,...)
void endClassDiagram(const ClassDiagram &, const QCString &filename, const QCString &name)
void startMemberSubtitle()
void setRelativePath(const QCString &path)
std::unique_ptr< IDocParser > createDocParser()
static void writeExtensionsFile(TextStream &t)
void endSection(const QCString &, SectionType)
virtual QCString trHierarchicalIndex()=0
static PageLinkedMap * exampleLinkedMap
void endInclDepGraph(DotInclDepGraph &)
This is an alternative implementation of QCString.