QDoc: Generate images inline for \inlineimage

Change-Id: I1ee001870ac1289a8b0340707f62c7cc3fb84492
Reviewed-by: Martin Smith <martin.smith@nokia.com>
This commit is contained in:
Casper van Donderen 2012-05-10 11:27:35 +02:00 committed by Qt by Nokia
parent d2456798c6
commit f6bd10b8ff

View File

@ -1279,13 +1279,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
} }
} }
if (currentTag() != DT_xref) if (currentTag() != DT_xref && atom->type() != Atom::InlineImage)
writeStartTag(DT_fig); writeStartTag(DT_fig);
writeStartTag(DT_image); writeStartTag(DT_image);
writeHrefAttribute(protectEnc(fileName)); writeHrefAttribute(protectEnc(fileName));
if (atom->type() == Atom::InlineImage) if (atom->type() == Atom::Image) {
xmlWriter().writeAttribute("placement","inline");
else {
xmlWriter().writeAttribute("placement","break"); xmlWriter().writeAttribute("placement","break");
xmlWriter().writeAttribute("align","center"); xmlWriter().writeAttribute("align","center");
} }
@ -1295,7 +1293,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
writeEndTag(); // </alt> writeEndTag(); // </alt>
} }
writeEndTag(); // </image> writeEndTag(); // </image>
if (currentTag() != DT_xref) if (currentTag() != DT_xref && atom->type() != Atom::InlineImage)
writeEndTag(); // </fig> writeEndTag(); // </fig>
} }
break; break;