diff options
author | albert-github <albert.tests@gmail.com> | 2018-08-09 17:49:58 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-08-09 17:49:58 (GMT) |
commit | 4682b91364247aafe66b6af472e321511e115e7c (patch) | |
tree | e267667bec90cebd6a38c757c7b2047f7d7e22ec /src/docbookvisitor.cpp | |
parent | 69829b043fb36a56d194dc31522b694379636855 (diff) | |
download | Doxygen-4682b91364247aafe66b6af472e321511e115e7c.zip Doxygen-4682b91364247aafe66b6af472e321511e115e7c.tar.gz Doxygen-4682b91364247aafe66b6af472e321511e115e7c.tar.bz2 |
Inline images
Create the possibility of inline images with the `\image` command by means of the option `inline`.
Diffstat (limited to 'src/docbookvisitor.cpp')
-rw-r--r-- | src/docbookvisitor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index ab10da0..78d19a4 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -36,7 +36,7 @@ #include "htmlentity.h" #include "plantuml.h" -static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name, QCString width, QCString height) +static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name, QCString width, QCString height, const bool inlineImage = FALSE) { QCString tmpStr; t << " <figure>" << endl; @@ -50,7 +50,7 @@ static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name, } else { - t << " width=\"50%\""; + if (!inlineImage) t << " width=\"50%\""; } if (!height.isEmpty()) { @@ -65,7 +65,7 @@ static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name, } } -static void visitPostEnd(FTextStream &t, const bool hasCaption) +static void visitPostEnd(FTextStream &t, const bool hasCaption, const bool inlineImage = FALSE) { t << endl; if (hasCaption) @@ -910,7 +910,7 @@ void DocbookDocVisitor::visitPre(DocImage *img) { baseName=baseName.right(baseName.length()-i-1); } - visitPreStart(m_t, img -> hasCaption(), baseName, img -> width(), img -> height()); + visitPreStart(m_t, img -> hasCaption(), baseName, img -> width(), img -> height(),img -> isInlineImage()); } else { @@ -924,7 +924,7 @@ void DocbookDocVisitor::visitPost(DocImage *img) if (img->type()==DocImage::DocBook) { if (m_hide) return; - visitPostEnd(m_t, img -> hasCaption()); + visitPostEnd(m_t, img -> hasCaption(),img -> isInlineImage()); // copy the image to the output dir QCString baseName=img->name(); int i; |