From 09939f6fd8b1e7aaa29016e09ef47047e7bea75b Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 23 Jan 2020 15:12:41 +0100 Subject: Bug 791390 - Table formatting information ignored in Doxygen XML output - added possibility (and checks) for xml - added missing case for class in docbook --- src/docbookvisitor.cpp | 4 ++++ src/xmldocvisitor.cpp | 47 +++++++++++++++++++++++++++++++++++++++++++++- templates/xml/compound.xsd | 4 ++++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index e6d0014..8bb5a34 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -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") { diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 0aafd47..0d1c740 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -806,7 +806,52 @@ void XmlDocVisitor::visitPost(DocHtmlRow *) void XmlDocVisitor::visitPre(DocHtmlCell *c) { if (m_hide) return; - if (c->isHeading()) m_t << ""; else m_t << ""; + if (c->isHeading()) m_t << "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 *) diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index 67d7843..191527f 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -570,6 +570,10 @@ + + + + -- cgit v0.12