Skip to content

Commit 82a63b6

Browse files
committed
Merge branch 'feature/issue_11279' of https://github.com/albert-github/doxygen into albert-github-feature/issue_11279
2 parents d8e7438 + d9aa204 commit 82a63b6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/latexdocvisitor.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,9 +1228,9 @@ void LatexDocVisitor::operator()(const DocHtmlDescData &dd)
12281228
decIndentLevel();
12291229
}
12301230

1231-
static bool tableIsNested(const DocNodeVariant *n)
1231+
static bool tableIsNested(const DocNodeVariant *n,LatexCodeGenerator &m_lcg)
12321232
{
1233-
bool isNested=FALSE;
1233+
bool isNested=m_lcg.usedTableLevel()>0;
12341234
while (n && !isNested)
12351235
{
12361236
isNested = holds_one_of_alternatives<DocHtmlTable,DocParamSect>(*n);
@@ -1239,9 +1239,9 @@ static bool tableIsNested(const DocNodeVariant *n)
12391239
return isNested;
12401240
}
12411241

1242-
static void writeStartTableCommand(TextStream &t,const DocNodeVariant *n,size_t cols)
1242+
static void writeStartTableCommand(TextStream &t,const DocNodeVariant *n,size_t cols,LatexCodeGenerator &m_lcg)
12431243
{
1244-
if (tableIsNested(n))
1244+
if (tableIsNested(n,m_lcg))
12451245
{
12461246
t << "{\\begin{tabularx}{\\linewidth}{|*{" << cols << "}{>{\\raggedright\\arraybackslash}X|}}";
12471247
}
@@ -1252,9 +1252,9 @@ static void writeStartTableCommand(TextStream &t,const DocNodeVariant *n,size_t
12521252
//return isNested ? "TabularNC" : "TabularC";
12531253
}
12541254

1255-
static void writeEndTableCommand(TextStream &t,const DocNodeVariant *n)
1255+
static void writeEndTableCommand(TextStream &t,const DocNodeVariant *n,LatexCodeGenerator &m_lcg)
12561256
{
1257-
if (tableIsNested(n))
1257+
if (tableIsNested(n,m_lcg))
12581258
{
12591259
t << "\\end{tabularx}}\n";
12601260
}
@@ -1281,7 +1281,7 @@ void LatexDocVisitor::operator()(const DocHtmlTable &t)
12811281
m_t << "\n";
12821282
}
12831283

1284-
writeStartTableCommand(m_t,t.parent(),t.numColumns());
1284+
writeStartTableCommand(m_t,t.parent(),t.numColumns(),m_lcg);
12851285

12861286
if (c)
12871287
{
@@ -1302,14 +1302,14 @@ void LatexDocVisitor::operator()(const DocHtmlTable &t)
13021302
if (firstRow && firstRow->isHeading())
13031303
{
13041304
setFirstRow(TRUE);
1305-
if (!tableIsNested(t.parent()))
1305+
if (!tableIsNested(t.parent(),m_lcg))
13061306
{
13071307
std::visit(*this,*t.firstRow());
13081308
}
13091309
setFirstRow(FALSE);
13101310
}
13111311
visitChildren(t);
1312-
writeEndTableCommand(m_t,t.parent());
1312+
writeEndTableCommand(m_t,t.parent(),m_lcg);
13131313
popTableState();
13141314
}
13151315

@@ -1381,7 +1381,7 @@ void LatexDocVisitor::operator()(const DocHtmlRow &row)
13811381
m_t << "\n";
13821382

13831383
const DocNodeVariant *n = ::parent(row.parent());
1384-
if (row.isHeading() && row.rowIndex()==1 && !tableIsNested(n))
1384+
if (row.isHeading() && row.rowIndex()==1 && !tableIsNested(n,m_lcg))
13851385
{
13861386
if (firstRow())
13871387
{

0 commit comments

Comments
 (0)