Doxygen
Loading...
Searching...
No Matches
htmldocvisitor.cpp File Reference
#include "htmldocvisitor.h"
#include "codefragment.h"
#include "config.h"
#include "dia.h"
#include "docparser.h"
#include "dot.h"
#include "doxygen.h"
#include "emoji.h"
#include "filedef.h"
#include "fileinfo.h"
#include "formula.h"
#include "htmlentity.h"
#include "indexlist.h"
#include "language.h"
#include "memberdef.h"
#include "mermaid.h"
#include "message.h"
#include "msc.h"
#include "outputlist.h"
#include "parserintf.h"
#include "plantuml.h"
#include "portable.h"
#include "reflist.h"
#include "util.h"
#include "vhdldocgen.h"
Include dependency graph for htmldocvisitor.cpp:

Go to the source code of this file.

Enumerations

enum class  contexts_t {
  NONE , STARTLI , STARTDD , ENDLI ,
  ENDDD , STARTTD , ENDTD , INTERLI ,
  INTERDD , INTERTD
}

Functions

static constexpr const char * contexts (contexts_t type)
static DString convertIndexWordToAnchor (const DString &word)
static bool mustBeOutsideParagraph (const DocNodeVariant &n)
static bool isDocVerbatimVisible (const DocVerbatim &s)
static bool isDocIncludeVisible (const DocInclude &s)
static bool isDocIncOperatorVisible (const DocIncOperator &s)
static bool isInvisibleNode (const DocNodeVariant &node)
template<class Node>
static bool holds_value (const Node *val, const DocNodeVariant &v)
template<class T>
bool isFirstChildNode (const T *parent, const DocPara &node)
template<class T>
bool isLastChildNode (const T *parent, const DocPara &node)
bool isSeparatedParagraph (const DocSimpleSect &parent, const DocPara &par)
static contexts_t getParagraphContext (const DocPara &p, bool &isFirst, bool &isLast)
static bool determineIfNeedsTag (const DocPara &p)
static bool insideStyleChangeThatIsOutsideParagraph (const DocPara *para, DocNodeList::const_iterator it)
 Returns true if the child nodes in paragraph para until nodeIndex contain a style change node that is still active and that style change is one that must be located outside of a paragraph, i.e.

Variables

static const int NUM_HTML_LIST_TYPES = 4
static const char g_types [][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"}
static const char * hex ="0123456789ABCDEF"

Enumeration Type Documentation

◆ contexts_t

enum class contexts_t
strong
Enumerator
NONE 
STARTLI 
STARTDD 
ENDLI 
ENDDD 
STARTTD 
ENDTD 
INTERLI 
INTERDD 
INTERTD 

Definition at line 47 of file htmldocvisitor.cpp.

48{
49 NONE, // 0
50 STARTLI, // 1
51 STARTDD, // 2
52 ENDLI, // 3
53 ENDDD, // 4
54 STARTTD, // 5
55 ENDTD, // 6
56 INTERLI, // 7
57 INTERDD, // 8
58 INTERTD // 9
59};

Function Documentation

◆ contexts()

constexpr const char * contexts ( contexts_t type)
staticconstexpr

Definition at line 61 of file htmldocvisitor.cpp.

62{
63 switch (type)
64 {
65 case contexts_t::NONE: return nullptr;
66 case contexts_t::STARTLI: return "startli";
67 case contexts_t::STARTDD: return "startdd";
68 case contexts_t::ENDLI: return "endli";
69 case contexts_t::ENDDD: return "enddd";
70 case contexts_t::STARTTD: return "starttd";
71 case contexts_t::ENDTD: return "endtd";
72 case contexts_t::INTERLI: return "interli";
73 case contexts_t::INTERDD: return "interdd";
74 case contexts_t::INTERTD: return "intertd";
75 default: return nullptr;
76 }
77}

References ENDDD, ENDLI, ENDTD, INTERDD, INTERLI, INTERTD, NONE, STARTDD, STARTLI, and STARTTD.

Referenced by HtmlDocVisitor::operator()().

◆ convertIndexWordToAnchor()

DString convertIndexWordToAnchor ( const DString & word)
static

Definition at line 80 of file htmldocvisitor.cpp.

81{
82 static int cnt = 0;
83 DString result="a";
84 DString cntStr;
85 result += cntStr.setNum(cnt);
86 result += "_";
87 cnt++;
88 const char *str = word.data();
89 unsigned char c = 0;
90 if (str)
91 {
92 while ((c = *str++))
93 {
94 if ((c >= 'a' && c <= 'z') || // ALPHA
95 (c >= 'A' && c <= 'Z') || // ALPHA
96 (c >= '0' && c <= '9') || // DIGIT
97 c == '-' ||
98 c == '.'
99 )
100 {
101 result += c;
102 }
103 else
104 {
105 char enc[4];
106 enc[0] = '_';
107 enc[1] = hex[(c & 0xf0) >> 4];
108 enc[2] = hex[c & 0xf];
109 enc[3] = 0;
110 result += enc;
111 }
112 }
113 }
114 return result;
115}
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:84
DString & setNum(short n)
Definition dstring.h:552
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition dstring.h:157
static const char * hex

References DString::data(), hex, and DString::setNum().

Referenced by HtmlDocVisitor::operator()().

◆ determineIfNeedsTag()

bool determineIfNeedsTag ( const DocPara & p)
static

Definition at line 1231 of file htmldocvisitor.cpp.

1232{
1233 bool needsTag = false;
1234 if (p.parent())
1235 {
1249 >(*p.parent()))
1250 {
1251 needsTag = true;
1252 }
1253 else if (std::get_if<DocRoot>(p.parent()))
1254 {
1255 needsTag = !std::get<DocRoot>(*p.parent()).singleLine();
1256 }
1257 }
1258 return needsTag;
1259}
Node representing an item of a auto list.
Definition docnode.h:595
Node representing an HTML blockquote.
Definition docnode.h:1296
Node representing a HTML table cell.
Definition docnode.h:1198
Node representing a HTML description data.
Definition docnode.h:1186
Node Html details.
Definition docnode.h:866
Node representing a HTML list item.
Definition docnode.h:1170
Node Html summary.
Definition docnode.h:853
Node representing an internal section of documentation.
Definition docnode.h:978
DocNodeVariant * parent()
Definition docnode.h:89
Node representing an block of paragraphs.
Definition docnode.h:988
Node representing a normal section.
Definition docnode.h:923
Node representing a simple list item.
Definition docnode.h:1158
Node representing a simple section.
Definition docnode.h:1026
Node representing an item of a cross-referenced list.
Definition docnode.h:621
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
Definition docnode.h:1371

References holds_one_of_alternatives(), and DocNode::parent().

Referenced by HtmlDocVisitor::operator()().

◆ getParagraphContext()

contexts_t getParagraphContext ( const DocPara & p,
bool & isFirst,
bool & isLast )
static

Definition at line 1099 of file htmldocvisitor.cpp.

1100{
1102 isFirst=false;
1103 isLast=false;
1104 if (p.parent())
1105 {
1106 const auto &parBlock = std::get_if<DocParBlock>(p.parent());
1107 if (parBlock)
1108 {
1109 // hierarchy: node N -> para -> parblock -> para
1110 // adapt return value to kind of N
1111 const DocNodeVariant *p3 = nullptr;
1112 if (::parent(p.parent()) && ::parent(::parent(p.parent())) )
1113 {
1114 p3 = ::parent(::parent(p.parent()));
1115 }
1116 isFirst=isFirstChildNode(parBlock,p);
1117 isLast =isLastChildNode (parBlock,p);
1118 bool isLI = p3!=nullptr && holds_one_of_alternatives<DocHtmlListItem,DocSecRefItem>(*p3);
1120 bool isTD = p3!=nullptr && holds_one_of_alternatives<DocHtmlCell,DocParamList>(*p3);
1122 if (isFirst)
1123 {
1124 if (isLI) t=contexts_t::STARTLI; else if (isDD) t=contexts_t::STARTDD; else if (isTD) t=contexts_t::STARTTD;
1125 }
1126 if (isLast)
1127 {
1128 if (isLI) t=contexts_t::ENDLI; else if (isDD) t=contexts_t::ENDDD; else if (isTD) t=contexts_t::ENDTD;
1129 }
1130 if (!isFirst && !isLast)
1131 {
1132 if (isLI) t=contexts_t::INTERLI; else if (isDD) t=contexts_t::INTERDD; else if (isTD) t=contexts_t::INTERTD;
1133 }
1134 return t;
1135 }
1136 const auto &docAutoListItem = std::get_if<DocAutoListItem>(p.parent());
1137 if (docAutoListItem)
1138 {
1139 isFirst=isFirstChildNode(docAutoListItem,p);
1140 isLast =isLastChildNode (docAutoListItem,p);
1141 t=contexts_t::STARTLI; // not used
1142 return t;
1143 }
1144 const auto &docSimpleListItem = std::get_if<DocSimpleListItem>(p.parent());
1145 if (docSimpleListItem)
1146 {
1147 isFirst=true;
1148 isLast =true;
1149 t=contexts_t::STARTLI; // not used
1150 return t;
1151 }
1152 const auto &docParamList = std::get_if<DocParamList>(p.parent());
1153 if (docParamList)
1154 {
1155 isFirst=true;
1156 isLast =true;
1157 t=contexts_t::STARTLI; // not used
1158 return t;
1159 }
1160 const auto &docHtmlListItem = std::get_if<DocHtmlListItem>(p.parent());
1161 if (docHtmlListItem)
1162 {
1163 isFirst=isFirstChildNode(docHtmlListItem,p);
1164 isLast =isLastChildNode (docHtmlListItem,p);
1165 if (isFirst) t=contexts_t::STARTLI;
1166 if (isLast) t=contexts_t::ENDLI;
1167 if (!isFirst && !isLast) t = contexts_t::INTERLI;
1168 return t;
1169 }
1170 const auto &docSecRefItem = std::get_if<DocSecRefItem>(p.parent());
1171 if (docSecRefItem)
1172 {
1173 isFirst=isFirstChildNode(docSecRefItem,p);
1174 isLast =isLastChildNode (docSecRefItem,p);
1175 if (isFirst) t=contexts_t::STARTLI;
1176 if (isLast) t=contexts_t::ENDLI;
1177 if (!isFirst && !isLast) t = contexts_t::INTERLI;
1178 return t;
1179 }
1180 const auto &docHtmlDescData = std::get_if<DocHtmlDescData>(p.parent());
1181 if (docHtmlDescData)
1182 {
1183 isFirst=isFirstChildNode(docHtmlDescData,p);
1184 isLast =isLastChildNode (docHtmlDescData,p);
1185 if (isFirst) t=contexts_t::STARTDD;
1186 if (isLast) t=contexts_t::ENDDD;
1187 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1188 return t;
1189 }
1190 const auto &docXRefItem = std::get_if<DocXRefItem>(p.parent());
1191 if (docXRefItem)
1192 {
1193 isFirst=isFirstChildNode(docXRefItem,p);
1194 isLast =isLastChildNode (docXRefItem,p);
1195 if (isFirst) t=contexts_t::STARTDD;
1196 if (isLast) t=contexts_t::ENDDD;
1197 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1198 return t;
1199 }
1200 const auto &docSimpleSect = std::get_if<DocSimpleSect>(p.parent());
1201 if (docSimpleSect)
1202 {
1203 isFirst=isFirstChildNode(docSimpleSect,p);
1204 isLast =isLastChildNode (docSimpleSect,p);
1205 if (isFirst) t=contexts_t::STARTDD;
1206 if (isLast) t=contexts_t::ENDDD;
1207 if (isSeparatedParagraph(*docSimpleSect,p))
1208 // if the paragraph is enclosed with separators it will
1209 // be included in <dd>..</dd> so avoid addition paragraph
1210 // markers
1211 {
1212 isFirst=isLast=true;
1213 }
1214 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1215 return t;
1216 }
1217 const auto &docHtmlCell = std::get_if<DocHtmlCell>(p.parent());
1218 if (docHtmlCell)
1219 {
1220 isFirst=isFirstChildNode(docHtmlCell,p);
1221 isLast =isLastChildNode (docHtmlCell,p);
1222 if (isFirst) t=contexts_t::STARTTD;
1223 if (isLast) t=contexts_t::ENDTD;
1224 if (!isFirst && !isLast) t = contexts_t::INTERTD;
1225 return t;
1226 }
1227 }
1228 return t;
1229}
std::variant< DocWord, DocLinkedWord, DocURL, DocLineBreak, DocHorRuler, DocAnchor, DocCite, DocStyleChange, DocSymbol, DocEmoji, DocWhiteSpace, DocSeparator, DocVerbatim, DocInclude, DocIncOperator, DocFormula, DocIndexEntry, DocAutoList, DocAutoListItem, DocTitle, DocXRefItem, DocImage, DocDotFile, DocMscFile, DocDiaFile, DocVhdlFlow, DocLink, DocRef, DocInternalRef, DocHRef, DocHtmlHeader, DocHtmlDescTitle, DocHtmlDescList, DocSection, DocSecRefItem, DocSecRefList, DocInternal, DocParBlock, DocSimpleList, DocHtmlList, DocSimpleSect, DocSimpleSectSep, DocParamSect, DocPara, DocParamList, DocSimpleListItem, DocHtmlListItem, DocHtmlDescData, DocHtmlCell, DocHtmlCaption, DocHtmlRow, DocHtmlTable, DocHtmlBlockQuote, DocText, DocRoot, DocHtmlDetails, DocHtmlSummary, DocPlantUmlFile, DocMermaidFile > DocNodeVariant
Definition docnode.h:66
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
Definition docnode.h:1335
contexts_t
bool isFirstChildNode(const T *parent, const DocPara &node)
bool isSeparatedParagraph(const DocSimpleSect &parent, const DocPara &par)
bool isLastChildNode(const T *parent, const DocPara &node)

References ENDDD, ENDLI, ENDTD, holds_one_of_alternatives(), INTERDD, INTERLI, INTERTD, isFirstChildNode(), isLastChildNode(), isSeparatedParagraph(), NONE, DocNode::parent(), parent(), STARTDD, STARTLI, and STARTTD.

Referenced by HtmlDocVisitor::forceEndParagraph(), HtmlDocVisitor::forceStartParagraph(), and HtmlDocVisitor::operator()().

◆ holds_value()

template<class Node>
bool holds_value ( const Node * val,
const DocNodeVariant & v )
static

Definition at line 1055 of file htmldocvisitor.cpp.

1056{
1057 bool b = std::visit([&](auto &&x) {
1058 //printf("holds_value val=%s (%p) v=%s (%p)\n",
1059 // docNodeName(*val),(void*)val,docNodeName(v),(void *)&x);
1060 return val==static_cast<const DocNode*>(&x);
1061 }, v);
1062 return b;
1063}
Abstract node interface with type information.
Definition docnode.h:81

Referenced by HtmlDocVisitor::forceEndParagraph(), HtmlDocVisitor::forceStartParagraph(), isFirstChildNode(), isLastChildNode(), and isSeparatedParagraph().

◆ insideStyleChangeThatIsOutsideParagraph()

bool insideStyleChangeThatIsOutsideParagraph ( const DocPara * para,
DocNodeList::const_iterator it )
static

Returns true if the child nodes in paragraph para until nodeIndex contain a style change node that is still active and that style change is one that must be located outside of a paragraph, i.e.

it is a center, div, or pre tag. See also bug746162.

Definition at line 2361 of file htmldocvisitor.cpp.

2363{
2364 //printf("insideStyleChangeThatIsOutputParagraph(index=%d)\n",nodeIndex);
2365 int styleMask=0;
2366 bool styleOutsideParagraph=false;
2367 while (!styleOutsideParagraph)
2368 {
2369 const DocNodeVariant *n = &(*it);
2370 const DocStyleChange *sc = std::get_if<DocStyleChange>(n);
2371 if (sc)
2372 {
2373 if (!sc->enable()) // remember styles that has been closed already
2374 {
2375 styleMask|=static_cast<int>(sc->style());
2376 }
2377 bool paraStyle = sc->style()==DocStyleChange::Center ||
2378 sc->style()==DocStyleChange::Div ||
2380 //printf("Found style change %s enabled=%d\n",sc->styleString(),sc->enable());
2381 if (sc->enable() && (styleMask&static_cast<int>(sc->style()))==0 && // style change that is still active
2382 paraStyle
2383 )
2384 {
2385 styleOutsideParagraph=true;
2386 }
2387 }
2388 if (it!=std::begin(para->children()))
2389 {
2390 --it;
2391 }
2392 else
2393 {
2394 break;
2395 }
2396 }
2397 return styleOutsideParagraph;
2398}
DocNodeList & children()
Definition docnode.h:143
Node representing a style change.
Definition docnode.h:268
Style style() const
Definition docnode.h:307
bool enable() const
Definition docnode.h:309

References DocStyleChange::Center, DocCompoundNode::children(), DocStyleChange::Div, DocStyleChange::enable(), DocStyleChange::Preformatted, and DocStyleChange::style().

Referenced by HtmlDocVisitor::forceEndParagraph(), and HtmlDocVisitor::forceStartParagraph().

◆ isDocIncludeVisible()

bool isDocIncludeVisible ( const DocInclude & s)
static

Definition at line 184 of file htmldocvisitor.cpp.

185{
186 switch (s.type())
187 {
194 return false;
195 default:
196 return true;
197 }
198}
@ LatexInclude
Definition docnode.h:437
@ DontInclude
Definition docnode.h:437
@ DocbookInclude
Definition docnode.h:439
Type type() const
Definition docnode.h:451

References DocInclude::DocbookInclude, DocInclude::DontInclude, DocInclude::LatexInclude, DocInclude::ManInclude, DocInclude::RtfInclude, DocInclude::type(), and DocInclude::XmlInclude.

Referenced by isInvisibleNode().

◆ isDocIncOperatorVisible()

bool isDocIncOperatorVisible ( const DocIncOperator & s)
static

Definition at line 200 of file htmldocvisitor.cpp.

201{
202 switch (s.type())
203 {
205 return false;
206 default:
207 return true;
208 }
209}
Type type() const
Definition docnode.h:485

References DocIncOperator::Skip, and DocIncOperator::type().

Referenced by isInvisibleNode().

◆ isDocVerbatimVisible()

bool isDocVerbatimVisible ( const DocVerbatim & s)
static

Definition at line 169 of file htmldocvisitor.cpp.

170{
171 switch (s.type())
172 {
178 return false;
179 default:
180 return true;
181 }
182}
Type type() const
Definition docnode.h:382

References DocVerbatim::DocbookOnly, DocVerbatim::LatexOnly, DocVerbatim::ManOnly, DocVerbatim::RtfOnly, DocVerbatim::type(), and DocVerbatim::XmlOnly.

Referenced by isInvisibleNode().

◆ isFirstChildNode()

template<class T>
bool isFirstChildNode ( const T * parent,
const DocPara & node )

Definition at line 1066 of file htmldocvisitor.cpp.

1067{
1068 return !parent->children().empty() && holds_value(&node,parent->children().front());
1069}
static bool holds_value(const Node *val, const DocNodeVariant &v)

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ isInvisibleNode()

bool isInvisibleNode ( const DocNodeVariant & node)
static

Definition at line 211 of file htmldocvisitor.cpp.

212{
213 //printf("isInvisibleNode(%s)\n",docNodeName(node));
214 // skip over white space
215 const DocWhiteSpace *ws = std::get_if<DocWhiteSpace>(&node);
216 if (ws) return true;
217 // skip over image nodes that are not for HTML output
218 const DocImage *di = std::get_if<DocImage>(&node);
219 if (di) return di->type()!=DocImage::Html;
220 // skip over verbatim nodes that are not visible in the HTML output
221 const DocVerbatim *dv = std::get_if<DocVerbatim>(&node);
222 if (dv) return !isDocVerbatimVisible(*dv);
223 // skip over include nodes that are not visible in the HTML output
224 const DocInclude *dinc = std::get_if<DocInclude>(&node);
225 if (dinc) return !isDocIncludeVisible(*dinc);
226 const DocIncOperator *dio = std::get_if<DocIncOperator>(&node);
227 // skip over include operator nodes that are not visible in the HTML output
228 if (dio) return !isDocIncOperatorVisible(*dio);
229 return false;
230}
Node representing an image.
Definition docnode.h:642
Type type() const
Definition docnode.h:647
Node representing a include/dontinclude operator block.
Definition docnode.h:477
Node representing an included text block from file.
Definition docnode.h:435
Node representing a verbatim, unparsed text fragment.
Definition docnode.h:376
Node representing some amount of white space.
Definition docnode.h:354
static bool isDocVerbatimVisible(const DocVerbatim &s)
static bool isDocIncOperatorVisible(const DocIncOperator &s)
static bool isDocIncludeVisible(const DocInclude &s)

References DocImage::Html, isDocIncludeVisible(), isDocIncOperatorVisible(), isDocVerbatimVisible(), and DocImage::type().

Referenced by HtmlDocVisitor::forceEndParagraph(), HtmlDocVisitor::forceStartParagraph(), and HtmlDocVisitor::operator()().

◆ isLastChildNode()

template<class T>
bool isLastChildNode ( const T * parent,
const DocPara & node )

Definition at line 1072 of file htmldocvisitor.cpp.

1073{
1074 return !parent->children().empty() && holds_value(&node,parent->children().back());
1075}

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ isSeparatedParagraph()

bool isSeparatedParagraph ( const DocSimpleSect & parent,
const DocPara & par )

Definition at line 1077 of file htmldocvisitor.cpp.

1078{
1079 const DocNodeList &nodes = parent.children();
1080 auto it = std::find_if(std::begin(nodes),std::end(nodes),[&par](const auto &n) { return holds_value(&par,n); });
1081 if (it==std::end(nodes)) return false;
1082 size_t count = parent.children().size();
1083 auto isSeparator = [](auto &&it_) { return std::get_if<DocSimpleSectSep>(&(*it_))!=nullptr; };
1084 if (count>1 && it==std::begin(nodes)) // it points to first node
1085 {
1086 return isSeparator(std::next(it));
1087 }
1088 else if (count>1 && it==std::prev(std::end(nodes))) // it points to last node
1089 {
1090 return isSeparator(std::prev(it));
1091 }
1092 else if (count>2 && it!=std::begin(nodes) && it!=std::prev(std::end(nodes))) // it points to intermediate node
1093 {
1094 return isSeparator(std::prev(it)) && isSeparator(std::next(it));
1095 }
1096 return false;
1097}

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ mustBeOutsideParagraph()

bool mustBeOutsideParagraph ( const DocNodeVariant & n)
static

Definition at line 119 of file htmldocvisitor.cpp.

120{
121 //printf("mustBeOutsideParagraph(%s)=",docNodeName(n));
124 /* <table> */ DocHtmlTable,
125 /* <h?> */ DocSection, DocHtmlHeader,
126 /* \internal */ DocInternal,
127 /* <div> */ DocInclude, DocSecRefList,
128 /* <hr> */ DocHorRuler,
129 /* <blockquote> */ DocHtmlBlockQuote,
130 /* \parblock */ DocParBlock,
131 /* \dotfile */ DocDotFile,
132 /* \mscfile */ DocMscFile,
133 /* \diafile */ DocDiaFile,
134 /* \plantumlfile */ DocPlantUmlFile,
135 /* \mermaidfile */ DocMermaidFile,
136 /* <details> */ DocHtmlDetails,
137 /* <summary> */ DocHtmlSummary,
138 DocIncOperator >(n))
139 {
140 return true;
141 }
142 const DocVerbatim *dv = std::get_if<DocVerbatim>(&n);
143 if (dv)
144 {
145 DocVerbatim::Type t = dv->type();
146 if (t == DocVerbatim::JavaDocCode || t == DocVerbatim::JavaDocLiteral) return false;
147 return t!=DocVerbatim::HtmlOnly || dv->isBlock();
148 }
149 const DocStyleChange *sc = std::get_if<DocStyleChange>(&n);
150 if (sc)
151 {
152 return sc->style()==DocStyleChange::Preformatted ||
153 sc->style()==DocStyleChange::Div ||
155 }
156 const DocFormula *df = std::get_if<DocFormula>(&n);
157 if (df)
158 {
159 return !df->isInline();
160 }
161 const DocImage *di = std::get_if<DocImage>(&n);
162 if (di)
163 {
164 return !di->isInlineImage();
165 }
166 return false;
167}
Node representing an auto List.
Definition docnode.h:571
Node representing a dia file.
Definition docnode.h:731
Node representing a dot file.
Definition docnode.h:713
Node representing an item of a cross-referenced list.
Definition docnode.h:529
bool isInline() const
Definition docnode.h:536
Node representing a horizontal ruler.
Definition docnode.h:216
Node representing a Html description list.
Definition docnode.h:910
Node Html heading.
Definition docnode.h:882
Node representing a Html list.
Definition docnode.h:1009
Node representing a HTML table.
Definition docnode.h:1274
bool isInlineImage() const
Definition docnode.h:654
Node representing a mermaid file.
Definition docnode.h:749
Node representing a msc file.
Definition docnode.h:722
Node representing a parameter section.
Definition docnode.h:1062
Node representing a uml file.
Definition docnode.h:740
Node representing a list of section references.
Definition docnode.h:968
Node representing a simple list.
Definition docnode.h:999
bool isBlock() const
Definition docnode.h:389
@ JavaDocLiteral
Definition docnode.h:378

References DocStyleChange::Center, DocStyleChange::Div, holds_one_of_alternatives(), DocVerbatim::HtmlOnly, DocVerbatim::isBlock(), DocFormula::isInline(), DocImage::isInlineImage(), DocVerbatim::JavaDocCode, DocVerbatim::JavaDocLiteral, DocStyleChange::Preformatted, DocStyleChange::style(), and DocVerbatim::type().

Referenced by HtmlDocVisitor::forceEndParagraph(), HtmlDocVisitor::forceStartParagraph(), and HtmlDocVisitor::operator()().

Variable Documentation

◆ g_types

const char g_types[][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"}
static

Definition at line 46 of file htmldocvisitor.cpp.

Referenced by HtmlDocVisitor::operator()().

◆ hex

const char* hex ="0123456789ABCDEF"
static

◆ NUM_HTML_LIST_TYPES

const int NUM_HTML_LIST_TYPES = 4
static

Definition at line 45 of file htmldocvisitor.cpp.

Referenced by HtmlDocVisitor::operator()().