diff options
Diffstat (limited to 'src/xmldocvisitor.cpp')
-rw-r--r-- | src/xmldocvisitor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 73aac7c..77f3e8e 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -41,7 +41,7 @@ static void visitCaption(XmlDocVisitor *parent, QList<DocNode> children) static void visitPreStart(FTextStream &t, const char *cmd, bool doCaption, XmlDocVisitor *parent, QList<DocNode> children, const QCString &name, bool writeType, DocImage::Type type, const QCString &width, - const QCString &height, bool inlineImage = FALSE) + const QCString &height, const QCString &alt = QCString(""), bool inlineImage = FALSE) { t << "<" << cmd; if (writeType) @@ -68,6 +68,10 @@ static void visitPreStart(FTextStream &t, const char *cmd, bool doCaption, { t << " height=\"" << convertToXML(height) << "\""; } + if (!alt.isEmpty()) + { + t << " alt=\"" << convertToXML(alt) << "\""; + } if (inlineImage) { t << " inline=\"yes\""; @@ -907,7 +911,7 @@ void XmlDocVisitor::visitPre(DocImage *img) { baseName = correctURL(url,img->relPath()); } - visitPreStart(m_t, "image", FALSE, this, img->children(), baseName, TRUE, img->type(), img->width(), img->height(), img ->isInlineImage()); + visitPreStart(m_t, "image", FALSE, this, img->children(), baseName, TRUE, img->type(), img->width(), img->height(), img->attribs().find("alt"), img->isInlineImage()); // copy the image to the output dir FileDef *fd; |