Skip to content

Commit 6e3366a

Browse files
committed
PR doxygen#11575 Refactoring: turn statics into private members
1 parent 82a63b6 commit 6e3366a

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

src/latexdocvisitor.cpp

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

1231-
static bool tableIsNested(const DocNodeVariant *n,LatexCodeGenerator &m_lcg)
1231+
bool LatexDocVisitor::isTableNested(const DocNodeVariant *n) const
12321232
{
12331233
bool isNested=m_lcg.usedTableLevel()>0;
12341234
while (n && !isNested)
@@ -1239,28 +1239,28 @@ static bool tableIsNested(const DocNodeVariant *n,LatexCodeGenerator &m_lcg)
12391239
return isNested;
12401240
}
12411241

1242-
static void writeStartTableCommand(TextStream &t,const DocNodeVariant *n,size_t cols,LatexCodeGenerator &m_lcg)
1242+
void LatexDocVisitor::writeStartTableCommand(const DocNodeVariant *n,size_t cols)
12431243
{
1244-
if (tableIsNested(n,m_lcg))
1244+
if (isTableNested(n))
12451245
{
1246-
t << "{\\begin{tabularx}{\\linewidth}{|*{" << cols << "}{>{\\raggedright\\arraybackslash}X|}}";
1246+
m_t << "{\\begin{tabularx}{\\linewidth}{|*{" << cols << "}{>{\\raggedright\\arraybackslash}X|}}";
12471247
}
12481248
else
12491249
{
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";
12511251
}
12521252
//return isNested ? "TabularNC" : "TabularC";
12531253
}
12541254

1255-
static void writeEndTableCommand(TextStream &t,const DocNodeVariant *n,LatexCodeGenerator &m_lcg)
1255+
void LatexDocVisitor::writeEndTableCommand(const DocNodeVariant *n)
12561256
{
1257-
if (tableIsNested(n,m_lcg))
1257+
if (isTableNested(n))
12581258
{
1259-
t << "\\end{tabularx}}\n";
1259+
m_t << "\\end{tabularx}}\n";
12601260
}
12611261
else
12621262
{
1263-
t << "\\end{longtabu}\n";
1263+
m_t << "\\end{longtabu}\n";
12641264
}
12651265
//return isNested ? "TabularNC" : "TabularC";
12661266
}
@@ -1281,7 +1281,7 @@ void LatexDocVisitor::operator()(const DocHtmlTable &t)
12811281
m_t << "\n";
12821282
}
12831283

1284-
writeStartTableCommand(m_t,t.parent(),t.numColumns(),m_lcg);
1284+
writeStartTableCommand(t.parent(),t.numColumns());
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(),m_lcg))
1305+
if (!isTableNested(t.parent()))
13061306
{
13071307
std::visit(*this,*t.firstRow());
13081308
}
13091309
setFirstRow(FALSE);
13101310
}
13111311
visitChildren(t);
1312-
writeEndTableCommand(m_t,t.parent(),m_lcg);
1312+
writeEndTableCommand(t.parent());
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,m_lcg))
1384+
if (row.isHeading() && row.rowIndex()==1 && !isTableNested(n))
13851385
{
13861386
if (firstRow())
13871387
{

src/latexdocvisitor.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,5 +266,9 @@ class LatexDocVisitor : public DocVisitor
266266
return !m_tableStateStack.empty();
267267
}
268268

269+
bool isTableNested(const DocNodeVariant *n) const;
270+
void writeStartTableCommand(const DocNodeVariant *n,size_t cols);
271+
void writeEndTableCommand(const DocNodeVariant *n);
272+
269273
};
270274
#endif

0 commit comments

Comments
 (0)