Skip to content

Commit

Permalink
Bug 791390 - Table formatting information ignored in Doxygen XML output
Browse files Browse the repository at this point in the history
- added possibility (and checks) for xml
- added missing case for class in docbook
  • Loading branch information
albert-github committed Jan 23, 2020
1 parent dc67dbe commit 09939f6
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/docbookvisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,10 @@ DB_VIS_C
{
m_t << " align='center'";
}
else if (!opt->value.isEmpty())
{
m_t << " " << opt->name << "='" << opt->value << "'";
}
}
else if (opt->name=="style")
{
Expand Down
47 changes: 46 additions & 1 deletion src/xmldocvisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,52 @@ void XmlDocVisitor::visitPost(DocHtmlRow *)
void XmlDocVisitor::visitPre(DocHtmlCell *c)
{
if (m_hide) return;
if (c->isHeading()) m_t << "<entry thead=\"yes\">"; else m_t << "<entry thead=\"no\">";
if (c->isHeading()) m_t << "<entry thead=\"yes\""; else m_t << "<entry thead=\"no\"";
HtmlAttribListIterator li(c->attribs());
HtmlAttrib *opt;
for (li.toFirst();(opt=li.current());++li)
{
if (opt->name=="class")
{
if (opt->value == "markdownTableBodyRight")
{
m_t << " align=\"right\"";
}
else if (opt->value == "markdownTableBodyLeftt")
{
m_t << " align=\"left\"";
}
else if (opt->value == "markdownTableBodyCenter")
{
m_t << " align=\"center\"";
}
else if (opt->value == "markdownTableHeadRight")
{
m_t << " align=\"right\"";
}
else if (opt->value == "markdownTableHeadLeftt")
{
m_t << " align=\"left\"";
}
else if (opt->value == "markdownTableHeadCenter")
{
m_t << " align=\"center\"";
}
else if (!opt->value.isEmpty())
{
m_t << " " << opt->name << "=\"" << opt->value << "\"";
}
}
else if (opt->name=="nowrap" && opt->value.isEmpty())
{
m_t << " " << opt->name << "=\"nowrap\"";
}
else if (!opt->value.isEmpty())
{
m_t << " " << opt->name << "=\"" << opt->value << "\"";
}
}
m_t << ">";
}

void XmlDocVisitor::visitPost(DocHtmlCell *)
Expand Down
4 changes: 4 additions & 0 deletions templates/xml/compound.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,10 @@
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="thead" type="DoxBool" />
<xsd:attribute name="colspan" type="xsd:integer" />
<xsd:attribute name="rowspan" type="xsd:integer" />
<!-- maybe other attributes can be listed as well -->
<xsd:anyAttribute processContents="skip"/>
</xsd:complexType>

<xsd:complexType name="docCaptionType" mixed="true">
Expand Down

0 comments on commit 09939f6

Please sign in to comment.