summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-11-25 10:17:32 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-11-25 10:17:32 (GMT)
commitf5390468388b80c1f0279f5942d05cb325744b28 (patch)
treebfa2b4e5f3ca3ce28ec273f5a8822b21971bb746 /src
parent549d5aeecdc909e6aa0434a2ddb30b735423ec03 (diff)
downloadDoxygen-f5390468388b80c1f0279f5942d05cb325744b28.zip
Doxygen-f5390468388b80c1f0279f5942d05cb325744b28.tar.gz
Doxygen-f5390468388b80c1f0279f5942d05cb325744b28.tar.bz2
Improvement regarding width and title for docbook
- In case no with and no height is given don't scale automatically to `width=50%` - in case of inline image and a title don't display title.
Diffstat (limited to 'src')
-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;
}