summaryrefslogtreecommitdiffstats
path: root/src/latexdocvisitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r--src/latexdocvisitor.cpp48
1 files changed, 19 insertions, 29 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index bc4caed..c7ca6d1 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -47,28 +47,6 @@ static QCString escapeLabelName(const char *s)
return result;
}
-static bool isSymbol(const char *s)
-{
- int l=0; // word length
- int nCaps=0; // number of captials
- int nCamels=0; // number of lowerCase+upperCase combos
- int nUnscore=0; // number of underscores
- const char *p=s;
- char c;
- bool plo=FALSE;
- while ((c=*p++))
- {
- bool lo=c>='a' && c<='z';
- bool up=c>='A' && c<='Z';
- if (c=='_') nUnscore++;
- if (up) nCaps++;
- if (up && plo) nCamels++;
- plo=lo;
- l++;
- }
- return l>=20 || nCaps>=4 || nCamels>=2 || nUnscore>0;
-}
-
const int maxLevels=5;
static const char *secLabels[maxLevels] =
{ "section","subsection","subsubsection","paragraph","subparagraph" };
@@ -123,7 +101,7 @@ LatexDocVisitor::LatexDocVisitor(FTextStream &t,CodeOutputInterface &ci,
const char *langExt,bool insideTabbing)
: DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_insideItem(FALSE), m_hide(FALSE), m_insideTabbing(insideTabbing),
- m_forceBreaks(FALSE), m_langExt(langExt), m_currentColumn(0),
+ m_langExt(langExt), m_currentColumn(0),
m_inRowspan(FALSE)
{
}
@@ -135,14 +113,14 @@ LatexDocVisitor::LatexDocVisitor(FTextStream &t,CodeOutputInterface &ci,
void LatexDocVisitor::visit(DocWord *w)
{
if (m_hide) return;
- filter(w->word(),isSymbol(w->word()));
+ filter(w->word());
}
void LatexDocVisitor::visit(DocLinkedWord *w)
{
if (m_hide) return;
startLink(w->ref(),w->file(),w->anchor());
- filter(w->word(),isSymbol(w->word()));
+ filter(w->word());
endLink(w->ref(),w->file(),w->anchor());
}
@@ -437,6 +415,19 @@ void LatexDocVisitor::visit(DocInclude *inc)
m_t << inc->text();
m_t << "\\end{DoxyVerbInclude}\n";
break;
+ case DocInclude::Snippet:
+ {
+ m_t << "\n\\begin{DoxyCodeInclude}\n";
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,
+ inc->context(),
+ extractBlock(inc->text(),inc->blockId()),
+ inc->isExample(),
+ inc->exampleFile()
+ );
+ m_t << "\\end{DoxyCodeInclude}" << endl;
+ }
+ break;
}
}
@@ -1368,18 +1359,17 @@ void LatexDocVisitor::visitPost(DocCopy *)
{
}
-void LatexDocVisitor::visitPre(DocText *t)
+void LatexDocVisitor::visitPre(DocText *)
{
- m_forceBreaks = t->forceBreaks();
}
void LatexDocVisitor::visitPost(DocText *)
{
}
-void LatexDocVisitor::filter(const char *str,bool forceBreaks)
+void LatexDocVisitor::filter(const char *str)
{
- filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem,m_forceBreaks || forceBreaks);
+ filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem);
}
void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor)