Doxygen
Loading...
Searching...
No Matches
htmldocvisitor.cpp File Reference
#include "htmldocvisitor.h"
#include "docparser.h"
#include "language.h"
#include "doxygen.h"
#include "outputgen.h"
#include "outputlist.h"
#include "dot.h"
#include "message.h"
#include "config.h"
#include "htmlgen.h"
#include "parserintf.h"
#include "msc.h"
#include "dia.h"
#include "util.h"
#include "vhdldocgen.h"
#include "filedef.h"
#include "memberdef.h"
#include "htmlentity.h"
#include "emoji.h"
#include "plantuml.h"
#include "mermaid.h"
#include "formula.h"
#include "fileinfo.h"
#include "indexlist.h"
#include "portable.h"
#include "codefragment.h"
#include "cite.h"
#include "md5.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 QCString convertIndexWordToAnchor (const QCString &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()

QCString convertIndexWordToAnchor ( const QCString & word)
static

Definition at line 80 of file htmldocvisitor.cpp.

81{
82 static int cnt = 0;
83 QCString result="a";
84 QCString 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}
This is an alternative implementation of QCString.
Definition qcstring.h:101
QCString & setNum(short n)
Definition qcstring.h:459
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:172
static constexpr auto hex

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

Referenced by HtmlDocVisitor::operator()().

◆ determineIfNeedsTag()

bool determineIfNeedsTag ( const DocPara & p)
static

Definition at line 1233 of file htmldocvisitor.cpp.

1234{
1235 bool needsTag = FALSE;
1236 if (p.parent())
1237 {
1251 >(*p.parent()))
1252 {
1253 needsTag = TRUE;
1254 }
1255 else if (std::get_if<DocRoot>(p.parent()))
1256 {
1257 needsTag = !std::get<DocRoot>(*p.parent()).singleLine();
1258 }
1259 }
1260 return needsTag;
1261}
Node representing an item of a auto list.
Definition docnode.h:595
Node representing an HTML blockquote.
Definition docnode.h:1297
Node representing a HTML table cell.
Definition docnode.h:1199
Node representing a HTML description data.
Definition docnode.h:1187
Node Html details.
Definition docnode.h:866
Node representing a HTML list item.
Definition docnode.h:1171
Node Html summary.
Definition docnode.h:853
Node representing an internal section of documentation.
Definition docnode.h:978
DocNodeVariant * parent()
Definition docnode.h:90
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:1159
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:1372
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

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

Referenced by HtmlDocVisitor::operator()().

◆ getParagraphContext()

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

Definition at line 1101 of file htmldocvisitor.cpp.

1102{
1104 isFirst=FALSE;
1105 isLast=FALSE;
1106 if (p.parent())
1107 {
1108 const auto parBlock = std::get_if<DocParBlock>(p.parent());
1109 if (parBlock)
1110 {
1111 // hierarchy: node N -> para -> parblock -> para
1112 // adapt return value to kind of N
1113 const DocNodeVariant *p3 = nullptr;
1114 if (::parent(p.parent()) && ::parent(::parent(p.parent())) )
1115 {
1116 p3 = ::parent(::parent(p.parent()));
1117 }
1118 isFirst=isFirstChildNode(parBlock,p);
1119 isLast =isLastChildNode (parBlock,p);
1120 bool isLI = p3!=nullptr && holds_one_of_alternatives<DocHtmlListItem,DocSecRefItem>(*p3);
1122 bool isTD = p3!=nullptr && holds_one_of_alternatives<DocHtmlCell,DocParamList>(*p3);
1124 if (isFirst)
1125 {
1126 if (isLI) t=contexts_t::STARTLI; else if (isDD) t=contexts_t::STARTDD; else if (isTD) t=contexts_t::STARTTD;
1127 }
1128 if (isLast)
1129 {
1130 if (isLI) t=contexts_t::ENDLI; else if (isDD) t=contexts_t::ENDDD; else if (isTD) t=contexts_t::ENDTD;
1131 }
1132 if (!isFirst && !isLast)
1133 {
1134 if (isLI) t=contexts_t::INTERLI; else if (isDD) t=contexts_t::INTERDD; else if (isTD) t=contexts_t::INTERTD;
1135 }
1136 return t;
1137 }
1138 const auto docAutoListItem = std::get_if<DocAutoListItem>(p.parent());
1139 if (docAutoListItem)
1140 {
1141 isFirst=isFirstChildNode(docAutoListItem,p);
1142 isLast =isLastChildNode (docAutoListItem,p);
1143 t=contexts_t::STARTLI; // not used
1144 return t;
1145 }
1146 const auto docSimpleListItem = std::get_if<DocSimpleListItem>(p.parent());
1147 if (docSimpleListItem)
1148 {
1149 isFirst=TRUE;
1150 isLast =TRUE;
1151 t=contexts_t::STARTLI; // not used
1152 return t;
1153 }
1154 const auto docParamList = std::get_if<DocParamList>(p.parent());
1155 if (docParamList)
1156 {
1157 isFirst=TRUE;
1158 isLast =TRUE;
1159 t=contexts_t::STARTLI; // not used
1160 return t;
1161 }
1162 const auto docHtmlListItem = std::get_if<DocHtmlListItem>(p.parent());
1163 if (docHtmlListItem)
1164 {
1165 isFirst=isFirstChildNode(docHtmlListItem,p);
1166 isLast =isLastChildNode (docHtmlListItem,p);
1167 if (isFirst) t=contexts_t::STARTLI;
1168 if (isLast) t=contexts_t::ENDLI;
1169 if (!isFirst && !isLast) t = contexts_t::INTERLI;
1170 return t;
1171 }
1172 const auto docSecRefItem = std::get_if<DocSecRefItem>(p.parent());
1173 if (docSecRefItem)
1174 {
1175 isFirst=isFirstChildNode(docSecRefItem,p);
1176 isLast =isLastChildNode (docSecRefItem,p);
1177 if (isFirst) t=contexts_t::STARTLI;
1178 if (isLast) t=contexts_t::ENDLI;
1179 if (!isFirst && !isLast) t = contexts_t::INTERLI;
1180 return t;
1181 }
1182 const auto docHtmlDescData = std::get_if<DocHtmlDescData>(p.parent());
1183 if (docHtmlDescData)
1184 {
1185 isFirst=isFirstChildNode(docHtmlDescData,p);
1186 isLast =isLastChildNode (docHtmlDescData,p);
1187 if (isFirst) t=contexts_t::STARTDD;
1188 if (isLast) t=contexts_t::ENDDD;
1189 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1190 return t;
1191 }
1192 const auto docXRefItem = std::get_if<DocXRefItem>(p.parent());
1193 if (docXRefItem)
1194 {
1195 isFirst=isFirstChildNode(docXRefItem,p);
1196 isLast =isLastChildNode (docXRefItem,p);
1197 if (isFirst) t=contexts_t::STARTDD;
1198 if (isLast) t=contexts_t::ENDDD;
1199 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1200 return t;
1201 }
1202 const auto docSimpleSect = std::get_if<DocSimpleSect>(p.parent());
1203 if (docSimpleSect)
1204 {
1205 isFirst=isFirstChildNode(docSimpleSect,p);
1206 isLast =isLastChildNode (docSimpleSect,p);
1207 if (isFirst) t=contexts_t::STARTDD;
1208 if (isLast) t=contexts_t::ENDDD;
1209 if (isSeparatedParagraph(*docSimpleSect,p))
1210 // if the paragraph is enclosed with separators it will
1211 // be included in <dd>..</dd> so avoid addition paragraph
1212 // markers
1213 {
1214 isFirst=isLast=TRUE;
1215 }
1216 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1217 return t;
1218 }
1219 const auto docHtmlCell = std::get_if<DocHtmlCell>(p.parent());
1220 if (docHtmlCell)
1221 {
1222 isFirst=isFirstChildNode(docHtmlCell,p);
1223 isLast =isLastChildNode (docHtmlCell,p);
1224 if (isFirst) t=contexts_t::STARTTD;
1225 if (isLast) t=contexts_t::ENDTD;
1226 if (!isFirst && !isLast) t = contexts_t::INTERTD;
1227 return t;
1228 }
1229 }
1230 return t;
1231}
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:67
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:1336
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, FALSE, holds_one_of_alternatives(), INTERDD, INTERLI, INTERTD, isFirstChildNode(), isLastChildNode(), isSeparatedParagraph(), NONE, DocNode::parent(), parent(), STARTDD, STARTLI, STARTTD, and TRUE.

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 1057 of file htmldocvisitor.cpp.

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

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 2357 of file htmldocvisitor.cpp.

2359{
2360 //printf("insideStyleChangeThatIsOutputParagraph(index=%d)\n",nodeIndex);
2361 int styleMask=0;
2362 bool styleOutsideParagraph=FALSE;
2363 while (!styleOutsideParagraph)
2364 {
2365 const DocNodeVariant *n = &(*it);
2366 const DocStyleChange *sc = std::get_if<DocStyleChange>(n);
2367 if (sc)
2368 {
2369 if (!sc->enable()) // remember styles that has been closed already
2370 {
2371 styleMask|=static_cast<int>(sc->style());
2372 }
2373 bool paraStyle = sc->style()==DocStyleChange::Center ||
2374 sc->style()==DocStyleChange::Div ||
2376 //printf("Found style change %s enabled=%d\n",sc->styleString(),sc->enable());
2377 if (sc->enable() && (styleMask&static_cast<int>(sc->style()))==0 && // style change that is still active
2378 paraStyle
2379 )
2380 {
2381 styleOutsideParagraph=TRUE;
2382 }
2383 }
2384 if (it!=std::begin(para->children()))
2385 {
2386 --it;
2387 }
2388 else
2389 {
2390 break;
2391 }
2392 }
2393 return styleOutsideParagraph;
2394}
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(), FALSE, DocStyleChange::Preformatted, DocStyleChange::style(), and TRUE.

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, FALSE, DocInclude::LatexInclude, DocInclude::ManInclude, DocInclude::RtfInclude, TRUE, 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 FALSE, DocIncOperator::Skip, TRUE, 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, FALSE, DocVerbatim::LatexOnly, DocVerbatim::ManOnly, DocVerbatim::RtfOnly, TRUE, DocVerbatim::type(), and DocVerbatim::XmlOnly.

Referenced by isInvisibleNode().

◆ isFirstChildNode()

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

Definition at line 1068 of file htmldocvisitor.cpp.

1069{
1070 return !parent->children().empty() && holds_value(&node,parent->children().front());
1071}
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 1074 of file htmldocvisitor.cpp.

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

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ isSeparatedParagraph()

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

Definition at line 1079 of file htmldocvisitor.cpp.

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

References FALSE, 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();
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:1275
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, FALSE, holds_one_of_alternatives(), DocVerbatim::HtmlOnly, DocVerbatim::isBlock(), DocFormula::isInline(), DocImage::isInlineImage(), DocVerbatim::JavaDocCode, DocVerbatim::JavaDocLiteral, DocStyleChange::Preformatted, DocStyleChange::style(), TRUE, 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.

46{"1", "a", "i", "A"};

Referenced by HtmlDocVisitor::operator()().

◆ hex

const char* hex ="0123456789ABCDEF"
static

Definition at line 78 of file htmldocvisitor.cpp.

◆ NUM_HTML_LIST_TYPES

const int NUM_HTML_LIST_TYPES = 4
static

Definition at line 45 of file htmldocvisitor.cpp.

Referenced by HtmlDocVisitor::operator()().