@@ -1228,9 +1228,9 @@ void LatexDocVisitor::operator()(const DocHtmlDescData &dd)
1228
1228
decIndentLevel ();
1229
1229
}
1230
1230
1231
- static bool tableIsNested (const DocNodeVariant *n)
1231
+ bool LatexDocVisitor::isTableNested (const DocNodeVariant *n) const
1232
1232
{
1233
- bool isNested=FALSE ;
1233
+ bool isNested=m_lcg. usedTableLevel ()> 0 ;
1234
1234
while (n && !isNested)
1235
1235
{
1236
1236
isNested = holds_one_of_alternatives<DocHtmlTable,DocParamSect>(*n);
@@ -1239,28 +1239,28 @@ static bool tableIsNested(const DocNodeVariant *n)
1239
1239
return isNested;
1240
1240
}
1241
1241
1242
- static void writeStartTableCommand (TextStream &t, const DocNodeVariant *n,size_t cols)
1242
+ void LatexDocVisitor:: writeStartTableCommand (const DocNodeVariant *n,size_t cols)
1243
1243
{
1244
- if (tableIsNested (n))
1244
+ if (isTableNested (n))
1245
1245
{
1246
- t << " {\\ begin{tabularx}{\\ linewidth}{|*{" << cols << " }{>{\\ raggedright\\ arraybackslash}X|}}" ;
1246
+ m_t << " {\\ begin{tabularx}{\\ linewidth}{|*{" << cols << " }{>{\\ raggedright\\ arraybackslash}X|}}" ;
1247
1247
}
1248
1248
else
1249
1249
{
1250
- t << " \\ tabulinesep=1mm\n\\ begin{longtabu}spread 0pt [c]{*{" << cols << " }{|X[-1]}|}\n " ;
1250
+ m_t << " \\ tabulinesep=1mm\n\\ begin{longtabu}spread 0pt [c]{*{" << cols << " }{|X[-1]}|}\n " ;
1251
1251
}
1252
1252
// return isNested ? "TabularNC" : "TabularC";
1253
1253
}
1254
1254
1255
- static void writeEndTableCommand (TextStream &t, const DocNodeVariant *n)
1255
+ void LatexDocVisitor:: writeEndTableCommand (const DocNodeVariant *n)
1256
1256
{
1257
- if (tableIsNested (n))
1257
+ if (isTableNested (n))
1258
1258
{
1259
- t << " \\ end{tabularx}}\n " ;
1259
+ m_t << " \\ end{tabularx}}\n " ;
1260
1260
}
1261
1261
else
1262
1262
{
1263
- t << " \\ end{longtabu}\n " ;
1263
+ m_t << " \\ end{longtabu}\n " ;
1264
1264
}
1265
1265
// return isNested ? "TabularNC" : "TabularC";
1266
1266
}
@@ -1281,7 +1281,7 @@ void LatexDocVisitor::operator()(const DocHtmlTable &t)
1281
1281
m_t << " \n " ;
1282
1282
}
1283
1283
1284
- writeStartTableCommand (m_t , t.parent (),t.numColumns ());
1284
+ writeStartTableCommand (t.parent (),t.numColumns ());
1285
1285
1286
1286
if (c)
1287
1287
{
@@ -1302,14 +1302,14 @@ void LatexDocVisitor::operator()(const DocHtmlTable &t)
1302
1302
if (firstRow && firstRow->isHeading ())
1303
1303
{
1304
1304
setFirstRow (TRUE );
1305
- if (!tableIsNested (t.parent ()))
1305
+ if (!isTableNested (t.parent ()))
1306
1306
{
1307
1307
std::visit (*this ,*t.firstRow ());
1308
1308
}
1309
1309
setFirstRow (FALSE );
1310
1310
}
1311
1311
visitChildren (t);
1312
- writeEndTableCommand (m_t , t.parent ());
1312
+ writeEndTableCommand (t.parent ());
1313
1313
popTableState ();
1314
1314
}
1315
1315
@@ -1381,7 +1381,7 @@ void LatexDocVisitor::operator()(const DocHtmlRow &row)
1381
1381
m_t << " \n " ;
1382
1382
1383
1383
const DocNodeVariant *n = ::parent (row.parent ());
1384
- if (row.isHeading () && row.rowIndex ()==1 && !tableIsNested (n))
1384
+ if (row.isHeading () && row.rowIndex ()==1 && !isTableNested (n))
1385
1385
{
1386
1386
if (firstRow ())
1387
1387
{
0 commit comments