From 051fb8a536e1d52aa0a0422186975852dd139c06 Mon Sep 17 00:00:00 2001 From: Artur Kink Date: Sun, 25 Sep 2016 22:38:57 -0400 Subject: Fixup man only output to use generator state push pop --- src/classdef.cpp | 3 ++- src/dirdef.cpp | 3 ++- src/filedef.cpp | 3 ++- src/groupdef.cpp | 9 ++++++--- src/namespacedef.cpp | 3 ++- src/pagedef.cpp | 5 +++-- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/classdef.cpp b/src/classdef.cpp index 407d263..51fb8c6 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -954,9 +954,10 @@ void ClassDef::writeBriefDescription(OutputList &ol,bool exampleFlag) if (hasBriefDescription()) { ol.startParagraph(); + ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.writeString(" - "); - ol.enableAll(); + ol.popGeneratorState(); ol.generateDoc(briefFile(),briefLine(),this,0, briefDescription(),TRUE,FALSE,0,TRUE,FALSE); ol.pushGeneratorState(); diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 2d46e45..0a63c1e 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -177,9 +177,10 @@ void DirDef::writeBriefDescription(OutputList &ol) if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); + ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.writeString(" - "); - ol.enableAll(); + ol.popGeneratorState(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); diff --git a/src/filedef.cpp b/src/filedef.cpp index 0791ebc..9c04dc8 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -373,9 +373,10 @@ void FileDef::writeBriefDescription(OutputList &ol) if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); + ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.writeString(" - "); - ol.enableAll(); + ol.popGeneratorState(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 8c688d7..ccfa0df 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -712,10 +712,8 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) ) { ol.pushGeneratorState(); - ol.disableAllBut(OutputGenerator::Man); // always print title for man page if (pageDict->count()!=countMembers()) // not only pages -> classical layout { - ol.enableAll(); ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); ol.writeRuler(); @@ -725,6 +723,10 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) ol.writeAnchor(0,"details"); ol.popGeneratorState(); } + else + { + ol.disableAllBut(OutputGenerator::Man); // always print title for man page + } ol.startGroupHeader(); ol.parseText(title); ol.endGroupHeader(); @@ -773,9 +775,10 @@ void GroupDef::writeBriefDescription(OutputList &ol) if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); + ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.writeString(" - "); - ol.enableAll(); + ol.popGeneratorState(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 839a39d..29f68a4 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -408,9 +408,10 @@ void NamespaceDef::writeBriefDescription(OutputList &ol) if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); + ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.writeString(" - "); - ol.enableAll(); + ol.popGeneratorState(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); diff --git a/src/pagedef.cpp b/src/pagedef.cpp index ab64a88..1210305 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -232,16 +232,17 @@ void PageDef::writePageDocumentation(OutputList &ol) QCString docStr = documentation()+inbodyDocumentation(); if (!docStr.isEmpty()) { + ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.writeString(" - "); - ol.enableAll(); + ol.popGeneratorState(); } ol.generateDoc( docFile(), // fileName docLine(), // startLine this, // context 0, // memberdef - docStr, // docStr + docStr, // docStr TRUE, // index words FALSE // not an example ); -- cgit v0.12