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::a3:
m_t <<
"\\paperw16480\\paperh23800";
break;
593 case PAPER_TYPE_t::letter:
m_t <<
"\\paperw12240\\paperh15840";
break;
594 case PAPER_TYPE_t::legal:
m_t <<
"\\paperw12240\\paperh20160";
break;
595 case PAPER_TYPE_t::executive:
m_t <<
"\\paperw10440\\paperh15120";
break;
597 m_t <<
"\\margl1800\\margr1800\\margt1440\\margb1440\\gutter0\\ltrsect}\n";
600 unsigned maxIndex = 0;
601 for (
const auto &[name,data] :
rtf_Style)
603 uint32_t index = data.index();
604 if (index > maxIndex) maxIndex = index;
606 std::vector<const StyleData*> array(maxIndex + 1,
nullptr);
607 ASSERT(maxIndex < array.size());
609 for (
const auto &[name,data] :
rtf_Style)
611 uint32_t index = data.index();
612 if (array[index] !=
nullptr)
614 err(
"Style '{}' redefines \\s{}.\n", name, index);
616 array[index] = &data;
620 size_t size = array.size();
621 for(
size_t i = 0; i < size; i++)
634 m_t <<
"{\\*\\listtable" <<
"\n";
641 m_t <<
"\\listid" <<
id <<
"}" <<
"\n";
648 m_t <<
"\\listid" <<
id <<
"}" <<
"\n";
650 m_t <<
"{\\listoverridetable" <<
"\n";
657 m_t <<
"{\\listoverride\\listid" <<
id <<
"\\listoverridecount0\\ls" <<
id <<
"}" <<
"\n";
663 m_t <<
"{\\comment begin body}\n";
670 DBG_RTF(
m_t <<
"{\\comment BeginRTFChapter}\n")
677 m_t <<
"\\sect\\sbknone\n";
681 m_t <<
"\\sect\\sbkpage\n";
690 DBG_RTF(
m_t <<
"{\\comment BeginRTFSection}\n")
696 m_t <<
"\\sect\\sbknone\n";
701 m_t <<
"\\sect\\sbkpage\n";
733 DBG_RTF(
m_t <<
"{\\comment startProjectNumber }\n")
739 DBG_RTF(
m_t <<
"{\\comment endProjectNumber }\n")
755 m_t <<
"{\\title {\\comment ";
766 m_t <<
"{\\comment ";
794 DBG_RTF(
m_t <<
"{\\comment start classhierarchy}\n")
814 if (!gd->isReference())
827 if (!mod->isReference() && mod->isPrimaryInterface())
840 if (dd->isLinkableInProject())
853 if (nd->isLinkableInProject())
866 if (cd->isLinkableInProject())
879 if (cd->isLinkableInProject() &&
880 !cd->isImplicitTemplateInstance() &&
881 !cd->isEmbeddedInOuterScope() &&
897 for (
const auto &fd : *fn)
899 if (fd->isLinkableInProject() || fd->generateSourceFile())
944 m_t <<
"}" << projectName;
948 m_t <<
" doxygen " << getDoxygenVersion() <<
".}\n";
950 DBG_RTF(
m_t <<
"{\\comment end of infoblock}\n");
954 m_t <<
"\\sectd\\pgnlcrm\n";
955 m_t <<
"{\\footer "<<
rtf_Style[
"Footer"].reference() <<
"{\\chpgn}}\n";
957 DBG_RTF(
m_t <<
"{\\comment begin title page}\n")
962 m_t <<
"\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n";
966 m_t <<
"\" \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
977 m_t <<
"{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt " <<
rtf_title <<
"}}\\par\n";
985 m_t <<
"{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt ";
986 writeDoc(ast.get(),
nullptr,
nullptr,0,-1);
1001 m_t <<
"\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\n";
1006 m_t <<
"{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt "<<
rtf_author <<
" }}\\par\n";
1010 m_t <<
"{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par\n";
1016 case TIMESTAMP_t::YES:
1017 case TIMESTAMP_t::DATETIME:
1018 m_t <<
"{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
1021 case TIMESTAMP_t::DATE:
1022 m_t <<
"{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
1025 case TIMESTAMP_t::NO:
1028 m_t <<
"\\page\\page";
1029 DBG_RTF(
m_t <<
"{\\comment End title page}\n")
1032 DBG_RTF(
m_t <<
"{\\comment Table of contents}\n")
1033 m_t <<
"\\vertalt\n";
1038 m_t <<
"{\\field\\fldedit {\\*\\fldinst TOC \\\\f \\\\*MERGEFORMAT}{\\fldrslt Table of contents}}\\par\n";
1051 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"topics.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1056 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"modules.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1061 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"dirs.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1074 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1079 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"concepts.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1084 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"hierarchy.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1100 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"annotated.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1105 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"files.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1110 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"pages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1117 if (!gd->isReference() && !gd->isASubGroup())
1129 if (!mod->isReference() && mod->isPrimaryInterface())
1142 if (dd->isLinkableInProject())
1150 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1151 m_t << dd->getOutputFileBase();
1152 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1162 if (nd->isLinkableInProject() && !nd->isAlias())
1170 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1171 m_t << nd->getOutputFileBase();
1172 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1182 if (cd->isLinkableInProject() && !cd->isAlias())
1190 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1191 m_t << cd->getOutputFileBase();
1192 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1210 if (cd->isLinkableInProject() &&
1211 !cd->isImplicitTemplateInstance() &&
1212 !cd->isEmbeddedInOuterScope() &&
1222 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1223 m_t << cd->getOutputFileBase();
1224 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1236 for (
const auto &fd : *fn)
1238 if (fd->isLinkableInProject())
1246 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1247 m_t << fd->getOutputFileBase();
1248 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1250 if (fd->generateSourceFile())
1258 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1259 m_t << fd->getSourceFileBase();
1260 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1279 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1280 m_t << pd->getOutputFileBase();
1281 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1290 if (!pd->getGroupDef() && !pd->isReference() && !pd->hasParentPage()
1306 m_t <<
"{\\field\\fldedit {\\*\\fldinst INDEX \\\\c2 \\\\*MERGEFORMAT}{\\fldrslt INDEX}}\n";
1315 m_t <<
"{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
1317 m_t <<
".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
1322 DBG_RTF(
m_t <<
"{\\comment Beginning Body of RTF Document}\n")
1324 m_t <<
"\\sect \\sbkpage \\pgndec \\pgnrestart\n";
1325 m_t <<
"\\sect \\sectd \\sbknone\n";
1328 m_t <<
"{\\footer "<<
rtf_Style[
"Footer"].reference() <<
"{\\chpgn}}\n";
1338 DBG_RTF(
m_t <<
"{\\comment (lineBreak)}" <<
"\n")
1350 DBG_RTF(
m_t <<
"{\\comment (startIndexList)}\n")
1360 DBG_RTF(
m_t <<
"{\\comment (endIndexList)}\n")
1376 DBG_RTF(
m_t <<
"{\\comment (startItemList level=" << level <<
") }\n")
1396 DBG_RTF(
m_t <<
"{\\comment (startItemListItem)}\n")
1415 DBG_RTF(
m_t <<
"{\\comment (endItemListItem)}\n")
1420 DBG_RTF(
m_t <<
"{\\comment (startIndexItem)}\n")
1431 DBG_RTF(
m_t <<
"{\\comment (endIndexItem)}\n")
1448 DBG_RTF(
m_t <<
"{\\comment (writeStartAnnoItem)}\n")
1453 m_t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1456 m_t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1471 DBG_RTF(
m_t <<
"{\\comment (startIndexKey)}\n")
1477 DBG_RTF(
m_t <<
"{\\comment (endIndexKey)}\n")
1482 DBG_RTF(
m_t <<
"{\\comment (startIndexValue)}\n")
1484 if (hasBrief)
m_t <<
"(";
1489 DBG_RTF(
m_t <<
"{\\comment (endIndexValue)}\n")
1490 if (hasBrief)
m_t <<
")";
1510 DBG_RTF(
m_t <<
"{\\comment Begin SubSubSection}\n")
1531 if (!anchor.
empty())
1537 m_t <<
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1540 m_t <<
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1563 if (!anchor.
empty())
1569 result +=
"{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
1572 result +=
"}{\\fldrslt {\\cs37\\ul\\cf2 ";
1602 if (!clname.
empty())
1606 if (!anchor.
empty())
1618 DBG_RTF(
m_t <<
"{\\comment startTitleHead}\n")
1621 heading.
sprintf(
"Heading%d", level);
1634 m_t <<
"{\\tc\\tcl" << level <<
" \\v ";
1649 DBG_RTF(
m_t <<
"{\\comment startGroupHeader}\n")
1656 else if (extraIndent==1)
1669 DBG_RTF(
m_t <<
"{\\comment endGroupHeader}\n")
1682 DBG_RTF(
m_t <<
"{\\comment startMemberDoc}\n")
1683 if (!memname.
empty() && memname[0]!=
'@')
1720 DBG_RTF(
m_t <<
"{\\comment startDoxyAnchor}\n")
1730 if (!anchor.
empty())
1736 DBG_RTF(
m_t <<
"{\\comment endDoxyAnchor}\n")
1737 m_t <<
"{\\bkmkstart ";
1740 m_t <<
"{\\bkmkend ";
1755 m_t <<
"{\\xe \\v ";
1769 DBG_RTF(
m_t <<
"{\\comment (startIndent) }\n")
1783 DBG_RTF(
m_t <<
"{\\comment (startMemberDescription)}\n")
1792 DBG_RTF(
m_t <<
"{\\comment (endMemberDescription)}\n")
1802 DBG_RTF(
m_t <<
"{\\comment (startDescForItem) }\n")
1807 DBG_RTF(
m_t <<
"{\\comment (endDescForItem) }\n")
1812 DBG_RTF(
m_t <<
"{\\comment (startSection)}\n")
1825 default:
ASSERT(0);
break;
1829 heading.
sprintf(
"Heading%d",num);
1833 m_t <<
"{\\tc\\tcl" << num <<
" \\v ";
1850 if (str.
empty())
return;
1865 DBG_RTF(
m_t <<
"{\\comment startClassDiagram }\n")
1879 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
1881 m_t <<
" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
1887 DBG_RTF(
m_t <<
"{\\comment startMemberItem }\n")
1893 DBG_RTF(
m_t <<
"{\\comment endMemberItem }\n")
1914 DBG_RTF(
m_t <<
"{\\comment writeAnchor (" << anchor <<
")}\n")
1921 m_t <<
"{\\field\\fldedit {\\*\\fldinst PAGEREF ";
1923 m_t <<
" \\\\*MERGEFORMAT}{\\fldrslt pagenum}}";
1935 DBG_RTF(
m_t <<
"{\\comment (startMemberList) }\n")
1939 m_t <<
"\\begin{CompactItemize}\n";
1945 DBG_RTF(
m_t <<
"{\\comment (endMemberList) }\n")
1949 m_t <<
"\\end{CompactItemize}\n";
1955 DBG_RTF(
m_t <<
"{\\comment (startDescTable) }\n")
1957 m_t <<
"{" <<
rtf_Style[
"Heading5"].reference() <<
"\n";
1961 m_t <<
"\\trowd \\trgaph108\\trleft426\\tblind426"
1962 "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
1963 "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
1964 "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
1965 "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
1966 "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
1967 "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 \n";
1968 int columnPos2[2] = { 25, 100 };
1969 int columnPos3[3] = { 25, 45, 100 };
1970 for (
int i=0;i<(hasInits?3:2);i++)
1972 m_t <<
"\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
1973 "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
1974 "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
1975 "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
1977 "\\cellx" << (
rtf_pageWidth*(hasInits?columnPos3[i]:columnPos2[i])/100) <<
"\n";
1979 m_t <<
"\\pard \\widctlpar\\intbl\\adjustright\n";
1984 DBG_RTF(
m_t <<
"{\\comment (endDescTable)}\n")
1998 DBG_RTF(
m_t <<
"{\\comment (startDescTableTitle) }\n")
2005 DBG_RTF(
m_t <<
"{\\comment (endDescTableTitle) }\n")
2011 DBG_RTF(
m_t <<
"{\\comment (startDescTableInit) }" << endl)
2019 DBG_RTF(
m_t <<
"{\\comment (endDescTableInit) }" << endl)
2025 DBG_RTF(
m_t <<
"{\\comment (startDescTableData) }\n")
2031 DBG_RTF(
m_t <<
"{\\comment (endDescTableData) }\n")
2032 m_t <<
"\\cell }{\\row }\n";
2049 err(
"Maximum indent level ({}) exceeded while generating RTF output!\n",m);
2059 err(
"Negative indent level while generating RTF output!\n");
2101 DBG_RTF(
m_t <<
"{\\comment startTextBlock}\n")
2126 DBG_RTF(
m_t <<
"{\\comment (newParagraph)}\n")
2134 DBG_RTF(
m_t <<
"{\\comment startParagraph}\n")
2137 if (
DString(txt) ==
"reference")
m_t <<
"\\ql\n";
2149 DBG_RTF(
m_t <<
"{\\comment startMemberSubtitle}\n")
2156 DBG_RTF(
m_t <<
"{\\comment endMemberSubtitle}\n")
2167 if (codePage ==
"932")
2169 result = (0x81<=c && c<=0x9f) || (0xe0<=c && c<=0xfc);
2171 else if (codePage ==
"936")
2173 result = 0x81<=c && c<=0xFE;
2175 else if (codePage ==
"949")
2177 result = 0x81<=c && c<=0xFE;
2179 else if (codePage ==
"950")
2181 result = 0x81<=c && c<=0xFE;
2191 if (s==
nullptr)
return;
2193 bool converted=
false;
2195 static std::vector<char> enc;
2196 if (l*4>enc.size()) enc.resize(l*4);
2198 if (!encoding.
empty())
2202 if (cd!=
reinterpret_cast<void *
>(-1))
2205 size_t oLeft=enc.size();
2206 const char *inputPtr = s.
data();
2207 char *outputPtr = &enc[0];
2210 enc.resize(enc.size()-oLeft);
2218 memcpy(enc.data(),s.
data(),l);
2221 bool multiByte =
false;
2223 for (
size_t i=0;i<enc.size();i++)
2225 uint8_t c =
static_cast<uint8_t
>(enc.at(i));
2227 if (c>=0x80 || multiByte)
2230 snprintf(esc,10,
"\\'%X",c);
2259 err(
"problems opening rtf file '{}' for reading\n",infName);
2263 const int maxLineLength = 10240;
2271 while (getline(f,line))
2274 if (line.find(
"\\comment begin body")!=std::string::npos)
break;
2278 std::string prevLine;
2280 while (getline(f,line))
2283 size_t pos=prevLine.find(
"INCLUDETEXT \"");
2284 if (pos!=std::string::npos)
2286 size_t startNamePos = prevLine.find(
'"',pos)+1;
2287 size_t endNamePos = prevLine.find(
'"',startNamePos);
2288 if (endNamePos != std::string::npos)
2290 DString fileName = prevLine.
substr(startNamePos,endNamePos-startNamePos);
2291 DBG_RTF(t <<
"{\\comment begin include " << fileName <<
"}\n")
2293 DBG_RTF(t <<
"{\\comment end include " << fileName <<
"}\n")
2303 if (!bIncludeHeader)
2305 size_t pos = line.rfind(
'}');
2306 if (pos==std::string::npos)
2308 err(
"Strange, the last char was not a '}}'\n");
2309 pos = line.length();
2325 DBG_RTF(
m_t <<
"{\\comment (startDotGraph)}\n")
2337 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2339 m_t << fn <<
"." << imgExt;
2340 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2343 DBG_RTF(
m_t <<
"{\\comment (endDotGraph)}\n")
2348 DBG_RTF(
m_t <<
"{\\comment (startInclDepGraph)}\n")
2360 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2362 m_t << fn <<
"." << imgExt;
2363 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2365 DBG_RTF(
m_t <<
"{\\comment (endInclDepGraph)}\n")
2378 DBG_RTF(
m_t <<
"{\\comment (startCallGraph)}\n")
2390 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2392 m_t << fn <<
"." << imgExt;
2393 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2395 DBG_RTF(
m_t <<
"{\\comment (endCallGraph)}\n")
2400 DBG_RTF(
m_t <<
"{\\comment (startDirDepGraph)}\n")
2412 m_t <<
"\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
2414 m_t << fn <<
"." << imgExt;
2415 m_t <<
"\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
2417 DBG_RTF(
m_t <<
"{\\comment (endDirDepGraph)}\n")
2431 while ((c=f.get())!=-1)
2457 if (bcount==0)
return;
2459 err(
"RTF integrity test failed at line {:d} of {} due to a bracket mismatch.\n"
2460 " Please try to create a small code example that produces this error \n"
2461 " and send that to doxygen@gmail.com.\n",line,
name);
2476 err(
"Output dir {} does not exist!\n",path);
2485 DString combinedName = path+
"/combined.rtf";
2486 DString mainRTFName = path+
"/"+name;
2491 err(
"Failed to open {} for writing!\n",combinedName);
2516 thisDir.
rename(mainRTFName.
str(),mainRTFName.
str() +
".org");
2535 DBG_RTF(
m_t <<
"{\\comment startMemberGroupHeader}\n")
2543 DBG_RTF(
m_t <<
"{\\comment endMemberGroupHeader}\n")
2550 DBG_RTF(
m_t <<
"{\\comment startMemberGroupDocs}\n")
2556 DBG_RTF(
m_t <<
"{\\comment endMemberGroupDocs}\n")
2563 DBG_RTF(
m_t <<
"{\\comment startMemberGroup}\n")
2569 DBG_RTF(
m_t <<
"{\\comment endMemberGroup}\n")
2576 DBG_RTF(
m_t <<
"{\\comment (startExamples)}\n")
2591 DBG_RTF(
m_t <<
"{\\comment (endExamples)}\n")
2601 DBG_RTF(
m_t <<
"{\\comment (startParameterType)}\n")
2602 if (!first && !key.
empty())
2604 m_t <<
" " << key <<
" ";
2610 DBG_RTF(
m_t <<
"{\\comment (endParameterType)}\n")
2616 DBG_RTF(
m_t <<
"{\\comment (exceptionEntry)}\n")
2621 else if (closeBracket)
2630 auto astImpl =
dynamic_cast<const DocNodeAST*
>(ast);
2634 std::visit(visitor,astImpl->root);
2641 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_doubleline)}\n")
2642 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdrdb\\brdrw15\\brsp20 \\adjustright \\par}\n";
2647 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_emboss)}\n")
2648 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdremboss\\brdrw15\\brsp20 \\adjustright \\par}\n";
2653 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_thick)}\n")
2654 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw75\\brsp20 \\adjustright \\par}\n";
2659 DBG_RTF(
m_t <<
"{\\comment (rtfwriteRuler_thin)}\n")
2660 m_t <<
"{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}\n";
2665 DBG_RTF(
m_t <<
"{\\comment (startConstraintList)}\n")
2680 DBG_RTF(
m_t <<
"{\\comment (startConstraintParam)}\n")
2686 DBG_RTF(
m_t <<
"{\\comment (endConstraintParam)}\n")
2693 DBG_RTF(
m_t <<
"{\\comment (startConstraintType)}\n")
2699 DBG_RTF(
m_t <<
"{\\comment (endConstraintType)}\n")
2706 DBG_RTF(
m_t <<
"{\\comment (startConstraintDocs)}\n")
2711 DBG_RTF(
m_t <<
"{\\comment (endConstraintDocs)}\n")
2717 DBG_RTF(
m_t <<
"{\\comment (endConstraintList)}\n")
2726 DBG_RTF(
m_t <<
"{\\comment (startIndexListItem)}\n")
2731 DBG_RTF(
m_t <<
"{\\comment (endIndexListItem)}\n")
2737 DBG_RTF(
m_t <<
"{\\comment (startInlineHeader)}\n")
2745 DBG_RTF(
m_t <<
"{\\comment (endInlineHeader)}\n")
2753 DBG_RTF(
m_t <<
"{\\comment (startMemberDocSimple)}\n")
2755 m_t <<
"{" <<
rtf_Style[
"Heading5"].reference() <<
"\n";
2766 m_t <<
"\\trowd \\trgaph108\\trleft426\\tblind426"
2767 "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
2768 "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
2769 "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
2770 "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
2771 "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
2772 "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 \n";
2773 int n=3,columnPos[3] = { 25, 50, 100 };
2780 for (
int i=0;i<n;i++)
2782 m_t <<
"\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
2783 "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
2784 "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
2785 "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
2789 m_t <<
"\\pard \\widctlpar\\intbl\\adjustright\n";
2794 DBG_RTF(
m_t <<
"{\\comment (endMemberDocSimple)}\n")
2800 DBG_RTF(
m_t <<
"{\\comment (startInlineMemberType)}\n")
2806 DBG_RTF(
m_t <<
"{\\comment (endInlineMemberType)}\n")
2812 DBG_RTF(
m_t <<
"{\\comment (startInlineMemberName)}\n")
2818 DBG_RTF(
m_t <<
"{\\comment (endInlineMemberName)}\n")
2824 DBG_RTF(
m_t <<
"{\\comment (startInlineMemberDoc)}\n")
2830 DBG_RTF(
m_t <<
"{\\comment (endInlineMemberDoc)}\n")
2831 m_t <<
"\\cell }{\\row }\n";
2840 m_t <<
"{\\f2 [" << l <<
"]}";
2841 if (!isLast)
m_t <<
", ";
2863 if (openBracket)
m_t <<
"(";
2868 if (last && closeBracket)
2877static std::unordered_map<std::string,std::string>
g_tagMap;
2904 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.