summaryrefslogtreecommitdiffstats
path: root/src/rtfdocvisitor.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2019-03-03 14:59:48 (GMT)
committeralbert-github <albert.tests@gmail.com>2019-03-03 14:59:48 (GMT)
commit8d13a1a9d0e6a5e4f50563b6d1b6840176e4a5cc (patch)
tree971dfd0b77afc78f1a970fa889a829f18293ba17 /src/rtfdocvisitor.cpp
parentabe69bd634fea9554a84d93e31db889ee589661f (diff)
downloadDoxygen-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/rtfdocvisitor.cpp')
-rw-r--r--src/rtfdocvisitor.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index afe6dee..00ccc0e 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -550,9 +550,24 @@ void RTFDocVisitor::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;