diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2003-06-15 18:25:48 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2003-06-15 18:25:48 (GMT) |
commit | 80108293f1f4808c02d28d2d1620563437433a56 (patch) | |
tree | 567da63962a903f646bb092a950026c75a8369d8 /src | |
parent | dae59054d3387840f0f4b4bf8f237fee0591a5b1 (diff) | |
download | Doxygen-80108293f1f4808c02d28d2d1620563437433a56.zip Doxygen-80108293f1f4808c02d28d2d1620563437433a56.tar.gz Doxygen-80108293f1f4808c02d28d2d1620563437433a56.tar.bz2 |
Release-1.3.2
Diffstat (limited to 'src')
-rw-r--r-- | src/code.l | 25 | ||||
-rw-r--r-- | src/config.l | 4 | ||||
-rw-r--r-- | src/docparser.cpp | 43 | ||||
-rw-r--r-- | src/docparser.h | 1 | ||||
-rw-r--r-- | src/htmlgen.cpp | 8 | ||||
-rw-r--r-- | src/index.cpp | 94 | ||||
-rw-r--r-- | src/scanner.l | 4 | ||||
-rw-r--r-- | src/translator_cz.h | 44 | ||||
-rw-r--r-- | src/translator_fr.h | 33 | ||||
-rw-r--r-- | src/translator_it.h | 20 | ||||
-rw-r--r-- | src/translator_pt.h | 95 | ||||
-rw-r--r-- | src/util.cpp | 73 |
12 files changed, 278 insertions, 166 deletions
@@ -41,8 +41,9 @@ //#define DBG_CTX(x) fprintf x #define DBG_CTX(x) do { } while(0) -#define SCOPEBLOCK (int *)4 -#define INNERBLOCK (int *)8 +#define CLASSBLOCK (int *)4 +#define SCOPEBLOCK (int *)8 +#define INNERBLOCK (int *)12 /* ----------------------------------------------------------------- * statics @@ -525,7 +526,7 @@ static ClassDef *stripClassName(const char *s) static MemberDef *setCallContextForVar(const QCString &name) { if (name.isEmpty()) return 0; - //printf("setCallContextForVar(%s)\n",name.data()); + //printf("setCallContextForVar(%s) g_classScope=%s\n",name.data(),g_classScope.data()); int scopeEnd = name.findRev("::"); if (scopeEnd!=-1) // name with explicit scope @@ -550,6 +551,7 @@ static MemberDef *setCallContextForVar(const QCString &name) ClassDef *mcd = g_theVarContext.findVariable(name); if (mcd) // local variable { + //printf("local variable\n"); if (mcd!=VariableContext::dummyContext) { //printf("local var `%s' mcd=%s\n",name.data(),mcd->name().data()); @@ -565,7 +567,11 @@ static MemberDef *setCallContextForVar(const QCString &name) MemberDef *md=mcd->getMemberByName(name); if (md) { - g_theCallContext.setClass(stripClassName(md->typeString())); + if (g_scopeStack.top()!=CLASSBLOCK) + { + //printf("class member `%s' mcd=%s\n",name.data(),mcd->name().data()); + g_theCallContext.setClass(stripClassName(md->typeString())); + } return md; } } @@ -1146,7 +1152,8 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" <Body,MemberCall,MemberCall2>"}" { g_theVarContext.popScope(); - if (g_scopeStack.pop()==SCOPEBLOCK) + int *scope = g_scopeStack.pop(); + if (scope==SCOPEBLOCK || scope==CLASSBLOCK) { popScope(); } @@ -1221,7 +1228,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" if (g_insideBody) g_bodyCurlyCount++; if (!g_curClassName.isEmpty()) // valid class name { - g_scopeStack.push(SCOPEBLOCK); + g_scopeStack.push(CLASSBLOCK); pushScope(g_curClassName); //printf("***** g_curClassName=%s\n",g_curClassName.data()); if (getResolvedClass(g_currentDefinition,g_curClassName)==0) @@ -1509,7 +1516,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" g_saveType = g_type.copy(); if (!g_type.isEmpty()) { - g_theVarContext.addVariable(g_type,g_name); + if (g_scopeStack.top()!=CLASSBLOCK) + { + g_theVarContext.addVariable(g_type,g_name); + } g_name.resize(0); } if (*yytext==';') @@ -1903,6 +1913,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" } } <*>"//"[!/][^\n]*\n { // strip special one-line comment + if (YY_START==SkipComment) REJECT; if (Config_getBool("STRIP_CODE_COMMENTS")) { char c[2]; c[0]='\n'; c[1]=0; diff --git a/src/config.l b/src/config.l index 03119c0..8a57707 100644 --- a/src/config.l +++ b/src/config.l @@ -2433,8 +2433,8 @@ void Config::create() "If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will \n" "generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or \n" "super classes. Setting the tag to NO turns the diagrams off. Note that this \n" - "option is superseded by the HAVE_DOT option below. This is only a fallback. It is \n" - "recommended to install and use dot, since it yield more powerful graphs. \n", + "option is superceded by the HAVE_DOT option below. This is only a fallback. It is \n" + "recommended to install and use dot, since it yields more powerful graphs. \n", TRUE ); cb = addBool( diff --git a/src/docparser.cpp b/src/docparser.cpp index f69a0c9..7d26e04 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -3435,6 +3435,13 @@ void DocPara::handleSection(const QString &cmdName) doctokenizerYYsetStatePara(); } +int DocPara::handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level) +{ + DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,level); + m_children.append(header); + int retval = header->parse(); + return (retval==RetVal_OK) ? TK_NEWPARA : retval; +} int DocPara::handleCommand(const QString &cmdName) { @@ -3930,46 +3937,22 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag } break; case HTML_H1: - { - DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,1); - m_children.append(header); - retval = header->parse(); - } + retval=handleHtmlHeader(tagHtmlAttribs,1); break; case HTML_H2: - { - DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,2); - m_children.append(header); - retval = header->parse(); - } + retval=handleHtmlHeader(tagHtmlAttribs,2); break; case HTML_H3: - { - DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,3); - m_children.append(header); - retval = header->parse(); - } + retval=handleHtmlHeader(tagHtmlAttribs,3); break; case HTML_H4: - { - DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,4); - m_children.append(header); - retval = header->parse(); - } + retval=handleHtmlHeader(tagHtmlAttribs,4); break; case HTML_H5: - { - DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,5); - m_children.append(header); - retval = header->parse(); - } + retval=handleHtmlHeader(tagHtmlAttribs,5); break; case HTML_H6: - { - DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,6); - m_children.append(header); - retval = header->parse(); - } + retval=handleHtmlHeader(tagHtmlAttribs,6); break; case HTML_IMG: { diff --git a/src/docparser.h b/src/docparser.h index 0c5a599..895043d 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -940,6 +940,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode void handleLink(const QString &cmdName,bool isJavaLink); void handleRef(const QString &cmdName); void handleSection(const QString &cmdName); + int handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level); int handleLanguageSwitch(); private: diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 1471638..7e79ca8 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -48,20 +48,20 @@ static const char *defaultStyleSheet = "}\n" "CAPTION { font-weight: bold }\n" "DIV.qindex { width: 100%;\n" -" background-color: #ddddee;\n" -" border: 4px solid #ddddee;\n" +" background-color: #eeeeff;\n" +" border: 4px solid #eeeeff;\n" " text-align: center;\n" " margin-bottom: 2px\n" "}\n" "A.qindex { text-decoration: none; font-weight: bold; }\n" -"A.qindex:hover { text-decoration: none; background-color: #ccccee }\n" +"A.qindex:hover { text-decoration: none; background-color: #ddddff }\n" "A.qindexHL { text-decoration: none; font-weight: bold;\n" " background-color: #6666cc;\n" " color: #ffffff\n" " }\n" "A.qindexHL:hover { text-decoration: none; background-color: #6666cc }\n" "A.qindexRef { text-decoration: none; font-weight: bold; }\n" -"A.qindexRef:hover { text-decoration: none; background-color: #ccccee }\n" +"A.qindexRef:hover { text-decoration: none; background-color: #ddddff }\n" "A.qindexRefHL { text-decoration: none; font-weight: bold;\n" " background-color: #6666cc;\n" " color: #ffffff\n" diff --git a/src/index.cpp b/src/index.cpp index af8f119..d24f2fe 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -358,7 +358,7 @@ void writeQuickLinks(OutputList &ol,bool compact,HighlightedItem hli,bool ext=FA ol.parseText(fixSpaces(theTranslator->trNamespaceMembers())); endQuickIndexItem(ol); } - if (documentedClassMembers>0) + if (documentedClassMembers[CMHL_All]>0) { if (!compact) ol.writeListItem(); startQuickIndexItem(ol,extLink,"functions"+Doxygen::htmlFileExtension, @@ -1900,29 +1900,31 @@ static void writeMemberIndexFiltered(OutputList &ol, ol.writeString(fixSpaces(theTranslator->trRelatedFunctions())); endQuickIndexItem(ol); } - ol.writeString("</div><p>\n"); - - + ol.writeString("</div>\n"); bool quickIndex = documentedClassMembers[hl]>maxItemsBeforeQuickIndex; if (quickIndex) { writeQuickMemberIndex(ol,g_memberIndexLetterUsed[hl]); } - bool &generateHtml = Config_getBool("GENERATE_HTML") ; - bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); - bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); - if (hasHtmlHelp) - { - HtmlHelp *htmlHelp = HtmlHelp::getInstance(); - htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"functions"); - } - if (hasFtvHelp) + ol.newParagraph(); + if (hl==CMHL_All) { - FTVHelp *ftvHelp = FTVHelp::getInstance(); - ftvHelp->addContentsItem(FALSE,0,"functions",0,ftvHelpTitle); + bool &generateHtml = Config_getBool("GENERATE_HTML") ; + bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); + bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); + if (hasHtmlHelp) + { + HtmlHelp *htmlHelp = HtmlHelp::getInstance(); + htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"functions"); + } + if (hasFtvHelp) + { + FTVHelp *ftvHelp = FTVHelp::getInstance(); + ftvHelp->addContentsItem(FALSE,0,"functions",0,ftvHelpTitle); + } + ol.parseText(theTranslator->trCompoundMembersDescription(Config_getBool("EXTRACT_ALL"))); } - if (hl==CMHL_All) ol.parseText(theTranslator->trCompoundMembersDescription(Config_getBool("EXTRACT_ALL"))); writeMemberList(ol,quickIndex,hl); endFile(ol); ol.popGeneratorState(); @@ -2262,7 +2264,7 @@ static void writeFileMemberIndexFiltered(OutputList &ol, ol.writeString(fixSpaces(theTranslator->trDefines())); endQuickIndexItem(ol); } - ol.writeString("</div><p>\n"); + ol.writeString("</div>\n"); bool quickIndex = documentedFileMembers[hl]>maxItemsBeforeQuickIndex; @@ -2270,20 +2272,24 @@ static void writeFileMemberIndexFiltered(OutputList &ol, { writeQuickMemberIndex(ol,g_fileIndexLetterUsed[hl]); } - bool &generateHtml = Config_getBool("GENERATE_HTML") ; - bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); - bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); - if (hasHtmlHelp) - { - HtmlHelp *htmlHelp = HtmlHelp::getInstance(); - htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"globals"); - } - if (hasFtvHelp) + ol.newParagraph(); + if (hl==FMHL_All) { - FTVHelp *ftvHelp = FTVHelp::getInstance(); - ftvHelp->addContentsItem(FALSE,0,"globals",0,ftvHelpTitle); + bool &generateHtml = Config_getBool("GENERATE_HTML") ; + bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); + bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); + if (hasHtmlHelp) + { + HtmlHelp *htmlHelp = HtmlHelp::getInstance(); + htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"globals"); + } + if (hasFtvHelp) + { + FTVHelp *ftvHelp = FTVHelp::getInstance(); + ftvHelp->addContentsItem(FALSE,0,"globals",0,ftvHelpTitle); + } + ol.parseText(theTranslator->trFileMembersDescription(Config_getBool("EXTRACT_ALL"))); } - if (hl==FMHL_All) ol.parseText(theTranslator->trFileMembersDescription(Config_getBool("EXTRACT_ALL"))); writeFileMemberList(ol,quickIndex,hl); endFile(ol); ol.popGeneratorState(); @@ -2363,27 +2369,31 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol, ol.writeString(fixSpaces(theTranslator->trEnumerationValues())); endQuickIndexItem(ol); } - ol.writeString("</div><p>\n"); + ol.writeString("</div>\n"); bool quickIndex = documentedNamespaceMembers[hl]>maxItemsBeforeQuickIndex; if (quickIndex) { writeQuickMemberIndex(ol,g_namespaceIndexLetterUsed[hl]); } - bool &generateHtml = Config_getBool("GENERATE_HTML") ; - bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); - bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); - if (hasHtmlHelp) - { - HtmlHelp *htmlHelp = HtmlHelp::getInstance(); - htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"namespacemembers"); - } - if (hasFtvHelp) + ol.newParagraph(); + if (hl==NMHL_All) { - FTVHelp *ftvHelp = FTVHelp::getInstance(); - ftvHelp->addContentsItem(FALSE,0,"namespacemembers",0,ftvHelpTitle); + bool &generateHtml = Config_getBool("GENERATE_HTML") ; + bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); + bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); + if (hasHtmlHelp) + { + HtmlHelp *htmlHelp = HtmlHelp::getInstance(); + htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"namespacemembers"); + } + if (hasFtvHelp) + { + FTVHelp *ftvHelp = FTVHelp::getInstance(); + ftvHelp->addContentsItem(FALSE,0,"namespacemembers",0,ftvHelpTitle); + } + ol.parseText(theTranslator->trNamespaceMemberDescription(Config_getBool("EXTRACT_ALL"))); } - if (hl==NMHL_All) ol.parseText(theTranslator->trNamespaceMemberDescription(Config_getBool("EXTRACT_ALL"))); writeNamespaceMemberList(ol,quickIndex,hl); endFile(ol); ol.popGeneratorState(); diff --git a/src/scanner.l b/src/scanner.l index 4cf55d0..5c87275 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -3367,14 +3367,14 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] current->groupDocType = Entry::GROUPDOC_NORMAL; BEGIN( GroupDocArg1 ); } -<Doc,JavaDoc>{B}*{CMD}"addtogroup"{B}+ { +<Doc,PageDoc,ExampleDoc,JavaDoc>{B}*{CMD}"addtogroup"{B}+ { current->section = Entry::GROUPDOC_SEC; current->fileName = yyFileName; current->startLine = yyLineNr; current->groupDocType = Entry::GROUPDOC_ADD; BEGIN( GroupDocArg1 ); } -<Doc,JavaDoc>{B}*{CMD}"weakgroup"{B}+ { +<Doc,PageDoc,ExampleDoc,JavaDoc>{B}*{CMD}"weakgroup"{B}+ { current->section = Entry::GROUPDOC_SEC; current->fileName = yyFileName; current->startLine = yyLineNr; diff --git a/src/translator_cz.h b/src/translator_cz.h index a0db49b..f826808 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -20,18 +20,9 @@ // The first translation from English to Czech was started by -// Vlastimil Havran. He wrote: -// -// "In the cases where are more translations possible I hope -// that I have selected the most reasonable text. If not, please, -// mail the comments and text proposals to -// -// havran@fel.cvut.cz, 1999/04/11" -// -// The prototype version of Czech strings with diacritics was -// implemented by Petr Prikryl (prikrylp@skil.cz), 2000/06/20. As -// Vlastimil was quite busy at the time, he agreed that Petr be the -// maintainer for a while (from 2000/06/20). +// Vlastimil Havran (1999--2000). The prototype version of Czech strings +// with diacritics was implemented by Petr Prikryl (prikrylp@skil.cz), +// 2000/06/20. Vlastimil agreed that Petr be the new maintainer. // // Updates: // -------- @@ -144,12 +135,10 @@ // 2002/07/29 // - The new trDeprecatedList() implemented. // -// 2002/10/15 -// - The new trEvents() and trEventDocumentation() implemented. -// -// 2003/04/28 -// - The five new methods "since 1.3" implemented. -// +// 2002/10/15 - The new trEvents() and trEventDocumentation() implemented. +// 2003/04/28 - Five new methods "since 1.3" implemented. +// 2003/06/10 - Two new methods "since 1.3.1" implemented. + // Todo // ---- // - The trReimplementedFromList() should pass the kind of the @@ -168,7 +157,7 @@ // Windows version. The version which does not call the function is // probably slightly faster. -class TranslatorCzech : public TranslatorAdapter_1_3_1 +class TranslatorCzech : public Translator { private: /*! The decode() inline assumes the source written in the @@ -1602,6 +1591,23 @@ class TranslatorCzech : public TranslatorAdapter_1_3_1 return decode("Statické atributy balíku"); } +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return decode("Vše"); + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return decode("Graf volání této funkce:"); + } + }; #endif // TRANSLATOR_CZ_H diff --git a/src/translator_fr.h b/src/translator_fr.h index 82b22b2..ce136a0 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -16,8 +16,7 @@ * The translation into French was provided by * Christophe Bordeux (bordeux@lig.di.epfl.ch) * and after version 1.2.0 by Xavier Outhier (xouthier@yahoo.fr) - * member of the non for profit association D2SET (http://www.d2set.org, - * d2set@d2set.org). + * member of the non for profit association D2SET (http://d2set.free.fr) */ /****************************************************************************** @@ -45,11 +44,17 @@ * -------------+------------------------------------------------------------ * 2003-03-29 | Update for new since 1.3 * -------------+------------------------------------------------------------ + * 2003-03-29 | Changed fonction into méthode. + * -------------+------------------------------------------------------------ + * 2003-06-06 | Fixed code page problem appeared between 1.42 and 1.43 in CVS + * -------------+------------------------------------------------------------ + * 2003-06-10 | Update for new since 1.3.1 + * -------------+------------------------------------------------------------ */ #ifndef TRANSLATOR_FR_H #define TRANSLATOR_FR_H -class TranslatorFrench : public TranslatorAdapter_1_3_1 +class TranslatorFrench : public Translator { public: QCString idLanguage() @@ -1320,14 +1325,14 @@ class TranslatorFrench : public TranslatorAdapter_1_3_1 */ virtual QCString trPackageMembers() { - return "Fonctions de paquetage"; + return "Méthodes de paquetage"; } /*! Used as a heading for a list of static Java class functions with * package scope. */ virtual QCString trStaticPackageMembers() { - return "Fonctions statiques de paquetage"; + return "Méthodes statiques de paquetage"; } /*! Used as a heading for a list of Java class variables with package * scope. @@ -1343,7 +1348,23 @@ class TranslatorFrench : public TranslatorAdapter_1_3_1 { return "Attributs statiques de paquetage"; } - + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "Tout"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Voici le graphique d'appel pour cette fonction:"; + } }; diff --git a/src/translator_it.h b/src/translator_it.h index 406ce4b..cebfd3d 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -19,6 +19,7 @@ * * Revision history * + * 2003/06: translated new items used since version 1.3.1 * 2003/04: translated new items used since version 1.3 * 2002/11: translated new items used since version 1.2.18 * 2002/08: translated new items used since version 1.2.17 @@ -68,7 +69,7 @@ #ifndef TRANSLATOR_IT_H #define TRANSLATOR_IT_H -class TranslatorItalian : public TranslatorAdapter_1_3_1 +class TranslatorItalian : public Translator { public: @@ -1430,6 +1431,23 @@ class TranslatorItalian : public TranslatorAdapter_1_3_1 return "Attributi statici con visibilità di package"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "Tutto"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Questo è il grafo delle chiamate per questa funzione:"; + } + }; #endif diff --git a/src/translator_pt.h b/src/translator_pt.h index 47733b2..7444a10 100644 --- a/src/translator_pt.h +++ b/src/translator_pt.h @@ -19,6 +19,8 @@ * * VERSION HISTORY * --------------- + * 007 09 june 2003 + * ! Updated for doxygen v1.3.1 * 006 30 july 2002 * ! Updated for doxygen v1.2.17 * 005 10 july 2002 @@ -38,7 +40,7 @@ #ifndef TRANSLATOR_PT_H #define TRANSLATOR_PT_H -class TranslatorPortuguese : public TranslatorAdapter_1_2_18 +class TranslatorPortuguese : public TranslatorAdapter_1_3_1 { public: @@ -127,7 +129,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_2_18 /*! this is the first part of a sentence that is followed by a class name */ QCString trThisIsTheListOfAllMembers() - { return "Esta é a lista completa dos membros de "; } + { return "Lista completa de todos os membros de "; } /*! this is the remainder of the sentence after the class name */ QCString trIncludingInheritedMembers() @@ -268,7 +270,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_2_18 { result+=" documentadas"; } - result+=" com links para "; + result+=" com referência para "; if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) @@ -297,20 +299,20 @@ class TranslatorPortuguese : public TranslatorAdapter_1_2_18 /*! This is an introduction to the page with all file members. */ QCString trFileMembersDescription(bool extractAll) { - QCString result="Lista de todas as "; + QCString result="Lista de "; if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="funções, variáveis, definições, enumerações e definições de tipo "; + result+="todas as funções, variáveis, definições, enumerações e definições de tipo "; if (!extractAll) result+="documentadas "; } else { - result+="ficheiros membro"; + result+="todos os ficheiros membro "; if (!extractAll) result+="documentados "; } - result+="com links para "; + result+="com referência para "; if (extractAll) - result+="os ficheiro a que pertecem:"; + result+="o ficheiro a que pertecem:"; else result+="a respectiva documentação:"; return result; @@ -416,7 +418,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_2_18 * list of defines */ QCString trDefines() - { return "Definição de macros"; } + { return "Macros"; } /*! This is used in the documentation of a file as a header before the * list of function prototypes @@ -740,7 +742,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_2_18 QCString result="Lista "; if (extractAll) result+="de todos os "; else result+="de toda a documentação dos "; - result+="membros do namespace com links para "; + result+="membros do namespace com referência para "; if (extractAll) result+="a documentação de cada membro:"; else @@ -1396,6 +1398,79 @@ class TranslatorPortuguese : public TranslatorAdapter_1_2_18 return "Lista de Deprecados"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Eventos"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Documentação dos eventos"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return "Tipos do Pacote"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return "Funções do Pacote"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return "Funções Estáticas do Pacote"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return "Atributos do Pacote"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return "Atributos Estáticos do Pacote"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "Tudo"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Grafo de chamadas desta função:"; + } + }; #endif diff --git a/src/util.cpp b/src/util.cpp index c654cb7..e43e7c1 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -757,7 +757,7 @@ bool leftScopeMatch(const QCString &scope, const QCString &name) void linkifyText(const TextGeneratorIntf &out,Definition *scope,const char * /*name*/,const char *text,bool autoBreak,bool external) { - //printf("scope=`%s' name=`%s' Text: `%s'\n",scName,name,text); + //printf("`%s'\n",text); static QRegExp regExp("[a-z_A-Z][a-z_A-Z0-9:]*"); QCString txtStr=text; QCString scopeName; @@ -774,6 +774,13 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,const char * /*n { // add non-word part to the result floatingIndex+=newIndex-skipIndex; + bool insideString=FALSE; + int i; + for (i=index;i<newIndex;i++) + { + if (txtStr.at(i)=='"') insideString=!insideString; + } + if (strLen>30 && floatingIndex>25 && autoBreak) // try to insert a split point { QCString splitText = txtStr.mid(skipIndex,newIndex-skipIndex); @@ -800,41 +807,35 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,const char * /*n } // get word from string QCString word=txtStr.mid(newIndex,matchLen); - ClassDef *cd=0; - FileDef *fd=0; - MemberDef *md=0; - NamespaceDef *nd=0; - GroupDef *gd=0; - - //QCString searchName=name; - //printf("word=`%s' scope=`%s'\n", - // word.data(),scope ? scope->name().data() : "<none>" - // ); - Definition *curScope = scope; - // check if `word' is a documented class name - if ( - 1 - /* !rightScopeMatch(word,searchName) && - !rightScopeMatch(scopeName,word) */ - ) + bool found=FALSE; + if (!insideString) { + ClassDef *cd=0; + FileDef *fd=0; + MemberDef *md=0; + NamespaceDef *nd=0; + GroupDef *gd=0; + + //QCString searchName=name; + //printf("word=`%s' scope=`%s'\n", + // word.data(),scope ? scope->name().data() : "<none>" + // ); + Definition *curScope = scope; + // check if `word' is a documented class name //printf("Searching...\n"); //int scopeOffset=scopeName.length(); - bool found=FALSE; do // for each scope (starting with full scope and going to empty scope) { QCString fullName = word; QCString prefix; replaceNamespaceAliases(fullName,fullName.length()); //if (scopeOffset>0) - if (curScope) + if (curScope && curScope!=Doxygen::globalScope) { - //prefix = scopeName.left(scopeOffset); prefix = curScope->name(); replaceNamespaceAliases(prefix,prefix.length()); fullName.prepend(prefix+"::"); } - //printf("Trying class %s\n",fullName.data()); bool isTypeDef=FALSE; if ((cd=getResolvedClass(scope,fullName,&isTypeDef))) @@ -842,7 +843,6 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,const char * /*n // add link to the result if (external ? cd->isLinkable() : cd->isLinkableInProject()) { - //ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,word); out.writeLink(cd->getReference(),cd->getOutputFileBase(),0,word); found=TRUE; } @@ -851,24 +851,16 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,const char * /*n { goto endloop; } - - //if (scopeOffset==0) - //{ - // scopeOffset=-1; - //} - //else if ((scopeOffset=scopeName.findRev("::",scopeOffset-1))==-1) - //{ - // scopeOffset=0; - //} + if (curScope) curScope = curScope->getOuterScope(); } //while (!found && scopeOffset>=0); while (!found && curScope); endloop: if (scope && - (scope->definitionType()==Definition::TypeClass || - scope->definitionType()==Definition::TypeNamespace - ) + (scope->definitionType()==Definition::TypeClass || + scope->definitionType()==Definition::TypeNamespace + ) ) { scopeName=scope->name(); @@ -890,18 +882,13 @@ endloop: //ol.writeObjectLink(d->getReference(),d->getOutputFileBase(), // md->anchor(),word); out.writeLink(d->getReference(),d->getOutputFileBase(), - md->anchor(),word); + md->anchor(),word); found=TRUE; } } - - if (!found) // add word to the result - { - //ol.docify(word); - out.writeString(word); - } } - else + + if (!found) // add word to the result { //ol.docify(word); out.writeString(word); |