summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-12-11 18:09:28 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-12-11 18:09:28 (GMT)
commit052fea7e9e03fe2fde177cf6c1a788a58a8f392f (patch)
tree7f24fcfb282b4fc14cb5ec2f4a06c569707f697d
parentfcab07461bde28c38d77ecf2954e9efdaac1379c (diff)
downloadDoxygen-052fea7e9e03fe2fde177cf6c1a788a58a8f392f.zip
Doxygen-052fea7e9e03fe2fde177cf6c1a788a58a8f392f.tar.gz
Doxygen-052fea7e9e03fe2fde177cf6c1a788a58a8f392f.tar.bz2
Prevent empty member list table (XHTML)
The table tag should only be written in case a table has at least one row, otherwise a non valid table is generated (XHTML)
-rw-r--r--src/classdef.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index c9e6dbb..e9d39d5 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -2572,8 +2572,8 @@ void ClassDef::writeMemberList(OutputList &ol)
ol.endParagraph();
//ol.startItemList();
- ol.writeString("<table class=\"directory\">\n");
+ bool first = true; // to prevent empty table
int idx=0;
//MemberNameInfo *mni=m_impl->allMemberNameInfoList->first();
MemberNameInfoSDict::Iterator mnii(*m_impl->allMemberNameInfoSDict);
@@ -2600,6 +2600,11 @@ void ClassDef::writeMemberList(OutputList &ol)
{
QCString name=mi->ambiguityResolutionScope+md->name();
//ol.writeListItem();
+ if (first)
+ {
+ ol.writeString("<table class=\"directory\">\n");
+ first = false;
+ }
ol.writeString(" <tr");
if ((idx&1)==0) ol.writeString(" class=\"even\"");
idx++;
@@ -2653,6 +2658,11 @@ void ClassDef::writeMemberList(OutputList &ol)
// generate link to the class instead.
{
//ol.writeListItem();
+ if (first)
+ {
+ ol.writeString("<table class=\"directory\">\n");
+ first = false;
+ }
ol.writeString(" <tr bgcolor=\"#f0f0f0\"");
if ((idx&1)==0) ol.writeString(" class=\"even\"");
idx++;
@@ -2782,7 +2792,7 @@ void ClassDef::writeMemberList(OutputList &ol)
}
//ol.endItemList();
- ol.writeString("</table>");
+ if (!first) ol.writeString("</table>");
endFile(ol);
ol.popGeneratorState();