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

1230{
1231 bool needsTag = FALSE;
1232 if (p.parent())
1233 {
1247 >(*p.parent()))
1248 {
1249 needsTag = TRUE;
1250 }
1251 else if (std::get_if<DocRoot>(p.parent()))
1252 {
1253 needsTag = !std::get<DocRoot>(*p.parent()).singleLine();
1254 }
1255 }
1256 return needsTag;
1257}
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 1097 of file htmldocvisitor.cpp.

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

1054{
1055 bool b = std::visit([&](auto &&x) {
1056 //printf("holds_value val=%s (%p) v=%s (%p)\n",
1057 // docNodeName(*val),(void*)val,docNodeName(v),(void *)&x);
1058 return val==static_cast<const DocNode*>(&x);
1059 }, v);
1060 return b;
1061}
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 2350 of file htmldocvisitor.cpp.

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

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

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

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ isSeparatedParagraph()

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

Definition at line 1075 of file htmldocvisitor.cpp.

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

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()().