25#include <unordered_map>
68 case TIMESTAMP_t::YES:
69 case TIMESTAMP_t::DATETIME:
70 result.
sprintf(
"\\yr%d\\mo%d\\dy%d\\hr%d\\min%d\\sec%d",
71 tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
72 tm.tm_hour, tm.tm_min, tm.tm_sec);
74 case TIMESTAMP_t::DATE:
75 result.
sprintf(
"\\yr%d\\mo%d\\dy%d",
76 tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday);
81 return "{\\creatim " + result +
"}\n";
90 const char *p=str.
data();
97 case '{': result +=
"\\{";
break;
98 case '}': result +=
"\\}";
break;
99 case '\\': result +=
"\\\\";
break;
100 default: result += c;
break;
110 result+=
static_cast<char>(i+
'0');
141 *
m_t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
144 *
m_t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
164 const char *p=str.
data();
176 int spacesToNextTabStop = tabSize - (
m_col%tabSize);
177 while (spacesToNextTabStop--)
187 case '\n': *
m_t <<
"\\par\n";
190 case '{': *
m_t <<
"\\{";
m_col++;
break;
191 case '}': *
m_t <<
"\\}";
m_col++;
break;
192 case '\\': *
m_t <<
"\\\\";
m_col++;
break;
222 DBG_RTF(*
m_t <<
"{\\comment (startCodeFragment) }\n")
235 DBG_RTF(*
m_t <<
"{\\comment (endCodeFragment) }\n")
254 lineAnchor.
sprintf(
"_l%05d",l);
257 bool showTarget = rtfHyperlinks && !lineAnchor.
empty() && writeLineAnchor;
260 *
m_t <<
"{\\bkmkstart ";
263 *
m_t <<
"{\\bkmkend ";
267 if (!fileName.
empty())
302 static const std::unordered_map<std::string,int> map {
304 {
"keywordtype", 18 },
305 {
"keywordflow", 19 },
307 {
"preprocessor", 21 },
308 {
"stringliteral", 22 },
309 {
"charliteral", 23 },
312 {
"vhdlkeyword", 26 },
315 auto it = map.find(name.
str());
320 *
m_t <<
"{\\cf" << cod <<
" ";
399 t <<
"# Generated by doxygen " << getDoxygenVersion() <<
"\n\n";
400 t <<
"# This file describes styles used for generating RTF output.\n";
401 t <<
"# All text after a hash (#) is considered a comment and will be ignored.\n";
402 t <<
"# Remove a hash to activate a line.\n\n";
414 t <<
"# Generated by doxygen " << getDoxygenVersion() <<
"\n\n";
415 t <<
"# This file describes extensions used for generating RTF output.\n";
416 t <<
"# All text after a hash (#) is considered a comment and will be ignored.\n";
417 t <<
"# Remove a hash to activate a line.\n\n";
419 t <<
"# Overrides the project title.\n";
421 t <<
"#Title = \n\n";
423 t <<
"# Name of the company that produced this document.\n";
424 t <<
"#Company = \n\n";
426 t <<
"# Filename of a company or project logo.\n";
427 t <<
"#LogoFilename = \n\n";
429 t <<
"# Author of the document.\n";
430 t <<
"#Author = \n\n";
432 t <<
"# Type of document (e.g. Design Specification, User Manual, etc.).\n";
433 t <<
"#DocumentType = \n\n";
435 t <<
"# Document tracking number.\n";
436 t <<
"#DocumentId = \n\n";
438 t <<
"# Name of the author's manager.\n";
439 t <<
"# This field is not displayed in the document itself, but it is \n";
440 t <<
"# available in the information block of the rtf file. In Microsoft \n";
441 t <<
"# Word, it is available under File:Properties.\n";
442 t <<
"#Manager = \n\n";
444 t <<
"# Subject of the document.\n";
445 t <<
"# This field is not displayed in the document itself, but it is \n";
446 t <<
"# available in the information block of the rtf file. In Microsoft \n";
447 t <<
"# Word, it is available under File:Properties.\n";
448 t <<
"#Subject = \n\n";
450 t <<
"# Comments regarding the document.\n";
451 t <<
"# This field is not displayed in the document itself, but it is \n";
452 t <<
"# available in the information block of the rtf file. In Microsoft \n";
453 t <<
"# Word, it is available under File:Properties.\n";
454 t <<
"#Comments = \n\n";
456 t <<
"# Keywords associated with the document.\n";
457 t <<
"# This field is not displayed in the document itself, but it is \n";
458 t <<
"# available in the information block of the rtf file. In Microsoft \n";
459 t <<
"# Word, it is available under File:Properties.\n";
460 t <<
"#Keywords = \n\n";
470 term(
"Could not create output directory {}\n",
dir);
479 err(
"Internal: rtf_Style_Default[{}] has no definition.\n", def->
name);
490 if (!rtfStyleSheetFile.
empty())
497 if (!rtfExtensionsFile.
empty())
506 err(
"Logo '{}' specified by 'LogoFilename' in the rtf extension file '{}' does not exist!\n",
535 m_t <<
"\\uc1 \\deff0\\deflang1033\\deflangfe1033\n";
537 DBG_RTF(
m_t <<
"{\\comment Beginning font list}\n")
538 m_t <<
"{\\fonttbl ";
540 m_t <<
"\\fprq2{\\*\\panose 02020603050405020304}Times New Roman;}\n";
542 m_t <<
"\\fprq2{\\*\\panose 020b0604020202020204}Arial;}\n";
544 m_t <<
"\\fprq1{\\*\\panose 02070309020205020404}Courier New;}\n";
545 m_t <<
"{\\f3\\froman\\fcharset2\\fprq2{\\*\\panose 05050102010706020507}Symbol;}\n";
548 m_t <<
"{\\colortbl;";
549 m_t <<
"\\red0\\green0\\blue0;";
550 m_t <<
"\\red0\\green0\\blue255;";
551 m_t <<
"\\red0\\green255\\blue255;";
552 m_t <<
"\\red0\\green255\\blue0;";
553 m_t <<
"\\red255\\green0\\blue255;";
554 m_t <<
"\\red255\\green0\\blue0;";
555 m_t <<
"\\red255\\green255\\blue0;";
556 m_t <<
"\\red255\\green255\\blue255;";
557 m_t <<
"\\red0\\green0\\blue128;";
558 m_t <<
"\\red0\\green128\\blue128;";
559 m_t <<
"\\red0\\green128\\blue0;";
560 m_t <<
"\\red128\\green0\\blue128;";
561 m_t <<
"\\red128\\green0\\blue0;";
562 m_t <<
"\\red128\\green128\\blue0;";
563 m_t <<
"\\red128\\green128\\blue128;";
564 m_t <<
"\\red192\\green192\\blue192;";
567 m_t <<
"\\red0\\green128\\blue0;";
568 m_t <<
"\\red96\\green64\\blue32;";
569 m_t <<
"\\rede0\\green128\\blue0;";
570 m_t <<
"\\red128\\green0\\blue0;";
571 m_t <<
"\\red128\\green96\\blue32;";
572 m_t <<
"\\red0\\green32\\blue128;";
573 m_t <<
"\\red0\\green128\\blue128;";
574 m_t <<
"\\red255\\green0\\blue255;";
575 m_t <<
"\\red0\\green0\\blue0;";
576 m_t <<
"\\red112\\green0\\blue112;";
577 m_t <<
"\\red255\\green0\\blue0;";
581 DBG_RTF(
m_t <<
"{\\comment Beginning style list}\n")
582 m_t <<
"{\\stylesheet\n";
583 m_t <<
"{\\widctlpar\\adjustright \\fs20\\cgrid \\snext0 Normal;}\n";
591 case PAPER_TYPE_t::a4:
m_t <<
"\\paperw11900\\paperh16840";
break;
592 case PAPER_TYPE_t::letter:
m_t <<
"\\paperw12240\\paperh15840";
break;
593 case PAPER_TYPE_t::legal:
m_t <<
"\\paperw12240\\paperh20160";
break;
594 case PAPER_TYPE_t::executive:
m_t <<
"\\paperw10440\\paperh15120";
break;
596 m_t <<
"\\margl1800\\margr1800\\margt1440\\margb1440\\gutter0\\ltrsect}\n";
599 unsigned maxIndex = 0;
600 for (
const auto &[name,data] :
rtf_Style)
602 uint32_t index = data.index();
603 if (index > maxIndex) maxIndex = index;
605 std::vector<const StyleData*> array(maxIndex + 1,
nullptr);
606 ASSERT(maxIndex < array.size());
608 for (
const auto &[name,data] :
rtf_Style)
610 uint32_t index = data.index();
611 if (array[index] !=
nullptr)
613 err(
"Style '{}' redefines \\s{}.\n", name, index);
615 array[index] = &data;
619 size_t size = array.size();
620 for(
size_t i = 0; i < size; i++)
633 m_t <<
"{\\*\\listtable" <<
"\n";
640 m_t <<
"\\listid" <<
id <<
"}" <<
"\n";
647 m_t <<
"\\listid" <<
id <<
"}" <<
"\n";
649 m_t <<
"{\\listoverridetable" <<
"\n";
656 m_t <<
"{\\listoverride\\listid" <<
id <<
"\\listoverridecount0\\ls" <<
id <<
"}" <<
"\n";
662 m_t <<
"{\\comment begin body}\n";
669 DBG_RTF(
m_t <<
"{\\comment BeginRTFChapter}\n")
676 m_t <<
"\\sect\\sbknone\n";
680 m_t <<
"\\sect\\sbkpage\n";
689 DBG_RTF(
m_t <<
"{\\comment BeginRTFSection}\n")
695 m_t <<
"\\sect\\sbknone\n";
700 m_t <<
"\\sect\\sbkpage\n";
732 DBG_RTF(
m_t <<
"{\\comment startProjectNumber }\n")
738 DBG_RTF(
m_t <<
"{\\comment endProjectNumber }\n")
754 m_t <<
"{\\title {\\comment ";
765 m_t <<
"{\\comment ";
793 DBG_RTF(
m_t <<
"{\\comment start classhierarchy}\n")
813 if (!gd->isReference())
826 if (!mod->isReference() && mod->isPrimaryInterface())
839 if (dd->isLinkableInProject())
852 if (nd->isLinkableInProject())
865 if (cd->isLinkableInProject())
878 if (cd->isLinkableInProject() &&
879 !cd->isImplicitTemplateInstance() &&
880 !cd->isEmbeddedInOuterScope() &&
896 for (
const auto &fd : *fn)
898 if (fd->isLinkableInProject() || fd->generateSourceFile())
943 m_t <<
"}" << projectName;
947 m_t <<
" doxygen " << getDoxygenVersion() <<
".}\n";
949 DBG_RTF(
m_t <<
"{\\comment end of infoblock}\n");
953 m_t <<
"\\sectd\\pgnlcrm\n";
954 m_t <<
"{\\footer "<<
rtf_Style[
"Footer"].reference() <<
"{\\chpgn}}\n";
956 DBG_RTF(
m_t <<
"{\\comment begin title page}\n")
961 m_t <<
"\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n";
965 m_t <<
"\" \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
976 m_t <<
"{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt " <<
rtf_title <<
"}}\\par\n";
984 m_t <<
"{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt ";
985 writeDoc(ast.get(),
nullptr,
nullptr,0,-1);
1000 m_t <<
"\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\n";
1005 m_t <<
"{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt "<<
rtf_author <<
" }}\\par\n";
1009 m_t <<
"{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par\n";
1015 case TIMESTAMP_t::YES:
1016 case TIMESTAMP_t::DATETIME:
1017 m_t <<
"{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
1020 case TIMESTAMP_t::DATE:
1021 m_t <<
"{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
1024 case TIMESTAMP_t::NO:
1027 m_t <<
"\\page\\page";
1028 DBG_RTF(
m_t <<
"{\\comment End title page}\n")
1031 DBG_RTF(
m_t <<
"{\\comment Table of contents}\n")
1032 m_t <<
"\\vertalt\n";
1037 m_t <<
"{\\field\\fldedit {\\*\\fldinst TOC \\\\f \\\\*MERGEFORMAT}{\\fldrslt Table of contents}}\\par\n";
1050 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"topics.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1055 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"modules.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1060 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"dirs.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1073 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1078 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"concepts.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1083 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"hierarchy.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1099 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"annotated.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1104 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"files.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1109 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"pages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1116 if (!gd->isReference() && !gd->isASubGroup())
1128 if (!mod->isReference() && mod->isPrimaryInterface())
1141 if (dd->isLinkableInProject())
1149 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1150 m_t << dd->getOutputFileBase();
1151 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1161 if (nd->isLinkableInProject() && !nd->isAlias())
1169 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1170 m_t << nd->getOutputFileBase();
1171 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1181 if (cd->isLinkableInProject() && !cd->isAlias())
1189 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1190 m_t << cd->getOutputFileBase();
1191 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1209 if (cd->isLinkableInProject() &&
1210 !cd->isImplicitTemplateInstance() &&
1211 !cd->isEmbeddedInOuterScope() &&
1221 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1222 m_t << cd->getOutputFileBase();
1223 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1235 for (
const auto &fd : *fn)
1237 if (fd->isLinkableInProject())
1245 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1246 m_t << fd->getOutputFileBase();
1247 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1249 if (fd->generateSourceFile())
1257 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1258 m_t << fd->getSourceFileBase();
1259 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1278 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1279 m_t << pd->getOutputFileBase();
1280 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1289 if (!pd->getGroupDef() && !pd->isReference() && !pd->hasParentPage()
1305 m_t <<
"{\\field\\fldedit {\\*\\fldinst INDEX \\\\c2 \\\\*MERGEFORMAT}{\\fldrslt INDEX}}\n";
1314 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1316 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1321 DBG_RTF(
m_t <<
"{\\comment Beginning Body of RTF Document}\n")
1323 m_t <<
"\\sect \\sbkpage \\pgndec \\pgnrestart\n";
1324 m_t <<
"\\sect \\sectd \\sbknone\n";
1327 m_t <<
"{\\footer "<<
rtf_Style[
"Footer"].reference() <<
"{\\chpgn}}\n";
1337 DBG_RTF(
m_t <<
"{\\comment (lineBreak)}" <<
"\n")
1349 DBG_RTF(
m_t <<
"{\\comment (startIndexList)}\n")
1359 DBG_RTF(
m_t <<
"{\\comment (endIndexList)}\n")
1375 DBG_RTF(
m_t <<
"{\\comment (startItemList level=" << level <<
") }\n")
1395 DBG_RTF(
m_t <<
"{\\comment (startItemListItem)}\n")
1414 DBG_RTF(
m_t <<
"{\\comment (endItemListItem)}\n")
1419 DBG_RTF(
m_t <<
"{\\comment (startIndexItem)}\n")
1430 DBG_RTF(
m_t <<
"{\\comment (endIndexItem)}\n")
1447 DBG_RTF(
m_t <<
"{\\comment (writeStartAnnoItem)}\n")
1452 m_t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1455 m_t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1470 DBG_RTF(
m_t <<
"{\\comment (startIndexKey)}\n")
1476 DBG_RTF(
m_t <<
"{\\comment (endIndexKey)}\n")
1481 DBG_RTF(
m_t <<
"{\\comment (startIndexValue)}\n")
1483 if (hasBrief)
m_t <<
"(";
1488 DBG_RTF(
m_t <<
"{\\comment (endIndexValue)}\n")
1489 if (hasBrief)
m_t <<
")";
1509 DBG_RTF(
m_t <<
"{\\comment Begin SubSubSection}\n")
1530 if (!anchor.
empty())
1536 m_t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1539 m_t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1562 if (!anchor.
empty())
1568 result +=
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1571 result +=
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1601 if (!clname.
empty())
1605 if (!anchor.
empty())
1617 DBG_RTF(
m_t <<
"{\\comment startTitleHead}\n")
1620 heading.
sprintf(
"Heading%d", level);
1633 m_t <<
"{\\tc\\tcl" << level <<
" \\v ";
1648 DBG_RTF(
m_t <<
"{\\comment startGroupHeader}\n")
1655 else if (extraIndent==1)
1668 DBG_RTF(
m_t <<
"{\\comment endGroupHeader}\n")
1681 DBG_RTF(
m_t <<
"{\\comment startMemberDoc}\n")
1682 if (!memname.
empty() && memname[0]!=
'@')
1719 DBG_RTF(
m_t <<
"{\\comment startDoxyAnchor}\n")
1729 if (!anchor.
empty())
1735 DBG_RTF(
m_t <<
"{\\comment endDoxyAnchor}\n")
1736 m_t <<
"{\\bkmkstart ";
1739 m_t <<
"{\\bkmkend ";
1754 m_t <<
"{\\xe \\v ";
1768 DBG_RTF(
m_t <<
"{\\comment (startIndent) }\n")
1782 DBG_RTF(
m_t <<
"{\\comment (startMemberDescription)}\n")
1791 DBG_RTF(
m_t <<
"{\\comment (endMemberDescription)}\n")
1801 DBG_RTF(
m_t <<
"{\\comment (startDescForItem) }\n")
1806 DBG_RTF(
m_t <<
"{\\comment (endDescForItem) }\n")
1811 DBG_RTF(
m_t <<
"{\\comment (startSection)}\n")
1824 default:
ASSERT(0);
break;
1828 heading.
sprintf(
"Heading%d",num);
1832 m_t <<
"{\\tc\\tcl" << num <<
" \\v ";
1849 if (str.
empty())
return;
1864 DBG_RTF(
m_t <<
"{\\comment startClassDiagram }\n")
1878 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
1880 m_t <<
" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
1886 DBG_RTF(
m_t <<
"{\\comment startMemberItem }\n")
1892 DBG_RTF(
m_t <<
"{\\comment endMemberItem }\n")
1913 DBG_RTF(
m_t <<
"{\\comment writeAnchor (" << anchor <<
")}\n")
1920 m_t <<
"{\\field\\fldedit {\\*\\fldinst PAGEREF ";
1922 m_t <<
" \\\\*MERGEFORMAT}{\\fldrslt pagenum}}";
1934 DBG_RTF(
m_t <<
"{\\comment (startMemberList) }\n")
1938 m_t <<
"\\begin{CompactItemize}\n";
1944 DBG_RTF(
m_t <<
"{\\comment (endMemberList) }\n")
1948 m_t <<
"\\end{CompactItemize}\n";
1954 DBG_RTF(
m_t <<
"{\\comment (startDescTable) }\n")
1956 m_t <<
"{" <<
rtf_Style[
"Heading5"].reference() <<
"\n";
1960 m_t <<
"\\trowd \\trgaph108\\trleft426\\tblind426"
1961 "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
1962 "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
1963 "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
1964 "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
1965 "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
1966 "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 \n";
1967 int columnPos2[2] = { 25, 100 };
1968 int columnPos3[3] = { 25, 45, 100 };
1969 for (
int i=0;i<(hasInits?3:2);i++)
1971 m_t <<
"\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
1972 "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
1973 "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
1974 "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
1976 "\\cellx" << (
rtf_pageWidth*(hasInits?columnPos3[i]:columnPos2[i])/100) <<
"\n";
1978 m_t <<
"\\pard \\widctlpar\\intbl\\adjustright\n";
1983 DBG_RTF(
m_t <<
"{\\comment (endDescTable)}\n")
1997 DBG_RTF(
m_t <<
"{\\comment (startDescTableTitle) }\n")
2004 DBG_RTF(
m_t <<
"{\\comment (endDescTableTitle) }\n")
2010 DBG_RTF(
m_t <<
"{\\comment (startDescTableInit) }" << endl)
2018 DBG_RTF(
m_t <<
"{\\comment (endDescTableInit) }" << endl)
2024 DBG_RTF(
m_t <<
"{\\comment (startDescTableData) }\n")
2030 DBG_RTF(
m_t <<
"{\\comment (endDescTableData) }\n")
2031 m_t <<
"\\cell }{\\row }\n";
2048 err(
"Maximum indent level ({}) exceeded while generating RTF output!\n",m);
2058 err(
"Negative indent level while generating RTF output!\n");
2100 DBG_RTF(
m_t <<
"{\\comment startTextBlock}\n")
2125 DBG_RTF(
m_t <<
"{\\comment (newParagraph)}\n")
2133 DBG_RTF(
m_t <<
"{\\comment startParagraph}\n")
2136 if (
DString(txt) ==
"reference")
m_t <<
"\\ql\n";
2148 DBG_RTF(
m_t <<
"{\\comment startMemberSubtitle}\n")
2155 DBG_RTF(
m_t <<
"{\\comment endMemberSubtitle}\n")
2166 if (codePage ==
"932")
2168 result = (0x81<=c && c<=0x9f) || (0xe0<=c && c<=0xfc);
2170 else if (codePage ==
"936")
2172 result = 0x81<=c && c<=0xFE;
2174 else if (codePage ==
"949")
2176 result = 0x81<=c && c<=0xFE;
2178 else if (codePage ==
"950")
2180 result = 0x81<=c && c<=0xFE;
2190 if (s==
nullptr)
return;
2192 bool converted=
false;
2194 static std::vector<char> enc;
2195 if (l*4>enc.size()) enc.resize(l*4);
2197 if (!encoding.
empty())
2201 if (cd!=
reinterpret_cast<void *
>(-1))
2204 size_t oLeft=enc.size();
2205 const char *inputPtr = s.
data();
2206 char *outputPtr = &enc[0];
2209 enc.resize(enc.size()-oLeft);
2217 memcpy(enc.data(),s.
data(),l);
2220 bool multiByte =
false;
2222 for (
size_t i=0;i<enc.size();i++)
2224 uint8_t c =
static_cast<uint8_t
>(enc.at(i));
2226 if (c>=0x80 || multiByte)
2229 snprintf(esc,10,
"\\'%X",c);
2258 err(
"problems opening rtf file '{}' for reading\n",infName);
2262 const int maxLineLength = 10240;
2270 while (getline(f,line))
2273 if (line.find(
"\\comment begin body")!=std::string::npos)
break;
2277 std::string prevLine;
2279 while (getline(f,line))
2282 size_t pos=prevLine.find(
"INCLUDETEXT \"");
2283 if (pos!=std::string::npos)
2285 size_t startNamePos = prevLine.find(
'"',pos)+1;
2286 size_t endNamePos = prevLine.find(
'"',startNamePos);
2287 if (endNamePos != std::string::npos)
2289 DString fileName = prevLine.
substr(startNamePos,endNamePos-startNamePos);
2290 DBG_RTF(t <<
"{\\comment begin include " << fileName <<
"}\n")
2292 DBG_RTF(t <<
"{\\comment end include " << fileName <<
"}\n")
2302 if (!bIncludeHeader)
2304 size_t pos = line.rfind(
'}');
2305 if (pos==std::string::npos)
2307 err(
"Strange, the last char was not a '}}'\n");
2308 pos = line.length();
2324 DBG_RTF(
m_t <<
"{\\comment (startDotGraph)}\n")
2336 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2338 m_t << fn <<
"." << imgExt;
2339 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2342 DBG_RTF(
m_t <<
"{\\comment (endDotGraph)}\n")
2347 DBG_RTF(
m_t <<
"{\\comment (startInclDepGraph)}\n")
2359 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2361 m_t << fn <<
"." << imgExt;
2362 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2364 DBG_RTF(
m_t <<
"{\\comment (endInclDepGraph)}\n")
2377 DBG_RTF(
m_t <<
"{\\comment (startCallGraph)}\n")
2389 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2391 m_t << fn <<
"." << imgExt;
2392 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2394 DBG_RTF(
m_t <<
"{\\comment (endCallGraph)}\n")
2399 DBG_RTF(
m_t <<
"{\\comment (startDirDepGraph)}\n")
2411 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2413 m_t << fn <<
"." << imgExt;
2414 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2416 DBG_RTF(
m_t <<
"{\\comment (endDirDepGraph)}\n")
2430 while ((c=f.get())!=-1)
2456 if (bcount==0)
return;
2458 err(
"RTF integrity test failed at line {:d} of {} due to a bracket mismatch.\n"
2459 " Please try to create a small code example that produces this error \n"
2460 " and send that to doxygen@gmail.com.\n",line,
name);
2475 err(
"Output dir {} does not exist!\n",path);
2484 DString combinedName = path+
"/combined.rtf";
2485 DString mainRTFName = path+
"/"+name;
2490 err(
"Failed to open {} for writing!\n",combinedName);
2515 thisDir.
rename(mainRTFName.
str(),mainRTFName.
str() +
".org");
2534 DBG_RTF(
m_t <<
"{\\comment startMemberGroupHeader}\n")
2542 DBG_RTF(
m_t <<
"{\\comment endMemberGroupHeader}\n")
2549 DBG_RTF(
m_t <<
"{\\comment startMemberGroupDocs}\n")
2555 DBG_RTF(
m_t <<
"{\\comment endMemberGroupDocs}\n")
2562 DBG_RTF(
m_t <<
"{\\comment startMemberGroup}\n")
2568 DBG_RTF(
m_t <<
"{\\comment endMemberGroup}\n")
2575 DBG_RTF(
m_t <<
"{\\comment (startExamples)}\n")
2590 DBG_RTF(
m_t <<
"{\\comment (endExamples)}\n")
2600 DBG_RTF(
m_t <<
"{\\comment (startParameterType)}\n")
2601 if (!first && !key.
empty())
2603 m_t <<
" " << key <<
" ";
2609 DBG_RTF(
m_t <<
"{\\comment (endParameterType)}\n")
2615 DBG_RTF(
m_t <<
"{\\comment (exceptionEntry)}\n")
2620 else if (closeBracket)
2629 auto astImpl =
dynamic_cast<const DocNodeAST*
>(ast);
2633 std::visit(visitor,astImpl->root);
2640 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_doubleline)}\n")
2641 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdrdb\\brdrw15\\brsp20 \\adjustright \\par}\n";
2646 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_emboss)}\n")
2647 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdremboss\\brdrw15\\brsp20 \\adjustright \\par}\n";
2652 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_thick)}\n")
2653 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw75\\brsp20 \\adjustright \\par}\n";
2658 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_thin)}\n")
2659 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}\n";
2664 DBG_RTF(
m_t <<
"{\\comment (startConstraintList)}\n")
2679 DBG_RTF(
m_t <<
"{\\comment (startConstraintParam)}\n")
2685 DBG_RTF(
m_t <<
"{\\comment (endConstraintParam)}\n")
2692 DBG_RTF(
m_t <<
"{\\comment (startConstraintType)}\n")
2698 DBG_RTF(
m_t <<
"{\\comment (endConstraintType)}\n")
2705 DBG_RTF(
m_t <<
"{\\comment (startConstraintDocs)}\n")
2710 DBG_RTF(
m_t <<
"{\\comment (endConstraintDocs)}\n")
2716 DBG_RTF(
m_t <<
"{\\comment (endConstraintList)}\n")
2725 DBG_RTF(
m_t <<
"{\\comment (startIndexListItem)}\n")
2730 DBG_RTF(
m_t <<
"{\\comment (endIndexListItem)}\n")
2736 DBG_RTF(
m_t <<
"{\\comment (startInlineHeader)}\n")
2744 DBG_RTF(
m_t <<
"{\\comment (endInlineHeader)}\n")
2752 DBG_RTF(
m_t <<
"{\\comment (startMemberDocSimple)}\n")
2754 m_t <<
"{" <<
rtf_Style[
"Heading5"].reference() <<
"\n";
2765 m_t <<
"\\trowd \\trgaph108\\trleft426\\tblind426"
2766 "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
2767 "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
2768 "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
2769 "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
2770 "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
2771 "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 \n";
2772 int n=3,columnPos[3] = { 25, 50, 100 };
2779 for (
int i=0;i<n;i++)
2781 m_t <<
"\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
2782 "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
2783 "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
2784 "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
2788 m_t <<
"\\pard \\widctlpar\\intbl\\adjustright\n";
2793 DBG_RTF(
m_t <<
"{\\comment (endMemberDocSimple)}\n")
2799 DBG_RTF(
m_t <<
"{\\comment (startInlineMemberType)}\n")
2805 DBG_RTF(
m_t <<
"{\\comment (endInlineMemberType)}\n")
2811 DBG_RTF(
m_t <<
"{\\comment (startInlineMemberName)}\n")
2817 DBG_RTF(
m_t <<
"{\\comment (endInlineMemberName)}\n")
2823 DBG_RTF(
m_t <<
"{\\comment (startInlineMemberDoc)}\n")
2829 DBG_RTF(
m_t <<
"{\\comment (endInlineMemberDoc)}\n")
2830 m_t <<
"\\cell }{\\row }\n";
2839 m_t <<
"{\\f2 [" << l <<
"]}";
2840 if (!isLast)
m_t <<
", ";
2862 if (openBracket)
m_t <<
"(";
2867 if (last && closeBracket)
2876static std::unordered_map<std::string,std::string>
g_tagMap;
2903 if ( ( ++(*nxtTag) ) >
'Z' )
Class representing a built-in class diagram.
void writeImage(TextStream &t, const DString &path, const DString &relPath, const DString &file, bool generateMap, bool toIndex) const
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
DString substr(size_t pos=0, size_t count=npos) const
Returns a substring of length count starting at pos.
char * rawData()
Returns a writable pointer to the data.
DString & prepend(const char *s)
DString & sprintf(const char *format,...)
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
const std::string & str() const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool startsWith(const char *s) const
bool endsWith(const char *s) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
static bool isFlagSet(const DebugMask mask)
static void print(DebugMask mask, int prio, fmt::format_string< Args... > fmt, Args &&... args)
The common base class of all entity definitions found in the sources.
virtual DString getDefFileExtension() const =0
Class representing a directory in the file system.
static std::string currentDirPath()
std::string absPath() const
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
bool remove(const std::string &path, bool acceptsAbsPath=true) const
std::string filePath(const std::string &path, bool acceptsAbsPath=true) const
bool rename(const std::string &orgName, const std::string &newName, bool acceptsAbsPath=true) const
static bool setCurrent(const std::string &path)
Class representing the abstract syntax tree of a documentation block.
Representation of an call graph.
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
Representation of a class inheritance or dependency graph.
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool TBRank=true, bool imageMap=true, int graphId=-1)
Representation of an directory dependency graph.
DString writeGraph(TextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1, bool linkRelations=true)
Representation of a group collaboration graph.
Representation of an include dependency graph.
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
static NamespaceLinkedMap * namespaceLinkedMap
static ConceptLinkedMap * conceptLinkedMap
static std::unique_ptr< PageDef > mainPage
static FileNameLinkedMap * inputNameLinkedMap
static ClassLinkedMap * classLinkedMap
static PageLinkedMap * exampleLinkedMap
static PageLinkedMap * pageLinkedMap
static DirLinkedMap * dirLinkedMap
static GroupLinkedMap * groupLinkedMap
Minimal replacement for QFileInfo.
std::string fileName() const
std::string absFilePath() const
opaque representation of the abstract syntax tree (AST)
A model of a class/file/namespace member symbol.
static ModuleManager & instance()
Class representing a list of different code generators.
void add(OutputCodeIntfPtr &&p)
Abstract interface for output generators.
Generator for RTF code fragments.
void startSpecialComment() override
void endCodeLine() override
size_t m_stripIndentAmount
void endFontClass() override
void writeCodeLink(CodeSymbolType type, const DString &ref, const DString &file, const DString &anchor, const DString &name, const DString &tooltip) override
void setSourceFileName(const DString &name)
DString rtf_Code_DepthStyle()
void writeLineNumber(const DString &, const DString &, const DString &, int l, bool) override
void startCodeFragment(const DString &style) override
RTFCodeGenerator(TextStream *t)
void endSpecialComment() override
void setIndentLevel(int level)
void startFontClass(const DString &) override
void setTextStream(TextStream *t)
void stripCodeComments(bool b) override
void endCodeFragment(const DString &) override
void setStripIndentAmount(size_t amount) override
void codify(const DString &text) override
void startCodeLine(int) override
Concrete visitor implementation for RTF output.
void startTextBlock(bool dense) override
void startGroupCollaboration() override
void startCallGraph() override
void endConstraintList() override
void endMemberList() override
void endConstraintType() override
void startTextLink(const DString &f, const DString &anchor) override
void endDescTableRow() override
void startDescTable(const DString &title, const bool hasInits) override
void endTitleHead(const DString &, const DString &name) override
void startLabels() override
void lineBreak(const DString &style=DString()) override
void startInlineMemberName() override
void writeChar(char c) override
void endDescTableData() override
void startDescTableData() override
void endDescTable() override
OutputType type() const override
RTFCodeGenerator * m_codeGen
void endDirDepGraph(DotDirDeps &g) override
std::unique_ptr< OutputCodeList > m_codeList
void startIndexKey() override
void endMemberItem(MemberItemType) override
void endPlainFile() override
void startIndexListItem() override
void endCompoundTemplateParams() override
static bool preProcessFileInplace(const DString &path, const DString &name)
This is an API to a VERY brittle RTF preprocessor that combines nested RTF files.
void rtfwriteRuler_thick()
void writeStartAnnoItem(const DString &type, const DString &file, const DString &path, const DString &name) override
static void writeStyleSheetFile(TextStream &t)
void setRelativePath(const DString &path)
void endInlineMemberType() override
void startParagraph(const DString &classDef) override
void endDescForItem() override
void startIndent() override
void lastIndexPage() override
void endInlineMemberName() override
void endItemList() override
std::array< RTFListItemInfo, maxIndentLevels > m_listItemInfo
void startDescTableInit() override
void endMemberGroup(bool) override
void startIndexItem(const DString &ref, const DString &file) override
void endMemberGroupDocs() override
DString rtf_BList_DepthStyle()
void addIndexItem(const DString &, const DString &) override
void startPlainFile(const DString &name) override
void endMemberDocSimple(bool) override
void endPageRef(const DString &, const DString &) override
void startDirDepGraph() override
void startMemberSubtitle() override
DString rtf_DList_DepthStyle()
void startDotGraph() override
void writeInheritedSectionTitle(const DString &, const DString &, const DString &, const DString &, const DString &, const DString &) override
void endTextBlock(bool) override
static void writeExtensionsFile(TextStream &t)
void startItemListItem() override
void startBold() override
void endMemberSubtitle() override
void setSourceFileName(const DString &sourceFileName)
void startEmphasis() override
void endSection(const DString &, SectionType) override
void endMemberDoc(bool) override
void startConstraintDocs() override
void startDescForItem() override
DString rtf_LCList_DepthStyle()
void endProjectNumber() override
void startDescTableTitle() override
void startParameterList(bool) override
void startConstraintList(const DString &) override
void endDotGraph(DotClassGraph &) override
void rtfwriteRuler_doubleline()
void writeAnchor(const DString &fileName, const DString &name) override
void endIndexSection(IndexSection) override
void writeObjectLink(const DString &ref, const DString &file, const DString &anchor, const DString &name) override
void writeNonBreakableSpace(int) override
void endMemberDescription() override
void exceptionEntry(const DString &, bool) override
void startIndexList() override
void startDoxyAnchor(const DString &, const DString &, const DString &, const DString &, const DString &) override
void rtfwriteRuler_emboss()
static const int maxIndentLevels
void startParameterType(bool, const DString &) override
void endClassDiagram(const ClassDiagram &, const DString &filename, const DString &name) override
void endInclDepGraph(DotInclDepGraph &) override
void startMemberDoc(const DString &, const DString &, const DString &, const DString &, int, int, bool) override
void endDescTableTitle() override
void startItemList() override
DString rtf_CList_DepthStyle()
void endGroupCollaboration(DotGroupCollaboration &g) override
void endItemListItem() override
void addCodeGen(OutputCodeList &list) override
void writeDoc(const IDocNodeAST *ast, const Definition *, const MemberDef *, int, int) override
void startMemberDocSimple(bool) override
void startCompoundTemplateParams() override
void addLabel(const DString &, const DString &) override
void startDescTableRow() override
void writeLabel(const DString &l, bool isLast) override
void startInlineMemberType() override
void endParameterExtra(bool, bool, bool) override
void startPageRef() override
void startMemberGroup() override
void rtfwriteRuler_thin()
void startIndexValue(bool) override
void startClassDiagram() override
void endIndexValue(const DString &, bool) override
void endIndexItem(const DString &ref, const DString &file) override
void endInlineHeader() override
void startInlineMemberDoc() override
void endIndexList() override
void endInlineMemberDoc() override
void endParagraph() override
void endTextLink() override
void startConstraintType() override
void startInclDepGraph() override
void writeString(const DString &text) override
void endIndexKey() override
void endMemberGroupHeader(bool) override
void startMemberGroupDocs() override
void endDoxyAnchor(const DString &, const DString &) override
void writePageLink(const DString &, bool) override
void endGroupHeader(int) override
void startMemberItem(const DString &, MemberItemType, const DString &) override
void startMemberDescription(const DString &, const DString &, bool) override
void startExamples() override
void startMemberGroupHeader(const DString &, bool) override
void startFile(const DString &name, bool isSource, const DString &manName, const DString &title, int id, int hierarchyLevel) override
void endCallGraph(DotCallGraph &) override
void endConstraintDocs() override
void endParameterType() override
void startSection(const DString &, const DString &, SectionType) override
void endEmphasis() override
void endConstraintParam() override
void startGroupHeader(const DString &, int) override
void startProjectNumber() override
void docify(const DString &text) override
void startIndexSection(IndexSection) override
RTFGenerator & operator=(const RTFGenerator &)
void startInlineHeader() override
void writeRTFReference(const DString &label)
void startMemberList() override
void endIndent() override
void writeStyleInfo(int part) override
void endDescTableInit() override
void endIndexListItem() override
void startTitleHead(const DString &) override
void startConstraintParam() override
DString rtf_EList_DepthStyle()
void endLabels() override
void endExamples() override
static constexpr int Section
static constexpr int MaxLevel
static constexpr int Subsection
static constexpr int Subsubsection
constexpr int level() const
static constexpr int Page
static constexpr int MinLevel
static constexpr int Paragraph
static constexpr int Subsubparagraph
static constexpr int Subparagraph
Text streaming class that buffers data.
void flush()
Flushes the buffer.
virtual DString trCompoundMembers()=0
virtual DString trFileDocumentation()=0
virtual DString trRTFCharSet()=0
virtual DString trInheritedFrom(const DString &members, const DString &what)=0
virtual DString trClassDocumentation()=0
virtual DString trHierarchicalIndex()=0
virtual DString trVersion()=0
virtual DString trConceptIndex()=0
virtual DString trTopicIndex()=0
virtual DString trModuleIndex()=0
virtual DString trTypeDocumentation()=0
virtual DString trPageIndex()=0
virtual DString trModuleDocumentation()=0
virtual DString trRTFansicp()=0
virtual DString trCompoundIndexFortran()=0
virtual DString trModulesIndex()=0
virtual DString trTopicDocumentation()=0
virtual DString trRTFGeneralIndex()=0
virtual DString trEnumerationValues()=0
virtual DString trRTFTableOfContents()=0
virtual DString trDirDocumentation()=0
virtual DString trDirIndex()=0
virtual DString trCompoundIndex()=0
virtual DString trDesignUnitIndex()=0
virtual DString trFileIndex()=0
virtual DString trExamples()=0
virtual DString trNamespaceIndex()=0
#define Config_getInt(name)
#define Config_getBool(name)
#define Config_getString(name)
#define Config_getEnum(name)
std::set< std::string > StringSet
std::tm getCurrentDateTime()
Returns the filled in std::tm for the current date and time.
DString dateToString(DateTimeType includeTime)
Returns the current date, when includeTime is set also the time is provided.
IDocParserPtr createDocParser()
factory function to create a parser
IDocNodeASTPtr validatingParseText(IDocParser &parserIntf, const DString &input)
const char * qPrint(const char *s)
@ isNamespaceDocumentation
Translator * theTranslator
std::ifstream openInputStream(const DString &name, bool binary=false, bool openAtEnd=false)
void unlink(const DString &fileName)
std::ofstream openOutputStream(const DString &name, bool append=false)
size_t updateColumnCount(const char *s, size_t col)
OutputCodeDefer< RTFCodeGenerator > RTFCodeGeneratorDefer
Portable versions of functions that are platform dependent.
int portable_iconv_close(void *cd)
size_t portable_iconv(void *cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
void * portable_iconv_open(const char *tocode, const char *fromcode)
DString rtfFormatBmkStr(const DString &name)
static void encodeForOutput(TextStream &t, const DString &s)
static std::mutex g_rtfFormatMutex
static StringSet removeSet
static DString docifyToString(const DString &str)
static DString objectLinkToString(const DString &ref, const DString &f, const DString &anchor, const DString &text)
static std::unordered_map< std::string, std::string > g_tagMap
static bool preProcessFile(Dir &d, const DString &infName, TextStream &t, bool bIncludeHeader=true, bool removeFile=true)
VERY brittle routine inline RTF's included by other RTF's.
static DString dateToRTFDateString()
void testRTFOutput(const DString &name)
Tests the integrity of the result by counting brackets.
static DString makeIndexName(const DString &s, int i)
static DString g_nextTag("AAAAAAAAAA")
DString rtfFormatBmkStr(const DString &name)
Rtf_Style_Default rtf_Style_Default[]
void loadExtensions(const DString &name)
void loadStylesheet(const DString &name, StyleDataMap &map)
Rtf_Table_Default rtf_Table_Default[]
DString reference() const
DString definition() const
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.
Various UTF8 related helper functions.
DString stripExtensionGeneral(const DString &fName, const DString &ext)
void clearSubDirs(const Dir &d)
void createSubDirs(const Dir &d)
DString relativePathToRoot(const DString &name)
bool copyFile(const DString &src, const DString &dest)
Copies the contents of file with name src to the newly created file with name dest.
DString getDotImageExtension()
DString stripPath(const DString &s)
A bunch of utility functions.