summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2018-11-25 11:01:03 (GMT)
committerGitHub <noreply@github.com>2018-11-25 11:01:03 (GMT)
commit4c1d17ef7579dabd4db55dc4777185c290edb256 (patch)
treebfa2b4e5f3ca3ce28ec273f5a8822b21971bb746
parent549d5aeecdc909e6aa0434a2ddb30b735423ec03 (diff)
parentf5390468388b80c1f0279f5942d05cb325744b28 (diff)
downloadDoxygen-4c1d17ef7579dabd4db55dc4777185c290edb256.zip
Doxygen-4c1d17ef7579dabd4db55dc4777185c290edb256.tar.gz
Doxygen-4c1d17ef7579dabd4db55dc4777185c290edb256.tar.bz2
Merge pull request #6642 from albert-github/feature/bug_docbook_image
Improvement regarding width and title for docbook
-rw-r--r--src/docbookvisitor.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index 51d1755..f7fb10f 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -64,7 +64,7 @@ void DocbookDocVisitor::visitPreStart(FTextStream &t,
const QCString &height,
bool inlineImage)
{
- if (hasCaption)
+ if (hasCaption && !inlineImage)
{
t << " <figure>" << endl;
t << " <title>" << endl;
@@ -84,7 +84,7 @@ void DocbookDocVisitor::visitPreStart(FTextStream &t,
}
else
{
- if (!inlineImage) t << " width=\"50%\"";
+ if (!height.isEmpty() && !inlineImage) t << " width=\"50%\"";
}
if (!height.isEmpty())
{
@@ -93,7 +93,7 @@ void DocbookDocVisitor::visitPreStart(FTextStream &t,
t << " align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << name << "\">";
t << "</imagedata>" << endl;
t << " </imageobject>" << endl;
- if (hasCaption)
+ if (hasCaption && !inlineImage)
{
t << " <!--" << endl; // Needed for general formatting with title for other formats
}
@@ -102,12 +102,12 @@ void DocbookDocVisitor::visitPreStart(FTextStream &t,
void DocbookDocVisitor::visitPostEnd(FTextStream &t, bool hasCaption, bool inlineImage)
{
t << endl;
- if (hasCaption)
+ if (hasCaption && !inlineImage)
{
t << " -->" << endl; // Needed for general formatting with title for other formats
}
t << " </mediaobject>" << endl;
- if (hasCaption)
+ if (hasCaption && !inlineImage)
{
t << " </figure>" << endl;
}