From 66d184ce7e93d0c2b27fbb034180bebdbf1c26a1 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 4 Aug 2013 11:58:15 +0200 Subject: Bug 688858 - SHORT_NAMES break references to \page in PDF output --- src/index.cpp | 7 +++++-- src/pagedef.cpp | 14 ++++++++++++++ src/pagedef.h | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/index.cpp b/src/index.cpp index 944d5db..5970a43 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -4129,16 +4129,19 @@ static void writeIndex(OutputList &ol) } QCString title = pd->title(); if (title.isEmpty()) title=pd->name(); + ol.startIndexSection(isPageDocumentation); ol.parseText(title); ol.endIndexSection(isPageDocumentation); + ol.pushGeneratorState(); // write TOC title (RTF only) ol.disableAllBut(OutputGenerator::RTF); ol.startIndexSection(isPageDocumentation2); ol.parseText(title); ol.endIndexSection(isPageDocumentation2); - ol.popGeneratorState(); - ol.writeAnchor(0,pd->name()); + ol.popGeneratorState(); + + ol.writeAnchor(0,pd->getOutputFileBase()); ol.writePageLink(pd->getOutputFileBase(),first); first=FALSE; diff --git a/src/pagedef.cpp b/src/pagedef.cpp index e93b3fd..0133be1 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -61,6 +61,20 @@ QCString PageDef::getOutputFileBase() const return m_fileName; } +void PageDef::setFileName(const char *name) +{ + static bool shortNames = Config_getBool("SHORT_NAMES"); + if (shortNames) + { + m_fileName = convertNameToFile(name); + } + else + { + m_fileName = name; + } +} + + void PageDef::addInnerCompound(Definition *def) { if (def->definitionType()==Definition::TypePage) diff --git a/src/pagedef.h b/src/pagedef.h index 4670ecd..f0e96c2 100644 --- a/src/pagedef.h +++ b/src/pagedef.h @@ -32,7 +32,7 @@ class PageDef : public Definition ~PageDef(); // setters - void setFileName(const char *name) { m_fileName = name; } + void setFileName(const char *name); void setShowToc(bool b); // getters -- cgit v0.12