Loading doc/commands.doc +11 −14 Original line number Original line Diff line number Diff line Loading @@ -2572,7 +2572,7 @@ class Receiver step before running doxygen, you can also add the name of the image file after \c \\startuml step before running doxygen, you can also add the name of the image file after \c \\startuml and inside curly brackets, i.e. and inside curly brackets, i.e. \verbatim \verbatim @startuml{myimage.png} @startuml{myimage.png} "Image Caption" width=5cm Alice -> Bob : Hello Alice -> Bob : Hello @enduml @enduml \endverbatim \endverbatim Loading Loading @@ -2897,15 +2897,16 @@ class Receiver specific, so if you want to insert an image for more than one specific, so if you want to insert an image for more than one format you'll have to repeat this command for each format. format you'll have to repeat this command for each format. The first argument specifies the output format. Currently, the The first argument specifies the output format in which the image should following values are supported: \c html, \c latex, \c docbook and \c rtf. be embedded. Currently, the following values are supported: \c html, \c latex, \c docbook and \c rtf. The second argument specifies the file name of the image. The second argument specifies the file name of the image. doxygen will look for files in the paths (or files) that you specified doxygen will look for files in the paths (or files) that you specified after the \ref cfg_image_path "IMAGE_PATH" tag. after the \ref cfg_image_path "IMAGE_PATH" tag. If the image is found it will be copied to the correct output directory. If the image is found it will be copied to the correct output directory. If the image name contains spaces you'll have to put quotes ("...") around it. If the image name contains spaces you'll have to put quotes ("...") around You can also specify an absolute URL instead of a file name, but then the name. You can also specify an absolute URL instead of a file name, but then doxygen does not copy the image nor check its existence. doxygen does not copy the image nor check its existence. The third argument is optional and can be used to specify the caption The third argument is optional and can be used to specify the caption Loading @@ -2914,16 +2915,12 @@ class Receiver spaces. The quotes are stripped before the caption is displayed. spaces. The quotes are stripped before the caption is displayed. The fourth argument is also optional and can be used to specify the The fourth argument is also optional and can be used to specify the width or height of the image. This can be useful for \LaTeX output width or height of the image. This can be useful for \LaTeX or docbook output (i.e. format=<code>latex</code>). (i.e. format=<code>latex</code> or format=<code>docbook</code>). \anchor image_sizeindicator \par Size indication \anchor image_sizeindicator \par Size indication The \c sizeindication can The \c sizeindication can specify the width or height to be used (or a combination). specify the width or height to be used )or a combination). Possible The size specifier in \LaTeX (for example `10cm` or values are (width, analogous for height): `4in` or a symbolic width like `\\textwidth`). `width` or `max with` or `min width`. The size should be a valid size specifier in \LaTeX (for example `10cm` or `6in` or a symbolic width like `\\textwidth`). (The `max width` etc. are based on the \LaTeX package `adjustbox`) Here is example of a comment block: Here is example of a comment block: Loading src/docbookvisitor.cpp +6 −21 Original line number Original line Diff line number Diff line Loading @@ -46,14 +46,7 @@ static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name, t << " <imagedata"; t << " <imagedata"; if (!width.isEmpty()) if (!width.isEmpty()) { { tmpStr = width; t << " width=\"" << convertToXML(width) << "\""; tmpStr = tmpStr.replace(QRegExp("min *width"),"minwidth"); tmpStr = tmpStr.replace(QRegExp("max *width"),"maxwidth"); tmpStr = tmpStr.replace(QRegExp("="),"=\""); tmpStr = tmpStr.replace(QRegExp(","),"\" ") + "\""; tmpStr = tmpStr.replace(QRegExp("\"\""),"\""); tmpStr = tmpStr.replace(QRegExp("\\"),"\\\\"); t << " " << tmpStr; } } else else { { Loading @@ -61,15 +54,7 @@ static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name, } } if (!height.isEmpty()) if (!height.isEmpty()) { { tmpStr = height; t << " depth=\"" << convertToXML(tmpStr) << "\""; tmpStr = tmpStr.replace(QRegExp("min *height"),"mindepth"); tmpStr = tmpStr.replace(QRegExp("max *height"),"maxdepth"); tmpStr = tmpStr.replace(QRegExp("height="),"depth="); tmpStr = tmpStr.replace(QRegExp("="),"=\""); tmpStr = tmpStr.replace(QRegExp(","),"\" ") + "\""; tmpStr = tmpStr.replace(QRegExp("\"\""),"\""); tmpStr = tmpStr.replace(QRegExp("\\"),"\\\\"); t << " " << tmpStr; } } t << " align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << name << "\">"; t << " align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << name << "\">"; t << "</imagedata>" << endl; t << "</imagedata>" << endl; Loading Loading @@ -1238,7 +1223,7 @@ void DocbookDocVisitor::writeMscFile(const QCString &baseName, DocVerbatim *s) QCString outDir = Config_getString("DOCBOOK_OUTPUT"); QCString outDir = Config_getString("DOCBOOK_OUTPUT"); writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_BITMAP); writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_BITMAP); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitCaption(this, s->m_children); visitCaption(this, s->children()); visitPostEnd(m_t, s->hasCaption()); visitPostEnd(m_t, s->hasCaption()); } } Loading @@ -1253,7 +1238,7 @@ void DocbookDocVisitor::writePlantUMLFile(const QCString &baseName, DocVerbatim QCString outDir = Config_getString("DOCBOOK_OUTPUT"); QCString outDir = Config_getString("DOCBOOK_OUTPUT"); generatePlantUMLOutput(baseName,outDir,PUML_BITMAP); generatePlantUMLOutput(baseName,outDir,PUML_BITMAP); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitCaption(this, s->m_children); visitCaption(this, s->children()); visitPostEnd(m_t, s->hasCaption()); visitPostEnd(m_t, s->hasCaption()); } } Loading Loading @@ -1298,7 +1283,7 @@ void DocbookDocVisitor::writeDiaFile(const QCString &baseName, DocVerbatim *s) QCString outDir = Config_getString("DOCBOOK_OUTPUT"); QCString outDir = Config_getString("DOCBOOK_OUTPUT"); writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP); writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitCaption(this, s->m_children); visitCaption(this, s->children()); visitPostEnd(m_t, s->hasCaption()); visitPostEnd(m_t, s->hasCaption()); } } Loading Loading @@ -1344,7 +1329,7 @@ void DocbookDocVisitor::writeDotFile(const QCString &baseName, DocVerbatim *s) QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP); writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP); visitPreStart(m_t, s->hasCaption(), baseName + ".dot", s->width(),s->height()); visitPreStart(m_t, s->hasCaption(), baseName + ".dot", s->width(),s->height()); visitCaption(this, s->m_children); visitCaption(this, s->children()); visitPostEnd(m_t, s->hasCaption()); visitPostEnd(m_t, s->hasCaption()); } } Loading src/docparser.cpp +49 −171 Original line number Original line Diff line number Diff line Loading @@ -839,9 +839,6 @@ static bool findDocsForMemberOrCompound(const char *commandName, static bool defaultHandleToken(DocNode *parent,int tok, static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children,bool QList<DocNode> &children,bool handleWord=TRUE); handleWord=TRUE); static void defaultHandleCaptionSize(const int cmd, DocNode *parent, QList<DocNode> &children, QCString &height, QCString &width); static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, const QCString &cmdName) const QCString &cmdName) Loading Loading @@ -1243,65 +1240,32 @@ static DocAnchor *handleAnchor(DocNode *parent) } } /* Helper function that deals with the Caption and size argument. /* Helper function that deals with the title, width, and height arguments of various commands. * @param parent Parent node, owner of the children list passed as * @param[in] cmd Command id for which to extract caption and size info. * @param[in] parent Parent node, owner of the children list passed as * the third argument. * the third argument. * @param children The list of child nodes to which the node representing * @param[in] children The list of child nodes to which the node representing * the token can be added. * the token can be added. * @param height Storagre for, optional, height * @param[out] width the extracted width specifier * @param width Storagre for, optional, width * @param[out] height the extracted height specifier */ */ static void defaultHandleCaptionSize(const int cmd, DocNode *parent, QList<DocNode> &children, QCString &height, QCString &width) static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, QList<DocNode> &children, QCString &width,QCString &height) { { QCString preamble = ""; int insideString = 0; g_nodeStack.push(parent); g_nodeStack.push(parent); // parse title // parse title doctokenizerYYsetStateCaption(); doctokenizerYYsetStateTitle(); int tok; int tok; while ((tok=doctokenizerYYlex())) while ((tok=doctokenizerYYlex())) { { if (tok==TK_WORD && g_token->name=="width=") if (tok==TK_WORD && (g_token->name=="width=" || g_token->name=="height=")) { // special case: no title, but we do have a size indicator doctokenizerYYsetStateTitleAttr(); // strip = width=preamble + g_token->name + g_token->chars; g_token->chars = ""; g_token->name = ""; preamble = ""; do { tok=doctokenizerYYlex(); } while (tok == TK_WHITESPACE); break; } if (tok==TK_WORD && g_token->name=="height=") { { // special case: no title, but we do have a size indicator // special case: no title, but we do have a size indicator doctokenizerYYsetStateTitleAttr(); doctokenizerYYsetStateTitleAttrValue(); // strip = // strip = height=preamble + g_token->name + g_token->chars; g_token->name = g_token->name.left(g_token->name.length()-1); g_token->chars = ""; g_token->name = ""; preamble = ""; do { tok=doctokenizerYYlex(); } while (tok == TK_WHITESPACE); break; } if (tok==TK_WORD && (g_token->name=="min" || g_token->name=="max")) { // special case: no title, but we do have a size indicator min or max if (!insideString) { preamble = g_token->name + " "; break; break; } } } insideString = 1; if (!defaultHandleToken(parent,tok,children)) if (!defaultHandleToken(parent,tok,children)) { { switch (tok) switch (tok) Loading Loading @@ -1330,41 +1294,18 @@ static void defaultHandleCaptionSize(const int cmd, DocNode *parent, QList<DocNo { { if (g_token->name=="width") if (g_token->name=="width") { { if (!width.isEmpty()) width += ","; width = g_token->chars; width+=preamble + "width=" + g_token->chars; preamble = ""; doctokenizerYYsetStateTitleAttr(); } } else if (g_token->name=="height") else if (g_token->name=="height") { { if (!height.isEmpty()) height += ","; height = g_token->chars; height+=preamble + "height=" + g_token->chars; preamble = ""; doctokenizerYYsetStateTitleAttr(); } else if (g_token->name=="max") { preamble = "max "; } else if (g_token->name=="min") { preamble = "min "; } } else else { { warn_doc_error(g_fileName,doctokenizerYYlineno,"Unknown option %s after \\%s command", warn_doc_error(g_fileName,doctokenizerYYlineno,"Unknown option '%s' after \\%s command, expected 'width' or 'height'", qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data()); qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data()); } } do { tok=doctokenizerYYlex(); tok=doctokenizerYYlex(); if (tok==TK_WORD && (g_token->name=="width=" || g_token->name=="height=")) { g_token->name=g_token->name.left(g_token->name.length()-1); tok=doctokenizerYYlex(); } } while (tok == TK_WHITESPACE); } } doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); Loading @@ -1372,6 +1313,7 @@ static void defaultHandleCaptionSize(const int cmd, DocNode *parent, QList<DocNo DocNode *n=g_nodeStack.pop(); DocNode *n=g_nodeStack.pop(); ASSERT(n==parent); ASSERT(n==parent); } } /* Helper function that deals with the most common tokens allowed in /* Helper function that deals with the most common tokens allowed in * title like sections. * title like sections. * @param parent Parent node, owner of the children list passed as * @param parent Parent node, owner of the children list passed as Loading Loading @@ -2786,7 +2728,7 @@ DocDotFile::DocDotFile(DocNode *parent,const QCString &name,const QCString &cont void DocDotFile::parse() void DocDotFile::parse() { { defaultHandleCaptionSize(CMD_DOTFILE,this,m_children,m_height, m_width); defaultHandleTitleAndSize(CMD_DOTFILE,this,m_children,m_width,m_height); bool ambig; bool ambig; FileDef *fd = findFileDef(Doxygen::dotFileNameDict,m_name,ambig); FileDef *fd = findFileDef(Doxygen::dotFileNameDict,m_name,ambig); Loading Loading @@ -2820,7 +2762,7 @@ DocMscFile::DocMscFile(DocNode *parent,const QCString &name,const QCString &cont void DocMscFile::parse() void DocMscFile::parse() { { defaultHandleCaptionSize(CMD_MSCFILE,this,m_children,m_height, m_width); defaultHandleTitleAndSize(CMD_MSCFILE,this,m_children,m_width,m_height); bool ambig; bool ambig; FileDef *fd = findFileDef(Doxygen::mscFileNameDict,m_name,ambig); FileDef *fd = findFileDef(Doxygen::mscFileNameDict,m_name,ambig); Loading Loading @@ -2856,7 +2798,7 @@ DocDiaFile::DocDiaFile(DocNode *parent,const QCString &name,const QCString &cont void DocDiaFile::parse() void DocDiaFile::parse() { { defaultHandleCaptionSize(CMD_DIAFILE,this,m_children,m_height, m_width); defaultHandleTitleAndSize(CMD_DIAFILE,this,m_children,m_width,m_height); bool ambig; bool ambig; FileDef *fd = findFileDef(Doxygen::diaFileNameDict,m_name,ambig); FileDef *fd = findFileDef(Doxygen::diaFileNameDict,m_name,ambig); Loading Loading @@ -2903,7 +2845,7 @@ void DocVhdlFlow::parse() switch (tok) switch (tok) { { case TK_COMMAND: case TK_COMMAND: warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a \\mscfile", warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a \\vhdlflow", qPrint(g_token->name)); qPrint(g_token->name)); break; break; case TK_SYMBOL: case TK_SYMBOL: Loading Loading @@ -2942,7 +2884,7 @@ DocImage::DocImage(DocNode *parent,const HtmlAttribList &attribs,const QCString void DocImage::parse() void DocImage::parse() { { defaultHandleCaptionSize(CMD_IMAGE,this,m_children,m_height, m_width); defaultHandleTitleAndSize(CMD_IMAGE,this,m_children,m_width,m_height); } } Loading Loading @@ -5022,7 +4964,8 @@ void DocPara::handleImage(const QCString &cmdName) img->parse(); img->parse(); } } void DocPara::handleDotFile(const QCString &cmdName) template<class T> void DocPara::handleFile(const QCString &cmdName) { { int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE) Loading @@ -5041,55 +4984,7 @@ void DocPara::handleDotFile(const QCString &cmdName) return; return; } } QCString name = g_token->name; QCString name = g_token->name; DocDotFile *df = new DocDotFile(this,name,g_context); T *df = new T(this,name,g_context); m_children.append(df); df->parse(); } void DocPara::handleMscFile(const QCString &cmdName) { int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", qPrint(cmdName)); return; } doctokenizerYYsetStateFile(); tok=doctokenizerYYlex(); doctokenizerYYsetStatePara(); if (tok!=TK_WORD) { warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s", tokToString(tok),qPrint(cmdName)); return; } QCString name = g_token->name; DocMscFile *df = new DocMscFile(this,name,g_context); m_children.append(df); df->parse(); } void DocPara::handleDiaFile(const QCString &cmdName) { int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", qPrint(cmdName)); return; } doctokenizerYYsetStateFile(); tok=doctokenizerYYlex(); doctokenizerYYsetStatePara(); if (tok!=TK_WORD) { warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s", tokToString(tok),qPrint(cmdName)); return; } QCString name = g_token->name; DocDiaFile *df = new DocDiaFile(this,name,g_context); m_children.append(df); m_children.append(df); df->parse(); df->parse(); } } Loading Loading @@ -5520,21 +5415,15 @@ int DocPara::handleCommand(const QCString &cmdName) break; break; case CMD_DOT: case CMD_DOT: { { /* DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Dot,g_isExample,g_exampleName); * need a temporary variable to store information for width, height and caption * which will be written into te right variable. */ DocVerbatim *tmp_dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Dot,g_isExample,g_exampleName); doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); defaultHandleCaptionSize(CMD_DOT,tmp_dv,tmp_dv->m_children,tmp_dv->m_height,tmp_dv-> m_width); QCString width,height; defaultHandleTitleAndSize(CMD_DOT,dv,dv->children(),width,height); doctokenizerYYsetStateDot(); doctokenizerYYsetStateDot(); retval = doctokenizerYYlex(); retval = doctokenizerYYlex(); DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Dot,g_isExample,g_exampleName); dv->setText(g_token->verb); dv -> m_width = tmp_dv -> m_width; dv->setWidth(width); dv -> m_height = tmp_dv -> m_height; dv->setHeight(height); dv -> m_children = tmp_dv -> m_children; delete tmp_dv; m_children.append(dv); m_children.append(dv); if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"dot section ended without end marker"); if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"dot section ended without end marker"); doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); Loading @@ -5542,21 +5431,15 @@ int DocPara::handleCommand(const QCString &cmdName) break; break; case CMD_MSC: case CMD_MSC: { { /* DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Msc,g_isExample,g_exampleName); * need a temporary variable to store information for width, height and caption * which will be written into te right variable. */ DocVerbatim *tmp_dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Msc,g_isExample,g_exampleName); doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); defaultHandleCaptionSize(CMD_MSC,tmp_dv,tmp_dv->m_children,tmp_dv->m_height,tmp_dv-> m_width); QCString width,height; defaultHandleTitleAndSize(CMD_MSC,dv,dv->children(),width,height); doctokenizerYYsetStateMsc(); doctokenizerYYsetStateMsc(); retval = doctokenizerYYlex(); retval = doctokenizerYYlex(); DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Msc,g_isExample,g_exampleName); dv->setText(g_token->verb); dv -> m_width = tmp_dv -> m_width; dv->setWidth(width); dv -> m_height = tmp_dv -> m_height; dv->setHeight(height); dv -> m_children = tmp_dv -> m_children; delete tmp_dv; m_children.append(dv); m_children.append(dv); if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"msc section ended without end marker"); if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"msc section ended without end marker"); doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); Loading @@ -5568,27 +5451,22 @@ int DocPara::handleCommand(const QCString &cmdName) doctokenizerYYsetStatePlantUMLOpt(); doctokenizerYYsetStatePlantUMLOpt(); retval = doctokenizerYYlex(); retval = doctokenizerYYlex(); QCString plantFile(g_token->sectionId); QCString plantFile(g_token->sectionId); /* DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::PlantUML,FALSE,plantFile); * need a temporary variable to store information for width, height and caption * which will be written into te right variable. */ DocVerbatim *tmp_dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Msc,g_isExample,g_exampleName); doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); defaultHandleCaptionSize(CMD_STARTUML,tmp_dv,tmp_dv->m_children,tmp_dv->m_height,tmp_dv-> m_width); QCString width,height; defaultHandleTitleAndSize(CMD_STARTUML,dv,dv->children(),width,height); doctokenizerYYsetStatePlantUML(); doctokenizerYYsetStatePlantUML(); retval = doctokenizerYYlex(); retval = doctokenizerYYlex(); dv->setText(g_token->verb); dv->setWidth(width); dv->setHeight(height); if (jarPath.isEmpty()) if (jarPath.isEmpty()) { { warn_doc_error(g_fileName,doctokenizerYYlineno,"ignoring \\startuml command because PLANTUML_JAR_PATH is not set"); warn_doc_error(g_fileName,doctokenizerYYlineno,"ignoring \\startuml command because PLANTUML_JAR_PATH is not set"); delete dv; } } else else { { DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::PlantUML,FALSE,plantFile); dv -> m_width = tmp_dv -> m_width; dv -> m_height = tmp_dv -> m_height; dv -> m_children = tmp_dv -> m_children; delete tmp_dv; m_children.append(dv); m_children.append(dv); } } if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"startuml section ended without end marker"); if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"startuml section ended without end marker"); Loading Loading @@ -5707,16 +5585,16 @@ int DocPara::handleCommand(const QCString &cmdName) handleImage(cmdName); handleImage(cmdName); break; break; case CMD_DOTFILE: case CMD_DOTFILE: handleDotFile(cmdName); handleFile<DocDotFile>(cmdName); break; break; case CMD_VHDLFLOW: case CMD_VHDLFLOW: handleVhdlFlow(); handleVhdlFlow(); break; break; case CMD_MSCFILE: case CMD_MSCFILE: handleMscFile(cmdName); handleFile<DocMscFile>(cmdName); break; break; case CMD_DIAFILE: case CMD_DIAFILE: handleDiaFile(cmdName); handleFile<DocDiaFile>(cmdName); break; break; case CMD_LINK: case CMD_LINK: handleLink(cmdName,FALSE); handleLink(cmdName,FALSE); Loading src/docparser.h +5 −5 Original line number Original line Diff line number Diff line Loading @@ -452,6 +452,9 @@ class DocVerbatim : public DocNode QCString height() const { return m_height; } QCString height() const { return m_height; } const QList<DocNode> &children() const { return m_children; } const QList<DocNode> &children() const { return m_children; } QList<DocNode> &children() { return m_children; } QList<DocNode> &children() { return m_children; } void setText(const QCString &t) { m_text=t; } void setWidth(const QCString &w) { m_width=w; } void setHeight(const QCString &h) { m_height=h; } private: private: QCString m_context; QCString m_context; Loading @@ -462,7 +465,6 @@ class DocVerbatim : public DocNode QCString m_relPath; QCString m_relPath; QCString m_lang; QCString m_lang; bool m_isBlock; bool m_isBlock; public: QCString m_width; QCString m_width; QCString m_height; QCString m_height; QList<DocNode> m_children; QList<DocNode> m_children; Loading Loading @@ -1123,9 +1125,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode int direction); int direction); void handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t); void handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t); void handleImage(const QCString &cmdName); void handleImage(const QCString &cmdName); void handleDotFile(const QCString &cmdName); template<class T> void handleFile(const QCString &cmdName); void handleMscFile(const QCString &cmdName); void handleDiaFile(const QCString &cmdName); void handleInclude(const QCString &cmdName,DocInclude::Type t); void handleInclude(const QCString &cmdName,DocInclude::Type t); void handleLink(const QCString &cmdName,bool isJavaLink); void handleLink(const QCString &cmdName,bool isJavaLink); void handleCite(); void handleCite(); Loading src/doctokenizer.h +0 −2 Original line number Original line Diff line number Diff line Loading @@ -131,10 +131,8 @@ void doctokenizerYYpushContext(); bool doctokenizerYYpopContext(); bool doctokenizerYYpopContext(); int doctokenizerYYlex(); int doctokenizerYYlex(); void doctokenizerYYsetStatePara(); void doctokenizerYYsetStatePara(); void doctokenizerYYsetStateCaption(); void doctokenizerYYsetStateTitle(); void doctokenizerYYsetStateTitle(); void doctokenizerYYsetStateTitleAttrValue(); void doctokenizerYYsetStateTitleAttrValue(); void doctokenizerYYsetStateTitleAttr(); void doctokenizerYYsetStateCode(); void doctokenizerYYsetStateCode(); void doctokenizerYYsetStateXmlCode(); void doctokenizerYYsetStateXmlCode(); void doctokenizerYYsetStateHtmlOnly(); void doctokenizerYYsetStateHtmlOnly(); Loading Loading
doc/commands.doc +11 −14 Original line number Original line Diff line number Diff line Loading @@ -2572,7 +2572,7 @@ class Receiver step before running doxygen, you can also add the name of the image file after \c \\startuml step before running doxygen, you can also add the name of the image file after \c \\startuml and inside curly brackets, i.e. and inside curly brackets, i.e. \verbatim \verbatim @startuml{myimage.png} @startuml{myimage.png} "Image Caption" width=5cm Alice -> Bob : Hello Alice -> Bob : Hello @enduml @enduml \endverbatim \endverbatim Loading Loading @@ -2897,15 +2897,16 @@ class Receiver specific, so if you want to insert an image for more than one specific, so if you want to insert an image for more than one format you'll have to repeat this command for each format. format you'll have to repeat this command for each format. The first argument specifies the output format. Currently, the The first argument specifies the output format in which the image should following values are supported: \c html, \c latex, \c docbook and \c rtf. be embedded. Currently, the following values are supported: \c html, \c latex, \c docbook and \c rtf. The second argument specifies the file name of the image. The second argument specifies the file name of the image. doxygen will look for files in the paths (or files) that you specified doxygen will look for files in the paths (or files) that you specified after the \ref cfg_image_path "IMAGE_PATH" tag. after the \ref cfg_image_path "IMAGE_PATH" tag. If the image is found it will be copied to the correct output directory. If the image is found it will be copied to the correct output directory. If the image name contains spaces you'll have to put quotes ("...") around it. If the image name contains spaces you'll have to put quotes ("...") around You can also specify an absolute URL instead of a file name, but then the name. You can also specify an absolute URL instead of a file name, but then doxygen does not copy the image nor check its existence. doxygen does not copy the image nor check its existence. The third argument is optional and can be used to specify the caption The third argument is optional and can be used to specify the caption Loading @@ -2914,16 +2915,12 @@ class Receiver spaces. The quotes are stripped before the caption is displayed. spaces. The quotes are stripped before the caption is displayed. The fourth argument is also optional and can be used to specify the The fourth argument is also optional and can be used to specify the width or height of the image. This can be useful for \LaTeX output width or height of the image. This can be useful for \LaTeX or docbook output (i.e. format=<code>latex</code>). (i.e. format=<code>latex</code> or format=<code>docbook</code>). \anchor image_sizeindicator \par Size indication \anchor image_sizeindicator \par Size indication The \c sizeindication can The \c sizeindication can specify the width or height to be used (or a combination). specify the width or height to be used )or a combination). Possible The size specifier in \LaTeX (for example `10cm` or values are (width, analogous for height): `4in` or a symbolic width like `\\textwidth`). `width` or `max with` or `min width`. The size should be a valid size specifier in \LaTeX (for example `10cm` or `6in` or a symbolic width like `\\textwidth`). (The `max width` etc. are based on the \LaTeX package `adjustbox`) Here is example of a comment block: Here is example of a comment block: Loading
src/docbookvisitor.cpp +6 −21 Original line number Original line Diff line number Diff line Loading @@ -46,14 +46,7 @@ static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name, t << " <imagedata"; t << " <imagedata"; if (!width.isEmpty()) if (!width.isEmpty()) { { tmpStr = width; t << " width=\"" << convertToXML(width) << "\""; tmpStr = tmpStr.replace(QRegExp("min *width"),"minwidth"); tmpStr = tmpStr.replace(QRegExp("max *width"),"maxwidth"); tmpStr = tmpStr.replace(QRegExp("="),"=\""); tmpStr = tmpStr.replace(QRegExp(","),"\" ") + "\""; tmpStr = tmpStr.replace(QRegExp("\"\""),"\""); tmpStr = tmpStr.replace(QRegExp("\\"),"\\\\"); t << " " << tmpStr; } } else else { { Loading @@ -61,15 +54,7 @@ static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name, } } if (!height.isEmpty()) if (!height.isEmpty()) { { tmpStr = height; t << " depth=\"" << convertToXML(tmpStr) << "\""; tmpStr = tmpStr.replace(QRegExp("min *height"),"mindepth"); tmpStr = tmpStr.replace(QRegExp("max *height"),"maxdepth"); tmpStr = tmpStr.replace(QRegExp("height="),"depth="); tmpStr = tmpStr.replace(QRegExp("="),"=\""); tmpStr = tmpStr.replace(QRegExp(","),"\" ") + "\""; tmpStr = tmpStr.replace(QRegExp("\"\""),"\""); tmpStr = tmpStr.replace(QRegExp("\\"),"\\\\"); t << " " << tmpStr; } } t << " align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << name << "\">"; t << " align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << name << "\">"; t << "</imagedata>" << endl; t << "</imagedata>" << endl; Loading Loading @@ -1238,7 +1223,7 @@ void DocbookDocVisitor::writeMscFile(const QCString &baseName, DocVerbatim *s) QCString outDir = Config_getString("DOCBOOK_OUTPUT"); QCString outDir = Config_getString("DOCBOOK_OUTPUT"); writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_BITMAP); writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_BITMAP); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitCaption(this, s->m_children); visitCaption(this, s->children()); visitPostEnd(m_t, s->hasCaption()); visitPostEnd(m_t, s->hasCaption()); } } Loading @@ -1253,7 +1238,7 @@ void DocbookDocVisitor::writePlantUMLFile(const QCString &baseName, DocVerbatim QCString outDir = Config_getString("DOCBOOK_OUTPUT"); QCString outDir = Config_getString("DOCBOOK_OUTPUT"); generatePlantUMLOutput(baseName,outDir,PUML_BITMAP); generatePlantUMLOutput(baseName,outDir,PUML_BITMAP); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitCaption(this, s->m_children); visitCaption(this, s->children()); visitPostEnd(m_t, s->hasCaption()); visitPostEnd(m_t, s->hasCaption()); } } Loading Loading @@ -1298,7 +1283,7 @@ void DocbookDocVisitor::writeDiaFile(const QCString &baseName, DocVerbatim *s) QCString outDir = Config_getString("DOCBOOK_OUTPUT"); QCString outDir = Config_getString("DOCBOOK_OUTPUT"); writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP); writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); visitCaption(this, s->m_children); visitCaption(this, s->children()); visitPostEnd(m_t, s->hasCaption()); visitPostEnd(m_t, s->hasCaption()); } } Loading Loading @@ -1344,7 +1329,7 @@ void DocbookDocVisitor::writeDotFile(const QCString &baseName, DocVerbatim *s) QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP); writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP); visitPreStart(m_t, s->hasCaption(), baseName + ".dot", s->width(),s->height()); visitPreStart(m_t, s->hasCaption(), baseName + ".dot", s->width(),s->height()); visitCaption(this, s->m_children); visitCaption(this, s->children()); visitPostEnd(m_t, s->hasCaption()); visitPostEnd(m_t, s->hasCaption()); } } Loading
src/docparser.cpp +49 −171 Original line number Original line Diff line number Diff line Loading @@ -839,9 +839,6 @@ static bool findDocsForMemberOrCompound(const char *commandName, static bool defaultHandleToken(DocNode *parent,int tok, static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children,bool QList<DocNode> &children,bool handleWord=TRUE); handleWord=TRUE); static void defaultHandleCaptionSize(const int cmd, DocNode *parent, QList<DocNode> &children, QCString &height, QCString &width); static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, const QCString &cmdName) const QCString &cmdName) Loading Loading @@ -1243,65 +1240,32 @@ static DocAnchor *handleAnchor(DocNode *parent) } } /* Helper function that deals with the Caption and size argument. /* Helper function that deals with the title, width, and height arguments of various commands. * @param parent Parent node, owner of the children list passed as * @param[in] cmd Command id for which to extract caption and size info. * @param[in] parent Parent node, owner of the children list passed as * the third argument. * the third argument. * @param children The list of child nodes to which the node representing * @param[in] children The list of child nodes to which the node representing * the token can be added. * the token can be added. * @param height Storagre for, optional, height * @param[out] width the extracted width specifier * @param width Storagre for, optional, width * @param[out] height the extracted height specifier */ */ static void defaultHandleCaptionSize(const int cmd, DocNode *parent, QList<DocNode> &children, QCString &height, QCString &width) static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, QList<DocNode> &children, QCString &width,QCString &height) { { QCString preamble = ""; int insideString = 0; g_nodeStack.push(parent); g_nodeStack.push(parent); // parse title // parse title doctokenizerYYsetStateCaption(); doctokenizerYYsetStateTitle(); int tok; int tok; while ((tok=doctokenizerYYlex())) while ((tok=doctokenizerYYlex())) { { if (tok==TK_WORD && g_token->name=="width=") if (tok==TK_WORD && (g_token->name=="width=" || g_token->name=="height=")) { // special case: no title, but we do have a size indicator doctokenizerYYsetStateTitleAttr(); // strip = width=preamble + g_token->name + g_token->chars; g_token->chars = ""; g_token->name = ""; preamble = ""; do { tok=doctokenizerYYlex(); } while (tok == TK_WHITESPACE); break; } if (tok==TK_WORD && g_token->name=="height=") { { // special case: no title, but we do have a size indicator // special case: no title, but we do have a size indicator doctokenizerYYsetStateTitleAttr(); doctokenizerYYsetStateTitleAttrValue(); // strip = // strip = height=preamble + g_token->name + g_token->chars; g_token->name = g_token->name.left(g_token->name.length()-1); g_token->chars = ""; g_token->name = ""; preamble = ""; do { tok=doctokenizerYYlex(); } while (tok == TK_WHITESPACE); break; } if (tok==TK_WORD && (g_token->name=="min" || g_token->name=="max")) { // special case: no title, but we do have a size indicator min or max if (!insideString) { preamble = g_token->name + " "; break; break; } } } insideString = 1; if (!defaultHandleToken(parent,tok,children)) if (!defaultHandleToken(parent,tok,children)) { { switch (tok) switch (tok) Loading Loading @@ -1330,41 +1294,18 @@ static void defaultHandleCaptionSize(const int cmd, DocNode *parent, QList<DocNo { { if (g_token->name=="width") if (g_token->name=="width") { { if (!width.isEmpty()) width += ","; width = g_token->chars; width+=preamble + "width=" + g_token->chars; preamble = ""; doctokenizerYYsetStateTitleAttr(); } } else if (g_token->name=="height") else if (g_token->name=="height") { { if (!height.isEmpty()) height += ","; height = g_token->chars; height+=preamble + "height=" + g_token->chars; preamble = ""; doctokenizerYYsetStateTitleAttr(); } else if (g_token->name=="max") { preamble = "max "; } else if (g_token->name=="min") { preamble = "min "; } } else else { { warn_doc_error(g_fileName,doctokenizerYYlineno,"Unknown option %s after \\%s command", warn_doc_error(g_fileName,doctokenizerYYlineno,"Unknown option '%s' after \\%s command, expected 'width' or 'height'", qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data()); qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data()); } } do { tok=doctokenizerYYlex(); tok=doctokenizerYYlex(); if (tok==TK_WORD && (g_token->name=="width=" || g_token->name=="height=")) { g_token->name=g_token->name.left(g_token->name.length()-1); tok=doctokenizerYYlex(); } } while (tok == TK_WHITESPACE); } } doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); Loading @@ -1372,6 +1313,7 @@ static void defaultHandleCaptionSize(const int cmd, DocNode *parent, QList<DocNo DocNode *n=g_nodeStack.pop(); DocNode *n=g_nodeStack.pop(); ASSERT(n==parent); ASSERT(n==parent); } } /* Helper function that deals with the most common tokens allowed in /* Helper function that deals with the most common tokens allowed in * title like sections. * title like sections. * @param parent Parent node, owner of the children list passed as * @param parent Parent node, owner of the children list passed as Loading Loading @@ -2786,7 +2728,7 @@ DocDotFile::DocDotFile(DocNode *parent,const QCString &name,const QCString &cont void DocDotFile::parse() void DocDotFile::parse() { { defaultHandleCaptionSize(CMD_DOTFILE,this,m_children,m_height, m_width); defaultHandleTitleAndSize(CMD_DOTFILE,this,m_children,m_width,m_height); bool ambig; bool ambig; FileDef *fd = findFileDef(Doxygen::dotFileNameDict,m_name,ambig); FileDef *fd = findFileDef(Doxygen::dotFileNameDict,m_name,ambig); Loading Loading @@ -2820,7 +2762,7 @@ DocMscFile::DocMscFile(DocNode *parent,const QCString &name,const QCString &cont void DocMscFile::parse() void DocMscFile::parse() { { defaultHandleCaptionSize(CMD_MSCFILE,this,m_children,m_height, m_width); defaultHandleTitleAndSize(CMD_MSCFILE,this,m_children,m_width,m_height); bool ambig; bool ambig; FileDef *fd = findFileDef(Doxygen::mscFileNameDict,m_name,ambig); FileDef *fd = findFileDef(Doxygen::mscFileNameDict,m_name,ambig); Loading Loading @@ -2856,7 +2798,7 @@ DocDiaFile::DocDiaFile(DocNode *parent,const QCString &name,const QCString &cont void DocDiaFile::parse() void DocDiaFile::parse() { { defaultHandleCaptionSize(CMD_DIAFILE,this,m_children,m_height, m_width); defaultHandleTitleAndSize(CMD_DIAFILE,this,m_children,m_width,m_height); bool ambig; bool ambig; FileDef *fd = findFileDef(Doxygen::diaFileNameDict,m_name,ambig); FileDef *fd = findFileDef(Doxygen::diaFileNameDict,m_name,ambig); Loading Loading @@ -2903,7 +2845,7 @@ void DocVhdlFlow::parse() switch (tok) switch (tok) { { case TK_COMMAND: case TK_COMMAND: warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a \\mscfile", warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a \\vhdlflow", qPrint(g_token->name)); qPrint(g_token->name)); break; break; case TK_SYMBOL: case TK_SYMBOL: Loading Loading @@ -2942,7 +2884,7 @@ DocImage::DocImage(DocNode *parent,const HtmlAttribList &attribs,const QCString void DocImage::parse() void DocImage::parse() { { defaultHandleCaptionSize(CMD_IMAGE,this,m_children,m_height, m_width); defaultHandleTitleAndSize(CMD_IMAGE,this,m_children,m_width,m_height); } } Loading Loading @@ -5022,7 +4964,8 @@ void DocPara::handleImage(const QCString &cmdName) img->parse(); img->parse(); } } void DocPara::handleDotFile(const QCString &cmdName) template<class T> void DocPara::handleFile(const QCString &cmdName) { { int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE) Loading @@ -5041,55 +4984,7 @@ void DocPara::handleDotFile(const QCString &cmdName) return; return; } } QCString name = g_token->name; QCString name = g_token->name; DocDotFile *df = new DocDotFile(this,name,g_context); T *df = new T(this,name,g_context); m_children.append(df); df->parse(); } void DocPara::handleMscFile(const QCString &cmdName) { int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", qPrint(cmdName)); return; } doctokenizerYYsetStateFile(); tok=doctokenizerYYlex(); doctokenizerYYsetStatePara(); if (tok!=TK_WORD) { warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s", tokToString(tok),qPrint(cmdName)); return; } QCString name = g_token->name; DocMscFile *df = new DocMscFile(this,name,g_context); m_children.append(df); df->parse(); } void DocPara::handleDiaFile(const QCString &cmdName) { int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", qPrint(cmdName)); return; } doctokenizerYYsetStateFile(); tok=doctokenizerYYlex(); doctokenizerYYsetStatePara(); if (tok!=TK_WORD) { warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s", tokToString(tok),qPrint(cmdName)); return; } QCString name = g_token->name; DocDiaFile *df = new DocDiaFile(this,name,g_context); m_children.append(df); m_children.append(df); df->parse(); df->parse(); } } Loading Loading @@ -5520,21 +5415,15 @@ int DocPara::handleCommand(const QCString &cmdName) break; break; case CMD_DOT: case CMD_DOT: { { /* DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Dot,g_isExample,g_exampleName); * need a temporary variable to store information for width, height and caption * which will be written into te right variable. */ DocVerbatim *tmp_dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Dot,g_isExample,g_exampleName); doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); defaultHandleCaptionSize(CMD_DOT,tmp_dv,tmp_dv->m_children,tmp_dv->m_height,tmp_dv-> m_width); QCString width,height; defaultHandleTitleAndSize(CMD_DOT,dv,dv->children(),width,height); doctokenizerYYsetStateDot(); doctokenizerYYsetStateDot(); retval = doctokenizerYYlex(); retval = doctokenizerYYlex(); DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Dot,g_isExample,g_exampleName); dv->setText(g_token->verb); dv -> m_width = tmp_dv -> m_width; dv->setWidth(width); dv -> m_height = tmp_dv -> m_height; dv->setHeight(height); dv -> m_children = tmp_dv -> m_children; delete tmp_dv; m_children.append(dv); m_children.append(dv); if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"dot section ended without end marker"); if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"dot section ended without end marker"); doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); Loading @@ -5542,21 +5431,15 @@ int DocPara::handleCommand(const QCString &cmdName) break; break; case CMD_MSC: case CMD_MSC: { { /* DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Msc,g_isExample,g_exampleName); * need a temporary variable to store information for width, height and caption * which will be written into te right variable. */ DocVerbatim *tmp_dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Msc,g_isExample,g_exampleName); doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); defaultHandleCaptionSize(CMD_MSC,tmp_dv,tmp_dv->m_children,tmp_dv->m_height,tmp_dv-> m_width); QCString width,height; defaultHandleTitleAndSize(CMD_MSC,dv,dv->children(),width,height); doctokenizerYYsetStateMsc(); doctokenizerYYsetStateMsc(); retval = doctokenizerYYlex(); retval = doctokenizerYYlex(); DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Msc,g_isExample,g_exampleName); dv->setText(g_token->verb); dv -> m_width = tmp_dv -> m_width; dv->setWidth(width); dv -> m_height = tmp_dv -> m_height; dv->setHeight(height); dv -> m_children = tmp_dv -> m_children; delete tmp_dv; m_children.append(dv); m_children.append(dv); if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"msc section ended without end marker"); if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"msc section ended without end marker"); doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); Loading @@ -5568,27 +5451,22 @@ int DocPara::handleCommand(const QCString &cmdName) doctokenizerYYsetStatePlantUMLOpt(); doctokenizerYYsetStatePlantUMLOpt(); retval = doctokenizerYYlex(); retval = doctokenizerYYlex(); QCString plantFile(g_token->sectionId); QCString plantFile(g_token->sectionId); /* DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::PlantUML,FALSE,plantFile); * need a temporary variable to store information for width, height and caption * which will be written into te right variable. */ DocVerbatim *tmp_dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Msc,g_isExample,g_exampleName); doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara(); defaultHandleCaptionSize(CMD_STARTUML,tmp_dv,tmp_dv->m_children,tmp_dv->m_height,tmp_dv-> m_width); QCString width,height; defaultHandleTitleAndSize(CMD_STARTUML,dv,dv->children(),width,height); doctokenizerYYsetStatePlantUML(); doctokenizerYYsetStatePlantUML(); retval = doctokenizerYYlex(); retval = doctokenizerYYlex(); dv->setText(g_token->verb); dv->setWidth(width); dv->setHeight(height); if (jarPath.isEmpty()) if (jarPath.isEmpty()) { { warn_doc_error(g_fileName,doctokenizerYYlineno,"ignoring \\startuml command because PLANTUML_JAR_PATH is not set"); warn_doc_error(g_fileName,doctokenizerYYlineno,"ignoring \\startuml command because PLANTUML_JAR_PATH is not set"); delete dv; } } else else { { DocVerbatim *dv = new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::PlantUML,FALSE,plantFile); dv -> m_width = tmp_dv -> m_width; dv -> m_height = tmp_dv -> m_height; dv -> m_children = tmp_dv -> m_children; delete tmp_dv; m_children.append(dv); m_children.append(dv); } } if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"startuml section ended without end marker"); if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"startuml section ended without end marker"); Loading Loading @@ -5707,16 +5585,16 @@ int DocPara::handleCommand(const QCString &cmdName) handleImage(cmdName); handleImage(cmdName); break; break; case CMD_DOTFILE: case CMD_DOTFILE: handleDotFile(cmdName); handleFile<DocDotFile>(cmdName); break; break; case CMD_VHDLFLOW: case CMD_VHDLFLOW: handleVhdlFlow(); handleVhdlFlow(); break; break; case CMD_MSCFILE: case CMD_MSCFILE: handleMscFile(cmdName); handleFile<DocMscFile>(cmdName); break; break; case CMD_DIAFILE: case CMD_DIAFILE: handleDiaFile(cmdName); handleFile<DocDiaFile>(cmdName); break; break; case CMD_LINK: case CMD_LINK: handleLink(cmdName,FALSE); handleLink(cmdName,FALSE); Loading
src/docparser.h +5 −5 Original line number Original line Diff line number Diff line Loading @@ -452,6 +452,9 @@ class DocVerbatim : public DocNode QCString height() const { return m_height; } QCString height() const { return m_height; } const QList<DocNode> &children() const { return m_children; } const QList<DocNode> &children() const { return m_children; } QList<DocNode> &children() { return m_children; } QList<DocNode> &children() { return m_children; } void setText(const QCString &t) { m_text=t; } void setWidth(const QCString &w) { m_width=w; } void setHeight(const QCString &h) { m_height=h; } private: private: QCString m_context; QCString m_context; Loading @@ -462,7 +465,6 @@ class DocVerbatim : public DocNode QCString m_relPath; QCString m_relPath; QCString m_lang; QCString m_lang; bool m_isBlock; bool m_isBlock; public: QCString m_width; QCString m_width; QCString m_height; QCString m_height; QList<DocNode> m_children; QList<DocNode> m_children; Loading Loading @@ -1123,9 +1125,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode int direction); int direction); void handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t); void handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t); void handleImage(const QCString &cmdName); void handleImage(const QCString &cmdName); void handleDotFile(const QCString &cmdName); template<class T> void handleFile(const QCString &cmdName); void handleMscFile(const QCString &cmdName); void handleDiaFile(const QCString &cmdName); void handleInclude(const QCString &cmdName,DocInclude::Type t); void handleInclude(const QCString &cmdName,DocInclude::Type t); void handleLink(const QCString &cmdName,bool isJavaLink); void handleLink(const QCString &cmdName,bool isJavaLink); void handleCite(); void handleCite(); Loading
src/doctokenizer.h +0 −2 Original line number Original line Diff line number Diff line Loading @@ -131,10 +131,8 @@ void doctokenizerYYpushContext(); bool doctokenizerYYpopContext(); bool doctokenizerYYpopContext(); int doctokenizerYYlex(); int doctokenizerYYlex(); void doctokenizerYYsetStatePara(); void doctokenizerYYsetStatePara(); void doctokenizerYYsetStateCaption(); void doctokenizerYYsetStateTitle(); void doctokenizerYYsetStateTitle(); void doctokenizerYYsetStateTitleAttrValue(); void doctokenizerYYsetStateTitleAttrValue(); void doctokenizerYYsetStateTitleAttr(); void doctokenizerYYsetStateCode(); void doctokenizerYYsetStateCode(); void doctokenizerYYsetStateXmlCode(); void doctokenizerYYsetStateXmlCode(); void doctokenizerYYsetStateHtmlOnly(); void doctokenizerYYsetStateHtmlOnly(); Loading