Pass in tocMaxDepth and sectionMaxDepth to PdfBuilder.

This commit is contained in:
dcramer
2012-11-08 22:39:59 -06:00
parent c8980b4c7b
commit ca72b6d57c
2 changed files with 40 additions and 8 deletions

View File

@@ -735,6 +735,8 @@ public abstract class WebHelpMojo extends AbstractWebhelpMojo {
pdfBuilder.setSectionAutolabel(getProperty("sectionAutolabel")); pdfBuilder.setSectionAutolabel(getProperty("sectionAutolabel"));
pdfBuilder.setFormalProcedures(getProperty("formalProcedures")); pdfBuilder.setFormalProcedures(getProperty("formalProcedures"));
pdfBuilder.setGenerateToc(getProperty("generateToc")); pdfBuilder.setGenerateToc(getProperty("generateToc"));
pdfBuilder.setTocMaxDepth(getProperty("tocMaxDepth"));
pdfBuilder.setTocSectionDepth(getProperty("tocSectionDepth"));
String srcFilename = this.projectBuildDirectory+"/docbkx/"+sourceFile.getName(); String srcFilename = this.projectBuildDirectory+"/docbkx/"+sourceFile.getName();
File tempHandle = new File(srcFilename); File tempHandle = new File(srcFilename);

View File

@@ -113,6 +113,8 @@ public class PDFBuilder {
private String sectionAutolabel; private String sectionAutolabel;
private String formalProcedures; private String formalProcedures;
private String generateToc; private String generateToc;
private String tocMaxDepth;
private String tocSectionDepth;
private String draftStatus; private String draftStatus;
private String trimWadlUriCount; private String trimWadlUriCount;
@@ -342,12 +344,24 @@ public class PDFBuilder {
transformer.setParameter("coverUrl", coverUrl); transformer.setParameter("coverUrl", coverUrl);
transformer.setParameter("coverColor", coverColor); transformer.setParameter("coverColor", coverColor);
if(null != sectionAutolabel){
transformer.setParameter("section.autolabel", sectionAutolabel); transformer.setParameter("section.autolabel", sectionAutolabel);
transformer.setParameter("chapter.autolabel", chapterAutolabel); }
transformer.setParameter("generate.toc", generateToc); if(null != chapterAutolabel){
transformer.setParameter("formal.procedures", formalProcedures); transformer.setParameter("chapter.autolabel", chapterAutolabel);
}
if(null != generateToc){
transformer.setParameter("generate.toc", generateToc);
}
if(null != tocMaxDepth){
transformer.setParameter("toc.max.depth", tocMaxDepth);
}
if(null != tocSectionDepth){
transformer.setParameter("toc.section.depth", tocSectionDepth);
}
if(null != formalProcedures){
transformer.setParameter("formal.procedures", formalProcedures);
}
transformer.setParameter("project.build.directory", projectBuildDirectory); transformer.setParameter("project.build.directory", projectBuildDirectory);
@@ -607,6 +621,22 @@ public class PDFBuilder {
this.generateToc = generateToc; this.generateToc = generateToc;
} }
public String getTocMaxDepth() {
return tocMaxDepth;
}
public void setTocSectionDepth(String tocSectionDepth) {
this.tocSectionDepth = tocSectionDepth;
}
public String getTocSectionDepth() {
return tocSectionDepth;
}
public void setTocMaxDepth(String tocMaxDepth) {
this.tocMaxDepth = tocMaxDepth;
}
public String getDraftStatus() { public String getDraftStatus() {
return draftStatus; return draftStatus;