From 6caac96a48e055807920f724d7de68f764e06441 Mon Sep 17 00:00:00 2001 From: Andreas Regel Date: Tue, 5 Dec 2017 11:49:19 +0100 Subject: Replace calls to trTypeString with trVhdlType in single mode, which is the default. Remove now unused method trTypeString. --- src/memberdef.cpp | 2 +- src/vhdldocgen.cpp | 40 ++-------------------------------------- src/vhdldocgen.h | 1 - 3 files changed, 3 insertions(+), 40 deletions(-) diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 01f4d8d..60558d0 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1978,7 +1978,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const bool extractPrivate = Config_getBool(EXTRACT_PRIVATE); if (optVhdl) { - sl.append(VhdlDocGen::trTypeString(getMemberSpecifiers())); + sl.append(VhdlDocGen::trVhdlType(getMemberSpecifiers())); } else { diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index dcf7f42..49ea130 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -1241,42 +1241,6 @@ QCString VhdlDocGen::getProtectionName(int prot) return ""; } -QCString VhdlDocGen::trTypeString(uint64 type) -{ - switch(type) - { - case VhdlDocGen::LIBRARY: return "Library"; - case VhdlDocGen::ENTITY: return "Entity"; - case VhdlDocGen::PACKAGE_BODY: return "Package Body"; - case VhdlDocGen::ATTRIBUTE: return "Attribute"; - case VhdlDocGen::PACKAGE: return "Package"; - case VhdlDocGen::SIGNAL: return "Signal"; - case VhdlDocGen::COMPONENT: return "Component"; - case VhdlDocGen::CONSTANT: return "Constant"; - case VhdlDocGen::TYPE: return "Type"; - case VhdlDocGen::SUBTYPE: return "Subtype"; - case VhdlDocGen::FUNCTION: return "Function"; - case VhdlDocGen::RECORD: return "Record"; - case VhdlDocGen::PROCEDURE: return "Procedure"; - case VhdlDocGen::ARCHITECTURE: return "Architecture"; - case VhdlDocGen::USE: return "Package"; - case VhdlDocGen::PROCESS: return "Process"; - case VhdlDocGen::PORT: return "Port"; - case VhdlDocGen::GENERIC: return "Generic"; - case VhdlDocGen::UNITS: return "Units"; - //case VhdlDocGen::PORTMAP: return "Port Map"; - case VhdlDocGen::SHAREDVARIABLE: return "Shared Variable"; - case VhdlDocGen::GROUP: return "Group"; - case VhdlDocGen::VFILE: return "File"; - case VhdlDocGen::INSTANTIATION: return "Instantiation"; - case VhdlDocGen::ALIAS: return "Alias"; - case VhdlDocGen::CONFIG: return "Configuration"; - case VhdlDocGen::MISCELLANEOUS: return "Miscellaneous"; - case VhdlDocGen::UCF_CONST: return "Constraints"; - default: return ""; - } -} // convertType - /*! * deletes a char backwards in a string */ @@ -2416,7 +2380,7 @@ bool VhdlDocGen::writeClassType( ClassDef *& cd, OutputList &ol ,QCString & cname) { int id=cd->protection(); - QCString qcs = VhdlDocGen::trTypeString(id+2); + QCString qcs = VhdlDocGen::trVhdlType(id+2); cname=VhdlDocGen::getClassName(cd); ol.startBold(); ol.writeString(qcs.data()); @@ -3993,7 +3957,7 @@ void FlowChart::createSVG() //const MemberDef *m=VhdlDocGen::getFlowMember(); //if (m) - // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",VhdlDocGen::trTypeString(m->getMemberSpecifiers()),m->name().data(),m->getFileDef()->name().data()); + // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",VhdlDocGen::trVhdlType(m->getMemberSpecifiers()),m->name().data(),m->getFileDef()->name().data()); QCString dir=" -o \""+ov+qcs+"\""; ov+="/flow_design.dot"; diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h index bd190ca..514dfe3 100644 --- a/src/vhdldocgen.h +++ b/src/vhdldocgen.h @@ -152,7 +152,6 @@ class VhdlDocGen //----------------------------------------------------- // translatable items - static QCString trTypeString(uint64 type); static QCString trVhdlType(uint64 type,bool sing=true); // trClassHierarchy. -- cgit v0.12 From f1fea3603fa3e561d8f1efff5bc685e4484e7998 Mon Sep 17 00:00:00 2001 From: Andreas Regel Date: Tue, 5 Dec 2017 15:35:16 +0100 Subject: Add VHDL strings to Translator class and add german translations. --- src/classdef.cpp | 8 +-- src/context.cpp | 18 +++---- src/index.cpp | 16 +++--- src/layout.cpp | 28 +++++----- src/memberdef.cpp | 2 +- src/rtfgen.cpp | 2 +- src/translator.h | 15 ++++++ src/translator_adapter.h | 35 ++++++++++++- src/translator_br.h | 2 +- src/translator_cn.h | 2 +- src/translator_cz.h | 2 +- src/translator_de.h | 121 ++++++++++++++++++++++++++++++++++++++++++++ src/translator_en.h | 117 ++++++++++++++++++++++++++++++++++++++++++ src/translator_es.h | 2 +- src/translator_fr.h | 2 +- src/translator_gr.h | 2 +- src/translator_it.h | 2 +- src/translator_jp.h | 2 +- src/translator_kr.h | 2 +- src/translator_nl.h | 2 +- src/translator_pt.h | 2 +- src/translator_ro.h | 2 +- src/translator_ru.h | 2 +- src/translator_sk.h | 2 +- src/translator_sv.h | 2 +- src/translator_tw.h | 2 +- src/vhdldocgen.cpp | 129 ++--------------------------------------------- src/vhdldocgen.h | 26 ---------- 28 files changed, 343 insertions(+), 206 deletions(-) diff --git a/src/classdef.cpp b/src/classdef.cpp index e1a80ce..94d8035 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -440,7 +440,7 @@ void ClassDef::internalInsertMember(MemberDef *md, if (getLanguage()==SrcLangExt_VHDL) { - QCString title=VhdlDocGen::trVhdlType(md->getMemberSpecifiers(),FALSE); + QCString title=theTranslator->trVhdlType(md->getMemberSpecifiers(),FALSE); if (!m_impl->vhdlSummaryTitles.find(title)) { m_impl->vhdlSummaryTitles.append(title,new QCString(title)); @@ -1882,7 +1882,7 @@ void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *heade } else if (lang==SrcLangExt_VHDL) { - ol.parseText(VhdlDocGen::trVhdlType(VhdlDocGen::ARCHITECTURE,FALSE)); + ol.parseText(theTranslator->trVhdlType(VhdlDocGen::ARCHITECTURE,FALSE)); } else { @@ -2122,7 +2122,7 @@ QCString ClassDef::title() const } else if (lang==SrcLangExt_VHDL) { - pageTitle = VhdlDocGen::getClassTitle(this)+" Reference"; + pageTitle = theTranslator->trCustomReference(VhdlDocGen::getClassTitle(this)); } else if (isJavaEnum()) { @@ -2474,7 +2474,7 @@ void ClassDef::writeMemberList(OutputList &ol) QStrList sl; if (lang==SrcLangExt_VHDL) { - sl.append(VhdlDocGen::trVhdlType(md->getMemberSpecifiers())); //append vhdl type + sl.append(theTranslator->trVhdlType(md->getMemberSpecifiers())); //append vhdl type } else if (md->isFriend()) sl.append("friend"); else if (md->isRelated()) sl.append("related"); diff --git a/src/context.cpp b/src/context.cpp index 896c4e0..063fb0e 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -617,7 +617,7 @@ class TranslateContext::Private TemplateVariant classes() const { return theTranslator->trClasses(); - // TODO: VHDL: trVhdlType(VhdlDocGen::ENTITY,FALSE) + // TODO: VHDL: theTranslator->trVhdlType(VhdlDocGen::ENTITY,FALSE) // TODO: Fortran: trDataTypes() } TemplateVariant classList() const @@ -927,8 +927,8 @@ class TranslateContext::Private { static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); - return fortranOpt ? theTranslator->trSubprograms() : - vhdlOpt ? VhdlDocGen::trFunctionAndProc() : + return fortranOpt ? theTranslator->trSubprograms() : + vhdlOpt ? theTranslator->trFunctionAndProc() : theTranslator->trFunctions(); } TemplateVariant variables() const @@ -2816,7 +2816,7 @@ class NamespaceContext::Private : public DefinitionContexttrFunctions(); SrcLangExt lang = m_namespaceDef->getLanguage(); if (lang==SrcLangExt_Fortran) title=theTranslator->trSubprograms(); - else if (lang==SrcLangExt_VHDL) title=VhdlDocGen::trFunctionAndProc(); + else if (lang==SrcLangExt_VHDL) title=theTranslator->trFunctionAndProc(); return getMemberList(getCache().functions,MemberListType_decFuncMembers,title); } TemplateVariant variables() const @@ -3249,7 +3249,7 @@ class FileContext::Private : public DefinitionContext QCString title = theTranslator->trFunctions(); SrcLangExt lang = m_fileDef->getLanguage(); if (lang==SrcLangExt_Fortran) title=theTranslator->trSubprograms(); - else if (lang==SrcLangExt_VHDL) title=VhdlDocGen::trFunctionAndProc(); + else if (lang==SrcLangExt_VHDL) title=theTranslator->trFunctionAndProc(); return getMemberList(getCache().functions,MemberListType_decFuncMembers,title); } TemplateVariant variables() const @@ -5489,7 +5489,7 @@ class ModuleContext::Private : public DefinitionContext QCString title = theTranslator->trFunctions(); SrcLangExt lang = m_groupDef->getLanguage(); if (lang==SrcLangExt_Fortran) title=theTranslator->trSubprograms(); - else if (lang==SrcLangExt_VHDL) title=VhdlDocGen::trFunctionAndProc(); + else if (lang==SrcLangExt_VHDL) title=theTranslator->trFunctionAndProc(); return getMemberList(getCache().functions,MemberListType_decFuncMembers,title); } TemplateVariant variables() const @@ -5828,7 +5828,7 @@ class ClassIndexContext::Private } else if (vhdlOpt) { - return VhdlDocGen::trDesignUnits(); + return theTranslator->trDesignUnits(); } else { @@ -6022,7 +6022,7 @@ class ClassHierarchyContext::Private static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); if (vhdlOpt) { - return VhdlDocGen::trDesignUnitHierarchy(); + return theTranslator->trDesignUnitHierarchy(); } else { @@ -6780,7 +6780,7 @@ class ClassTreeContext::Private } else if (vhdlOpt) { - return VhdlDocGen::trDesignUnitList(); + return theTranslator->trDesignUnitList(); } else { diff --git a/src/index.cpp b/src/index.cpp index bfa4954..6e446c0 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2503,8 +2503,8 @@ static const CmhlInfo *getCmhlInfo(int hl) { CmhlInfo("functions", theTranslator->trAll()), CmhlInfo("functions_func", - fortranOpt ? theTranslator->trSubprograms() : - vhdlOpt ? VhdlDocGen::trFunctionAndProc() : + fortranOpt ? theTranslator->trSubprograms() : + vhdlOpt ? theTranslator->trFunctionAndProc() : theTranslator->trFunctions()), CmhlInfo("functions_vars",theTranslator->trVariables()), CmhlInfo("functions_type",theTranslator->trTypedefs()), @@ -2682,8 +2682,8 @@ static const FmhlInfo *getFmhlInfo(int hl) { FmhlInfo("globals", theTranslator->trAll()), FmhlInfo("globals_func", - fortranOpt ? theTranslator->trSubprograms() : - vhdlOpt ? VhdlDocGen::trFunctionAndProc() : + fortranOpt ? theTranslator->trSubprograms() : + vhdlOpt ? theTranslator->trFunctionAndProc() : theTranslator->trFunctions()), FmhlInfo("globals_vars",theTranslator->trVariables()), FmhlInfo("globals_type",theTranslator->trTypedefs()), @@ -2850,8 +2850,8 @@ static const NmhlInfo *getNmhlInfo(int hl) { NmhlInfo("namespacemembers", theTranslator->trAll()), NmhlInfo("namespacemembers_func", - fortranOpt ? theTranslator->trSubprograms() : - vhdlOpt ? VhdlDocGen::trFunctionAndProc() : + fortranOpt ? theTranslator->trSubprograms() : + vhdlOpt ? theTranslator->trFunctionAndProc() : theTranslator->trFunctions()), NmhlInfo("namespacemembers_vars",theTranslator->trVariables()), NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()), @@ -4017,7 +4017,7 @@ static void writeIndex(OutputList &ol) ol.startIndexSection(isClassHierarchyIndex); ol.parseText(/*projPrefix+*/ (fortranOpt ? theTranslator->trCompoundIndexFortran() : - vhdlOpt ? VhdlDocGen::trDesignUnitIndex() : + vhdlOpt ? theTranslator->trDesignUnitIndex() : theTranslator->trHierarchicalIndex() )); ol.endIndexSection(isClassHierarchyIndex); @@ -4027,7 +4027,7 @@ static void writeIndex(OutputList &ol) ol.startIndexSection(isCompoundIndex); ol.parseText(/*projPrefix+*/ (fortranOpt ? theTranslator->trCompoundIndexFortran() : - vhdlOpt ? VhdlDocGen::trDesignUnitIndex() : + vhdlOpt ? theTranslator->trDesignUnitIndex() : theTranslator->trCompoundIndex() )); ol.endIndexSection(isCompoundIndex); diff --git a/src/layout.cpp b/src/layout.cpp index fdc9f4c..1d9a5ed 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -310,7 +310,7 @@ class LayoutParser : public QXmlDefaultHandler new StartElementHandlerSection(this,LayoutDocEntry::ClassNestedClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_2_OPTIONS( theTranslator->trCompounds(), - SrcLangExt_VHDL,VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE), + SrcLangExt_VHDL,theTranslator->trVhdlType(VhdlDocGen::ENTITY,FALSE), SrcLangExt_Fortran,theTranslator->trDataTypes() ))); m_sHandler.insert("class/memberdecl/services", @@ -491,7 +491,7 @@ class LayoutParser : public QXmlDefaultHandler new StartElementHandlerSection(this,LayoutDocEntry::NamespaceClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_2_OPTIONS( theTranslator->trCompounds(), - SrcLangExt_VHDL,VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE), + SrcLangExt_VHDL,theTranslator->trVhdlType(VhdlDocGen::ENTITY,FALSE), SrcLangExt_Fortran,theTranslator->trDataTypes() ))); m_sHandler.insert("namespace/memberdecl/membergroups", @@ -508,7 +508,7 @@ class LayoutParser : public QXmlDefaultHandler COMPILE_FOR_2_OPTIONS( theTranslator->trFunctions(), SrcLangExt_Fortran,theTranslator->trSubprograms(), - SrcLangExt_VHDL,VhdlDocGen::trFunctionAndProc() + SrcLangExt_VHDL,theTranslator->trFunctionAndProc() ))); m_sHandler.insert("namespace/memberdecl/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, @@ -570,7 +570,7 @@ class LayoutParser : public QXmlDefaultHandler new StartElementHandlerSection(this,LayoutDocEntry::FileClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_2_OPTIONS( theTranslator->trCompounds(), - SrcLangExt_VHDL,VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE), + SrcLangExt_VHDL,theTranslator->trVhdlType(VhdlDocGen::ENTITY,FALSE), SrcLangExt_Fortran,theTranslator->trDataTypes() ))); m_sHandler.insert("file/memberdecl/namespaces", @@ -599,7 +599,7 @@ class LayoutParser : public QXmlDefaultHandler COMPILE_FOR_2_OPTIONS( theTranslator->trFunctions(), SrcLangExt_Fortran,theTranslator->trSubprograms(), - SrcLangExt_VHDL,VhdlDocGen::trFunctionAndProc() + SrcLangExt_VHDL,theTranslator->trFunctionAndProc() ))); m_sHandler.insert("file/memberdecl/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, @@ -660,7 +660,7 @@ class LayoutParser : public QXmlDefaultHandler new StartElementHandlerSection(this,LayoutDocEntry::GroupClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_2_OPTIONS( theTranslator->trCompounds(), - SrcLangExt_VHDL,VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE), + SrcLangExt_VHDL,theTranslator->trVhdlType(VhdlDocGen::ENTITY,FALSE), SrcLangExt_Fortran,theTranslator->trDataTypes() ))); m_sHandler.insert("group/memberdecl/namespaces", @@ -701,7 +701,7 @@ class LayoutParser : public QXmlDefaultHandler COMPILE_FOR_2_OPTIONS( theTranslator->trFunctions(), SrcLangExt_Fortran,theTranslator->trSubprograms(), - SrcLangExt_VHDL,VhdlDocGen::trFunctionAndProc() + SrcLangExt_VHDL,theTranslator->trFunctionAndProc() ))); m_sHandler.insert("group/memberdecl/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, @@ -954,35 +954,35 @@ class LayoutParser : public QXmlDefaultHandler }, { "classindex", LayoutNavEntry::ClassIndex, - fortranOpt ? theTranslator->trDataTypes() : vhdlOpt ? VhdlDocGen::trDesignUnits() : theTranslator->trCompoundIndex(), + fortranOpt ? theTranslator->trDataTypes() : vhdlOpt ? theTranslator->trDesignUnits() : theTranslator->trCompoundIndex(), QCString(), QCString(), "classes" }, { "classes", LayoutNavEntry::Classes, - fortranOpt ? theTranslator->trCompoundListFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitList() : theTranslator->trClasses(), + fortranOpt ? theTranslator->trCompoundListFortran() : vhdlOpt ? theTranslator->trDesignUnitList() : theTranslator->trClasses(), theTranslator->trCompoundList(), - fortranOpt ? theTranslator->trCompoundListDescriptionFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitListDescription() : theTranslator->trCompoundListDescription(), + fortranOpt ? theTranslator->trCompoundListDescriptionFortran() : vhdlOpt ? theTranslator->trDesignUnitListDescription() : theTranslator->trCompoundListDescription(), "annotated" }, { "classlist", LayoutNavEntry::ClassList, - fortranOpt ? theTranslator->trCompoundListFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitList() : theTranslator->trCompoundList(), + fortranOpt ? theTranslator->trCompoundListFortran() : vhdlOpt ? theTranslator->trDesignUnitList() : theTranslator->trCompoundList(), QCString(), - fortranOpt ? theTranslator->trCompoundListDescriptionFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitListDescription() : theTranslator->trCompoundListDescription(), + fortranOpt ? theTranslator->trCompoundListDescriptionFortran() : vhdlOpt ? theTranslator->trDesignUnitListDescription() : theTranslator->trCompoundListDescription(), "annotated" }, { "hierarchy", LayoutNavEntry::ClassHierarchy, - vhdlOpt ? VhdlDocGen::trDesignUnitHierarchy() : theTranslator->trClassHierarchy(), + vhdlOpt ? theTranslator->trDesignUnitHierarchy() : theTranslator->trClassHierarchy(), QCString(), theTranslator->trClassHierarchyDescription(), hasGraphicalHierarchy ? "inherits" : "hierarchy" }, { "classmembers", LayoutNavEntry::ClassMembers, - fortranOpt ? theTranslator->trCompoundMembersFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitMembers() : theTranslator->trCompoundMembers(), + fortranOpt ? theTranslator->trCompoundMembersFortran() : vhdlOpt ? theTranslator->trDesignUnitMembers() : theTranslator->trCompoundMembers(), QCString(), fortranOpt ? theTranslator->trCompoundMembersDescriptionFortran(extractAll) : theTranslator->trCompoundMembersDescription(extractAll), "functions" diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 60558d0..36259c6 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1978,7 +1978,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const bool extractPrivate = Config_getBool(EXTRACT_PRIVATE); if (optVhdl) { - sl.append(VhdlDocGen::trVhdlType(getMemberSpecifiers())); + sl.append(theTranslator->trVhdlType(getMemberSpecifiers())); } else { diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 7fcfbb3..70a4c78 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -703,7 +703,7 @@ void RTFGenerator::endIndexSection(IndexSections is) } else if (vhdlOpt) { - t << "{\\tc \\v " << VhdlDocGen::trDesignUnitIndex() << "}"<< endl; + t << "{\\tc \\v " << theTranslator->trDesignUnitIndex() << "}"<< endl; } else { diff --git a/src/translator.h b/src/translator.h index 7092174..377ad45 100644 --- a/src/translator.h +++ b/src/translator.h @@ -19,6 +19,7 @@ #define TRANSLATOR_H #include "classdef.h" +#include "vhdldocgen.h" /** Abstract base class for all translatable text fragments. */ class Translator @@ -570,6 +571,20 @@ class Translator virtual QCString trSingletonReference(const char *sName) = 0; virtual QCString trServiceGeneratedFromFiles(bool single) = 0; virtual QCString trSingletonGeneratedFromFiles(bool single) = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.8.15 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDesignUnitHierarchy() = 0; + virtual QCString trDesignUnitList() = 0; + virtual QCString trDesignUnitMembers() = 0; + virtual QCString trDesignUnitListDescription() = 0; + virtual QCString trDesignUnitIndex() = 0; + virtual QCString trDesignUnits() = 0; + virtual QCString trFunctionAndProc() = 0; + virtual QCString trVhdlType(uint64 type,bool single=true) = 0; + virtual QCString trCustomReference(const char *name) = 0; }; #endif diff --git a/src/translator_adapter.h b/src/translator_adapter.h index 254876a..e66c9bf 100644 --- a/src/translator_adapter.h +++ b/src/translator_adapter.h @@ -41,7 +41,40 @@ class TranslatorAdapterBase : public Translator }; -class TranslatorAdapter_1_8_4 : public TranslatorAdapterBase +class TranslatorAdapter_1_8_15 : public TranslatorAdapterBase +{ + public: + virtual QCString updateNeededMessage() + { return createUpdateNeededMessage(idLanguage(),"release 1.8.15"); } + + virtual QCString trDesignUnitHierarchy() + { return english.trDesignUnitHierarchy(); } + + virtual QCString trDesignUnitList() + { return english.trDesignUnitList(); } + + virtual QCString trDesignUnitMembers() + { return english.trDesignUnitMembers(); } + + virtual QCString trDesignUnitListDescription() + { return english.trDesignUnitListDescription(); } + + virtual QCString trDesignUnitIndex() + { return english.trDesignUnitIndex(); } + + virtual QCString trDesignUnits() + { return english.trDesignUnits(); } + + virtual QCString trFunctionAndProc() + { return english.trFunctionAndProc(); } + + virtual QCString trVhdlType(uint64 type,bool single) + { return english.trVhdlType(type,single); } + virtual QCString trCustomReference(const char *name) + { return english.trCustomReference(name); } +}; + +class TranslatorAdapter_1_8_4 : public TranslatorAdapter_1_8_15 { public: virtual QCString updateNeededMessage() diff --git a/src/translator_br.h b/src/translator_br.h index a294ee0..3d12f08 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -45,7 +45,7 @@ #ifndef TRANSLATOR_BR_H #define TRANSLATOR_BR_H -class TranslatorBrazilian : public Translator +class TranslatorBrazilian : public TranslatorAdapter_1_8_15 { public: diff --git a/src/translator_cn.h b/src/translator_cn.h index d37da94..ec39e11 100644 --- a/src/translator_cn.h +++ b/src/translator_cn.h @@ -24,7 +24,7 @@ */ #define CN_SPC " " -class TranslatorChinese : public Translator +class TranslatorChinese : public TranslatorAdapter_1_8_15 { public: /*! Used for identification of the language. The identification diff --git a/src/translator_cz.h b/src/translator_cz.h index 056d0e4..7c61f58 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -85,7 +85,7 @@ // something else. It is difficult to find the general translation // for all kinds in the Czech language. -class TranslatorCzech : public Translator +class TranslatorCzech : public TranslatorAdapter_1_8_15 { public: // --- Language control methods ------------------- diff --git a/src/translator_de.h b/src/translator_de.h index d63bdcf..83a89c0 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -469,6 +469,10 @@ class TranslatorGerman : public Translator { return "Datenstruktur-Dokumentation"; } + else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) + { + return "Designeinheiten-Dokumentation"; + } else { return "Klassen-Dokumentation"; @@ -2125,6 +2129,123 @@ class TranslatorGerman : public Translator } ////////////////////////////////////////////////////////////////////////// +// new since 1.8.15 +////////////////////////////////////////////////////////////////////////// + + /** VHDL design unit hierarchy */ + virtual QCString trDesignUnitHierarchy() + { return "Entwurfseinheiten-Hierarchie"; } + /** VHDL design unit list */ + virtual QCString trDesignUnitList() + { return "Auflistung der Entwurfseinheiten"; } + /** VHDL design unit members */ + virtual QCString trDesignUnitMembers() + { return "Entwurfseinheiten-Elemente"; } + /** VHDL design unit list description */ + virtual QCString trDesignUnitListDescription() + { + return "Hier folgt die Aufzählung aller Entwurfseinheiten und deren " + "Elemente mit einer Kurzbeschreibung:"; + } + /** VHDL design unit index */ + virtual QCString trDesignUnitIndex() + { return "Entwurfseinheiten-Verzeichnis"; } + /** VHDL design units */ + virtual QCString trDesignUnits() + { return "Entwurfseinheiten"; } + /** VHDL functions/procedures/processes */ + virtual QCString trFunctionAndProc() + { return "Funktionen/Prozeduren/Prozesse"; } + /** VHDL type */ + virtual QCString trVhdlType(uint64 type,bool single) + { + switch(type) + { + case VhdlDocGen::LIBRARY: + if (single) return "Bibliothek"; + else return "Bibliotheken"; + case VhdlDocGen::PACKAGE: + if (single) return "Paket"; + else return "Pakete"; + case VhdlDocGen::SIGNAL: + if (single) return "Signal"; + else return "Signale"; + case VhdlDocGen::COMPONENT: + if (single) return "Komponente"; + else return "Komponenten"; + case VhdlDocGen::CONSTANT: + if (single) return "Konstante"; + else return "Konstanten"; + case VhdlDocGen::ENTITY: + if (single) return "Entwurfseinheit"; + else return "Entwurfseinheiten"; + case VhdlDocGen::TYPE: + if (single) return "Typ"; + else return "Typen"; + case VhdlDocGen::SUBTYPE: + if (single) return "Subtyp"; + else return "Subtypen"; + case VhdlDocGen::FUNCTION: + if (single) return "Funktion"; + else return "Funktionen"; + case VhdlDocGen::RECORD: + if (single) return "Datenstruktur"; + else return "Datenstrukturen"; + case VhdlDocGen::PROCEDURE: + if (single) return "Prozedur"; + else return "Prozeduren"; + case VhdlDocGen::ARCHITECTURE: + if (single) return "Architektur"; + else return "Architekturen"; + case VhdlDocGen::ATTRIBUTE: + if (single) return "Attribut"; + else return "Attribute"; + case VhdlDocGen::PROCESS: + if (single) return "Prozess"; + else return "Prozesse"; + case VhdlDocGen::PORT: + if (single) return "Schnittstelle"; + else return "Schnittstellen"; + case VhdlDocGen::USE: + if (single) return "Use Klausel"; + else return "Use Klauseln"; + case VhdlDocGen::GENERIC: + if (single) return "Parameter"; + else return "Parameter"; + case VhdlDocGen::PACKAGE_BODY: + return "Paketkörper"; + case VhdlDocGen::UNITS: + return "Einheiten"; + case VhdlDocGen::SHAREDVARIABLE: + if (single) return "Geteilte Variable"; + else return "Geteilte Variablen"; + case VhdlDocGen::VFILE: + if (single) return "Datei"; + else return "Dateien"; + case VhdlDocGen::GROUP: + if (single) return "Gruppe"; + else return "Gruppen"; + case VhdlDocGen::INSTANTIATION: + if (single) return "Instanziierung"; + else return "Instanziierungen"; + case VhdlDocGen::ALIAS: + if (single) return "Alias"; + else return "Aliase"; + case VhdlDocGen::CONFIG: + if (single) return "Konfiguration"; + else return "Konfigurationen"; + case VhdlDocGen::MISCELLANEOUS: + return "Verschiedenes"; + case VhdlDocGen::UCF_CONST: + return "Constraints"; + default: + return "Klasse"; + } + } + virtual QCString trCustomReference(const char *name) + { return QCString(name)+"-Referenz"; } + +////////////////////////////////////////////////////////////////////////// }; diff --git a/src/translator_en.h b/src/translator_en.h index 190ba79..a236978 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -1993,6 +1993,123 @@ class TranslatorEnglish : public Translator } ////////////////////////////////////////////////////////////////////////// +// new since 1.8.15 +////////////////////////////////////////////////////////////////////////// + + /** VHDL design unit hierarchy */ + virtual QCString trDesignUnitHierarchy() + { return "Design Unit Hierarchy"; } + /** VHDL design unit list */ + virtual QCString trDesignUnitList() + { return "Design Unit List"; } + /** VHDL design unit members */ + virtual QCString trDesignUnitMembers() + { return "Design Unit Members"; } + /** VHDL design unit list description */ + virtual QCString trDesignUnitListDescription() + { + return "Here is a list of all design unit members with links to " + "the Entities they belong to:"; + } + /** VHDL design unit index */ + virtual QCString trDesignUnitIndex() + { return "Design Unit Index"; } + /** VHDL design units */ + virtual QCString trDesignUnits() + { return "Design Units"; } + /** VHDL functions/procedures/processes */ + virtual QCString trFunctionAndProc() + { return "Functions/Procedures/Processes"; } + /** VHDL type */ + virtual QCString trVhdlType(uint64 type,bool single) + { + switch(type) + { + case VhdlDocGen::LIBRARY: + if (single) return "Library"; + else return "Libraries"; + case VhdlDocGen::PACKAGE: + if (single) return "Package"; + else return "Packages"; + case VhdlDocGen::SIGNAL: + if (single) return "Signal"; + else return "Signals"; + case VhdlDocGen::COMPONENT: + if (single) return "Component"; + else return "Components"; + case VhdlDocGen::CONSTANT: + if (single) return "Constant"; + else return "Constants"; + case VhdlDocGen::ENTITY: + if (single) return "Entity"; + else return "Entities"; + case VhdlDocGen::TYPE: + if (single) return "Type"; + else return "Types"; + case VhdlDocGen::SUBTYPE: + if (single) return "Subtype"; + else return "Subtypes"; + case VhdlDocGen::FUNCTION: + if (single) return "Function"; + else return "Functions"; + case VhdlDocGen::RECORD: + if (single) return "Record"; + else return "Records"; + case VhdlDocGen::PROCEDURE: + if (single) return "Procedure"; + else return "Procedures"; + case VhdlDocGen::ARCHITECTURE: + if (single) return "Architecture"; + else return "Architectures"; + case VhdlDocGen::ATTRIBUTE: + if (single) return "Attribute"; + else return "Attributes"; + case VhdlDocGen::PROCESS: + if (single) return "Process"; + else return "Processes"; + case VhdlDocGen::PORT: + if (single) return "Port"; + else return "Ports"; + case VhdlDocGen::USE: + if (single) return "use clause"; + else return "Use Clauses"; + case VhdlDocGen::GENERIC: + if (single) return "Generic"; + else return "Generics"; + case VhdlDocGen::PACKAGE_BODY: + return "Package Body"; + case VhdlDocGen::UNITS: + return "Units"; + case VhdlDocGen::SHAREDVARIABLE: + if (single) return "Shared Variable"; + else return "Shared Variables"; + case VhdlDocGen::VFILE: + if (single) return "File"; + else return "Files"; + case VhdlDocGen::GROUP: + if (single) return "Group"; + else return "Groups"; + case VhdlDocGen::INSTANTIATION: + if (single) return "Instantiation"; + else return "Instantiations"; + case VhdlDocGen::ALIAS: + if (single) return "Alias"; + else return "Aliases"; + case VhdlDocGen::CONFIG: + if (single) return "Configuration"; + else return "Configurations"; + case VhdlDocGen::MISCELLANEOUS: + return "Miscellaneous"; + case VhdlDocGen::UCF_CONST: + return "Constraints"; + default: + return "Class"; + } + } + virtual QCString trCustomReference(const char *name) + { return QCString(name)+" Reference"; } + +////////////////////////////////////////////////////////////////////////// }; diff --git a/src/translator_es.h b/src/translator_es.h index 8922297..5f89f24 100644 --- a/src/translator_es.h +++ b/src/translator_es.h @@ -34,7 +34,7 @@ * Updated to 1.8.4 by Bartomeu Creus Navarro (17-julio-2013) */ -class TranslatorSpanish : public Translator +class TranslatorSpanish : public TranslatorAdapter_1_8_15 { public: diff --git a/src/translator_fr.h b/src/translator_fr.h index 9775a29..b0fb5b1 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -103,7 +103,7 @@ // Translator class (by the local maintainer) when the localized // translator is made up-to-date again. -class TranslatorFrench : public Translator +class TranslatorFrench : public TranslatorAdapter_1_8_15 { public: diff --git a/src/translator_gr.h b/src/translator_gr.h index 8b7afe1..2b60f3d 100644 --- a/src/translator_gr.h +++ b/src/translator_gr.h @@ -42,7 +42,7 @@ #ifndef TRANSLATOR_GR_H #define TRANSLATOR_GR_H -class TranslatorGreek : public Translator +class TranslatorGreek : public TranslatorAdapter_1_8_15 { public: diff --git a/src/translator_it.h b/src/translator_it.h index 8f08b5a..9638a01 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -89,7 +89,7 @@ #ifndef TRANSLATOR_IT_H #define TRANSLATOR_IT_H -class TranslatorItalian : public Translator +class TranslatorItalian : public TranslatorAdapter_1_8_15 { public: diff --git a/src/translator_jp.h b/src/translator_jp.h index c4f92c2..b35a2b3 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -69,7 +69,7 @@ Doxygen の開発の方でもそれはそれでいーんじゃん?みたいな #ifndef TRANSLATOR_JP_H #define TRANSLATOR_JP_H -class TranslatorJapanese : public Translator +class TranslatorJapanese : public TranslatorAdapter_1_8_15 { public: virtual QCString idLanguage() diff --git a/src/translator_kr.h b/src/translator_kr.h index 7e95e3b..c60d1ac 100644 --- a/src/translator_kr.h +++ b/src/translator_kr.h @@ -48,7 +48,7 @@ Translator class (by the local maintainer) when the localized translator is made up-to-date again. */ -class TranslatorKorean : public Translator +class TranslatorKorean : public TranslatorAdapter_1_8_15 { protected: friend class TranslatorAdapterBase; diff --git a/src/translator_nl.h b/src/translator_nl.h index 241cf97..b6d0d1d 100644 --- a/src/translator_nl.h +++ b/src/translator_nl.h @@ -18,7 +18,7 @@ #ifndef TRANSLATOR_NL_H #define TRANSLATOR_NL_H -class TranslatorDutch : public Translator +class TranslatorDutch : public TranslatorAdapter_1_8_15 { public: QCString idLanguage() diff --git a/src/translator_pt.h b/src/translator_pt.h index c58bf64..4251063 100644 --- a/src/translator_pt.h +++ b/src/translator_pt.h @@ -55,7 +55,7 @@ #define TRANSLATOR_PT_H -class TranslatorPortuguese : public Translator +class TranslatorPortuguese : public TranslatorAdapter_1_8_15 { public: diff --git a/src/translator_ro.h b/src/translator_ro.h index 661578b..6f0c197 100644 --- a/src/translator_ro.h +++ b/src/translator_ro.h @@ -42,7 +42,7 @@ #define TRANSLATOR_RO_H -class TranslatorRomanian : public Translator +class TranslatorRomanian : public TranslatorAdapter_1_8_15 { public: diff --git a/src/translator_ru.h b/src/translator_ru.h index 54c0202..9d92888 100644 --- a/src/translator_ru.h +++ b/src/translator_ru.h @@ -26,7 +26,7 @@ #ifndef TRANSLATOR_RU_H #define TRANSLATOR_RU_H -class TranslatorRussian : public Translator +class TranslatorRussian : public TranslatorAdapter_1_8_15 { public: /*! Used for identification of the language. */ diff --git a/src/translator_sk.h b/src/translator_sk.h index 3a925ec..ec8af4b 100644 --- a/src/translator_sk.h +++ b/src/translator_sk.h @@ -32,7 +32,7 @@ #ifndef TRANSLATOR_SK_H #define TRANSLATOR_SK_H -class TranslatorSlovak : public Translator +class TranslatorSlovak : public TranslatorAdapter_1_8_15 { public: // --- Language control methods ------------------- diff --git a/src/translator_sv.h b/src/translator_sv.h index 88fffd9..5da89df 100644 --- a/src/translator_sv.h +++ b/src/translator_sv.h @@ -120,7 +120,7 @@ Problem! #ifndef TRANSLATOR_SE_H #define TRANSLATOR_SE_H -class TranslatorSwedish : public Translator +class TranslatorSwedish : public TranslatorAdapter_1_8_15 { public: diff --git a/src/translator_tw.h b/src/translator_tw.h index 26a6db6..77627bf 100644 --- a/src/translator_tw.h +++ b/src/translator_tw.h @@ -41,7 +41,7 @@ // Translator class (by the local maintainer) when the localized // translator is made up-to-date again. -class TranslatorChinesetraditional : public Translator +class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15 { public: diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 49ea130..40c0d46 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -61,7 +61,7 @@ #include "vhdlcode.h" #include "plantuml.h" //#define DEBUGFLOW -#define theTranslator_vhdlType VhdlDocGen::trVhdlType +#define theTranslator_vhdlType theTranslator->trVhdlType static QDict g_vhdlKeyDict0(17,FALSE); static QDict g_vhdlKeyDict1(17,FALSE); @@ -968,7 +968,6 @@ QCString VhdlDocGen::getClassTitle(const ClassDef *cd) int ii=cd->protection(); pageTitle+=" "; pageTitle+=theTranslator_vhdlType(ii+2,TRUE); - pageTitle+=" "; return pageTitle; } // getClassTitle @@ -2380,7 +2379,7 @@ bool VhdlDocGen::writeClassType( ClassDef *& cd, OutputList &ol ,QCString & cname) { int id=cd->protection(); - QCString qcs = VhdlDocGen::trVhdlType(id+2); + QCString qcs = theTranslator->trVhdlType(id+2); cname=VhdlDocGen::getClassName(cd); ol.startBold(); ol.writeString(qcs.data()); @@ -2390,128 +2389,6 @@ bool VhdlDocGen::writeClassType( ClassDef *& cd, return FALSE; }// writeClassLink -QCString VhdlDocGen::trVhdlType(uint64 type,bool sing) -{ - switch(type) - { - case VhdlDocGen::LIBRARY: - if (sing) return "Library"; - else return "Libraries"; - case VhdlDocGen::PACKAGE: - if (sing) return "Package"; - else return "Packages"; - case VhdlDocGen::SIGNAL: - if (sing) return "Signal"; - else return "Signals"; - case VhdlDocGen::COMPONENT: - if (sing) return "Component"; - else return "Components"; - case VhdlDocGen::CONSTANT: - if (sing) return "Constant"; - else return "Constants"; - case VhdlDocGen::ENTITY: - if (sing) return "Entity"; - else return "Entities"; - case VhdlDocGen::TYPE: - if (sing) return "Type"; - else return "Types"; - case VhdlDocGen::SUBTYPE: - if (sing) return "Subtype"; - else return "Subtypes"; - case VhdlDocGen::FUNCTION: - if (sing) return "Function"; - else return "Functions"; - case VhdlDocGen::RECORD: - if (sing) return "Record"; - else return "Records"; - case VhdlDocGen::PROCEDURE: - if (sing) return "Procedure"; - else return "Procedures"; - case VhdlDocGen::ARCHITECTURE: - if (sing) return "Architecture"; - else return "Architectures"; - case VhdlDocGen::ATTRIBUTE: - if (sing) return "Attribute"; - else return "Attributes"; - case VhdlDocGen::PROCESS: - if (sing) return "Process"; - else return "Processes"; - case VhdlDocGen::PORT: - if (sing) return "Port"; - else return "Ports"; - case VhdlDocGen::USE: - if (sing) return "use clause"; - else return "Use Clauses"; - case VhdlDocGen::GENERIC: - if (sing) return "Generic"; - else return "Generics"; - case VhdlDocGen::PACKAGE_BODY: - return "Package Body"; - case VhdlDocGen::UNITS: - return "Units"; - case VhdlDocGen::SHAREDVARIABLE: - if (sing) return "Shared Variable"; - return "Shared Variables"; - case VhdlDocGen::VFILE: - if (sing) return "File"; - return "Files"; - case VhdlDocGen::GROUP: - if (sing) return "Group"; - return "Groups"; - case VhdlDocGen::INSTANTIATION: - if (sing) return "Instantiation"; - else return "Instantiations"; - case VhdlDocGen::ALIAS: - if (sing) return "Alias"; - return "Aliases"; - case VhdlDocGen::CONFIG: - if (sing) return "Configuration"; - return "Configurations"; - case VhdlDocGen::MISCELLANEOUS: - return "Miscellaneous"; - case VhdlDocGen::UCF_CONST: - return "Constraints"; - default: - return "Class"; - } -} - -QCString VhdlDocGen::trDesignUnitHierarchy() -{ - return "Design Unit Hierarchy"; -} - -QCString VhdlDocGen::trDesignUnitList() -{ - return "Design Unit List"; -} - -QCString VhdlDocGen::trDesignUnitMembers() -{ - return "Design Unit Members"; -} - -QCString VhdlDocGen::trDesignUnitListDescription() -{ - return "Here is a list of all design unit members with links to " - "the Entities they belong to:"; -} - -QCString VhdlDocGen::trDesignUnitIndex() -{ - return "Design Unit Index"; -} - -QCString VhdlDocGen::trDesignUnits() -{ - return "Design Units"; -} - -QCString VhdlDocGen::trFunctionAndProc() -{ - return "Functions/Procedures/Processes"; -} - /*! writes a link if the string is linkable else a formatted string */ @@ -3957,7 +3834,7 @@ void FlowChart::createSVG() //const MemberDef *m=VhdlDocGen::getFlowMember(); //if (m) - // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",VhdlDocGen::trVhdlType(m->getMemberSpecifiers()),m->name().data(),m->getFileDef()->name().data()); + // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",theTranslator->trVhdlType(m->getMemberSpecifiers()),m->name().data(),m->getFileDef()->name().data()); QCString dir=" -o \""+ov+qcs+"\""; ov+="/flow_design.dot"; diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h index 514dfe3..9dd8417 100644 --- a/src/vhdldocgen.h +++ b/src/vhdldocgen.h @@ -150,32 +150,6 @@ class VhdlDocGen static bool isMisc(const MemberDef *mdef); //----------------------------------------------------- - // translatable items - - static QCString trVhdlType(uint64 type,bool sing=true); - - // trClassHierarchy. - static QCString trDesignUnitHierarchy(); - - // trCompoundList - static QCString trDesignUnitList(); - - // trCompoundMembers. - static QCString trDesignUnitMembers(); - - // trCompoundListDescription - static QCString trDesignUnitListDescription(); - - // trCompounds - static QCString trDesignUnits(); - - // trCompoundIndex - static QCString trDesignUnitIndex(); - - // trFunctions - static QCString trFunctionAndProc(); - - //----------------------------------------------------- static void prepareComment(QCString&); static void formatString(const QCString&,OutputList& ol,const MemberDef*); -- cgit v0.12 From efd2921d1e3a3f9b7f994673d0af6d70b1888b98 Mon Sep 17 00:00:00 2001 From: Andreas Regel Date: Wed, 6 Dec 2017 09:41:22 +0100 Subject: Fix VHDL Latex documentation having two chapters with the same name. --- src/index.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.cpp b/src/index.cpp index 6e446c0..0f12ca4 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -4017,7 +4017,7 @@ static void writeIndex(OutputList &ol) ol.startIndexSection(isClassHierarchyIndex); ol.parseText(/*projPrefix+*/ (fortranOpt ? theTranslator->trCompoundIndexFortran() : - vhdlOpt ? theTranslator->trDesignUnitIndex() : + vhdlOpt ? theTranslator->trHierarchicalIndex() : theTranslator->trHierarchicalIndex() )); ol.endIndexSection(isClassHierarchyIndex); -- cgit v0.12 From fe88231028cc137b9e97ae1024ce8781244f3103 Mon Sep 17 00:00:00 2001 From: Andreas Regel Date: Wed, 3 Jan 2018 07:34:06 +0100 Subject: Change german translation of trClassDocumentation() for VHDL output. --- src/translator_de.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/translator_de.h b/src/translator_de.h index 83a89c0..5103ace 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -471,7 +471,7 @@ class TranslatorGerman : public Translator } else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) { - return "Designeinheiten-Dokumentation"; + return "Entwurfseinheiten-Dokumentation"; } else { -- cgit v0.12 From da7ff05881501450be84bc870fdb1931b7e57af2 Mon Sep 17 00:00:00 2001 From: Andreas Regel Date: Tue, 9 Jan 2018 09:07:52 +0100 Subject: Remove default assignment from Translator::trVhdlType() declaration --- src/classdef.cpp | 2 +- src/memberdef.cpp | 2 +- src/translator.h | 2 +- src/vhdldocgen.cpp | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/classdef.cpp b/src/classdef.cpp index 94d8035..f121e27 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -2474,7 +2474,7 @@ void ClassDef::writeMemberList(OutputList &ol) QStrList sl; if (lang==SrcLangExt_VHDL) { - sl.append(theTranslator->trVhdlType(md->getMemberSpecifiers())); //append vhdl type + sl.append(theTranslator->trVhdlType(md->getMemberSpecifiers(),TRUE)); //append vhdl type } else if (md->isFriend()) sl.append("friend"); else if (md->isRelated()) sl.append("related"); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 36259c6..c9f9121 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1978,7 +1978,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const bool extractPrivate = Config_getBool(EXTRACT_PRIVATE); if (optVhdl) { - sl.append(theTranslator->trVhdlType(getMemberSpecifiers())); + sl.append(theTranslator->trVhdlType(getMemberSpecifiers(),TRUE)); } else { diff --git a/src/translator.h b/src/translator.h index 377ad45..7ee49cf 100644 --- a/src/translator.h +++ b/src/translator.h @@ -583,7 +583,7 @@ class Translator virtual QCString trDesignUnitIndex() = 0; virtual QCString trDesignUnits() = 0; virtual QCString trFunctionAndProc() = 0; - virtual QCString trVhdlType(uint64 type,bool single=true) = 0; + virtual QCString trVhdlType(uint64 type,bool single) = 0; virtual QCString trCustomReference(const char *name) = 0; }; diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 40c0d46..fd5e4d7 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -1753,7 +1753,7 @@ void VhdlDocGen::writeVhdlDeclarations(MemberList* ml, VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::GROUP,FALSE),0,FALSE,VhdlDocGen::GROUP); VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::INSTANTIATION,FALSE),0,FALSE,VhdlDocGen::INSTANTIATION); VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::ALIAS,FALSE),0,FALSE,VhdlDocGen::ALIAS); - VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::MISCELLANEOUS),0,FALSE,VhdlDocGen::MISCELLANEOUS); + VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::MISCELLANEOUS,TRUE),0,FALSE,VhdlDocGen::MISCELLANEOUS); // configurations must be added to global file definitions. VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::CONFIG,FALSE),0,FALSE,VhdlDocGen::CONFIG); @@ -2379,7 +2379,7 @@ bool VhdlDocGen::writeClassType( ClassDef *& cd, OutputList &ol ,QCString & cname) { int id=cd->protection(); - QCString qcs = theTranslator->trVhdlType(id+2); + QCString qcs = theTranslator->trVhdlType(id+2,TRUE); cname=VhdlDocGen::getClassName(cd); ol.startBold(); ol.writeString(qcs.data()); @@ -3834,7 +3834,7 @@ void FlowChart::createSVG() //const MemberDef *m=VhdlDocGen::getFlowMember(); //if (m) - // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",theTranslator->trVhdlType(m->getMemberSpecifiers()),m->name().data(),m->getFileDef()->name().data()); + // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",theTranslator->trVhdlType(m->getMemberSpecifiers(),TRUE),m->name().data(),m->getFileDef()->name().data()); QCString dir=" -o \""+ov+qcs+"\""; ov+="/flow_design.dot"; -- cgit v0.12 From 9f7406d151e4f5d021558e97f5d87a0d9cacecf9 Mon Sep 17 00:00:00 2001 From: Andreas Regel Date: Tue, 9 Jan 2018 12:20:32 +0100 Subject: Return VHDL specific text in trClassHierarchyDescription() --- src/translator_de.h | 13 +++++++++++-- src/translator_en.h | 12 ++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/translator_de.h b/src/translator_de.h index 5103ace..8e6ec2c 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -316,8 +316,17 @@ class TranslatorGerman : public Translator /*! This is an introduction to the class hierarchy. */ virtual QCString trClassHierarchyDescription() - { return "Die Liste der Ableitungen ist -mit Einschränkungen- " - "alphabetisch sortiert:"; + { + if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) + { + return "Hier folgt eine hierarchische Auflistung der " + "Entwurfseinheiten:"; + } + else + { + return "Die Liste der Ableitungen ist -mit Einschränkungen- " + "alphabetisch sortiert:"; + } } /*! This is an introduction to the list with all files. */ diff --git a/src/translator_en.h b/src/translator_en.h index a236978..d12621e 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -224,8 +224,16 @@ class TranslatorEnglish : public Translator /*! This is an introduction to the class hierarchy. */ virtual QCString trClassHierarchyDescription() - { return "This inheritance list is sorted roughly, " - "but not completely, alphabetically:"; + { + if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) + { + return "Here is a hierarchical list of all entities:"; + } + else + { + return "This inheritance list is sorted roughly, " + "but not completely, alphabetically:"; + } } /*! This is an introduction to the list with all files. */ -- cgit v0.12 From f5ffd481a44fa5eae225ce728d1777070c4143e1 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 17 Feb 2018 18:32:47 +0100 Subject: Implementation Fortran ENUM / ENUMERATION All ENUMs are anonymous as they don't have a name defined in the Fortran standard. --- src/fortrancode.l | 90 +++++++++++++++++++++++++++--------------- src/fortranscanner.l | 109 ++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 153 insertions(+), 46 deletions(-) diff --git a/src/fortrancode.l b/src/fortrancode.l index 501b492..28caef2 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -684,7 +684,7 @@ NUM_TYPE (complex|integer|logical|real) LOG_OPER (\.and\.|\.eq\.|\.eqv\.|\.ge\.|\.gt\.|\.le\.|\.lt\.|\.ne\.|\.neqv\.|\.or\.|\.not\.) KIND {ARGS} CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS})) -TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|{CHAR}|TYPE|CLASS|PROCEDURE) +TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|{CHAR}|TYPE|CLASS|PROCEDURE|ENUMERATOR) INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")" ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|RECURSIVE|PURE|IMPURE|ELEMENTAL|VALUE|NOPASS|DEFERRED|CONTIGUOUS|VOLATILE) @@ -695,6 +695,7 @@ FLOW (DO|SELECT|CASE|SELECT{BS}(CASE|TYPE)|WHERE|IF|THEN|ELSE|WHILE|FORALL| COMMANDS (FORMAT|CONTAINS|MODULE{BS_}PROCEDURE|WRITE|READ|ALLOCATE|ALLOCATED|ASSOCIATED|PRESENT|DEALLOCATE|NULLIFY|SIZE|INQUIRE|OPEN|CLOSE|FLUSH|DATA|COMMON) IGNORE (CALL) PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|IMPURE|PURE|ELEMENTAL)? +LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")" /* | */ @@ -775,12 +776,12 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I BEGIN(Use); } "ONLY" { // TODO: rename - startFontClass("keywordtype"); - codifyLines(yytext); - endFontClass(); + startFontClass("keywordtype"); + codifyLines(yytext); + endFontClass(); yy_push_state(YY_START); - BEGIN(UseOnly); - } + BEGIN(UseOnly); + } {ID} { QCString tmp = yytext; tmp = tmp.lower(); @@ -835,15 +836,29 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I BEGIN(ClassName); if (!qstricmp(yytext,"module")) currentModule="module"; } +("enum")/{BS_}|{BS}{COMMA}{BS}{LANGUAGE_BIND_SPEC}|\n { // + startScope(); + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + yy_push_state(YY_START); + BEGIN(ClassName); + currentClass="class"; + } +<*>{LANGUAGE_BIND_SPEC} { // + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + } ("type")/{BS_}|({COMMA}({ACCESS_SPEC}|ABSTRACT|EXTENDS))|\n { // - startScope(); - startFontClass("keyword"); - codifyLines(yytext); - endFontClass(); + startScope(); + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); yy_push_state(YY_START); - BEGIN(ClassName); - currentClass="class"; - } + BEGIN(ClassName); + currentClass="class"; + } {ID} { if (currentModule == "module") { @@ -853,22 +868,26 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I generateLink(*g_code,yytext); yy_pop_state(); } -({ACCESS_SPEC}|ABSTRACT|EXTENDS)/[,:( ] { //| variable deklaration +({ACCESS_SPEC}|ABSTRACT|EXTENDS)/[,:( ] { //| variable declaration startFontClass("keyword"); g_code->codify(yytext); endFontClass(); } \n { // interface may be without name yy_pop_state(); - YY_FTN_REJECT; - } + YY_FTN_REJECT; + } +^{BS}"end"({BS_}"enum").* { // just reset currentClass, rest is done in following rule + currentClass=0; + YY_FTN_REJECT; + } ^{BS}"end"({BS_}"type").* { // just reset currentClass, rest is done in following rule currentClass=0; - YY_FTN_REJECT; + YY_FTN_REJECT; } ^{BS}"end"({BS_}"module").* { // just reset currentModule, rest is done in following rule currentModule=0; - YY_FTN_REJECT; + YY_FTN_REJECT; } /*-------- subprog definition -------------------------------------*/ ({PREFIX}{BS_})?{TYPE_SPEC}{BS_}({PREFIX}{BS_})?{BS}/{SUBPROG}{BS_} { // TYPE_SPEC is for old function style function result @@ -901,7 +920,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I yy_pop_state(); YY_FTN_RESET } -^{BS}"end"{BS}("block"{BS}"data"|{SUBPROG}|"module"|"program"|"type"|"interface")?{BS} { // Fortran subroutine or function ends +^{BS}"end"{BS}("block"{BS}"data"|{SUBPROG}|"module"|"program"|"enum"|"type"|"interface")?{BS} { // Fortran subroutine or function ends //cout << "===> end function " << yytext << endl; endScope(); startFontClass("keyword"); @@ -914,7 +933,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I generateLink(*g_code,yytext); yy_pop_state(); } -^{BS}"end"{BS}("block"{BS}"data"|{SUBPROG}|"module"|"program"|"type"|"interface"){BS}/(\n|!) { // Fortran subroutine or function ends +^{BS}"end"{BS}("block"{BS}"data"|{SUBPROG}|"module"|"program"|"enum"|"type"|"interface"){BS}/(\n|!) { // Fortran subroutine or function ends //cout << "===> end function " << yytext << endl; endScope(); startFontClass("keyword"); @@ -934,7 +953,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I g_code->codify(yytext); endFontClass(); } -({TYPE_SPEC}|{ATTR_SPEC})/[,:( ] { //| variable deklaration +({TYPE_SPEC}|{ATTR_SPEC})/[,:( ] { //| variable declaration startFontClass("keywordtype"); g_code->codify(yytext); endFontClass(); @@ -947,7 +966,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I endFontClass(); } else if (g_currentMemberDef && ((g_currentMemberDef->isFunction() && (g_currentMemberDef->typeString() != QCString("subroutine"))) || - g_currentMemberDef->isVariable())) + g_currentMemberDef->isVariable() || g_currentMemberDef->isEnumValue())) { generateLink(*g_code, yytext); } @@ -956,15 +975,15 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I g_code->codify(yytext); addLocalVar(yytext); } - } -{BS}("=>"|"="){BS} { // Procedure binding - BEGIN(DeclarationBinding); - g_code->codify(yytext); - } -{ID} { // Type bound procedure link + } +{BS}("=>"|"="){BS} { // Procedure binding + BEGIN(DeclarationBinding); + g_code->codify(yytext); + } +{ID} { // Type bound procedure link generateLink(*g_code, yytext); yy_pop_state(); - } + } [(] { // start of array specification bracketCount++; g_code->codify(yytext); @@ -1029,11 +1048,20 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I // fixed form continuation line YY_FTN_REJECT; } + else if (QCString(yytext).stripWhiteSpace().lower() == "type") + { + yy_push_state(YY_START); + BEGIN(Declaration); + startFontClass("keywordtype"); + g_code->codify(QCString(yytext).stripWhiteSpace()); + endFontClass(); + g_code->codify(yytext + 4); + } else { - g_insideBody=TRUE; + g_insideBody=TRUE; generateLink(*g_code, yytext); - g_insideBody=FALSE; + g_insideBody=FALSE; } } diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 85b6de9..d4a94c7 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -164,6 +164,7 @@ static Entry* global_root = 0 ; static Entry* file_root = 0 ; static Entry* current = 0 ; static Entry* last_entry = 0 ; +static Entry* last_enum = 0 ; static ScanVar v_type = V_IGNORE; // type of parsed variable static QList moduleProcedures; // list of all interfaces which contain unresolved // module procedures @@ -198,6 +199,7 @@ static SymbolModifiers currentModifiers; //! Holds program scope->symbol name->symbol modifiers. static QMap > modifiers; +static int anonCount = 0 ; //----------------------------------------------------------------------------- static int yyread(char *buf,int max_size); @@ -226,6 +228,7 @@ static QCString extractFromParens(const QCString name); static CommentInPrepass* locatePrepassComment(int from, int to); static void updateVariablePrepassComment(int from, int to); static void newLine(); +static void initEntry(); //----------------------------------------------------------------------------- #undef YY_INPUT @@ -260,7 +263,7 @@ NUM_TYPE (complex|integer|logical|real) LOG_OPER (\.and\.|\.eq\.|\.eqv\.|\.ge\.|\.gt\.|\.le\.|\.lt\.|\.ne\.|\.neqv\.|\.or\.|\.not\.) KIND {ARGS} CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS})) -TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|{CHAR}|TYPE{ARGS}|CLASS{ARGS}|PROCEDURE{ARGS}?) +TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|ENUMERATOR|{CHAR}|TYPE{ARGS}|CLASS{ARGS}|PROCEDURE{ARGS}?) INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")" ATTR_SPEC (EXTERNAL|ALLOCATABLE|DIMENSION{ARGS}|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE|CONTIGUOUS|VOLATILE|VALUE) @@ -297,6 +300,7 @@ SCOPENAME ({ID}{BS}"::"{BS})* %x Variable %x Initialization %x ArrayInitializer +%x Enum %x Typedef %x TypedefBody %x TypedefBodyContains @@ -711,8 +715,17 @@ private { {ID} { } } -{ +{ ^{BS}{TYPE_SPEC}/{SEPARATE} { + last_enum = 0; + if (YY_START == Enum) + { + argType = "@"; // enum marker + } + else + { + argType = QCString(yytext).simplifyWhiteSpace().lower(); + } current->bodyLine = yyLineNr + 1; current->endBodyLine = yyLineNr + lineCountPrepass; /* variable declaration starts */ @@ -721,7 +734,6 @@ private { addModule(NULL); yy_push_state(ModuleBody); //anon program } - argType = QCString(yytext).simplifyWhiteSpace().lower(); yy_push_state(AttributeList); } /* Dimitri: macro expansion should already be done during preprocessing not here! @@ -817,17 +829,30 @@ private { modifiers[current_root][name.lower()] |= currentModifiers; argName= name; - v_type= V_IGNORE; - if (!argType.isEmpty() && current_root->section!=Entry::FUNCTION_SEC) - { // new variable entry - v_type = V_VARIABLE; + v_type= V_IGNORE; + if (!argType.isEmpty() && current_root->section!=Entry::FUNCTION_SEC) + { // new variable entry + v_type = V_VARIABLE; current->section = Entry::VARIABLE_SEC; - current->name = argName; - current->type = argType; - current->fileName = yyFileName; - current->bodyLine = yyLineNr; // used for source reference + current->name = argName; + current->type = argType; + current->fileName = yyFileName; + current->bodyLine = yyLineNr; // used for source reference current->startLine = yyLineNr; - addCurrentEntry(1); + if (argType == "@") + { + current_root->addSubEntry(current); + current = new Entry(*current); + // add to the scope surrounding the enum (copy!) + current_root->parent()->addSubEntry(current); + last_enum = current; + current = new Entry ; + initEntry(); + } + else + { + addCurrentEntry(1); + } } else if (!argType.isEmpty()) { // declaration of parameter list: add type for corr. parameter @@ -963,19 +988,72 @@ private { { updateVariablePrepassComment(yyColNr-(int)yyleng, yyColNr); yy_pop_state(); // end initialization - if (v_type == V_VARIABLE) last_entry->initializer= initializer; + if (last_enum) + { + last_enum->initializer= initializer; + } + else + { + if (v_type == V_VARIABLE) last_entry->initializer= initializer; + } } else initializer+=", "; } "\n"|"!" { //| yy_pop_state(); // end initialization - if (v_type == V_VARIABLE) last_entry->initializer= initializer; + if (last_enum) + { + last_enum->initializer= initializer; + } + else + { + if (v_type == V_VARIABLE) last_entry->initializer= initializer; + } yyColNr -= 1; unput(*yytext); } . { initializer+=yytext; } +<*>{BS}"enum"{BS}","{BS}"bind"{BS}"("{BS}"c"{BS}")"{BS} { + if(YY_START == Start) + { + addModule(NULL); + yy_push_state(ModuleBody); //anon program + } + + yy_push_state(Enum); + current->protection = defaultProtection; + typeProtection = defaultProtection; + typeMode = true; + + current->spec |= Entry::Struct; + current->name.resize(0); + current->args.resize(0); + current->name.sprintf("@%d",anonCount++); + + current->section = Entry::ENUM_SEC; + current->fileName = yyFileName; + current->startLine = yyLineNr; + current->bodyLine = yyLineNr; + if ((current_root) && + (current_root->section == Entry::CLASS_SEC + || current_root->section == Entry::NAMESPACE_SEC)) + { + current->name = current_root->name + "::" + current->name; + } + + addCurrentEntry(1); + startScope(last_entry); + BEGIN( Enum ) ; + } +"end"{BS}"enum" { + last_entry->parent()->endBodyLine = yyLineNr; + if (!endScope(current_root)) + yyterminate(); + typeMode = false; + yy_pop_state(); + } /*------ fortran subroutine/function handling ------------------------------------------------------------*/ /* Start is initial condition */ @@ -1117,6 +1195,7 @@ private { { Entry *tmp_entry = current; current = last_entry; // temporarily switch to the previous entry + if (last_enum) current = last_enum; handleCommentBlock(docBlock,TRUE); current=tmp_entry; } @@ -1132,7 +1211,7 @@ private { docBlock.resize(0); } -"!>" { +"!>" { yy_push_state(YY_START); current->docLine = yyLineNr; docBlockJavaStyle = FALSE; -- cgit v0.12 From 36afe5e25c10dfd5a6208df7c8892eb2bb7498c5 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 29 Mar 2018 14:37:52 +0200 Subject: Better HTML output for VHDL Ports Small alignment improvement of HTML output for VHDL Ports so that the mode will be in a separate column --- src/htmlgen.cpp | 31 ++++++++++++++++++++----------- src/htmlgen.h | 5 +++-- src/latexgen.cpp | 4 ++-- src/latexgen.h | 5 +++-- src/mangen.cpp | 8 ++++---- src/mangen.h | 5 +++-- src/outputgen.h | 5 +++-- src/outputlist.h | 10 ++++++---- src/rtfgen.cpp | 2 +- src/rtfgen.h | 5 +++-- src/vhdldocgen.cpp | 14 ++++++++------ 11 files changed, 56 insertions(+), 38 deletions(-) diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index cc3e61d..90b3dd0 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1428,13 +1428,7 @@ void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char * t << " inherit " << inheritId; } t << "\">"; - switch(annoType) - { - case 0: t << ""; break; - case 1: t << ""; break; - case 2: t << ""; break; - default: t << ""; break; - } + insertMemberAlignLeft(annoType, true); } void HtmlGenerator::endMemberItem() @@ -1466,7 +1460,19 @@ void HtmlGenerator::insertMemberAlign(bool templ) t << " "; } -void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId) +void HtmlGenerator::insertMemberAlignLeft(int annoType, bool initTag) +{ + if (!initTag) t << " "; + switch(annoType) + { + case 0: t << ""; break; + case 1: t << ""; break; + case 2: t << ""; break; + default: t << ""; break; + } +} + +void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId, bool typ) { DBG_HTML(t << "" << endl) if (m_emptySection) @@ -1479,7 +1485,10 @@ void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheri { t << " inherit " << inheritId; } - t << "\"> "; + t << "\">"; + t << " "; + if (typ) t << " "; + t << "";; } void HtmlGenerator::endMemberDescription() @@ -1505,7 +1514,7 @@ void HtmlGenerator::endMemberSections() } } -void HtmlGenerator::startMemberHeader(const char *anchor) +void HtmlGenerator::startMemberHeader(const char *anchor, int typ) { DBG_HTML(t << "" << endl) if (!m_emptySection) @@ -1518,7 +1527,7 @@ void HtmlGenerator::startMemberHeader(const char *anchor) t << "" << endl; m_emptySection=FALSE; } - t << "

"; + t << "

"; if (anchor) { t << "" << endl; diff --git a/src/htmlgen.h b/src/htmlgen.h index 82f0c17..2d8d6e0 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -175,7 +175,7 @@ class HtmlGenerator : public OutputGenerator void endMemberSections(); void startHeaderSection(); void endHeaderSection(); - void startMemberHeader(const char *); + void startMemberHeader(const char *, int); void endMemberHeader(); void startMemberSubtitle(); void endMemberSubtitle(); @@ -200,7 +200,8 @@ class HtmlGenerator : public OutputGenerator void endMemberGroup(bool); void insertMemberAlign(bool); - void startMemberDescription(const char *anchor,const char *inheritId); + void insertMemberAlignLeft(int,bool); + void startMemberDescription(const char *anchor,const char *inheritId, bool typ); void endMemberDescription(); void startMemberDeclaration() {} void endMemberDeclaration(const char *anchor,const char *inheritId); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 1511dcb..0387ae2 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -1505,7 +1505,7 @@ void LatexGenerator::endGroupHeader(int) t << "}" << endl; } -void LatexGenerator::startMemberHeader(const char *) +void LatexGenerator::startMemberHeader(const char *,int) { if (Config_getBool(COMPACT_LATEX)) { @@ -1793,7 +1793,7 @@ void LatexGenerator::endMemberItem() t << endl; } -void LatexGenerator::startMemberDescription(const char *,const char *) +void LatexGenerator::startMemberDescription(const char *,const char *,bool) { if (!insideTabbing) { diff --git a/src/latexgen.h b/src/latexgen.h index 430d250..469e411 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -169,7 +169,7 @@ class LatexGenerator : public OutputGenerator void endMemberSections() {} void startHeaderSection() {} void endHeaderSection() {} - void startMemberHeader(const char *); + void startMemberHeader(const char *,int); void endMemberHeader(); void startMemberSubtitle() {} void endMemberSubtitle() {} @@ -194,6 +194,7 @@ class LatexGenerator : public OutputGenerator void endMemberGroup(bool); void insertMemberAlign(bool) {} + void insertMemberAlignLeft(int,bool){} void writeRuler() { t << endl << endl; } void writeAnchor(const char *fileName,const char *name); @@ -225,7 +226,7 @@ class LatexGenerator : public OutputGenerator void endCenter() { t << "\\end{center}" << endl; } void startSmall() { t << "\\footnotesize "; } void endSmall() { t << "\\normalsize "; } - void startMemberDescription(const char *,const char *); + void startMemberDescription(const char *,const char *,bool); void endMemberDescription(); void startMemberDeclaration() {} void endMemberDeclaration(const char *,const char *) {} diff --git a/src/mangen.cpp b/src/mangen.cpp index 17e6003..d23b2fe 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -283,7 +283,7 @@ void ManGenerator::endGroupHeader(int) upperCase=FALSE; } -void ManGenerator::startMemberHeader(const char *) +void ManGenerator::startMemberHeader(const char *,int) { if (!firstCol) t << endl; t << ".SS \""; @@ -619,9 +619,9 @@ void ManGenerator::startSection(const char *,const char *,SectionInfo::SectionTy { case SectionInfo::Page: startGroupHeader(FALSE); break; case SectionInfo::Section: startGroupHeader(FALSE); break; - case SectionInfo::Subsection: startMemberHeader(0); break; - case SectionInfo::Subsubsection: startMemberHeader(0); break; - case SectionInfo::Paragraph: startMemberHeader(0); break; + case SectionInfo::Subsection: startMemberHeader(0, -1); break; + case SectionInfo::Subsubsection: startMemberHeader(0, -1); break; + case SectionInfo::Paragraph: startMemberHeader(0, -1); break; default: ASSERT(0); break; } } diff --git a/src/mangen.h b/src/mangen.h index b3b9f76..0413ffd 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -99,9 +99,10 @@ class ManGenerator : public OutputGenerator void endMemberSections() {} void startHeaderSection() {} void endHeaderSection(); - void startMemberHeader(const char *); + void startMemberHeader(const char *,int); void endMemberHeader(); void insertMemberAlign(bool) {} + void insertMemberAlignLeft(int,bool){} void startMemberSubtitle() {} void endMemberSubtitle() {} //void writeListItem(); @@ -160,7 +161,7 @@ class ManGenerator : public OutputGenerator void endCenter() {} void startSmall() {} void endSmall() {} - void startMemberDescription(const char *,const char *) { t << "\n.RI \""; firstCol=FALSE; } + void startMemberDescription(const char *,const char *,bool) { t << "\n.RI \""; firstCol=FALSE; } void endMemberDescription() { t << "\""; firstCol=FALSE; } void startMemberDeclaration() {} void endMemberDeclaration(const char *,const char *) {} diff --git a/src/outputgen.h b/src/outputgen.h index 68356b4..44d34b8 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -380,7 +380,7 @@ class OutputGenerator : public BaseOutputDocInterface virtual void endMemberSections() = 0; virtual void startHeaderSection() = 0; virtual void endHeaderSection() = 0; - virtual void startMemberHeader(const char *anchor) = 0; + virtual void startMemberHeader(const char *anchor, int typ) = 0; virtual void endMemberHeader() = 0; virtual void startMemberSubtitle() = 0; virtual void endMemberSubtitle() = 0; @@ -403,6 +403,7 @@ class OutputGenerator : public BaseOutputDocInterface virtual void startMemberGroup() = 0; virtual void endMemberGroup(bool) = 0; virtual void insertMemberAlign(bool) = 0; + virtual void insertMemberAlignLeft(int,bool) = 0; virtual void startMemberDoc(const char *,const char *, const char *,const char *,int,int,bool) = 0; virtual void endMemberDoc(bool) = 0; @@ -414,7 +415,7 @@ class OutputGenerator : public BaseOutputDocInterface virtual void writeStartAnnoItem(const char *type,const char *file, const char *path,const char *name) = 0; virtual void writeEndAnnoItem(const char *name) = 0; - virtual void startMemberDescription(const char *anchor,const char *inheritId) = 0; + virtual void startMemberDescription(const char *anchor,const char *inheritId, bool typ) = 0; virtual void endMemberDescription() = 0; virtual void startMemberDeclaration() = 0; virtual void endMemberDeclaration(const char *anchor,const char *inheritId) = 0; diff --git a/src/outputlist.h b/src/outputlist.h index 0738ed1..2e89101 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -191,8 +191,8 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startHeaderSection); } void endHeaderSection() { forall(&OutputGenerator::endHeaderSection); } - void startMemberHeader(const char *anchor) - { forall(&OutputGenerator::startMemberHeader,anchor); } + void startMemberHeader(const char *anchor, int typ = 2) + { forall(&OutputGenerator::startMemberHeader,anchor,typ); } void endMemberHeader() { forall(&OutputGenerator::endMemberHeader); } void startMemberSubtitle() @@ -237,6 +237,8 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::endMemberGroup,last); } void insertMemberAlign(bool templ=FALSE) { forall(&OutputGenerator::insertMemberAlign,templ); } + void insertMemberAlignLeft(int typ=0, bool templ=FALSE) + { forall(&OutputGenerator::insertMemberAlignLeft,typ,templ); } void writeRuler() { forall(&OutputGenerator::writeRuler); } void writeAnchor(const char *fileName,const char *name) @@ -306,8 +308,8 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startBold); } void endBold() { forall(&OutputGenerator::endBold); } - void startMemberDescription(const char *anchor,const char *inheritId=0) - { forall(&OutputGenerator::startMemberDescription,anchor,inheritId); } + void startMemberDescription(const char *anchor,const char *inheritId=0, bool typ = false) + { forall(&OutputGenerator::startMemberDescription,anchor,inheritId, typ); } void endMemberDescription() { forall(&OutputGenerator::endMemberDescription); } void startMemberDeclaration() diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 7fcfbb3..9a6f549 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -1626,7 +1626,7 @@ void RTFGenerator::endDescItem() newParagraph(); } -void RTFGenerator::startMemberDescription(const char *,const char *) +void RTFGenerator::startMemberDescription(const char *,const char *,bool) { DBG_RTF(t << "{\\comment (startMemberDescription)}" << endl) t << "{" << endl; diff --git a/src/rtfgen.h b/src/rtfgen.h index d8f6ca7..1eb7db0 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -103,7 +103,7 @@ class RTFGenerator : public OutputGenerator void endMemberSections() {} void startHeaderSection() {} void endHeaderSection() {} - void startMemberHeader(const char *) { startGroupHeader(FALSE); } + void startMemberHeader(const char *,int) { startGroupHeader(FALSE); } void endMemberHeader() { endGroupHeader(FALSE); } void startMemberSubtitle(); void endMemberSubtitle(); @@ -120,6 +120,7 @@ class RTFGenerator : public OutputGenerator void startMemberTemplateParams() {} void endMemberTemplateParams(const char *,const char *) {} void insertMemberAlign(bool) {} + void insertMemberAlignLeft(int,bool){} void writeRuler() { rtfwriteRuler_thin(); } @@ -156,7 +157,7 @@ class RTFGenerator : public OutputGenerator void startSmall() { t << "{\\sub "; } void endSmall() { t << "}"; } - void startMemberDescription(const char *,const char *); + void startMemberDescription(const char *,const char *,bool); void endMemberDescription(); void startMemberDeclaration() {} void endMemberDeclaration(const char *,const char *) {} diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index dcf7f42..6625d16 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -2096,19 +2096,21 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, writeLink(mdef,ol); ol.docify(" "); - ol.insertMemberAlign(); if (mm==VhdlDocGen::GENERIC) { + ol.insertMemberAlign(); ol.startBold(); VhdlDocGen::formatString(largs,ol,mdef); ol.endBold(); } else { + ol.insertMemberAlignLeft(isAnonymous, false); ol.docify(" "); ol.startBold(); VhdlDocGen::formatString(ltype,ol,mdef); ol.endBold(); + ol.insertMemberAlign(); ol.docify(" "); VhdlDocGen::formatString(largs,ol,mdef); } @@ -2263,11 +2265,11 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, ol.endMemberItem(); if (!mdef->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC) /* && !annMemb */) { - QCString s=mdef->briefDescription(); - ol.startMemberDescription(mdef->anchor()); + QCString s=mdef->briefDescription(); + ol.startMemberDescription(mdef->anchor(), NULL, mm == VhdlDocGen::PORT); ol.generateDoc(mdef->briefFile(),mdef->briefLine(), - mdef->getOuterScope()?mdef->getOuterScope():d, - mdef,s.data(),TRUE,FALSE,0,TRUE,FALSE); + mdef->getOuterScope()?mdef->getOuterScope():d, + mdef,s.data(),TRUE,FALSE,0,TRUE,FALSE); if (detailsVisible) { ol.pushGeneratorState(); @@ -2364,7 +2366,7 @@ void VhdlDocGen::writeVHDLDeclarations(MemberList* ml,OutputList &ol, if (title) { - ol.startMemberHeader(title); + ol.startMemberHeader(title,type == VhdlDocGen::PORT ? 3 : 2); ol.parseText(title); ol.endMemberHeader(); ol.docify(" "); -- cgit v0.12 From cb331331f7b09aa44376596e83d29b3191a55b43 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 31 Mar 2018 19:48:20 +0200 Subject: Added some VHDL code coloring - add coloring of "of" - improvement for architecture - adding coloring for names after an end statement removed obsolete g_CurrScope --- src/vhdlcode.l | 68 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 17 deletions(-) diff --git a/src/vhdlcode.l b/src/vhdlcode.l index ce1f92b..618258f 100644 --- a/src/vhdlcode.l +++ b/src/vhdlcode.l @@ -94,7 +94,7 @@ static QCString g_exampleFile; static QCString g_classScope; -static QCString g_CurrScope; +static bool g_CurrARCH = FALSE; static FileDef * g_sourceFileDef; static Definition * g_currentDefinition; @@ -109,7 +109,7 @@ static int g_braceCount=0; static void writeFont(const char *s,const char* text); static void generateMemLink(CodeOutputInterface &ol,QCString &clName,QCString& memberName); static bool writeColoredWord(QCString& word ); -static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool typeOnly=FALSE); +static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool typeOnly=FALSE, const char *curr_class=0); static void endFontClass(); static void startFontClass(const char *s); //------------------------------------------------------------------- @@ -291,7 +291,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F } else { - generateClassOrGlobalLink(*g_code,temp); + generateClassOrGlobalLink(*g_code,temp,FALSE,curr_class); } } else @@ -328,7 +328,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F } else { - generateClassOrGlobalLink(*g_code,temp); + generateClassOrGlobalLink(*g_code,temp,FALSE,curr_class); } } else @@ -383,7 +383,7 @@ static void codifyLines(const char *text,const char *cl=0,bool classlink=FALSE,b if (comment) writeFont("keyword",sp); else - writeWord(sp,cl,classlink); + writeWord(sp,cl,classlink); done=TRUE; } } @@ -510,7 +510,7 @@ static void generateMemLink(CodeOutputInterface &ol,QCString &clName,QCString& m }// generateMemLink -static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool /*typeOnly*/) +static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool /*typeOnly*/, const char *curr_class) { QCString className=clName; @@ -521,6 +521,11 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName //bool isLocal=FALSE; className.stripPrefix("_"); cd = getClass(className.data()); + if (!cd && curr_class) + { + if (QCString(curr_class).contains(QRegExp("::"+QCString(clName)+"$"))) cd = getClass(curr_class); + } + while (cd) { //className.stripPrefix("_"); @@ -759,7 +764,7 @@ DIGITSS [0-9]+|[0-9]+("#")*[0-9_a-fA-F\+\.\-]+("#")* ALLTYPESMAP {B}*[_a-zA-Z0-9. ]+{BN}* ALLTYPESMAP1 {BN}*[_a-zA-Z0-9.() ]+{BN}* -ARCHITECTURE ^{B}*("architecture"){BN}+{FUNCNAME}{BN}+("of"){BN}+{FUNCNAME} +ARCHITECTURE ^{B}*("architecture"){BN}+{FUNCNAME}{BN}+("of"){BN}+{FUNCNAME}{BN}+("is") PROCESS ({BN}*{FUNCNAME}{BN}*[:]+{BN}*("process"){BN}*[(]*)|[^a-zA-Z]("process "|"process("){BN}*[ (]*|[^a-zA-Z]("process"){BN}+ END1 {B}*("end "){BN}+("if"|"case"|"loop"|"generate"|"for") @@ -768,7 +773,7 @@ END3 {BN}*[^a-zA-Z]("end"){BN}+{FUNCNAME}{BN}*[;] END4 {B}*("end"){BN}+"function"{BN}+{FUNCNAME}{BN}*[;] ENDEFUNC {END3}|{END4}|{END2} -KEYWORD ("new"|"event"|"break"|"case"|"end"|"loop"|"else"|"for"|"goto"|"if"|"return"|"generate"|"is"|"while"|"in") +KEYWORD ("of"|"new"|"event"|"break"|"case"|"end"|"loop"|"else"|"for"|"goto"|"if"|"return"|"generate"|"is"|"while"|"in") TYPEKW ^{B}*("type"|"subtype"|"constant"|"attribute"|"signal"|"variable","alias","configuration") FUNC ^{B}*("function"|"procedure"){BN}*{FUNCNAME}{BN}*("(") @@ -807,6 +812,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI %x ClassVar %x ClassesName %x Map +%x End %x Body %% @@ -1058,14 +1064,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI g_CurrClass.append(vhdlcodeYYtext); g_CurrClass=g_CurrClass.stripWhiteSpace(); - if (!writeColoredWord(g_CurrScope)) - { - generateClassOrGlobalLink(*g_code,vhdlcodeYYtext); - } - else - { - codifyLines(vhdlcodeYYtext,g_CurrClass.data()); - } + generateClassOrGlobalLink(*g_code,vhdlcodeYYtext); BEGIN(Bases); } @@ -1284,6 +1283,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI //temp+=("-"); //temp+=VhdlDocGen::getIndexWord(vhdlcodeYYtext,3); QCString temp = VhdlDocGen::getIndexWord(vhdlcodeYYtext,3); + g_CurrARCH = TRUE; temp+="::"; temp+=VhdlDocGen::getIndexWord(vhdlcodeYYtext,1); g_CurrClass=temp; @@ -1291,7 +1291,6 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI codifyLines(vhdlcodeYYtext,temp.data(),TRUE); //generateClassOrGlobalLink(*g_code,temp.data()); isPackageBody=FALSE; - BEGIN(ClassName); } @@ -1371,6 +1370,41 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI } +"end"{BN}+"architecture"{BN}+{FUNCNAME} { + codifyLines(vhdlcodeYYtext,g_CurrClass.data(),TRUE); + g_CurrARCH = FALSE; + } +"end"{BN}+{FUNCNAME} { + if (g_CurrARCH) + { + codifyLines(vhdlcodeYYtext,g_CurrClass.data(),TRUE); + g_CurrARCH = FALSE; + } + else + REJECT; + } +"end" { + appStringLower(g_PrevString,vhdlcodeYYtext); + QCString temp(vhdlcodeYYtext); + temp=temp.stripWhiteSpace(); + + writeColoredWord(temp); + BEGIN(End); + } +{ID} { + appStringLower(g_PrevString,vhdlcodeYYtext); + QCString temp(vhdlcodeYYtext); + temp=temp.stripWhiteSpace(); + + if (!writeColoredWord(temp)) + { + generateClassOrGlobalLink(*g_code,temp.data()); + } + } +";" { + codifyLines(vhdlcodeYYtext); + BEGIN(Bases); + } {KEYWORD} { // found keyword QCString qcs(vhdlcodeYYtext); if (!writeColoredWord(qcs)) -- cgit v0.12 From 66a728cdcf50baeef45f78a1180c5ce86fe734af Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 9 Apr 2018 14:30:49 +0200 Subject: Improvement LaTeX output For a number of languages the output in LaTeX has been improved so the regular documentation can be generated (automatically) in LaTeX / PDF as well. --- src/config.xml | 9 +++--- src/dirdef.cpp | 2 +- src/docbookvisitor.cpp | 2 +- src/docparser.cpp | 2 +- src/filedef.cpp | 2 +- src/formula.cpp | 4 +-- src/groupdef.cpp | 2 +- src/htmldocvisitor.cpp | 2 +- src/latexdocvisitor.cpp | 2 +- src/latexgen.cpp | 84 +++++++++++++++++++++++++++++++------------------ src/layout.cpp | 2 +- src/mandocvisitor.cpp | 1 + src/memberdef.cpp | 2 +- src/membergroup.cpp | 1 + src/memberlist.cpp | 2 +- src/namespacedef.cpp | 2 +- src/rtfdocvisitor.cpp | 2 +- src/translator.h | 30 ++++++++++++++++++ src/translator_am.h | 4 +-- src/translator_cn.h | 12 +++++++ src/translator_dk.h | 3 +- src/translator_gr.h | 4 +-- src/translator_je.h | 14 ++++++++- src/translator_jp.h | 12 +++++++ src/translator_ke.h | 12 ++++++- src/translator_kr.h | 12 ++++++- src/translator_lv.h | 2 +- src/translator_no.h | 3 +- src/translator_pl.h | 10 ++++-- src/translator_pt.h | 5 ++- src/translator_sc.h | 5 +++ src/translator_si.h | 2 +- src/translator_tw.h | 12 +++++++ src/translator_vi.h | 16 +++++++++- src/util.cpp | 2 +- src/xmldocvisitor.cpp | 2 +- 36 files changed, 217 insertions(+), 68 deletions(-) diff --git a/src/config.xml b/src/config.xml index 38dfefb..8d897a5 100644 --- a/src/config.xml +++ b/src/config.xml @@ -2533,13 +2533,14 @@ EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... ]]> - diff --git a/src/dirdef.cpp b/src/dirdef.cpp index b247ba7..eb6f5d1 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -5,12 +5,12 @@ #include "doxygen.h" #include "util.h" #include "outputlist.h" +#include "config.h" #include "language.h" #include "message.h" #include "dot.h" #include "layout.h" #include "ftextstream.h" -#include "config.h" #include "docparser.h" //---------------------------------------------------------------------- diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index ab10da0..768acda 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -20,6 +20,7 @@ #include "docbookvisitor.h" #include "docparser.h" +#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" @@ -29,7 +30,6 @@ #include "util.h" #include "parserintf.h" #include "filename.h" -#include "config.h" #include "filedef.h" #include "msc.h" #include "dia.h" diff --git a/src/docparser.cpp b/src/docparser.cpp index 3d57c2e..893c3ff 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -38,6 +38,7 @@ #include "message.h" #include "section.h" #include "searchindex.h" +#include "config.h" #include "language.h" #include "portable.h" #include "cite.h" @@ -50,7 +51,6 @@ #include "namespacedef.h" #include "reflist.h" #include "formula.h" -#include "config.h" #include "growbuf.h" #include "markdown.h" #include "htmlentity.h" diff --git a/src/filedef.cpp b/src/filedef.cpp index 2cfe37a..b919f74 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -23,6 +23,7 @@ #include "classdef.h" #include "namespacedef.h" #include "util.h" +#include "config.h" #include "language.h" #include "outputlist.h" #include "dot.h" @@ -40,7 +41,6 @@ #include "filename.h" #include "membergroup.h" #include "dirdef.h" -#include "config.h" #include "clangparser.h" #include "settings.h" diff --git a/src/formula.cpp b/src/formula.cpp index 6fe617d..9e48b2d 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -25,6 +25,7 @@ #include "util.h" #include "message.h" #include "config.h" +#include "language.h" #include "portable.h" #include "index.h" #include "doxygen.h" @@ -96,8 +97,7 @@ void FormulaList::generateBitmaps(const char *path) { //printf("Running latex...\n"); //system("latex _formulas.tex /dev/null"); - QCString latexCmd = Config_getString(LATEX_CMD_NAME); - if (latexCmd.isEmpty()) latexCmd="latex"; + QCString latexCmd = theTranslator->latexCommandName(); portable_sysTimerStart(); if (portable_system(latexCmd,"_formulas.tex")!=0) { diff --git a/src/groupdef.cpp b/src/groupdef.cpp index ccfa0df..3a060b9 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -23,6 +23,7 @@ #include "classlist.h" #include "outputlist.h" #include "namespacedef.h" +#include "config.h" #include "language.h" #include "util.h" #include "memberlist.h" @@ -39,7 +40,6 @@ #include "entry.h" #include "membername.h" #include "dirdef.h" -#include "config.h" //--------------------------------------------------------------------------- diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 8b6d26c..539aea8 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -19,12 +19,12 @@ #include #include "htmldocvisitor.h" #include "docparser.h" +#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" #include "dot.h" #include "message.h" -#include "config.h" #include "htmlgen.h" #include "parserintf.h" #include "msc.h" diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 5a67c15..aa6981e 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -19,6 +19,7 @@ #include #include "latexdocvisitor.h" #include "docparser.h" +#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" @@ -30,7 +31,6 @@ #include "dia.h" #include "cite.h" #include "filedef.h" -#include "config.h" #include "htmlentity.h" #include "plantuml.h" diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 1511dcb..c192a97 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -271,13 +271,15 @@ static void writeLatexMakefile() exit(1); } // inserted by KONNO Akihisa 2002-03-05 - QCString latex_command = Config_getString(LATEX_CMD_NAME); + QCString latex_command = theTranslator->latexCommandName(); QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME); // end insertion by KONNO Akihisa 2002-03-05 FTextStream t(&file); if (!Config_getBool(USE_PDFLATEX)) // use plain old latex { - t << "all: refman.dvi" << endl + t << "LATEX_CMD=" << latex_command << endl + << endl + << "all: refman.dvi" << endl << endl << "ps: refman.ps" << endl << endl @@ -294,7 +296,7 @@ static void writeLatexMakefile() t << "\tps2pdf refman.ps refman.pdf" << endl << endl; t << "refman.dvi: clean refman.tex doxygen.sty" << endl << "\techo \"Running latex...\"" << endl - << "\t" << latex_command << " refman.tex" << endl + << "\t$(LATEX_CMD) refman.tex" << endl << "\techo \"Running makeindex...\"" << endl << "\t" << mkidx_command << " refman.idx" << endl; if (generateBib) @@ -302,19 +304,19 @@ static void writeLatexMakefile() t << "\techo \"Running bibtex...\"" << endl; t << "\tbibtex refman" << endl; t << "\techo \"Rerunning latex....\"" << endl; - t << "\t" << latex_command << " refman.tex" << endl; + t << "\t$(LATEX_CMD) refman.tex" << endl; } t << "\techo \"Rerunning latex....\"" << endl - << "\t" << latex_command << " refman.tex" << endl + << "\t$(LATEX_CMD) refman.tex" << endl << "\tlatex_count=8 ; \\" << endl << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl << "\t do \\" << endl << "\t echo \"Rerunning latex....\" ;\\" << endl - << "\t " << latex_command << " refman.tex ;\\" << endl + << "\t $(LATEX_CMD) refman.tex ; \\" << endl << "\t latex_count=`expr $$latex_count - 1` ;\\" << endl << "\t done" << endl << "\t" << mkidx_command << " refman.idx" << endl - << "\t" << latex_command << " refman.tex" << endl << endl + << "\t$(LATEX_CMD) refman.tex" << endl << endl << "refman_2on1.ps: refman.ps" << endl << "\tpsnup -2 refman.ps >refman_2on1.ps" << endl << endl @@ -323,26 +325,28 @@ static void writeLatexMakefile() } else // use pdflatex for higher quality output { + t << "LATEX_CMD=" << latex_command << endl + << endl; t << "all: refman.pdf" << endl << endl << "pdf: refman.pdf" << endl << endl; t << "refman.pdf: clean refman.tex" << endl; - t << "\tpdflatex refman" << endl; + t << "\t$(LATEX_CMD) refman" << endl; t << "\t" << mkidx_command << " refman.idx" << endl; if (generateBib) { t << "\tbibtex refman" << endl; - t << "\tpdflatex refman" << endl; + t << "\t$(LATEX_CMD) refman" << endl; } - t << "\tpdflatex refman" << endl + t << "\t$(LATEX_CMD) refman" << endl << "\tlatex_count=8 ; \\" << endl << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl << "\t do \\" << endl << "\t echo \"Rerunning latex....\" ;\\" << endl - << "\t pdflatex refman ;\\" << endl + << "\t $(LATEX_CMD) refman ;\\" << endl << "\t latex_count=`expr $$latex_count - 1` ;\\" << endl << "\t done" << endl << "\t" << mkidx_command << " refman.idx" << endl - << "\tpdflatex refman" << endl << endl; + << "\t$(LATEX_CMD) refman" << endl << endl; } t << endl @@ -356,7 +360,7 @@ static void writeMakeBat() #if defined(_MSC_VER) QCString dir=Config_getString(LATEX_OUTPUT); QCString fileName=dir+"/make.bat"; - QCString latex_command = Config_getString(LATEX_CMD_NAME); + QCString latex_command = theTranslator->latexCommandName(); QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME); QFile file(fileName); bool generateBib = !Doxygen::citeDict->isEmpty(); @@ -371,14 +375,15 @@ static void writeMakeBat() t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n\n"; if (!Config_getBool(USE_PDFLATEX)) // use plain old latex { - t << latex_command << " refman.tex\n"; + t << "set LATEX_CMD=" << latex_command << "\n"; + t << "%LATEX_CMD% refman.tex\n"; t << "echo ----\n"; t << mkidx_command << " refman.idx\n"; if (generateBib) { t << "bibtex refman\n"; t << "echo ----\n"; - t << latex_command << " refman.tex\n"; + t << "\t%LATEX_CMD% refman.tex\n"; } t << "setlocal enabledelayedexpansion\n"; t << "set count=8\n"; @@ -390,28 +395,29 @@ static void writeMakeBat() t << "set /a count-=1\n"; t << "if !count! EQU 0 goto :skip\n\n"; t << "echo ----\n"; - t << latex_command << " refman.tex\n"; + t << "%LATEX_CMD% refman.tex\n"; t << "goto :repeat\n"; t << ":skip\n"; t << "endlocal\n"; t << mkidx_command << " refman.idx\n"; - t << latex_command << " refman.tex\n"; + t << "%LATEX_CMD% refman.tex\n"; t << "dvips -o refman.ps refman.dvi\n"; t << "gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite " "-sOutputFile=refman.pdf -c save pop -f refman.ps\n"; } else // use pdflatex { - t << "pdflatex refman\n"; + t << "set LATEX_CMD=" << latex_command << "\n"; + t << "%LATEX_CMD% refman\n"; t << "echo ----\n"; t << mkidx_command << " refman.idx\n"; if (generateBib) { t << "bibtex refman" << endl; - t << "pdflatex refman" << endl; + t << "%LATEX_CMD% refman" << endl; } t << "echo ----\n"; - t << "pdflatex refman\n\n"; + t << "%LATEX_CMD% refman\n\n"; t << "setlocal enabledelayedexpansion\n"; t << "set count=8\n"; t << ":repeat\n"; @@ -422,12 +428,12 @@ static void writeMakeBat() t << "set /a count-=1\n"; t << "if !count! EQU 0 goto :skip\n\n"; t << "echo ----\n"; - t << "pdflatex refman\n"; + t << "%LATEX_CMD% refman\n"; t << "goto :repeat\n"; t << ":skip\n"; t << "endlocal\n"; t << mkidx_command << " refman.idx\n"; - t << "pdflatex refman\n"; + t << "%LATEX_CMD% refman\n"; t << "cd /D %Dir_Old%\n"; t << "set Dir_Old=\n"; } @@ -504,6 +510,7 @@ static void writeDefaultHeaderPart1(FTextStream &t) "\\usepackage{textcomp}\n" "\\usepackage[nointegrals]{wasysym}\n" "\\usepackage[table]{xcolor}\n" + "\\usepackage{ifpdf,ifxetex}\n" "\n"; // Language support @@ -516,9 +523,13 @@ static void writeDefaultHeaderPart1(FTextStream &t) } // Define default fonts - t << "% Font selection\n" - "\\usepackage[T1]{fontenc}\n" - "\\usepackage[scaled=.90]{helvet}\n" + t << "% Font selection\n"; + QCString fontenc = theTranslator->latexFontenc(); + if (!fontenc.isEmpty()) + { + t << "\\usepackage[" << fontenc << "]{fontenc}\n"; + } + t << "\\usepackage[scaled=.90]{helvet}\n" "\\usepackage{courier}\n" "\\usepackage{amssymb}\n" "\\usepackage{sectsty}\n" @@ -626,11 +637,14 @@ static void writeDefaultHeaderPart1(FTextStream &t) if (pdfHyperlinks) { t << "% Hyperlinks (required, but should be loaded last)\n" - "\\usepackage{ifpdf}\n" "\\ifpdf\n" " \\usepackage[pdftex,pagebackref=true]{hyperref}\n" "\\else\n" - " \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n" + " \\ifxetex\n" + " \\usepackage[pagebackref=true]{hyperref}\n" + " \\else\n" + " \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n" + " \\fi\n" "\\fi\n" "\\hypersetup{%\n" " colorlinks=true,%\n" @@ -656,8 +670,11 @@ static void writeDefaultHeaderPart1(FTextStream &t) t << "%===== C O N T E N T S =====\n" "\n" "\\begin{document}\n"; - if (theTranslator->idLanguage()=="greek") - t << "\\selectlanguage{greek}\n"; + QCString documentPre = theTranslator->latexDocumentPre(); + if (!documentPre.isEmpty()) + { + t << documentPre; + } t << "\n"; // Front matter @@ -750,8 +767,13 @@ static void writeDefaultFooter(FTextStream &t) "\\clearemptydoublepage\n" "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trRTFGeneralIndex() << "}\n" "\\printindex\n" - "\n" - "\\end{document}\n"; + "\n"; + QCString documentPost = theTranslator->latexDocumentPost(); + if (!documentPost.isEmpty()) + { + t << documentPost; + } + t << "\\end{document}\n"; } void LatexGenerator::writeHeaderFile(QFile &f) diff --git a/src/layout.cpp b/src/layout.cpp index fdc9f4c..cce68cd 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -18,12 +18,12 @@ #include "layout.h" #include "message.h" +#include "config.h" #include "language.h" #include "vhdldocgen.h" #include "util.h" #include "doxygen.h" #include "version.h" -#include "config.h" #include #include diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 2233cc6..2ed557c 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -20,6 +20,7 @@ #include "mandocvisitor.h" #include "docparser.h" +#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 01f4d8d..922b75d 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -25,6 +25,7 @@ #include "code.h" #include "message.h" #include "htmlhelp.h" +#include "config.h" #include "language.h" #include "outputlist.h" #include "example.h" @@ -43,7 +44,6 @@ #include "memberlist.h" #include "namespacedef.h" #include "filedef.h" -#include "config.h" //----------------------------------------------------------------------------- diff --git a/src/membergroup.cpp b/src/membergroup.cpp index aaa504f..c5144e2 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -22,6 +22,7 @@ #include "classdef.h" #include "namespacedef.h" #include "filedef.h" +#include "config.h" #include "language.h" #include "groupdef.h" #include "doxygen.h" diff --git a/src/memberlist.cpp b/src/memberlist.cpp index e19cead..5e3dfcf 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -21,6 +21,7 @@ #include "classdef.h" #include "message.h" #include "util.h" +#include "config.h" #include "language.h" #include "doxygen.h" #include "outputlist.h" @@ -30,7 +31,6 @@ #include "namespacedef.h" #include "filedef.h" #include "membergroup.h" -#include "config.h" #include "docparser.h" MemberList::MemberList() : m_listType(MemberListType_pubMethods) diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index d3eb0df..e78b4e9 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -18,6 +18,7 @@ #include "namespacedef.h" #include "outputlist.h" #include "util.h" +#include "config.h" #include "language.h" #include "classdef.h" #include "classlist.h" @@ -29,7 +30,6 @@ #include "vhdldocgen.h" #include "layout.h" #include "membergroup.h" -#include "config.h" //------------------------------------------------------------------ diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index c85b638..d015757 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -20,6 +20,7 @@ #include "rtfdocvisitor.h" #include "docparser.h" +#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" @@ -32,7 +33,6 @@ #include "msc.h" #include "dia.h" #include "filedef.h" -#include "config.h" #include "htmlentity.h" #include "plantuml.h" diff --git a/src/translator.h b/src/translator.h index 7092174..0f94ed0 100644 --- a/src/translator.h +++ b/src/translator.h @@ -41,6 +41,36 @@ class Translator virtual QCString idLanguage() = 0; virtual QCString latexLanguageSupportCommand() = 0; + /*! + * Sets the LaTeX font encoding to be used. The default is set to `T1`, + * in case another font encoding has to be used this can be specified with + * this routine. In case no font encoding is required the empty string + * can be returned. + */ + virtual QCString latexFontenc() { return "T1"; }; + /*! + * Sets the commands to be insered directly after the `\\begin{document}` + * in the LaTeX document. + */ + virtual QCString latexDocumentPre() { return ""; }; + /*! + * Sets the commands to be insered directly before the `\\end{document}` + * in the LaTeX document. + */ + virtual QCString latexDocumentPost() { return ""; }; + /*! + * Set the name to be used as latex command. + */ + virtual QCString latexCommandName() + { + QCString latex_command = Config_getString(LATEX_CMD_NAME); + if (latex_command.isEmpty()) latex_command = "latex"; + if (Config_getBool(USE_PDFLATEX)) + { + if (latex_command == "latex") latex_command = "pdflatex"; + } + return latex_command; + } // --- Language translation methods ------------------- diff --git a/src/translator_am.h b/src/translator_am.h index 6f5e671..5b4c446 100644 --- a/src/translator_am.h +++ b/src/translator_am.h @@ -32,8 +32,8 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0 /* Used to get the command(s) for the language support. */ virtual QCString latexLanguageSupportCommand() { - return "
\\usepackage[latin]{armtex}\n"
-			   "\\usepackage[armscii8]{inputenc}\n
"; + return "\\usepackage[latin]{armtex}\n" + "\\usepackage[armscii8]{inputenc}\n"; } // --- Language translation methods ------------------- diff --git a/src/translator_cn.h b/src/translator_cn.h index fc0cf3c..e53f31d 100644 --- a/src/translator_cn.h +++ b/src/translator_cn.h @@ -53,8 +53,20 @@ class TranslatorChinese : public Translator */ virtual QCString latexLanguageSupportCommand() { + return "\\usepackage{CJKutf8}\n"; + } + virtual QCString latexFontenc() + { return ""; } + virtual QCString latexDocumentPre() + { + return "\\begin{CJK}{UTF8}{min}\n"; + } + virtual QCString latexDocumentPost() + { + return "\\end{CJK}\n"; + } /*! used in the compound documentation before a list of related functions. */ diff --git a/src/translator_dk.h b/src/translator_dk.h index e98cfa8..70e9032 100644 --- a/src/translator_dk.h +++ b/src/translator_dk.h @@ -116,8 +116,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0 virtual QCString latexLanguageSupportCommand() { return - "\\usepackage[danish]{babel}\n" - "\\usepackage[T1]{fontenc}\n"; + "\\usepackage[danish]{babel}\n"; } // --- Language translation methods ------------------- diff --git a/src/translator_gr.h b/src/translator_gr.h index 8b7afe1..0ae3e2f 100644 --- a/src/translator_gr.h +++ b/src/translator_gr.h @@ -59,8 +59,8 @@ class TranslatorGreek : public Translator virtual QCString latexLanguageSupportCommand() { - //return "\\usepackage[greek,english]{babel}\n\\usepackage[iso-8859-7]{inputenc}\n"; - return "\\usepackage[greek,english]{babel}\n"; + return "\\usepackage[greek,english]{babel}\n" + "\\usepackage{alphabeta}\n"; } // --- Language translation methods ------------------- diff --git a/src/translator_je.h b/src/translator_je.h index 835a516..d555421 100644 --- a/src/translator_je.h +++ b/src/translator_je.h @@ -36,7 +36,19 @@ class TranslatorJapaneseEn : public TranslatorEnglish { return "japanese-en"; } virtual QCString latexLanguageSupportCommand() { - return "platex"; + return "\\usepackage{CJKutf8}\n"; + } + virtual QCString latexFontenc() + { + return ""; + } + virtual QCString latexDocumentPre() + { + return "\\begin{CJK}{UTF8}{min}\n"; + } + virtual QCString latexDocumentPost() + { + return "\\end{CJK}\n"; } virtual QCString trRTFansicp() { diff --git a/src/translator_jp.h b/src/translator_jp.h index c4f92c2..43c5dc2 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -77,8 +77,20 @@ class TranslatorJapanese : public Translator virtual QCString latexLanguageSupportCommand() { + return "\\usepackage{CJKutf8}\n"; + } + virtual QCString latexFontenc() + { return ""; } + virtual QCString latexDocumentPre() + { + return "\\begin{CJK}{UTF8}{min}\n"; + } + virtual QCString latexDocumentPost() + { + return "\\end{CJK}\n"; + } /*! used in the compound documentation before a list of related functions. */ virtual QCString trRelatedFunctions() diff --git a/src/translator_ke.h b/src/translator_ke.h index 525cf84..c9f488c 100644 --- a/src/translator_ke.h +++ b/src/translator_ke.h @@ -35,12 +35,22 @@ class TranslatorKoreanEn : public TranslatorEnglish { return "korean-en"; } virtual QCString latexLanguageSupportCommand() { - return "\\usepackage{hfont}\n"; + return "\\usepackage{kotex}\n"; } virtual QCString trRTFansicp() { return "949"; } + virtual QCString latexCommandName() + { + QCString latex_command = Config_getString(LATEX_CMD_NAME); + if (latex_command.isEmpty()) latex_command = "latex"; + if (Config_getBool(USE_PDFLATEX)) + { + if (latex_command == "latex") latex_command = "xelatex"; + } + return latex_command; + } /*! Used as ansicpg for RTF fcharset * \see trRTFansicp() for a table of possible values. diff --git a/src/translator_kr.h b/src/translator_kr.h index 7e95e3b..80ccc78 100644 --- a/src/translator_kr.h +++ b/src/translator_kr.h @@ -86,7 +86,17 @@ class TranslatorKorean : public Translator // I'm not sure what this should be. // When I figure it out, I'll update this. // see http://www.ktug.or.kr/jsboard/read.php?table=operate&no=4422&page=1 - return "\\usepackage{hfont}\n"; + return "\\usepackage{kotex}\n"; + } + virtual QCString latexCommandName() + { + QCString latex_command = Config_getString(LATEX_CMD_NAME); + if (latex_command.isEmpty()) latex_command = "latex"; + if (Config_getBool(USE_PDFLATEX)) + { + if (latex_command == "latex") latex_command = "xelatex"; + } + return latex_command; } // --- Language translation methods ------------------- diff --git a/src/translator_lv.h b/src/translator_lv.h index 2736bb0..bd579da 100644 --- a/src/translator_lv.h +++ b/src/translator_lv.h @@ -76,7 +76,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4 */ virtual QCString latexLanguageSupportCommand() { - return "\\usepackage[LV]{fontenc}\n" + return "\\usepackage[T2A]{fontenc}\n" "\\usepackage[latvian]{babel}\n"; } diff --git a/src/translator_no.h b/src/translator_no.h index 58b596a..eccd952 100644 --- a/src/translator_no.h +++ b/src/translator_no.h @@ -72,8 +72,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6 virtual QCString latexLanguageSupportCommand() { return - "\\usepackage[norwegian]{babel}\n" - "\\usepackage[T1]{fontenc}\n"; + "\\usepackage[norsk]{babel}\n"; } // --- Language translation methods ------------------- diff --git a/src/translator_pl.h b/src/translator_pl.h index 421f407..e0ecc8f 100644 --- a/src/translator_pl.h +++ b/src/translator_pl.h @@ -44,8 +44,14 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2 */ QCString latexLanguageSupportCommand() { - return "\\usepackage{polski}\n" - "\\usepackage[T1]{fontenc}\n"; + return "\\usepackage[polish]{babel}\n" + "\\let\\lll\\undefined\n"; /* to overcome problems with the <<< + symbol as defined in the amssymb + package, and the Polish symbol + "Latin Small Letter L With Stroke" + ł or ł or ł + We take the amssymb symbol as leading. + */ } // --- Language translation methods ------------------- diff --git a/src/translator_pt.h b/src/translator_pt.h index c58bf64..25c5762 100644 --- a/src/translator_pt.h +++ b/src/translator_pt.h @@ -85,7 +85,10 @@ class TranslatorPortuguese : public Translator * the empty string is returned in this implementation. */ virtual QCString latexLanguageSupportCommand() - { return "Portuguese"; } + { + return + "\\usepackage[portuges]{babel}\n"; + } // --- Language translation methods ------------------- diff --git a/src/translator_sc.h b/src/translator_sc.h index d2b3954..e8191df 100644 --- a/src/translator_sc.h +++ b/src/translator_sc.h @@ -71,6 +71,11 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0 */ virtual QCString latexLanguageSupportCommand() { + return "\\usepackage[T2A]{fontenc}\n" + "\\usepackage[russian]{babel}\n"; + } + virtual QCString latexFontenc() + { return ""; } diff --git a/src/translator_si.h b/src/translator_si.h index 792053e..2dd7e5b 100644 --- a/src/translator_si.h +++ b/src/translator_si.h @@ -36,7 +36,7 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6 */ QCString latexLanguageSupportCommand() { - return "\\usepackage[slovene]{babel}\n\\usepackage[T1]{fontenc}\n"; + return "\\usepackage[slovene]{babel}\n"; } QCString trRelatedFunctions() { return "Povezane funkcije"; } diff --git a/src/translator_tw.h b/src/translator_tw.h index 26a6db6..46237ca 100644 --- a/src/translator_tw.h +++ b/src/translator_tw.h @@ -72,8 +72,20 @@ class TranslatorChinesetraditional : public Translator */ virtual QCString latexLanguageSupportCommand() { + return "\\usepackage{CJKutf8}\n"; + } + virtual QCString latexFontenc() + { return ""; } + virtual QCString latexDocumentPre() + { + return "\\begin{CJK}{UTF8}{min}\n"; + } + virtual QCString latexDocumentPost() + { + return "\\end{CJK}\n"; + } // --- Language translation methods ------------------- diff --git a/src/translator_vi.h b/src/translator_vi.h index a0046b0..b391b0c 100644 --- a/src/translator_vi.h +++ b/src/translator_vi.h @@ -78,9 +78,23 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0 */ virtual QCString latexLanguageSupportCommand() { + return + "\\usepackage[vietnamese]{babel}\n"; + } + virtual QCString latexFontenc() + { return ""; } - + virtual QCString latexCommandName() + { + QCString latex_command = Config_getString(LATEX_CMD_NAME); + if (latex_command.isEmpty()) latex_command = "latex"; + if (Config_getBool(USE_PDFLATEX)) + { + if (latex_command == "latex") latex_command = "xelatex"; + } + return latex_command; + } // --- Language translation methods ------------------- /*! used in the compound documentation before a list of related functions. */ diff --git a/src/util.cpp b/src/util.cpp index 9100706..25b805a 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -35,8 +35,8 @@ #include "doxygen.h" #include "outputlist.h" #include "defargs.h" -#include "language.h" #include "config.h" +#include "language.h" #include "htmlhelp.h" #include "example.h" #include "version.h" diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 93765b1..a4bc40b 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -20,6 +20,7 @@ #include "xmldocvisitor.h" #include "docparser.h" +#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" @@ -29,7 +30,6 @@ #include "util.h" #include "parserintf.h" #include "filename.h" -#include "config.h" #include "htmlentity.h" static void visitCaption(XmlDocVisitor *parent, QList children) -- cgit v0.12 From 496ebe413b20d406ef4a3b6b2a5966461c30af6c Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 9 Apr 2018 15:27:31 +0200 Subject: Improvement LaTeX output (Regression) 1) Build error: Unexpected token 'semic' on the line 50 in '/home/travis/build/doxygen/doxygen/build/src/translator.h'. status = 2 in collectPureVirtualPrototypes() Due to a discrepancy what translator.py expects and is in the actual code. In the actual code a (not required) ; was present after the closing } of the routine. 2) Unknown command \cpdflatex --- src/config.xml | 2 +- src/translator.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config.xml b/src/config.xml index 8d897a5..d4c8c4a 100644 --- a/src/config.xml +++ b/src/config.xml @@ -2538,7 +2538,7 @@ EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... Note that when not enabling \ref cfg_use_pdflatex "USE_PDFLATEX" the default is \c latex when - enabling \ref cfg_use_pdflatex "USE_PDFLATEX" the default is \cpdflatex and when in the later case + enabling \ref cfg_use_pdflatex "USE_PDFLATEX" the default is \c pdflatex and when in the later case \c latex is chosen this is overwritten by \c pdflatex. For specific output languages the default can have been set differently, this depends on the implementation of the output language. ]]> diff --git a/src/translator.h b/src/translator.h index 0f94ed0..2c15c81 100644 --- a/src/translator.h +++ b/src/translator.h @@ -47,17 +47,17 @@ class Translator * this routine. In case no font encoding is required the empty string * can be returned. */ - virtual QCString latexFontenc() { return "T1"; }; + virtual QCString latexFontenc() { return "T1"; } /*! * Sets the commands to be insered directly after the `\\begin{document}` * in the LaTeX document. */ - virtual QCString latexDocumentPre() { return ""; }; + virtual QCString latexDocumentPre() { return ""; } /*! * Sets the commands to be insered directly before the `\\end{document}` * in the LaTeX document. */ - virtual QCString latexDocumentPost() { return ""; }; + virtual QCString latexDocumentPost() { return ""; } /*! * Set the name to be used as latex command. */ -- cgit v0.12 From df9a47bd2080ce6385f2a21c6d868755ba7b1f67 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 11 Apr 2018 13:51:33 +0200 Subject: Generating doxygen documentation on Windows (with MikTex) The current version of MikTex gives the error message: Appendix Z. (../html/examples/include/latex/refman_doc.tex ("C:\Program Files\MiKTeX 2.9\te x\latex\alertmessage\example.tex" ! LaTeX Error: Can be used only in preamble. This is due to a \page command with the name 'example', renaming the page solves this issue. --- examples/include.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/include.cpp b/examples/include.cpp index ba8c054..d9ea5ea 100644 --- a/examples/include.cpp +++ b/examples/include.cpp @@ -8,7 +8,7 @@ class Include_Test void example(); }; -/*! \page example +/*! \page pag_example * \dontinclude include_test.cpp * Our main function starts like this: * \skip main -- cgit v0.12 From f7663cf300375b4ec8d8fe052f3da48782743919 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 7 May 2018 15:59:33 +0200 Subject: Problem with \cond in normal comment of test 015 In the \cond is also recognized in non-doxygen comment. - As a work around the \ has been removed - in case of e.g. pdf the enabled function is not shown as it does not have a doxygen comment - test file output update due to change in input code. - pre.l and commentcnv.l. better error message i.e. showing better the used condition --- src/commentcnv.l | 2 +- src/pre.l | 2 +- testing/015/015__cond_8c.xml | 4 +++- testing/015_cond.c | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/commentcnv.l b/src/commentcnv.l index 89d2fea..10dab28 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -1068,7 +1068,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName) { CondCtx *ctx = g_condStack.pop(); QCString sectionInfo = " "; - if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label %s ",ctx->sectionId.data()); + if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",ctx->sectionId.stripWhiteSpace().data()); warn(g_fileName,ctx->lineNr,"Conditional section%sdoes not have " "a corresponding \\endcond command within this file.",sectionInfo.data()); } diff --git a/src/pre.l b/src/pre.l index bf1ec9b..37f7115 100644 --- a/src/pre.l +++ b/src/pre.l @@ -3195,7 +3195,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) { CondCtx *ctx = g_condStack.pop(); QCString sectionInfo = " "; - if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label %s ",ctx->sectionId.data()); + if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",ctx->sectionId.stripWhiteSpace().data()); warn(fileName,ctx->lineNr,"Conditional section%sdoes not have " "a corresponding \\endcond command within this file.",sectionInfo.data()); delete ctx; diff --git a/testing/015/015__cond_8c.xml b/testing/015/015__cond_8c.xml index 43cf335..bcc18b5 100644 --- a/testing/015/015__cond_8c.xml +++ b/testing/015/015__cond_8c.xml @@ -11,15 +11,17 @@ + Function to be shown. - + + Text argument more text. diff --git a/testing/015_cond.c b/testing/015_cond.c index ab3044c..0ac209d 100644 --- a/testing/015_cond.c +++ b/testing/015_cond.c @@ -1,4 +1,4 @@ -// objective: test the \cond command +// objective: test the `cond` command // check: 015__cond_8c.xml // config: ENABLED_SECTIONS = COND_ENABLED @@ -17,12 +17,14 @@ void func(); /// \endcond /// \cond COND_ENABLED +/// Function to be shown. void cond_enabled() { } /// \endcond /** \cond COND_DISABLED */ + Function not to be shown. void cond_disabled() { } -- cgit v0.12 From edfa0d2a95dacfea8c2cddc1da1e37728d1cc608 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 11 May 2018 20:35:46 +0200 Subject: Cannot properly jump from brief to detailed function description In case a plain python function (i.e. not in a class or similar) the reference in the brief description to the detailed description points to nowhere as the anchor at the detailed description has file_ in front of it. The file_ is required for namespaces as mentioned in the code: // member is in a namespace, but is written as part of the file documentation // as well, so we need to make sure its label is unique. tests, on a python project, gave that this doesn't happen and that in case of just files a wrong member reference is given in. Based on: Generating Python Documentation with doxygen produces broken links to functions (https://stackoverflow.com/questions/50217315/generating-python-documentation-with-doxygen-produces-broken-links-to-functions#50217315) --- src/memberdef.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 0bd0701..abd5a65 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -2576,7 +2576,7 @@ void MemberDef::writeDocumentation(MemberList *ml, else if (getFileDef()) { scopeName=getFileDef()->displayName(); scopedContainer=getFileDef(); } ciname = ((GroupDef *)container)->groupTitle(); } - else if (container->definitionType()==TypeFile && getNamespaceDef()) + else if (container->definitionType()==TypeFile && getNamespaceDef() && lang != SrcLangExt_Python) { // member is in a namespace, but is written as part of the file documentation // as well, so we need to make sure its label is unique. memAnchor.prepend("file_"); -- cgit v0.12 From ec8a1a465ef6b4cbcba9b7b9b9cbdf87e39c7bba Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 12 May 2018 18:58:10 +0200 Subject: Bug 727103 - Misparsed comments leading to missing call graph Handling comment block in scanner.l and code.l in an analogous way. The problem is caused by a non terminated comment bock in a comment block. It is strongly advised not to use comment blocks inside other comment blocks and otherwise fix the message. --- src/code.l | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/code.l b/src/code.l index 74b360f..5c9e289 100644 --- a/src/code.l +++ b/src/code.l @@ -3573,6 +3573,9 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" endFontClass(); } } +[^\*\n]+ { + g_code->codify(yytext); + } <*>"/*" { startFontClass("comment"); g_code->codify(yytext); -- cgit v0.12 From 279f5286ecd3f1e7a35bbfedab774d9d93b80f99 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 14 May 2018 13:10:51 +0200 Subject: Remove some dead code --- src/filedef.cpp | 1 - src/util.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/src/filedef.cpp b/src/filedef.cpp index 74c4c67..e2df9be 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -1420,7 +1420,6 @@ bool FileDef::generateSourceFile() const { static bool sourceBrowser = Config_getBool(SOURCE_BROWSER); static bool verbatimHeaders = Config_getBool(VERBATIM_HEADERS); - QCString extension = name().right(4); return !isReference() && (sourceBrowser || (verbatimHeaders && guessSection(name())==Entry::HEADER_SEC) diff --git a/src/util.cpp b/src/util.cpp index 9762892..ff0d0c6 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -323,7 +323,6 @@ int guessSection(const char *name) n.right(4)==".c++" || n.right(5)==".java" || n.right(2)==".m" || - n.right(2)==".M" || n.right(3)==".mm" || n.right(3)==".ii" || // inline n.right(4)==".ixx" || -- cgit v0.12 From b33c0e0274ee25b1a414a79c13521ef8defecbda Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 14 May 2018 14:49:04 +0200 Subject: Bug 796094 - Backslashes in default values confuse the parser (and cause params to be ignored) Corrected assignment / counting. --- src/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.cpp b/src/util.cpp index 9762892..330e061 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1782,7 +1782,7 @@ QCString removeRedundantWhiteSpace(const QCString &s) pc = c; i++; c = src[i]; - *dst+=c; + *dst++=c; } else if (c=='"') { -- cgit v0.12 From a6b0a7fe237c5eb6e76073d366f281c8413eb0dd Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 14 May 2018 15:54:03 +0200 Subject: Bug 796086 - Adjacent xrefitems always added to first list present on page Better to search backward then forward to find related item. --- src/commentscan.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commentscan.l b/src/commentscan.l index de31b2e..55c55a7 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -548,7 +548,7 @@ static void addXRefItem(const char *listName,const char *itemTitle, if (docEntry->sli) { QListIterator slii(*docEntry->sli); - for (slii.toFirst();(lii=slii.current());++slii) + for (slii.toLast();(lii=slii.current());--slii) { if (qstrcmp(lii->type,listName)==0) { -- cgit v0.12 From e570fd61c6975ef067efbf6a9c09b79cc58d96f5 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 16 May 2018 13:19:44 +0200 Subject: Corrected warning in case of a not supported output format with \image command. When using a not supported output format with the image command e.g. \image man foo.png we get the warning message: warning: image type man specified as the first argument of man is not valid this is corrected to: warning: output format man specified as the first argument of image command is not valid --- src/docparser.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/docparser.cpp b/src/docparser.cpp index 215439a..29c6ca7 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -5037,25 +5037,27 @@ void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type void DocPara::handleImage(const QCString &cmdName) { + QCString saveCmdName = cmdName; + int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", - qPrint(cmdName)); + qPrint(saveCmdName)); return; } tok=doctokenizerYYlex(); if (tok!=TK_WORD && tok!=TK_LNKWORD) { warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s", - tokToString(tok),qPrint(cmdName)); + tokToString(tok),qPrint(saveCmdName)); return; } tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", - qPrint(cmdName)); + qPrint(saveCmdName)); return; } DocImage::Type t; @@ -5066,9 +5068,9 @@ void DocPara::handleImage(const QCString &cmdName) else if (imgType=="rtf") t=DocImage::Rtf; else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"image type %s specified as the first argument of " - "%s is not valid", - qPrint(imgType),qPrint(cmdName)); + warn_doc_error(g_fileName,doctokenizerYYlineno,"output format %s specified as the first argument of " + "%s command is not valid", + qPrint(imgType),qPrint(saveCmdName)); return; } doctokenizerYYsetStateFile(); @@ -5077,7 +5079,7 @@ void DocPara::handleImage(const QCString &cmdName) if (tok!=TK_WORD) { warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s", - tokToString(tok),qPrint(cmdName)); + tokToString(tok),qPrint(saveCmdName)); return; } HtmlAttribList attrList; -- cgit v0.12 From abca136aa24db05c5a3bcbac3e4708cb01aac2c2 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 16 May 2018 15:03:14 +0200 Subject: Numbers overlap the titles in TOC of PDF With a lot of paragraphs / nesting levels in the TOC it happens that the paragraph number flows into paragraph title in the toc, this patch overcomes this problem. See also https://en.wikibooks.org/wiki/LaTeX/Tables_of_Contents_and_Lists_of_Figures#Numbers_overlap_the_titles --- src/latexgen.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 7d72974..00826e6 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -694,6 +694,9 @@ static void writeDefaultHeaderPart1(FTextStream &t) t << "\\usepackage{caption}\n" << "\\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}\n\n"; + // prevent numbers overlap the titles in toc + t << "\\renewcommand{\\numberline}[1]{#1~}\n"; + // End of preamble, now comes the document contents t << "%===== C O N T E N T S =====\n" "\n" -- cgit v0.12 From ceedc1b7c0e9c2ea6e00d44fae2c0f8f477def69 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 20 May 2018 15:38:26 +0200 Subject: Bug 792122 - XHTML pages are broken several ways (Regression #674) The markdown processing of [TOC] was not performed anymore, at the moment of processing there was no g_current. Adding @tableofcontents to the stream (like with images) solves this problem. --- src/markdown.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index f7526dc..a6b6d89 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -844,7 +844,7 @@ static int processLink(GrowBuf &out,const char *data,int,int size) } if (isToc) // special case for [TOC] { - if (g_current) g_current->stat=TRUE; + out.addStr("@tableofcontents"); } else if (isImageLink) { -- cgit v0.12 From 48817487de116ee526714587900380e53b195f5e Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 22 May 2018 18:57:05 +0200 Subject: Small problems when displaying python code - with was not colored (in pyscanner the KEYWORD item was not used, so removed as dead code) - incorrect handling of a 'triquote' at end of string - incorrect handling of a stringprefix followed by the end of a string --- src/pycode.l | 30 ++++++++++++++++++++++++++---- src/pyscanner.l | 1 - 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/pycode.l b/src/pycode.l index fe1eef5..1b176d6 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -884,7 +884,7 @@ SHORTSTRINGITEM ({SHORTSTRINGCHAR}|{ESCAPESEQ}) SHORTSTRINGCHAR [^\\\n"] STRINGLITERAL {STRINGPREFIX}?( {SHORTSTRING} | {LONGSTRING}) STRINGPREFIX ("r"|"u"|"ur"|"R"|"U"|"UR"|"Ur"|"uR") -KEYWORD ("lambda"|"import"|"class"|"assert"|"as"|"from"|"global"|"def"|"True"|"False") +KEYWORD ("lambda"|"import"|"class"|"assert"|"with"|"as"|"from"|"global"|"def"|"True"|"False") FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"if"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally") QUOTES ("\""[^"]*"\"") SINGLEQUOTES ("'"[^']*"'") @@ -1382,21 +1382,43 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT } */ -<*>{STRINGPREFIX}?{TRISINGLEQUOTE} | +<*>{STRINGPREFIX}?{TRISINGLEQUOTE} { + if (YY_START==SingleQuoteString) REJECT; + startFontClass("stringliteral"); + g_stringContext=YY_START; + g_doubleQuote=yytext[yyleng-1]=='"'; + codify(yytext); + BEGIN(TripleString); + } <*>{STRINGPREFIX}?{TRIDOUBLEQUOTE} { - startFontClass("stringliteral"); + if (YY_START==DoubleQuoteString) REJECT; + startFontClass("stringliteral"); g_stringContext=YY_START; g_doubleQuote=yytext[yyleng-1]=='"'; - codify(yytext); + codify(yytext); BEGIN(TripleString); } <*>{STRINGPREFIX}?"'" { // single quoted string + if (YY_START==SingleQuoteString || + YY_START==DoubleQuoteString || + YY_START==TripleString + ) + { + REJECT; + } startFontClass("stringliteral"); g_stringContext=YY_START; codify(yytext); BEGIN(SingleQuoteString); } <*>{STRINGPREFIX}?"\"" { // double quoted string + if (YY_START==SingleQuoteString || + YY_START==DoubleQuoteString || + YY_START==TripleString + ) + { + REJECT; + } startFontClass("stringliteral"); g_stringContext=YY_START; codify(yytext); diff --git a/src/pyscanner.l b/src/pyscanner.l index 5c9aef5..4718e3b 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -487,7 +487,6 @@ SHORTSTRINGITEM ({SHORTSTRINGCHAR}|{ESCAPESEQ}) SHORTSTRINGCHAR [^\\\n"] STRINGLITERAL {STRINGPREFIX}?( {SHORTSTRING} | {LONGSTRING}) STRINGPREFIX ("r"|"u"|"ur"|"R"|"U"|"UR"|"Ur"|"uR") -KEYWORD ("lambda"|"import"|"class"|"assert"|"as"|"from"|"global"|"def"|"True"|"False") FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"if"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally") POUNDCOMMENT "#"[^#\n][^\n]* SCRIPTCOMMENT "#!".* -- cgit v0.12 From d4b5fa51ec2ad9dd2ba59e16fa85c53f9015755f Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 22 May 2018 21:10:42 +0200 Subject: Moved #include "config.h" back to the original place --- src/dirdef.cpp | 2 +- src/docbookvisitor.cpp | 2 +- src/docparser.cpp | 2 +- src/filedef.cpp | 2 +- src/groupdef.cpp | 2 +- src/htmldocvisitor.cpp | 2 +- src/latexdocvisitor.cpp | 2 +- src/layout.cpp | 2 +- src/mandocvisitor.cpp | 1 - src/memberdef.cpp | 2 +- src/membergroup.cpp | 1 - src/memberlist.cpp | 2 +- src/namespacedef.cpp | 2 +- src/rtfdocvisitor.cpp | 2 +- src/translator.h | 1 + src/util.cpp | 2 +- src/xmldocvisitor.cpp | 2 +- 17 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 9a94050..6631ed7 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -5,12 +5,12 @@ #include "doxygen.h" #include "util.h" #include "outputlist.h" -#include "config.h" #include "language.h" #include "message.h" #include "dot.h" #include "layout.h" #include "ftextstream.h" +#include "config.h" #include "docparser.h" //---------------------------------------------------------------------- diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index 768acda..ab10da0 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -20,7 +20,6 @@ #include "docbookvisitor.h" #include "docparser.h" -#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" @@ -30,6 +29,7 @@ #include "util.h" #include "parserintf.h" #include "filename.h" +#include "config.h" #include "filedef.h" #include "msc.h" #include "dia.h" diff --git a/src/docparser.cpp b/src/docparser.cpp index e767862..29c6ca7 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -38,7 +38,6 @@ #include "message.h" #include "section.h" #include "searchindex.h" -#include "config.h" #include "language.h" #include "portable.h" #include "cite.h" @@ -51,6 +50,7 @@ #include "namespacedef.h" #include "reflist.h" #include "formula.h" +#include "config.h" #include "growbuf.h" #include "markdown.h" #include "htmlentity.h" diff --git a/src/filedef.cpp b/src/filedef.cpp index 312f865..e2df9be 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -23,7 +23,6 @@ #include "classdef.h" #include "namespacedef.h" #include "util.h" -#include "config.h" #include "language.h" #include "outputlist.h" #include "dot.h" @@ -41,6 +40,7 @@ #include "filename.h" #include "membergroup.h" #include "dirdef.h" +#include "config.h" #include "clangparser.h" #include "settings.h" diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 3a060b9..ccfa0df 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -23,7 +23,6 @@ #include "classlist.h" #include "outputlist.h" #include "namespacedef.h" -#include "config.h" #include "language.h" #include "util.h" #include "memberlist.h" @@ -40,6 +39,7 @@ #include "entry.h" #include "membername.h" #include "dirdef.h" +#include "config.h" //--------------------------------------------------------------------------- diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index e0f9038..6a9c142 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -19,12 +19,12 @@ #include #include "htmldocvisitor.h" #include "docparser.h" -#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" #include "dot.h" #include "message.h" +#include "config.h" #include "htmlgen.h" #include "parserintf.h" #include "msc.h" diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 7080d02..86ceade 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -19,7 +19,6 @@ #include #include "latexdocvisitor.h" #include "docparser.h" -#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" @@ -31,6 +30,7 @@ #include "dia.h" #include "cite.h" #include "filedef.h" +#include "config.h" #include "htmlentity.h" #include "plantuml.h" diff --git a/src/layout.cpp b/src/layout.cpp index cce68cd..fdc9f4c 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -18,12 +18,12 @@ #include "layout.h" #include "message.h" -#include "config.h" #include "language.h" #include "vhdldocgen.h" #include "util.h" #include "doxygen.h" #include "version.h" +#include "config.h" #include #include diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 2ed557c..2233cc6 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -20,7 +20,6 @@ #include "mandocvisitor.h" #include "docparser.h" -#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 256865b..0bd0701 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -25,7 +25,6 @@ #include "code.h" #include "message.h" #include "htmlhelp.h" -#include "config.h" #include "language.h" #include "outputlist.h" #include "example.h" @@ -44,6 +43,7 @@ #include "memberlist.h" #include "namespacedef.h" #include "filedef.h" +#include "config.h" //----------------------------------------------------------------------------- diff --git a/src/membergroup.cpp b/src/membergroup.cpp index c5144e2..aaa504f 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -22,7 +22,6 @@ #include "classdef.h" #include "namespacedef.h" #include "filedef.h" -#include "config.h" #include "language.h" #include "groupdef.h" #include "doxygen.h" diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 5e3dfcf..e19cead 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -21,7 +21,6 @@ #include "classdef.h" #include "message.h" #include "util.h" -#include "config.h" #include "language.h" #include "doxygen.h" #include "outputlist.h" @@ -31,6 +30,7 @@ #include "namespacedef.h" #include "filedef.h" #include "membergroup.h" +#include "config.h" #include "docparser.h" MemberList::MemberList() : m_listType(MemberListType_pubMethods) diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index e78b4e9..d3eb0df 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -18,7 +18,6 @@ #include "namespacedef.h" #include "outputlist.h" #include "util.h" -#include "config.h" #include "language.h" #include "classdef.h" #include "classlist.h" @@ -30,6 +29,7 @@ #include "vhdldocgen.h" #include "layout.h" #include "membergroup.h" +#include "config.h" //------------------------------------------------------------------ diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index d015757..c85b638 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -20,7 +20,6 @@ #include "rtfdocvisitor.h" #include "docparser.h" -#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" @@ -33,6 +32,7 @@ #include "msc.h" #include "dia.h" #include "filedef.h" +#include "config.h" #include "htmlentity.h" #include "plantuml.h" diff --git a/src/translator.h b/src/translator.h index 2c15c81..f572f57 100644 --- a/src/translator.h +++ b/src/translator.h @@ -19,6 +19,7 @@ #define TRANSLATOR_H #include "classdef.h" +#include "config.h" /** Abstract base class for all translatable text fragments. */ class Translator diff --git a/src/util.cpp b/src/util.cpp index 37608bd..ff0d0c6 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -35,8 +35,8 @@ #include "doxygen.h" #include "outputlist.h" #include "defargs.h" -#include "config.h" #include "language.h" +#include "config.h" #include "htmlhelp.h" #include "example.h" #include "version.h" diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index a4bc40b..93765b1 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -20,7 +20,6 @@ #include "xmldocvisitor.h" #include "docparser.h" -#include "config.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" @@ -30,6 +29,7 @@ #include "util.h" #include "parserintf.h" #include "filename.h" +#include "config.h" #include "htmlentity.h" static void visitCaption(XmlDocVisitor *parent, QList children) -- cgit v0.12 From 9606604a18ac78165b92099bc822ccbddda32bb7 Mon Sep 17 00:00:00 2001 From: Isaac Hier Date: Wed, 23 May 2018 04:12:14 -0400 Subject: Include header for CompilationDatabase --- src/clangparser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/clangparser.cpp b/src/clangparser.cpp index 77151d6..2ea15ee 100644 --- a/src/clangparser.cpp +++ b/src/clangparser.cpp @@ -4,6 +4,7 @@ #if USE_LIBCLANG #include +#include "clang/Tooling/CompilationDatabase.h" #include "clang/Tooling/Tooling.h" #include #include -- cgit v0.12 From d05562bb395d0e83be29c8ff5ad76ddbe2a794bc Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 25 May 2018 18:49:47 +0200 Subject: Syntax highlighting / code coloring in RTF Although stated in the Doxyfile that for RTF source code syntax highlighting should be present this was not the case. --- src/rtfgen.cpp | 39 +++++++++++++++++++++++++++++++++++++-- src/rtfgen.h | 4 ++-- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 9a6f549..18eef1a 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -244,7 +244,22 @@ void RTFGenerator::beginRTFDocument() t <<"\\red128\\green0\\blue0;"; t <<"\\red128\\green128\\blue0;"; t <<"\\red128\\green128\\blue128;"; - t <<"\\red192\\green192\\blue192;}" << endl; + t <<"\\red192\\green192\\blue192;"; + + // code highlighting colors. Note order is important see also RTFGenerator::startFontClass + t <<"\\red0\\green128\\blue0;"; // keyword = index 17 + t <<"\\red96\\green64\\blue32;"; // keywordtype + t <<"\\rede0\\green128\\blue0;"; // keywordflow + t <<"\\red128\\green0\\blue0;"; // comment + t <<"\\red128\\green96\\blue32;"; // preprocessor + t <<"\\red0\\green32\\blue128;"; // stringliteral + t <<"\\red0\\green128\\blue128;"; // charliteral + t <<"\\red255\\green0\\blue255;"; // vhdldigit + t <<"\\red0\\green0\\blue0;"; // vhdlchar + t <<"\\red112\\green0\\blue112;"; // vhdlkeyword + t <<"\\red255\\green0\\blue0;"; // vhdllogic + + t <<"}\n"; DBG_RTF(t <<"{\\comment Beginning style list}\n") t <<"{\\stylesheet\n"; @@ -3041,5 +3056,25 @@ void RTFGenerator::endLabels() { } +void RTFGenerator::startFontClass(const char *name) +{ + int cod = 2; + QCString qname(name); + if (qname == "keyword") cod = 17; + else if (qname == "keywordtype") cod = 18; + else if (qname == "keywordflow") cod = 19; + else if (qname == "comment") cod = 20; + else if (qname == "preprocessor") cod = 21; + else if (qname == "stringliteral") cod = 22; + else if (qname == "charliteral") cod = 23; + else if (qname == "vhdldigit") cod = 24; + else if (qname == "vhdlchar") cod = 25; + else if (qname == "vhdlkeyword") cod = 26; + else if (qname == "vhdllogic") cod = 27; + t << "{\\cf" << cod << " "; +} - +void RTFGenerator::endFontClass() +{ + t << "}"; +} diff --git a/src/rtfgen.h b/src/rtfgen.h index 1eb7db0..bb3146a 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -258,8 +258,8 @@ class RTFGenerator : public OutputGenerator void writeLabel(const char *l,bool isLast); void endLabels(); - void startFontClass(const char *) {} - void endFontClass() {} + void startFontClass(const char *); + void endFontClass(); void writeCodeAnchor(const char *) {} void setCurrentDoc(Definition *,const char *,bool) {} -- cgit v0.12 From ed86c707318c1cb005702ef88dbdaa3a2bee5581 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 26 May 2018 17:54:53 +0200 Subject: Problem with code inside a Doxy table in LaTeX When code is used inside a problem occurs with \discretionary - Inside a table \discretionary is disabled when code is used. - \newline should not be appended to a code line (is already implicitly done by the command). --- src/latexdocvisitor.cpp | 25 +++++++++++++++++++------ src/latexgen.cpp | 23 +++++++++++++++-------- src/latexgen.h | 1 + templates/latex/doxygen.sty | 14 ++++++++++---- 4 files changed, 45 insertions(+), 18 deletions(-) diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 86ceade..69eddf7 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -18,6 +18,7 @@ #include "htmlattrib.h" #include #include "latexdocvisitor.h" +#include "latexgen.h" #include "docparser.h" #include "language.h" #include "doxygen.h" @@ -291,10 +292,12 @@ void LatexDocVisitor::visit(DocVerbatim *s) { case DocVerbatim::Code: { - m_t << "\n\\begin{DoxyCode}\n"; + m_t << "\n\\begin{DoxyCode}{" << usedTableLevels() << "}\n"; + LatexCodeGenerator::setDoxyCodeOpen(TRUE); Doxygen::parserManager->getParser(lang) ->parseCode(m_ci,s->context(),s->text(),langExt, s->isExample(),s->exampleFile()); + LatexCodeGenerator::setDoxyCodeOpen(FALSE); m_t << "\\end{DoxyCode}\n"; } break; @@ -399,7 +402,8 @@ void LatexDocVisitor::visit(DocInclude *inc) { case DocInclude::IncWithLines: { - m_t << "\n\\begin{DoxyCodeInclude}\n"; + m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n"; + LatexCodeGenerator::setDoxyCodeOpen(TRUE); QFileInfo cfi( inc->file() ); FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() ); Doxygen::parserManager->getParser(inc->extension()) @@ -415,11 +419,13 @@ void LatexDocVisitor::visit(DocInclude *inc) 0, // memberDef TRUE // show line numbers ); + LatexCodeGenerator::setDoxyCodeOpen(FALSE); m_t << "\\end{DoxyCodeInclude}" << endl; } break; case DocInclude::Include: - m_t << "\n\\begin{DoxyCodeInclude}\n"; + m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n"; + LatexCodeGenerator::setDoxyCodeOpen(TRUE); Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci,inc->context(), inc->text(),langExt,inc->isExample(), @@ -431,6 +437,7 @@ void LatexDocVisitor::visit(DocInclude *inc) 0, // memberDef FALSE ); + LatexCodeGenerator::setDoxyCodeOpen(FALSE); m_t << "\\end{DoxyCodeInclude}\n"; break; case DocInclude::DontInclude: @@ -447,7 +454,8 @@ void LatexDocVisitor::visit(DocInclude *inc) break; case DocInclude::Snippet: { - m_t << "\n\\begin{DoxyCodeInclude}\n"; + m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n"; + LatexCodeGenerator::setDoxyCodeOpen(TRUE); Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci, inc->context(), @@ -456,6 +464,7 @@ void LatexDocVisitor::visit(DocInclude *inc) inc->isExample(), inc->exampleFile() ); + LatexCodeGenerator::setDoxyCodeOpen(FALSE); m_t << "\\end{DoxyCodeInclude}" << endl; } break; @@ -463,7 +472,8 @@ void LatexDocVisitor::visit(DocInclude *inc) { QFileInfo cfi( inc->file() ); FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() ); - m_t << "\n\\begin{DoxyCodeInclude}\n"; + m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n"; + LatexCodeGenerator::setDoxyCodeOpen(TRUE); Doxygen::parserManager->getParser(inc->extension()) ->parseCode(m_ci, inc->context(), @@ -478,6 +488,7 @@ void LatexDocVisitor::visit(DocInclude *inc) 0, // memberDef TRUE // show line number ); + LatexCodeGenerator::setDoxyCodeOpen(FALSE); m_t << "\\end{DoxyCodeInclude}" << endl; } break; @@ -495,7 +506,8 @@ void LatexDocVisitor::visit(DocIncOperator *op) // op->type(),op->isFirst(),op->isLast(),op->text().data()); if (op->isFirst()) { - if (!m_hide) m_t << "\n\\begin{DoxyCodeInclude}\n"; + if (!m_hide) m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n"; + LatexCodeGenerator::setDoxyCodeOpen(TRUE); pushEnabled(); m_hide = TRUE; } @@ -515,6 +527,7 @@ void LatexDocVisitor::visit(DocIncOperator *op) if (op->isLast()) { popEnabled(); + LatexCodeGenerator::setDoxyCodeOpen(FALSE); if (!m_hide) m_t << "\n\\end{DoxyCodeInclude}\n"; } else diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 7a2ea59..076b354 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -39,6 +39,7 @@ #include "resourcemgr.h" static bool DoxyCodeOpen = FALSE; +static bool DoxyCodeLineOpen = FALSE; //------------------------------- LatexCodeGenerator::LatexCodeGenerator(FTextStream &t,const QCString &relPath,const QCString &sourceFileName) @@ -101,7 +102,7 @@ void LatexCodeGenerator::codify(const char *str) m_col+=spacesToNextTabStop; p++; break; - case '\n': (usedTableLevels()>0) ? m_t << "\\newline\n" : m_t << '\n'; m_col=0; p++; + case '\n': (usedTableLevels()>0 && !DoxyCodeOpen) ? m_t << "\\newline\n" : m_t << '\n'; m_col=0; p++; break; default: i=0; @@ -190,10 +191,10 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co { static bool usePDFLatex = Config_getBool(USE_PDFLATEX); static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS); - if (!DoxyCodeOpen) + if (!DoxyCodeLineOpen) { m_t << "\\DoxyCodeLine{"; - DoxyCodeOpen = TRUE; + DoxyCodeLineOpen = TRUE; } if (m_prettyCode) { @@ -228,19 +229,19 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co void LatexCodeGenerator::startCodeLine(bool) { m_col=0; - if (!DoxyCodeOpen) + if (!DoxyCodeLineOpen) { m_t << "\\DoxyCodeLine{"; - DoxyCodeOpen = TRUE; + DoxyCodeLineOpen = TRUE; } } void LatexCodeGenerator::endCodeLine() { - if (DoxyCodeOpen) + if (DoxyCodeLineOpen) { m_t << "}"; - DoxyCodeOpen = FALSE; + DoxyCodeLineOpen = FALSE; } codify("\n"); } @@ -255,6 +256,10 @@ void LatexCodeGenerator::endFontClass() m_t << "}"; } +void LatexCodeGenerator::setDoxyCodeOpen(bool val) +{ + DoxyCodeOpen = val; +} //------------------------------- @@ -2228,12 +2233,14 @@ void LatexGenerator::endConstraintList() void LatexGenerator::startCodeFragment() { - t << "\n\\begin{DoxyCode}\n"; + t << "\n\\begin{DoxyCode}{" << usedTableLevels() << "}\n"; + DoxyCodeOpen = TRUE; } void LatexGenerator::endCodeFragment() { t << "\\end{DoxyCode}\n"; + DoxyCodeOpen = FALSE; } void LatexGenerator::startInlineHeader() diff --git a/src/latexgen.h b/src/latexgen.h index 469e411..07c4080 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -51,6 +51,7 @@ class LatexCodeGenerator : public CodeOutputInterface void writeCodeAnchor(const char *) {} void setCurrentDoc(Definition *,const char *,bool) {} void addWord(const char *,bool) {} + static void setDoxyCodeOpen(bool val); private: void _writeCodeLink(const char *className, diff --git a/templates/latex/doxygen.sty b/templates/latex/doxygen.sty index bee23c5..51e369b 100644 --- a/templates/latex/doxygen.sty +++ b/templates/latex/doxygen.sty @@ -97,7 +97,7 @@ } % Used by @code ... @endcode -\newenvironment{DoxyCode}{% +\newenvironment{DoxyCode}[1]{% \par% \scriptsize% \normalfont\ttfamily% @@ -106,7 +106,13 @@ \settowidth{\CodeWidthChar}{?}% \settoheight{\CodeHeightChar}{?}% \setlength{\parskip}{0ex plus 0ex minus 0ex}% - {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces% + \ifthenelse{\equal{#1}{0}} + { + {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces% + } + { + {\lccode`~32 \lowercase{\global\let~}}\obeyspaces% + } }{% \normalfont% @@ -128,8 +134,8 @@ \fi % Used by @example, @include, @includelineno and @dontinclude -\newenvironment{DoxyCodeInclude}{% - \DoxyCode% +\newenvironment{DoxyCodeInclude}[1]{% + \DoxyCode{#1}% }{% \endDoxyCode% } -- cgit v0.12 From 67a22b2d5b9c14a325374dd8857e066b11abb7ca Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 26 May 2018 20:28:00 +0200 Subject: Bug 774597 - Title in rtf file is incorrect when overridden by user in extension file Corrected title in case of extension file used. --- src/rtfgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 9a6f549..ffec9fd 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -602,7 +602,7 @@ void RTFGenerator::endIndexSection(IndexSections is) t << rtf_Style_Reset << rtf_Style["Title"]->reference << endl; // set to title style if (rtf_title) // User has overridden document title in extensions file - t << "{\\field\\fldedit {\\*\\fldinst " << rtf_title << " \\\\*MERGEFORMAT}{\\fldrslt " << rtf_title << "}}\\par" << endl; + t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt " << rtf_title << "}}\\par" << endl; else { DocText *root = validatingParseText(projectName); -- cgit v0.12 From 21ce6ed9d2a37df2de846d48398261bb087c0a09 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 28 May 2018 14:51:55 +0200 Subject: Bug 796426 - Invalid 3-byte UTF8 found in input of graph - Corrected counting of utf-8 characters - Corrected truncation of text for e.g. tooltips (Note dot 2.38.0 silently ignored the error, 2.40.1 shows the error.) --- src/util.cpp | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index ff0d0c6..4d1ed30 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7394,23 +7394,23 @@ int nextUtf8CharPosition(const QCString &utf8Str,int len,int startPos) { if (((uchar)c&0xE0)==0xC0) { - bytes++; // 11xx.xxxx: >=2 byte character + bytes+=1; // 11xx.xxxx: >=2 byte character } if (((uchar)c&0xF0)==0xE0) { - bytes++; // 111x.xxxx: >=3 byte character + bytes+=2; // 111x.xxxx: >=3 byte character } if (((uchar)c&0xF8)==0xF0) { - bytes++; // 1111.xxxx: >=4 byte character + bytes+=3; // 1111.xxxx: >=4 byte character } if (((uchar)c&0xFC)==0xF8) { - bytes++; // 1111.1xxx: >=5 byte character + bytes+=4; // 1111.1xxx: >=5 byte character } if (((uchar)c&0xFE)==0xFC) { - bytes++; // 1111.1xxx: 6 byte character + bytes+=5; // 1111.1xxx: 6 byte character } } else if (c=='&') // skip over character entities @@ -7444,11 +7444,10 @@ QCString parseCommentAsText(const Definition *scope,const MemberDef *md, root->accept(visitor); delete visitor; delete root; - QCString result = convertCharEntitiesToUTF8(s.data()); + QCString result = convertCharEntitiesToUTF8(s.data()).stripWhiteSpace(); int i=0; int charCnt=0; int l=result.length(); - bool addEllipsis=FALSE; while ((i=nextUtf8CharPosition(result,l,i))=0 && isspace(result.at(i))) - { - addEllipsis=TRUE; - } - else if (result.at(i)==',' || - result.at(i)=='.' || - result.at(i)=='?') + if (result.at(i)==',' || + result.at(i)=='.' || + result.at(i)=='!' || + result.at(i)=='?') { + i++; // we want to be "behind" last inspected character break; } } } - if (addEllipsis || charCnt==100) result=result.left(i)+"..."; + if ( i < l) result=result.left(i)+"..."; return result.data(); } -- cgit v0.12 From be4fb2753c2f028a53d657a7920267a4191cd566 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 28 May 2018 15:10:28 +0200 Subject: Bug 782754 - rtf generation Looks like problem has been introduced with the fix for bug 445105 (release 1.5.3), in this case the \par is necessary. The fix for bug 741547 (pull request #596) is related to this problem and the fix here is not necessary with this fix. Related to bug 778525, here 2 problems occur and the mangling is solved with this patch. --- src/classdef.cpp | 14 -------------- src/rtfgen.cpp | 6 +++--- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/classdef.cpp b/src/classdef.cpp index 4ce48a7..45afd90 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1935,21 +1935,7 @@ void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *heade if (rootNode && !rootNode->isEmpty()) { ol.startMemberDescription(anchor()); - - ol.pushGeneratorState(); - ol.disableAll(); - ol.enable(OutputGenerator::RTF); - ol.writeString("{"); - ol.popGeneratorState(); - ol.writeDoc(rootNode,this,0); - - ol.pushGeneratorState(); - ol.disableAll(); - ol.enable(OutputGenerator::RTF); - ol.writeString("\\par}"); - ol.popGeneratorState(); - if (isLinkableInProject()) { writeMoreLink(ol,anchor()); diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 9a6f549..0faf565 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -1639,11 +1639,11 @@ void RTFGenerator::endMemberDescription() { DBG_RTF(t << "{\\comment (endMemberDescription)}" << endl) endEmphasis(); - newParagraph(); + //newParagraph(); decrementIndentLevel(); - //t << "\\par"; + t << "\\par"; t << "}" << endl; - //m_omitParagraph = TRUE; + m_omitParagraph = TRUE; } void RTFGenerator::startDescList(SectionTypes) -- cgit v0.12 From ea4af8a8579f3a1a9712e13b01a725c61773432b Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 29 May 2018 11:00:54 +0200 Subject: Wrong spelling of word doxygen Corrected spelling Doxgyen -> doxygen and added space for better readability --- src/rtfgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 9a6f549..bc16a7d 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -575,7 +575,7 @@ void RTFGenerator::endIndexSection(IndexSections is) break; case isTitlePageAuthor: { - t << "Doxgyen. }\n"; + t << " doxygen.}\n"; t << "{\\creatim " << dateToRTFDateString() << "}\n}"; DBG_RTF(t << "{\\comment end of infoblock}\n"); // setup for this section -- cgit v0.12 From efcc4d035e4ecdb3ecc449770a5fd26694717efa Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 29 May 2018 11:29:30 +0200 Subject: =?UTF-8?q?Bug=C2=A0792918=20-=20incorrect=20parsing=20of=20markdo?= =?UTF-8?q?wn=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem due to the fact that for the display of the header line the size of the separator line was used. The headerStart and headerEnd have to be set before the next call to 'findTableColumns' Related to: - pull request 537 Add support for more CSS and column/row spanning in markdown tables - pull request 542 Reverting pull request #537 until it will be fixed - commit on 16/09/2017: New table features mentioned in the documentation were not enabled. --- src/markdown.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index f7526dc..f5c0dfd 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -1590,15 +1590,15 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size) int columns,start,end,cc; i = findTableColumns(data,size,start,end,columns); - + + int headerStart = start; + int headerEnd = end; + #ifdef USE_ORIGINAL_TABLES out.addStr(""); // write table header, in range [start..end] out.addStr(""); - - int headerStart = start; - int headerEnd = end; #endif // read cell alignments @@ -1712,9 +1712,6 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size) QVector > tableContents; tableContents.setAutoDelete(TRUE); - int headerStart = start; - int headerEnd = end; - int m=headerStart; QVector *headerContents = new QVector(columns); headerContents->setAutoDelete(TRUE); -- cgit v0.12 From 2c5a80f301032ab4653736f767037f2cd6c0ef61 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 29 May 2018 12:16:37 +0200 Subject: Doxygen manual doesn't have lines around markdown tables / cells. In the chapter about markdown tables the tables lack the lines around the table and between the cells. Reason is a wrong color in the doxygen_manual.css (taken value from the standard doxygen.css). Regression on pull request #537 --- doc/doxygen_manual.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/doxygen_manual.css b/doc/doxygen_manual.css index 51cc8b0..87d560c 100644 --- a/doc/doxygen_manual.css +++ b/doc/doxygen_manual.css @@ -1554,7 +1554,7 @@ table.markdownTable { } table.markdownTable td, table.markdownTable th { - border: 1px solid ##37; + border: 1px solid #2D4068; padding: 3px 7px 2px; } -- cgit v0.12 From d984f7dd21863fc01a1a6ede0878d3dd14af157a Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 30 May 2018 19:33:17 +0200 Subject: Problems and some enhancements for LaTeX tables - Possibility to honor also the cell alignment when using Markdown tables for other formats (markdown.cpp, latexdocvisitor.cpp, lines: 1146, 1157, 1173) latexdocvisitor.cpp: - Possibility to nest tables to a further level when using LaTeX. It was only possible till level 2 (i.e. a longtabu followed buy a tabularx table). By placing tabularx in an extra set of brackets this is fixed (lines 938 and 951) - tablarx environment cannot handle the headers as used for the longtabu table. A header line is in case of tabularx implemented by mimicking the header line. - longtabu needs multiple times the header line (first and following), tabularx we only need 1 (line 998) - no longtabu special headers (line 1092) - tabularx cannot handle rowcolor, coloring done only with columncolor(line 1024, 1134, 1188) - no necessity for longtabu to define column with for spanned columns / rows(line 1048, 1134, 1171) --- src/docparser.cpp | 26 +++++++++++++++++++++++--- src/latexdocvisitor.cpp | 46 +++++++++++++++++++++++++--------------------- 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/src/docparser.cpp b/src/docparser.cpp index 29c6ca7..205e818 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -3505,14 +3505,34 @@ DocHtmlCell::Alignment DocHtmlCell::alignment() const { HtmlAttribList attrs = attribs(); uint i; - for (i=0; iname.lower()=="align") { - if (attrs.at(i)->value.lower()=="center") + if (attrs.at(i)->value.lower()=="center") + return Center; + else if (attrs.at(i)->value.lower()=="right") + return Right; + else return Left; + } + else if (attrs.at(i)->name.lower()=="class") + { + if (attrs.at(i)->value.lower()=="markdowntableheadcenter") + return Center; + else if (attrs.at(i)->value.lower()=="markdowntableheadright") + return Right; + else if (attrs.at(i)->value.lower()=="markdowntableheadleft") + return Left; + else if (attrs.at(i)->value.lower()=="markdowntableheadnone") + return Center; + else if (attrs.at(i)->value.lower()=="markdowntablebodycenter") return Center; - else if (attrs.at(i)->value.lower()=="right") + else if (attrs.at(i)->value.lower()=="markdowntablebodyright") return Right; + else if (attrs.at(i)->value.lower()=="markdowntablebodyleft") + return Left; + else if (attrs.at(i)->value.lower()=="markdowntablebodynone") + return Left; else return Left; } } diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 86ceade..e268006 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -935,7 +935,7 @@ static void writeStartTableCommand(FTextStream &t,const DocNode *n,int cols) { if (tableIsNested(n)) { - t << "\\begin{tabularx}{\\linewidth}{|*{" << cols << "}{>{\\raggedright\\arraybackslash}X|}}"; + t << "{\\begin{tabularx}{\\linewidth}{|*{" << cols << "}{>{\\raggedright\\arraybackslash}X|}}"; } else { @@ -948,7 +948,7 @@ static void writeEndTableCommand(FTextStream &t,const DocNode *n) { if (tableIsNested(n)) { - t << "\\end{tabularx}\n"; + t << "\\end{tabularx}}\n"; } else { @@ -995,7 +995,8 @@ void LatexDocVisitor::visitPre(DocHtmlTable *t) if (firstRow && firstRow->isHeading()) { setFirstRow(TRUE); - firstRow->accept(this); + DocNode *n = t->parent(); + if (!tableIsNested(n)) firstRow->accept(this); setFirstRow(FALSE); } } @@ -1021,13 +1022,14 @@ void LatexDocVisitor::visitPost(DocHtmlCaption *c) void LatexDocVisitor::visitPre(DocHtmlRow *r) { setCurrentColumn(0); - if (r->isHeading()) m_t << "\\rowcolor{\\tableheadbgcolor}"; } void LatexDocVisitor::visitPost(DocHtmlRow *row) { if (m_hide) return; + DocNode *n = row->parent() ->parent(); + int c=currentColumn(); while (c<=numCols()) // end of row while inside a row span? { @@ -1045,10 +1047,7 @@ void LatexDocVisitor::visitPost(DocHtmlRow *row) if (span->colSpan>1) // row span is also part of a column span { m_t << "\\multicolumn{" << span->colSpan << "}{"; - m_t << "p{(\\linewidth-\\tabcolsep*" - << numCols() << "-\\arrayrulewidth*" - << row->visibleCells() << ")*" - << span->colSpan <<"/"<< numCols() << "}|}{}"; + m_t << "}|}{}"; } else // solitary row span { @@ -1089,7 +1088,8 @@ void LatexDocVisitor::visitPost(DocHtmlRow *row) m_t << "\n"; - if (row->isHeading() && row->rowIndex()==1) + + if (row->isHeading() && row->rowIndex()==1 && !tableIsNested(n)) { if (firstRow()) { @@ -1131,10 +1131,7 @@ void LatexDocVisitor::visitPre(DocHtmlCell *c) { m_t << "|"; } - m_t << "p{(\\linewidth-\\tabcolsep*" - << numCols() << "-\\arrayrulewidth*" - << row->visibleCells() << ")*" - << span->colSpan <<"/"<< numCols() << "}|}{}"; + m_t << "l|}{" << (c->isHeading()? "\\columncolor{\\tableheadbgcolor}" : "") << "}"; // alignment not relevant, empty column setCurrentColumn(currentColumn()+span->colSpan); } else @@ -1146,6 +1143,7 @@ void LatexDocVisitor::visitPre(DocHtmlCell *c) } int cs = c->colSpan(); + int a = c->alignment(); if (cs>1 && row) { setInColSpan(TRUE); @@ -1154,11 +1152,18 @@ void LatexDocVisitor::visitPre(DocHtmlCell *c) { m_t << "|"; } - m_t << "p{(\\linewidth-\\tabcolsep*" - << numCols() << "-\\arrayrulewidth*" - << row->visibleCells() << ")*" - << cs <<"/"<< numCols() << "}|}{"; - if (c->isHeading()) m_t << "\\cellcolor{\\tableheadbgcolor}"; + switch (a) + { + case DocHtmlCell::Right: + m_t << "r|}{"; + break; + case DocHtmlCell::Center: + break; + m_t << "c|}{"; + default: + m_t << "l|}{"; + break; + } } int rs = c->rowSpan(); if (rs>0) @@ -1168,9 +1173,8 @@ void LatexDocVisitor::visitPre(DocHtmlCell *c) // c->rowIndex(),c->columnIndex(),c->rowSpan(),c->colSpan(), // currentColumn()); addRowSpan(new ActiveRowSpan(c,rs,cs,currentColumn())); - m_t << "\\multirow{" << rs << "}{\\linewidth}{"; + m_t << "\\multirow{" << rs << "}{*}{"; } - int a = c->alignment(); if (a==DocHtmlCell::Center) { m_t << "\\PBS\\centering "; @@ -1181,7 +1185,7 @@ void LatexDocVisitor::visitPre(DocHtmlCell *c) } if (c->isHeading()) { - m_t << "\\textbf{ "; + m_t << "\\cellcolor{\\tableheadbgcolor}\\textbf{ "; } if (cs>1) { -- cgit v0.12 From 509cf2db2304ee74e3fa1a580f33dbea3cdfca30 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 31 May 2018 12:29:39 +0200 Subject: Bug 782082 - Czech/Slovak language documentation with tables from LaTeX to PDF is not possible Added commands as indicated to overrule \cline and \cmidrule due to problems with `-` --- src/translator_cz.h | 8 +++++++- src/translator_sk.h | 10 ++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/translator_cz.h b/src/translator_cz.h index 056d0e4..40e6687 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -96,7 +96,13 @@ class TranslatorCzech : public Translator virtual QCString latexLanguageSupportCommand() { return "\\usepackage[T2A]{fontenc}\n" - "\\usepackage[czech]{babel}\n"; + "\\usepackage[czech]{babel}\n" + "\\usepackage{regexpatch}\n" + "\\makeatletter\n" + "% Change the `-` delimiter to an active character\n" + "\\xpatchparametertext\\@@@cmidrule{-}{\\cA-}{}{}\n" + "\\xpatchparametertext\\@cline{-}{\\cA-}{}{}\n" + "\\makeatother\n"; } // --- Language translation methods ------------------- diff --git a/src/translator_sk.h b/src/translator_sk.h index 3a925ec..52649e8 100644 --- a/src/translator_sk.h +++ b/src/translator_sk.h @@ -41,8 +41,14 @@ class TranslatorSlovak : public Translator { return "slovak"; } virtual QCString latexLanguageSupportCommand() - { return "\\usepackage[slovak]{babel}\n"; } - + { return "\\usepackage[slovak]{babel}\n" + "\\usepackage{regexpatch}\n" + "\\makeatletter\n" + "% Change the `-` delimiter to an active character\n" + "\\xpatchparametertext\\@@@cmidrule{-}{\\cA-}{}{}\n" + "\\xpatchparametertext\\@cline{-}{\\cA-}{}{}\n" + "\\makeatother\n"; + } // --- Language translation methods ------------------- /*! used in the compound documentation before a list of related functions. */ -- cgit v0.12 From 09ae56fcfc540ab79378ba83fdb95ff28401786c Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 2 Jun 2018 14:13:14 +0200 Subject: Drop down lists in menu bar missing As a result of pull request #636 the drop down lists in the main bar don't work anymore, furthermore the treeview is lacking the scrollbar when a text is to long (text is not shown. --- templates/html/doxygen.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/html/doxygen.css b/templates/html/doxygen.css index 1425dc1..8a1235a 100644 --- a/templates/html/doxygen.css +++ b/templates/html/doxygen.css @@ -167,6 +167,14 @@ ul { overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ } +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + .fragment { text-align: left; direction: ltr; -- cgit v0.12 From 293e5c9ba4b88924e0cc4b513318cf822f5c63eb Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 4 Jun 2018 20:25:30 +0200 Subject: Bug 796494 - Collapsed treeview arrow displays as emoji in Microsoft Edge The right arrow (▶) is inn MicrosoftEdge displayed as an Emoji it displays as a white arrow inside a blue square with a black border instead of a monochrome arrow. Unicode contains another right arrow (␪) which displays correctly (also in Chrome, Opera, FireFox, Internet Explorer; in some even better). The Unicode naming is a bit confusing: - for the down arrow we only have: - ▼ 'BLACK DOWN-POINTING TRIANGLE' - for the right arrow we have: - ▶ 'BLACK RIGHT-POINTING TRIANGLE' - ► 'BLACK RIGHT-POINTING POINTER' so it looks logical to use both Triangles but this is not the case. --- src/ftvhelp.cpp | 2 +- templates/html/dynsections.js | 6 +++--- templates/html/htmldirtree.tpl | 2 +- templates/html/navtree.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index 14c94a3..d71c48f 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -257,7 +257,7 @@ void FTVHelp::generateIndent(FTextStream &t, FTVNode *n,bool opened) while (p) { indent++; p=p->parent; } if (n->isDir) { - QCString dir = opened ? "▼" : "▶"; + QCString dir = opened ? "▼" : "►"; t << " " << "  - {%if node.level+1 {% endif %} {% if node.namespace %} diff --git a/templates/html/navtree.js b/templates/html/navtree.js index e310bc9..7ce2935 100644 --- a/templates/html/navtree.js +++ b/templates/html/navtree.js @@ -23,7 +23,7 @@ */ var navTreeSubIndices = new Array(); var arrowDown = '▼'; -var arrowRight = '▶'; +var arrowRight = '►'; function getData(varName) { -- cgit v0.12 From 79ac5232cf029f3d40543641e92daa8aaa1c9f7c Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 5 Jun 2018 11:46:03 +0200 Subject: Add formula (images) to RTF output The RTF output was lacking the possibility to have formulas in it (were written as text). This patch generates the images analogous to the HTML, non MATHJAX, version and includes them in the output. --- doc/formulas.doc | 5 ++--- src/doxygen.cpp | 6 ++++++ src/rtfdocvisitor.cpp | 16 ++++++++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/doc/formulas.doc b/doc/formulas.doc index ee4ff61..f505155 100644 --- a/doc/formulas.doc +++ b/doc/formulas.doc @@ -17,9 +17,8 @@ /*! \page formulas Including formulas Doxygen allows you to put \LaTeX formulas in the -output (this works only for the HTML and \LaTeX output, -not for the RTF nor for the man page output). To be able to include -formulas (as images) in the HTML documentation, you will also need to +output (this works only for the HTML, \LaTeX and RTF output. To be able to include +formulas (as images) in the HTML and RTF documentation, you will also need to have the following tools installed
  • \c latex: the \LaTeX compiler, needed to parse the formulas. diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 263b59f..bc244b7 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -11558,6 +11558,12 @@ void generateOutput() Doxygen::formulaList->generateBitmaps(Config_getString(HTML_OUTPUT)); g_s.end(); } + if (Doxygen::formulaList->count()>0 && generateRtf) + { + g_s.begin("Generating bitmaps for formulas in RTF...\n"); + Doxygen::formulaList->generateBitmaps(Config_getString(RTF_OUTPUT)); + g_s.end(); + } if (Config_getBool(SORT_GROUP_NAMES)) { diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index c85b638..7e3f104 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -526,9 +526,21 @@ void RTFDocVisitor::visit(DocIncOperator *op) void RTFDocVisitor::visit(DocFormula *f) { if (m_hide) return; - // TODO: do something sensible here, like including a bitmap DBG_RTF("{\\comment RTFDocVisitor::visit(DocFormula)}\n"); - m_t << f->text(); + bool bDisplay = !f->isInline(); + if (bDisplay) + { + m_t << "\\par"; + m_t << "{"; + m_t << "\\pard\\plain"; + m_t << "\\pard"; + m_t << "\\qc"; + } + m_t << "{ \\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"" << f->relPath() << f->name() << ".png\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt Image}}"; + if (bDisplay) + { + m_t << "\\par}"; + } m_lastIsPara=FALSE; } -- cgit v0.12 From 4c7ed9016d24482cb2b46363537c95954a809012 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 5 Jun 2018 12:10:59 +0200 Subject: Improvement LaTeX output (regression) Regression on pull request #698. We shouldn't switch to pdflatex for formula generation (follow up procedure: dvips and gs / splitting into images does not work). In the travis tests this was shown as well but not flagged as an error. --- src/formula.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/formula.cpp b/src/formula.cpp index 9e48b2d..46e2075 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -25,7 +25,6 @@ #include "util.h" #include "message.h" #include "config.h" -#include "language.h" #include "portable.h" #include "index.h" #include "doxygen.h" @@ -97,7 +96,7 @@ void FormulaList::generateBitmaps(const char *path) { //printf("Running latex...\n"); //system("latex _formulas.tex /dev/null"); - QCString latexCmd = theTranslator->latexCommandName(); + QCString latexCmd = "latex"; portable_sysTimerStart(); if (portable_system(latexCmd,"_formulas.tex")!=0) { -- cgit v0.12 From dbb7838937e7bcbe129dd246438aeabfafc6be32 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 7 Jun 2018 18:04:18 +0200 Subject: Bug 363762 - Tooltips are not shown in dot-generated graphs The basic problem mentioned in this issue was already solved in Mai 2009 (version 1.5.8 or earlier), in case a brief description is present this is displayed otherwise the node number is specified) A remaining thing was that the tooltip with the root nodes (gray nodes) was always something like Node0 irrespective of the brief description. This has been solved here. --- src/dot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dot.cpp b/src/dot.cpp index eeb8b8b..2db5ca9 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -1878,10 +1878,10 @@ void DotNode::writeBox(FTextStream &t, << m_url.right(m_url.length()-anchorPos) << "\""; } } - if (!m_tooltip.isEmpty()) - { - t << ",tooltip=\"" << escapeTooltip(m_tooltip) << "\""; - } + } + if (!m_tooltip.isEmpty()) + { + t << ",tooltip=\"" << escapeTooltip(m_tooltip) << "\""; } t << "];" << endl; } -- cgit v0.12 From 56f6398447407a3826285e527cee547588e2e517 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 7 Jun 2018 19:39:36 +0200 Subject: Bug 363762 - Tooltips are not shown in dot-generated graphs Some graphs were still missing a tooltip in the root node (most notably the caller graphs), so were still displaying something like Node0. --- src/dot.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dot.cpp b/src/dot.cpp index 2db5ca9..5adc2ab 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -3483,9 +3483,10 @@ DotInclDepGraph::DotInclDepGraph(FileDef *fd,bool inverse) m_inclDepFileName = fd->includeDependencyGraphFileName(); m_inclByDepFileName = fd->includedByDependencyGraphFileName(); QCString tmp_url=fd->getReference()+"$"+fd->getOutputFileBase(); + QCString tooltip = fd->briefDescriptionAsTooltip(); m_startNode = new DotNode(m_curNodeNumber++, fd->docName(), - "", + tooltip, tmp_url.data(), TRUE // root node ); @@ -3812,9 +3813,10 @@ DotCallGraph::DotCallGraph(MemberDef *md,bool inverse) { name = md->qualifiedName(); } + QCString tooltip = md->briefDescriptionAsTooltip(); m_startNode = new DotNode(m_curNodeNumber++, linkToText(md->getLanguage(),name,FALSE), - "", + tooltip, uniqueId.data(), TRUE // root node ); @@ -4336,7 +4338,8 @@ DotGroupCollaboration::DotGroupCollaboration(GroupDef* gd) { QCString tmp_url = gd->getReference()+"$"+gd->getOutputFileBase(); m_usedNodes = new QDict(1009); - m_rootNode = new DotNode(m_curNodeNumber++, gd->groupTitle(), "", tmp_url, TRUE ); + QCString tooltip = gd->briefDescriptionAsTooltip(); + m_rootNode = new DotNode(m_curNodeNumber++, gd->groupTitle(), tooltip, tmp_url, TRUE ); m_rootNode->markAsVisible(); m_usedNodes->insert(gd->name(), m_rootNode ); m_edges.setAutoDelete(TRUE); -- cgit v0.12 From 5b2c378d1932bc548d6b3fcc1841b6c7778c4a97 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 10 Jun 2018 18:08:43 +0200 Subject: Update Dutch translation in respect to new VHDL entries. --- src/translator_nl.h | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 127 insertions(+), 3 deletions(-) diff --git a/src/translator_nl.h b/src/translator_nl.h index b6d0d1d..c0c8c9b 100644 --- a/src/translator_nl.h +++ b/src/translator_nl.h @@ -18,7 +18,7 @@ #ifndef TRANSLATOR_NL_H #define TRANSLATOR_NL_H -class TranslatorDutch : public TranslatorAdapter_1_8_15 +class TranslatorDutch : public Translator { public: QCString idLanguage() @@ -93,8 +93,15 @@ class TranslatorDutch : public TranslatorAdapter_1_8_15 QCString trSearch() { return "Zoeken"; } QCString trClassHierarchyDescription() - { return "Deze inheritance lijst is min of meer alfabetisch " - "gesorteerd:"; + { + if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) + { + return "Hieronder is een hiërarchische lijst met alle entiteiten:"; + } + else + { + return "Deze inheritance lijst is min of meer alfabetisch gesorteerd:"; + } } QCString trFileListDescription(bool extractAll) { @@ -1586,6 +1593,123 @@ class TranslatorDutch : public TranslatorAdapter_1_8_15 } ////////////////////////////////////////////////////////////////////////// +// new since 1.8.15 +////////////////////////////////////////////////////////////////////////// + + /** VHDL design unit hierarchy */ + virtual QCString trDesignUnitHierarchy() + { return "Ontwerp Eenheid Hiërarchie"; } + /** VHDL design unit list */ + virtual QCString trDesignUnitList() + { return "Ontwerp Eenheid Lijst"; } + /** VHDL design unit members */ + virtual QCString trDesignUnitMembers() + { return "Ontwerp Eenheid Members"; } + /** VHDL design unit list description */ + virtual QCString trDesignUnitListDescription() + { + return "hieronder volgt de lijst met all ontwerp eenheden met links " + "naar de entiteiten waar ze bij behoren:"; + } + /** VHDL design unit index */ + virtual QCString trDesignUnitIndex() + { return "Ontwerp Eenheid Index"; } + /** VHDL design units */ + virtual QCString trDesignUnits() + { return "Ontwerp Eenheden"; } + /** VHDL functions/procedures/processes */ + virtual QCString trFunctionAndProc() + { return "Functies/Procedures/Processen"; } + /** VHDL type */ + virtual QCString trVhdlType(uint64 type,bool single) + { + switch(type) + { + case VhdlDocGen::LIBRARY: + if (single) return "Bibliotheek"; + else return "Bibliotheken"; + case VhdlDocGen::PACKAGE: + if (single) return "Package"; + else return "Packages"; + case VhdlDocGen::SIGNAL: + if (single) return "Signal"; + else return "Signals"; + case VhdlDocGen::COMPONENT: + if (single) return "Bestanddeel"; + else return "Bestanddelen"; + case VhdlDocGen::CONSTANT: + if (single) return "Konstante"; + else return "Konstanten"; + case VhdlDocGen::ENTITY: + if (single) return "Entiteit"; + else return "Entiteiten"; + case VhdlDocGen::TYPE: + if (single) return "Type"; + else return "Types"; + case VhdlDocGen::SUBTYPE: + if (single) return "Ondertype"; + else return "Ondertypes"; + case VhdlDocGen::FUNCTION: + if (single) return "Funktie"; + else return "Funkties"; + case VhdlDocGen::RECORD: + if (single) return "Record"; + else return "Records"; + case VhdlDocGen::PROCEDURE: + if (single) return "Procedure"; + else return "Procedures"; + case VhdlDocGen::ARCHITECTURE: + if (single) return "Architectuur"; + else return "Architecturen"; + case VhdlDocGen::ATTRIBUTE: + if (single) return "Attribuut"; + else return "Attributen"; + case VhdlDocGen::PROCESS: + if (single) return "Proces"; + else return "Processen"; + case VhdlDocGen::PORT: + if (single) return "Poort"; + else return "Porten"; + case VhdlDocGen::USE: + if (single) return "gebruiks clausule"; + else return "Gebruiks Clausules"; + case VhdlDocGen::GENERIC: + if (single) return "Algemeen"; + else return "Algemene"; + case VhdlDocGen::PACKAGE_BODY: + return "Package Body"; + case VhdlDocGen::UNITS: + return "Eenheden"; + case VhdlDocGen::SHAREDVARIABLE: + if (single) return "Gedeelde Variable"; + else return "Gedeelde Variablen"; + case VhdlDocGen::VFILE: + if (single) return "Bestand"; + else return "Bestanden"; + case VhdlDocGen::GROUP: + if (single) return "Groep"; + else return "Groepen"; + case VhdlDocGen::INSTANTIATION: + if (single) return "Instantiëring"; + else return "Instantiëringen"; + case VhdlDocGen::ALIAS: + if (single) return "Alias"; + else return "Aliases"; + case VhdlDocGen::CONFIG: + if (single) return "Configuratie"; + else return "Configuraties"; + case VhdlDocGen::MISCELLANEOUS: + return "Diverse"; + case VhdlDocGen::UCF_CONST: + return "Limiteringen"; + default: + return "Klasse"; + } + } + virtual QCString trCustomReference(const char *name) + { return QCString(name)+" Referentie"; } + +////////////////////////////////////////////////////////////////////////// }; #endif -- cgit v0.12 From fc2d26714142033dfec24f846c439464bda65dca Mon Sep 17 00:00:00 2001 From: Fabio Jun Takada Chino Date: Sun, 10 Jun 2018 16:52:40 -0300 Subject: Translators updated to version 1.8.15. --- src/translator_br.h | 126 ++++++++++++++++++++++++++++++++++++++++++++++++-- src/translator_pt.h | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 247 insertions(+), 8 deletions(-) diff --git a/src/translator_br.h b/src/translator_br.h index 3d12f08..774e554 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 1997-2017 by Dimitri van Heesch. + * Copyright (C) 1997-2018 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -10,14 +10,16 @@ * Documents produced by Doxygen are derivative workns derived from the * input used in their production; they are not affected by this license. * - * Brazilian Portuguese translation version 20100531 + * Brazilian Portuguese translation * Maintainer: - * Fabio "FJTC" Jun Takada Chino + * Fabio "FJTC" Jun Takada Chino * Collaborators: * Emerson Ferreira * Thanks to Jorge Ramos, Fernando Carijo and others for their contributions. * * History: + * 20180612: + * - Updated to 1.8.15; * 20170123: * - Full translation revision; * - trLegendDocs() is now synchronized with the English version; @@ -45,7 +47,7 @@ #ifndef TRANSLATOR_BR_H #define TRANSLATOR_BR_H -class TranslatorBrazilian : public TranslatorAdapter_1_8_15 +class TranslatorBrazilian : public Translator { public: @@ -2082,6 +2084,122 @@ class TranslatorBrazilian : public TranslatorAdapter_1_8_15 return result; } + ////////////////////////////////////////////////////////////////////////// + // new since 1.8.15 + ////////////////////////////////////////////////////////////////////////// + + /** VHDL design unit hierarchy */ + virtual QCString trDesignUnitHierarchy() + { return "Hierarquia da Unidade de Design"; } + /** VHDL design unit list */ + virtual QCString trDesignUnitList() + { return "Lista de Unidades de Design"; } + /** VHDL design unit members */ + virtual QCString trDesignUnitMembers() + { return "Membros da Unidade de Design"; } + /** VHDL design unit list description */ + virtual QCString trDesignUnitListDescription() + { + return "Esta é uma lista de todos os membros de unidades de design " + "com ligações para as entidades às quais pertencem:"; + } + /** VHDL design unit index */ + virtual QCString trDesignUnitIndex() + { return "Índice de Unidades de Design"; } + /** VHDL design units */ + virtual QCString trDesignUnits() + { return "Unidades de Design"; } + /** VHDL functions/procedures/processes */ + virtual QCString trFunctionAndProc() + { return "Funções/Procedimentos/Processos"; } + /** VHDL type */ + virtual QCString trVhdlType(uint64 type,bool single) + { + switch(type) + { + case VhdlDocGen::LIBRARY: + if (single) return "Biblioteca"; + else return "Bibliotecas"; + case VhdlDocGen::PACKAGE: + if (single) return "Pacote"; + else return "Pacotes"; + case VhdlDocGen::SIGNAL: + if (single) return "Sinal"; + else return "Sinais"; + case VhdlDocGen::COMPONENT: + if (single) return "Componente"; + else return "Componentes"; + case VhdlDocGen::CONSTANT: + if (single) return "Constante"; + else return "Constantes"; + case VhdlDocGen::ENTITY: + if (single) return "Entidade"; + else return "Entidades"; + case VhdlDocGen::TYPE: + if (single) return "Tipo"; + else return "Tipos"; + case VhdlDocGen::SUBTYPE: + if (single) return "Subtipo"; + else return "Subtipos"; + case VhdlDocGen::FUNCTION: + if (single) return "Função"; + else return "Funções"; + case VhdlDocGen::RECORD: + if (single) return "Registro"; + else return "Registros"; + case VhdlDocGen::PROCEDURE: + if (single) return "Procedimento"; + else return "Procedimentos"; + case VhdlDocGen::ARCHITECTURE: + if (single) return "Arquitetura"; + else return "Arquiteturas"; + case VhdlDocGen::ATTRIBUTE: + if (single) return "Atributo"; + else return "Atributos"; + case VhdlDocGen::PROCESS: + if (single) return "Processo"; + else return "Processos"; + case VhdlDocGen::PORT: + if (single) return "Porta"; + else return "Portas"; + case VhdlDocGen::USE: + if (single) return "cláusula de uso"; + else return "cláusulas de uso"; + case VhdlDocGen::GENERIC: + if (single) return "Generico"; + else return "Genericos"; + case VhdlDocGen::PACKAGE_BODY: + return "Corpo do Pacote"; + case VhdlDocGen::UNITS: + return "Unidades"; + case VhdlDocGen::SHAREDVARIABLE: + if (single) return "Variável Compartilhada"; + else return "Variáveis Compartilhadas"; + case VhdlDocGen::VFILE: + if (single) return "Arquivo"; + else return "Arquivos"; + case VhdlDocGen::GROUP: + if (single) return "Grupo"; + else return "Grupos"; + case VhdlDocGen::INSTANTIATION: + if (single) return "Instância"; + else return "Instâncias"; + case VhdlDocGen::ALIAS: + if (single) return "Apelido"; + else return "Apelidos"; + case VhdlDocGen::CONFIG: + if (single) return "Configuração"; + else return "Configurações"; + case VhdlDocGen::MISCELLANEOUS: + return "Outros"; // Is this correct for VHDL? + case VhdlDocGen::UCF_CONST: + return "Restrições"; + default: + return "Classe"; + } + } + virtual QCString trCustomReference(const char *name) + { return "Referência de " + QCString(name); } ////////////////////////////////////////////////////////////////////////// diff --git a/src/translator_pt.h b/src/translator_pt.h index 6bbe2bc..2506f7f 100644 --- a/src/translator_pt.h +++ b/src/translator_pt.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 1997-2015 by Dimitri van Heesch. + * Copyright (C) 1997-2018 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -10,9 +10,9 @@ * Documents produced by Doxygen are derivative works derived from the * input used in their production; they are not affected by this license. * - * Portuguese translation version 20110428 + * Portuguese translation version * Maintainer (from 04/28/2011): - * Fabio "FJTC" Jun Takada Chino + * Fabio "FJTC" Jun Takada Chino * Maintainer (until 04/28/2011): * Rui Godinho Lopes * @@ -24,6 +24,8 @@ * VERSION HISTORY * --------------- * History: + * 20180612: + * - Updated to 1.8.15; * 20131129: * - Updated to 1.8.5; * - Translation in the method trFileMembers() fixed; @@ -55,7 +57,7 @@ #define TRANSLATOR_PT_H -class TranslatorPortuguese : public TranslatorAdapter_1_8_15 +class TranslatorPortuguese : public Translator { public: @@ -2019,6 +2021,125 @@ class TranslatorPortuguese : public TranslatorAdapter_1_8_15 return result; } + ////////////////////////////////////////////////////////////////////////// + // new since 1.8.15 + ////////////////////////////////////////////////////////////////////////// + + /** VHDL design unit hierarchy */ + virtual QCString trDesignUnitHierarchy() + { return "Hierarquia da Unidade de Design"; } + /** VHDL design unit list */ + virtual QCString trDesignUnitList() + { return "Lista de Unidades de Design"; } + /** VHDL design unit members */ + virtual QCString trDesignUnitMembers() + { return "Membros da Unidade de Design"; } + /** VHDL design unit list description */ + virtual QCString trDesignUnitListDescription() + { + return "Esta é uma lista de todos os membros de unidades de design " + "com ligações para as entidades às quais pertencem:"; + } + /** VHDL design unit index */ + virtual QCString trDesignUnitIndex() + { return "Índice de Unidades de Design"; } + /** VHDL design units */ + virtual QCString trDesignUnits() + { return "Unidades de Design"; } + /** VHDL functions/procedures/processes */ + virtual QCString trFunctionAndProc() + { return "Funções/Procedimentos/Processos"; } + /** VHDL type */ + virtual QCString trVhdlType(uint64 type,bool single) + { + switch(type) + { + case VhdlDocGen::LIBRARY: + if (single) return "Biblioteca"; + else return "Bibliotecas"; + case VhdlDocGen::PACKAGE: + if (single) return "Pacote"; + else return "Pacotes"; + case VhdlDocGen::SIGNAL: + if (single) return "Sinal"; + else return "Sinais"; + case VhdlDocGen::COMPONENT: + if (single) return "Componente"; + else return "Componentes"; + case VhdlDocGen::CONSTANT: + if (single) return "Constante"; + else return "Constantes"; + case VhdlDocGen::ENTITY: + if (single) return "Entidade"; + else return "Entidades"; + case VhdlDocGen::TYPE: + if (single) return "Tipo"; + else return "Tipos"; + case VhdlDocGen::SUBTYPE: + if (single) return "Subtipo"; + else return "Subtipos"; + case VhdlDocGen::FUNCTION: + if (single) return "Função"; + else return "Funções"; + case VhdlDocGen::RECORD: + if (single) return "Registro"; + else return "Registros"; + case VhdlDocGen::PROCEDURE: + if (single) return "Procedimento"; + else return "Procedimentos"; + case VhdlDocGen::ARCHITECTURE: + if (single) return "Arquitetura"; + else return "Arquiteturas"; + case VhdlDocGen::ATTRIBUTE: + if (single) return "Atributo"; + else return "Atributos"; + case VhdlDocGen::PROCESS: + if (single) return "Processo"; + else return "Processos"; + case VhdlDocGen::PORT: + if (single) return "Porta"; + else return "Portas"; + case VhdlDocGen::USE: + if (single) return "cláusula de uso"; + else return "cláusulas de uso"; + case VhdlDocGen::GENERIC: + if (single) return "Generico"; + else return "Genericos"; + case VhdlDocGen::PACKAGE_BODY: + return "Corpo do Pacote"; + case VhdlDocGen::UNITS: + return "Unidades"; + case VhdlDocGen::SHAREDVARIABLE: + if (single) return "Variável Compartilhada"; + else return "Variáveis Compartilhadas"; + case VhdlDocGen::VFILE: + if (single) return "Ficheiro"; + else return "Ficheiros"; + case VhdlDocGen::GROUP: + if (single) return "Grupo"; + else return "Grupos"; + case VhdlDocGen::INSTANTIATION: + if (single) return "Instância"; + else return "Instâncias"; + case VhdlDocGen::ALIAS: + if (single) return "Apelido"; + else return "Apelidos"; + case VhdlDocGen::CONFIG: + if (single) return "Configuração"; + else return "Configurações"; + case VhdlDocGen::MISCELLANEOUS: + return "Outros"; // Is this correct for VHDL? + case VhdlDocGen::UCF_CONST: + return "Restrições"; + default: + return "Classe"; + } + } + virtual QCString trCustomReference(const char *name) + { return "Referência de " + QCString(name); } + +////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// }; -- cgit v0.12 From 5d89de25fa5aa146ab65a88f09a7cc729dea3e51 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 11 Jun 2018 19:47:37 +0200 Subject: Resolve inconsistency in formula repositories. HTML and RTF have their own directory with formula repository files. These can get out of sync when HTML and RTF versions are not always build together (and both are required again). --- doc/formulas.doc | 4 ++-- src/doxygen.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++-------- src/doxygen.h | 2 +- 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/doc/formulas.doc b/doc/formulas.doc index f505155..520f089 100644 --- a/doc/formulas.doc +++ b/doc/formulas.doc @@ -100,8 +100,8 @@ the section should contain valid command for the specific environment. \warning Currently, doxygen is not very fault tolerant in recovering from typos in formulas. It may be necessary to remove the -file formula.repository that is written to the html directory to -get rid of an incorrect formula. +files formula.repository that are written to the html and rtf directories to +get rid of an incorrect formula as well as the form_* files. \htmlonly Go to the next section or return to the diff --git a/src/doxygen.cpp b/src/doxygen.cpp index bc244b7..1fb9a1c 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -9752,14 +9752,17 @@ int readFileOrDirectory(const char *s, //---------------------------------------------------------------------------- -void readFormulaRepository() +void readFormulaRepository(QCString dir, bool cmp) { - QFile f(Config_getString(HTML_OUTPUT)+"/formula.repository"); + static int current_repository = 0; + int new_repository = 0; + QFile f(dir+"/formula.repository"); if (f.open(IO_ReadOnly)) // open repository { msg("Reading formula repository...\n"); QTextStream t(&f); QCString line; + Formula *f; while (!t.eof()) { line=t.readLine().utf8(); @@ -9773,14 +9776,42 @@ void readFormulaRepository() { QCString formName = line.left(se); QCString formText = line.right(line.length()-se-1); - Formula *f=new Formula(formText); - Doxygen::formulaList->setAutoDelete(TRUE); - Doxygen::formulaList->append(f); - Doxygen::formulaDict->insert(formText,f); - Doxygen::formulaNameDict->insert(formName,f); + if (cmp) + { + if ((f=Doxygen::formulaDict->find(formText))==0) + { + err("discrepancy between formula repositories! Remove " + "formula.repository and from_* files from output directories."); + exit(1); + } + QCString formLabel; + formLabel.sprintf("\\form#%d",f->getId()); + if (formLabel != formName) + { + err("discrepancy between formula repositories! Remove " + "formula.repository and from_* files from output directories."); + exit(1); + } + new_repository++; + } + else + { + f=new Formula(formText); + Doxygen::formulaList->setAutoDelete(TRUE); + Doxygen::formulaList->append(f); + Doxygen::formulaDict->insert(formText,f); + Doxygen::formulaNameDict->insert(formName,f); + current_repository++; + } } } } + if (cmp && (current_repository != new_repository)) + { + err("size discrepancy between formula repositories! Remove " + "formula.repository and from_* files from output directories."); + exit(1); + } } //---------------------------------------------------------------------------- @@ -11070,7 +11101,12 @@ void parseInput() if (Config_getBool(GENERATE_HTML)) { - readFormulaRepository(); + readFormulaRepository(Config_getString(HTML_OUTPUT)); + } + if (Config_getBool(GENERATE_RTF)) + { + // in case GENERRATE_HTML is set we just have to compare, both repositories should be identical + readFormulaRepository(Config_getString(RTF_OUTPUT),Config_getBool(GENERATE_HTML)); } /************************************************************************** diff --git a/src/doxygen.h b/src/doxygen.h index b3467c1..7bd05a4 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -159,7 +159,7 @@ void searchInputFiles(StringList &inputFiles); void parseInput(); void generateOutput(); void readAliases(); -void readFormulaRepository(); +void readFormulaRepository(QCString dir, bool cmp = FALSE); void cleanUpDoxygen(); int readFileOrDirectory(const char *s, FileNameList *fnList, -- cgit v0.12 From a74e24784f4d5b6be5cd2167340a7572d869e220 Mon Sep 17 00:00:00 2001 From: pgajdos Date: Tue, 19 Jun 2018 15:09:36 +0200 Subject: fix build with qt 5.11, deprecated qt5_use_modules macro was removed, patch by Christophe Giboudeaux --- addon/doxywizard/CMakeLists.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/addon/doxywizard/CMakeLists.txt b/addon/doxywizard/CMakeLists.txt index 0907d23..810c0d0 100644 --- a/addon/doxywizard/CMakeLists.txt +++ b/addon/doxywizard/CMakeLists.txt @@ -4,9 +4,6 @@ if (NOT force_qt4) if (Qt5Core_FOUND) message(STATUS "Using Qt5") find_package(Qt5 COMPONENTS Widgets Gui Xml) - macro(qt_use_modules) - qt5_use_modules(${ARGN}) - endmacro() macro(qt_wrap_cpp) qt5_wrap_cpp(${ARGN}) endmacro() @@ -23,8 +20,6 @@ if (NOT Qt5Core_FOUND) message(STATUS "Using Qt4") endif() find_package(Qt4 REQUIRED COMPONENTS QtCore QtXml QtGui) - macro(qt_use_modules) - endmacro() macro(qt_wrap_cpp) qt4_wrap_cpp(${ARGN}) endmacro() @@ -104,9 +99,11 @@ ${GENERATED_SRC_WIZARD}/configdoc.cpp ${doxywizard_MOC} ${doxywizard_RESOURCES_RCC} ) -qt_use_modules(doxywizard Core Gui Widgets Xml) -target_link_libraries(doxywizard -${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} -) + +if(Qt5Core_FOUND) + target_link_libraries(doxywizard Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml) +else() + target_link_libraries(doxywizard ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) +endif() install(TARGETS doxywizard DESTINATION bin) -- cgit v0.12 From 02a07ad66ad327a91cb0cf42d7d2b970b3ba83bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 19 Jun 2018 22:19:37 +0200 Subject: Update doxygen.cpp --- src/doxygen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index bc244b7..29b889e 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -9574,7 +9574,7 @@ int readDir(QFileInfo *fi, if (fi->isSymLink()) { dirName = resolveSymlink(dirName.data()); - if (dirName.isEmpty()) return 0; // recusive symlink + if (dirName.isEmpty()) return 0; // recursive symlink if (g_pathsVisited.find(dirName)) return 0; // already visited path g_pathsVisited.insert(dirName,(void*)0x8); } -- cgit v0.12 From 8a777aec2e4963354c6ff3a784937f72f276aa81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 19 Jun 2018 22:20:47 +0200 Subject: Update doxygen.md --- src/doxygen.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doxygen.md b/src/doxygen.md index ccb47b9..17144ec 100644 --- a/src/doxygen.md +++ b/src/doxygen.md @@ -9,7 +9,7 @@ links to the relevant parts of the code. This document is intended for developers who want to work on doxygen. Users of doxygen are referred to the [User Manual](http://www.doxygen.org/manual.html). -The generic starting point of the application is of cource the main() function. +The generic starting point of the application is of course the main() function. Configuration options --------------------- -- cgit v0.12 From 9aa3d77576029708caef3d14e0c64e3f53bf6b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 19 Jun 2018 22:21:42 +0200 Subject: Update rtfdocvisitor.cpp --- src/rtfdocvisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 7e3f104..ec6d015 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -1079,7 +1079,7 @@ void RTFDocVisitor::visitPost(DocHtmlHeader *) { if (m_hide) return; DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlHeader)}\n"); - // close open table of contens entry + // close open table of contents entry m_t << "} \\par"; m_t << "}" << endl; // end section m_lastIsPara=TRUE; -- cgit v0.12 From 1ef338604f827edbdc0cb9b627ff141a050f5b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 19 Jun 2018 22:23:51 +0200 Subject: Update scanner.l --- src/scanner.l | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scanner.l b/src/scanner.l index 3609d32..21b845f 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -4793,7 +4793,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) {ID} { // typically a K&R style C function if (insideCS && qstrcmp(yytext,"where")==0) { - // type contraint for a method + // type constraint for a method delete current->typeConstr; current->typeConstr = new ArgumentList; current->typeConstr->append(new Argument); @@ -5535,7 +5535,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) baseName.resize(0); BEGIN( BasesProt ) ; } - else if (insideCS && qstrcmp(yytext,"where")==0) // C# type contraint + else if (insideCS && qstrcmp(yytext,"where")==0) // C# type constraint { delete current->typeConstr; current->typeConstr = new ArgumentList; @@ -5815,7 +5815,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) QCString baseScope = yytext; if (insideCS && baseScope.stripWhiteSpace()=="where") { - // type contraint for a class + // type constraint for a class delete current->typeConstr; current->typeConstr = new ArgumentList; current->typeConstr->append(new Argument); -- cgit v0.12 From f0161c38ed53b2cf2cbccccfb85474b36aaa80a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 19 Jun 2018 22:27:54 +0200 Subject: Update qdict.doc --- qtools/qdict.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtools/qdict.doc b/qtools/qdict.doc index d2e26c0..a414d3f 100644 --- a/qtools/qdict.doc +++ b/qtools/qdict.doc @@ -171,7 +171,7 @@ Setting \e size to a suitably large \link primes.html prime number\endlink (equal to or greater than the expected number of entries) - makes the hash distribution better and hence the loopup faster. + makes the hash distribution better and hence the lookup faster. Setting \e caseSensitive to TRUE will treat "abc" and "Abc" as different keys. Setting it to FALSE will make the dictionary ignore case. -- cgit v0.12 From ac9df945c4c5cf61d3611ca52112183b03f7da03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 19 Jun 2018 22:30:58 +0200 Subject: Update qgdict.cpp --- qtools/qgdict.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtools/qgdict.cpp b/qtools/qgdict.cpp index 4fe1a26..c8d8fbd 100644 --- a/qtools/qgdict.cpp +++ b/qtools/qgdict.cpp @@ -1101,7 +1101,7 @@ QDataStream& QGDict::write( QDataStream &s ) const QGDictIterator::QGDictIterator( const QGDict &d ) { dict = (QGDict *)&d; // get reference to dict - toFirst(); // set to first noe + toFirst(); // set to first node if ( !dict->iterators ) { dict->iterators = new QGDItList; // create iterator list CHECK_PTR( dict->iterators ); -- cgit v0.12 From 6dde99df36bf006e184039b0c6b6dad06e71edb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 19 Jun 2018 22:32:24 +0200 Subject: Update qintdict.doc --- qtools/qintdict.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtools/qintdict.doc b/qtools/qintdict.doc index e027fb2..90625da 100644 --- a/qtools/qintdict.doc +++ b/qtools/qintdict.doc @@ -166,7 +166,7 @@ Setting \e size to a suitably large \link primes.html prime number\endlink (equal to or greater than the expected number of entries) makes the hash - distribution better and hence the loopup faster. + distribution better and hence the lookup faster. */ /*! -- cgit v0.12 From bef72b8ed13218067c46e6c0333034e304fa88ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 19 Jun 2018 22:41:53 +0200 Subject: Update qptrdict.doc --- qtools/qptrdict.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtools/qptrdict.doc b/qtools/qptrdict.doc index bff6a15..633536c 100644 --- a/qtools/qptrdict.doc +++ b/qtools/qptrdict.doc @@ -172,7 +172,7 @@ Setting \e size to a suitably large \link primes.html prime number\endlink (equal to or greater than the expected number of entries) makes the hash - distribution better and hence the loopup faster. + distribution better and hence the lookup faster. */ /*! -- cgit v0.12 From 4431f9a0ee0400a9f5c95650bcd385854bfae43c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 19 Jun 2018 22:46:13 +0200 Subject: Update qvaluelist.doc --- qtools/qvaluelist.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtools/qvaluelist.doc b/qtools/qvaluelist.doc index 918d08e..f7a0dde 100644 --- a/qtools/qvaluelist.doc +++ b/qtools/qvaluelist.doc @@ -199,7 +199,7 @@ \fn QValueList::~QValueList() Destroys the list. References to the values in the list and all iterators of this list become invalidated. Since QValueList is highly tuned for performance - you wont see warnings if you use invalid iterators, + you won't see warnings if you use invalid iterators, because it is impossible for an iterator to check whether it is valid or not. */ -- cgit v0.12 From 8332bb2b04312c21897000c78a602eca09597f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Tue, 19 Jun 2018 22:47:15 +0200 Subject: Update qstring.cpp --- qtools/qstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp index 30bb05b..fe478bd 100644 --- a/qtools/qstring.cpp +++ b/qtools/qstring.cpp @@ -10768,7 +10768,7 @@ otherwise. These functions are: isNull() (returns TRUE if the character is U+0000), isPrint() (TRUE if the character is any sort of printable -character, including whitespace), isPunct() (any sort of punctation), +character, including whitespace), isPunct() (any sort of punctuation), isMark() (Unicode Marks), isLetter (letters), isNumber() (any sort of numeric characters), isLetterOrNumber(), and isDigit() (decimal digits). All of these are wrappers around category(), which returns the -- cgit v0.12