diff options
author | albert-github <albert.tests@gmail.com> | 2019-03-03 14:59:48 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-03-03 14:59:48 (GMT) |
commit | 8d13a1a9d0e6a5e4f50563b6d1b6840176e4a5cc (patch) | |
tree | 971dfd0b77afc78f1a970fa889a829f18293ba17 /src/latexdocvisitor.cpp | |
parent | abe69bd634fea9554a84d93e31db889ee589661f (diff) | |
download | Doxygen-8d13a1a9d0e6a5e4f50563b6d1b6840176e4a5cc.zip Doxygen-8d13a1a9d0e6a5e4f50563b6d1b6840176e4a5cc.tar.gz Doxygen-8d13a1a9d0e6a5e4f50563b6d1b6840176e4a5cc.tar.bz2 |
Show line numbers in "split" examples
With the commands like `\skip`, `\skipline` it is possible to show parts of a file for further explanation / tutorials. They can be started with `\include` or `\dontinclude` but in case `\include` specifies that the line numbers have to be shown they are only shown in the full example and not in the split up example
- show line numbers in split up example in case `lineno` is required
- add `lineno` option to `\dontinclude` so here also line numbers can be shown.
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r-- | src/latexdocvisitor.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 008d638..31f05ad 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -572,9 +572,24 @@ void LatexDocVisitor::visit(DocIncOperator *op) popEnabled(); if (!m_hide) { + FileDef *fd; + if (!op->includeFileName().isEmpty()) + { + QFileInfo cfi( op->includeFileName() ); + fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() ); + } + Doxygen::parserManager->getParser(m_langExt) ->parseCode(m_ci,op->context(),op->text(),langExt, - op->isExample(),op->exampleFile()); + op->isExample(),op->exampleFile(), + fd, // fileDef + op->line(), // startLine + -1, // endLine + FALSE, // inline fragment + 0, // memberDef + op->lineno() // show line numbers + ); + if (fd) delete fd; } pushEnabled(); m_hide=TRUE; |