Commit 66d184ce authored by Dimitri van Heesch's avatar Dimitri van Heesch

Bug 688858 - SHORT_NAMES break references to \page in PDF output

parent 4fcc4168
...@@ -4129,16 +4129,19 @@ static void writeIndex(OutputList &ol) ...@@ -4129,16 +4129,19 @@ static void writeIndex(OutputList &ol)
} }
QCString title = pd->title(); QCString title = pd->title();
if (title.isEmpty()) title=pd->name(); if (title.isEmpty()) title=pd->name();
ol.startIndexSection(isPageDocumentation); ol.startIndexSection(isPageDocumentation);
ol.parseText(title); ol.parseText(title);
ol.endIndexSection(isPageDocumentation); ol.endIndexSection(isPageDocumentation);
ol.pushGeneratorState(); // write TOC title (RTF only) ol.pushGeneratorState(); // write TOC title (RTF only)
ol.disableAllBut(OutputGenerator::RTF); ol.disableAllBut(OutputGenerator::RTF);
ol.startIndexSection(isPageDocumentation2); ol.startIndexSection(isPageDocumentation2);
ol.parseText(title); ol.parseText(title);
ol.endIndexSection(isPageDocumentation2); ol.endIndexSection(isPageDocumentation2);
ol.popGeneratorState(); ol.popGeneratorState();
ol.writeAnchor(0,pd->name());
ol.writeAnchor(0,pd->getOutputFileBase());
ol.writePageLink(pd->getOutputFileBase(),first); ol.writePageLink(pd->getOutputFileBase(),first);
first=FALSE; first=FALSE;
......
...@@ -61,6 +61,20 @@ QCString PageDef::getOutputFileBase() const ...@@ -61,6 +61,20 @@ QCString PageDef::getOutputFileBase() const
return m_fileName; 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) void PageDef::addInnerCompound(Definition *def)
{ {
if (def->definitionType()==Definition::TypePage) if (def->definitionType()==Definition::TypePage)
......
...@@ -32,7 +32,7 @@ class PageDef : public Definition ...@@ -32,7 +32,7 @@ class PageDef : public Definition
~PageDef(); ~PageDef();
// setters // setters
void setFileName(const char *name) { m_fileName = name; } void setFileName(const char *name);
void setShowToc(bool b); void setShowToc(bool b);
// getters // getters
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment