summaryrefslogtreecommitdiffstats
path: root/src/printdocvisitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/printdocvisitor.h')
-rw-r--r--src/printdocvisitor.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index 8d9a2b9..8d375fc 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -22,6 +22,7 @@
#include <qglobal.h>
#include "docvisitor.h"
#include "htmlentity.h"
+#include "emoji.h"
#include "message.h"
/*! Concrete visitor implementation for pretty printing */
@@ -68,6 +69,19 @@ class PrintDocVisitor : public DocVisitor
printf("print: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
}
}
+ void visit(DocEmoji *s)
+ {
+ indent_leaf();
+ const char *res = EmojiEntityMapper::instance()->name(s->index());
+ if (res)
+ {
+ printf("%s",res);
+ }
+ else
+ {
+ printf("print: non supported emoji found: %s\n",qPrint(s->name()));
+ }
+ }
void visit(DocURL *u)
{
indent_leaf();
@@ -173,7 +187,10 @@ class PrintDocVisitor : public DocVisitor
case DocInclude::Include: printf("include"); break;
case DocInclude::IncWithLines: printf("incwithlines"); break;
case DocInclude::DontInclude: printf("dontinclude"); break;
- case DocInclude::HtmlInclude: printf("htmlinclude"); break;
+ case DocInclude::HtmlInclude:
+ printf("htmlinclude");
+ if (inc->isBlock()) printf(" block=\"yes\"");
+ break;
case DocInclude::LatexInclude: printf("latexinclude"); break;
case DocInclude::VerbInclude: printf("verbinclude"); break;
case DocInclude::Snippet: printf("snippet"); break;
@@ -496,7 +513,7 @@ class PrintDocVisitor : public DocVisitor
case DocImage::Rtf: printf("rtf"); break;
case DocImage::DocBook: printf("docbook"); break;
}
- printf("\" %s %s>\n",img->width().data(),img->height().data());
+ printf("\" %s %s inline=\"%s\">\n",img->width().data(),img->height().data(),img->isInlineImage() ? "yes" : "no");
}
void visitPost(DocImage *)
{
@@ -640,13 +657,13 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocXRefItem *x)
{
indent_pre();
- printf("<xrefitem file=\"%s\" anchor=\"%s\" title=\"%s\"/>\n",
+ printf("<xrefitem file=\"%s\" anchor=\"%s\" title=\"%s\">\n",
x->file().data(),x->anchor().data(),x->title().data());
}
void visitPost(DocXRefItem *)
{
indent_post();
- printf("<xrefitem/>\n");
+ printf("</xrefitem>\n");
}
void visitPre(DocInternalRef *r)
{