diff options
author | albert-github <albert.tests@gmail.com> | 2018-06-29 14:46:09 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-06-29 14:46:09 (GMT) |
commit | 12eaf6afe565ae1f7d440080205ddb76585bd31d (patch) | |
tree | 94c4a9072b0cb00c826149bc629821166b431c25 /src | |
parent | 154e877cc2e8b10091d7e0068b6f6d5793cd29f3 (diff) | |
download | Doxygen-12eaf6afe565ae1f7d440080205ddb76585bd31d.zip Doxygen-12eaf6afe565ae1f7d440080205ddb76585bd31d.tar.gz Doxygen-12eaf6afe565ae1f7d440080205ddb76585bd31d.tar.bz2 |
Bug 693515 - The 'Examples:' section; bad/missing style and incorrect spelling
Made implementation analogous to the implementation for parameters in respect to padding and the use of colon (:).
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 4 | ||||
-rw-r--r-- | src/htmlgen.cpp | 19 | ||||
-rw-r--r-- | src/htmlgen.h | 2 | ||||
-rw-r--r-- | src/latexgen.cpp | 2 | ||||
-rw-r--r-- | src/latexgen.h | 2 | ||||
-rw-r--r-- | src/mangen.cpp | 2 | ||||
-rw-r--r-- | src/mangen.h | 4 | ||||
-rw-r--r-- | src/memberdef.cpp | 4 | ||||
-rw-r--r-- | src/outputgen.h | 6 | ||||
-rw-r--r-- | src/outputlist.h | 4 | ||||
-rw-r--r-- | src/rtfgen.cpp | 2 | ||||
-rw-r--r-- | src/rtfgen.h | 2 |
12 files changed, 35 insertions, 18 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index 4977760..8a1bff1 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1013,13 +1013,13 @@ void ClassDef::writeDetailedDocumentationBody(OutputList &ol) // write examples if (hasExamples() && m_impl->exampleSDict) { - ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": "); + ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()); ol.startDescForItem(); //ol.startParagraph(); writeExample(ol,m_impl->exampleSDict); //ol.endParagraph(); ol.endDescForItem(); - ol.endSimpleSect(); + ol.endSimpleSect(BaseOutputDocInterface::Examples); } //ol.newParagraph(); writeSourceDef(ol,name()); diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 740b2f5..8f2f415 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1942,10 +1942,20 @@ void HtmlGenerator::endDescTableData() t << "</td>"; } -void HtmlGenerator::startSimpleSect(SectionTypes, +void HtmlGenerator::startSimpleSect(SectionTypes sect, const char *filename,const char *anchor, const char *title) { + if (sect == BaseOutputDocInterface::Examples) + { + QCString className; + className="examples"; + t << "<dl class=\"" << className << "\"><dt>"; + docify(title); + t << "</dt>" << endl; + return; + } + t << "<dl><dt><b>"; if (filename) { @@ -1958,8 +1968,13 @@ void HtmlGenerator::startSimpleSect(SectionTypes, t << "</b></dt>"; } -void HtmlGenerator::endSimpleSect() +void HtmlGenerator::endSimpleSect(SectionTypes sect) { + if (sect == BaseOutputDocInterface::Examples) + { + t << "</dl>" << endl; + return; + } t << "</dl>"; } diff --git a/src/htmlgen.h b/src/htmlgen.h index 2d8d6e0..dad884f 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -249,7 +249,7 @@ class HtmlGenerator : public OutputGenerator //void startDescList(SectionTypes) { t << "<dl compact><dt><b>" << endl; } //void endDescList() { t << "</dl>"; } void startSimpleSect(SectionTypes,const char *,const char *,const char *); - void endSimpleSect(); + void endSimpleSect(SectionTypes); void startParamList(ParamListTypes,const char *); void endParamList(); //void writeDescItem() { t << "<dd>" << endl; } diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 076b354..60c2d0c 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -2119,7 +2119,7 @@ void LatexGenerator::startSimpleSect(SectionTypes,const char *file, t << "]"; } -void LatexGenerator::endSimpleSect() +void LatexGenerator::endSimpleSect(SectionTypes) { t << "\\end{Desc}" << endl; } diff --git a/src/latexgen.h b/src/latexgen.h index 07c4080..2820b98 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -236,7 +236,7 @@ class LatexGenerator : public OutputGenerator void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; } void endDescList() { t << "\\end{Desc}" << endl; } void startSimpleSect(SectionTypes,const char *,const char *,const char *); - void endSimpleSect(); + void endSimpleSect(SectionTypes); void startParamList(ParamListTypes,const char *title); void endParamList(); void startDescForItem() { t << "\\par" << endl; } diff --git a/src/mangen.cpp b/src/mangen.cpp index d23b2fe..99be1dc 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -665,7 +665,7 @@ void ManGenerator::startSimpleSect(SectionTypes,const char *, paragraph=TRUE; } -void ManGenerator::endSimpleSect() +void ManGenerator::endSimpleSect(SectionTypes) { } diff --git a/src/mangen.h b/src/mangen.h index 0413ffd..55c826d 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -170,7 +170,7 @@ class ManGenerator : public OutputGenerator void startDescList(SectionTypes); void endDescList() {} void startSimpleSect(SectionTypes,const char *,const char *,const char *); - void endSimpleSect(); + void endSimpleSect(SectionTypes); void startParamList(ParamListTypes,const char *title); void endParamList(); //void writeDescItem(); @@ -199,7 +199,7 @@ class ManGenerator : public OutputGenerator void startDescTable(const char *t) { startSimpleSect(EnumValues,0,0,t); startDescForItem(); } - void endDescTable() { endDescForItem(); endSimpleSect(); } + void endDescTable() { endDescForItem(); endSimpleSect(BaseOutputDocInterface::NONE); } void startDescTableRow() {} void endDescTableRow() {} void startDescTableTitle() { startItemListItem(); startBold(); startEmphasis(); endItemListItem(); } diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 819904f..83b2791 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -2309,11 +2309,11 @@ void MemberDef::_writeExamples(OutputList &ol) // write the list of examples that use this member if (hasExamples()) { - ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": "); + ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()); ol.startDescForItem(); writeExample(ol,m_impl->exampleSDict); ol.endDescForItem(); - ol.endSimpleSect(); + ol.endSimpleSect(BaseOutputDocInterface::Examples); } } diff --git a/src/outputgen.h b/src/outputgen.h index 44d34b8..a8943c0 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -145,7 +145,9 @@ class BaseOutputDocInterface : public CodeOutputInterface Since, Date, Bug, Note, Warning, Par, Deprecated, Pre, Post, Invar, Remark, Attention, - Todo, Test, RCS, */ EnumValues, + Todo, Test, RCS, */ + NONE, + EnumValues, Examples }; @@ -281,7 +283,7 @@ class BaseOutputDocInterface : public CodeOutputInterface virtual void startSimpleSect(SectionTypes t,const char *file, const char *anchor,const char *title) = 0; - virtual void endSimpleSect() = 0; + virtual void endSimpleSect(SectionTypes t = NONE) = 0; virtual void startParamList(ParamListTypes t,const char *title) = 0; virtual void endParamList() = 0; diff --git a/src/outputlist.h b/src/outputlist.h index 2e89101..07c5207 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -324,8 +324,8 @@ class OutputList : public OutputDocInterface void startSimpleSect(SectionTypes t,const char *file,const char *anchor, const char *title) { forall(&OutputGenerator::startSimpleSect,t,file,anchor,title); } - void endSimpleSect() - { forall(&OutputGenerator::endSimpleSect); } + void endSimpleSect(SectionTypes t) + { forall(&OutputGenerator::endSimpleSect,t); } void startParamList(ParamListTypes t,const char *title) { forall(&OutputGenerator::startParamList,t,title); } void endParamList() diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 64da929..4dd4c10 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -2749,7 +2749,7 @@ void RTFGenerator::startSimpleSect(SectionTypes,const char *file,const char *anc t << rtf_Style_Reset << rtf_DList_DepthStyle(); } -void RTFGenerator::endSimpleSect() +void RTFGenerator::endSimpleSect(SectionTypes) { DBG_RTF(t << "{\\comment (endSimpleSect)}" << endl) m_omitParagraph = FALSE; diff --git a/src/rtfgen.h b/src/rtfgen.h index bb3146a..ed2a351 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -165,7 +165,7 @@ class RTFGenerator : public OutputGenerator const char *,const char *,const char *) {} void startDescList(SectionTypes); void startSimpleSect(SectionTypes,const char *,const char *,const char *); - void endSimpleSect(); + void endSimpleSect(SectionTypes); void startParamList(ParamListTypes,const char *); void endParamList(); //void writeDescItem(); |