diff options
Diffstat (limited to 'src/pagedef.cpp')
-rw-r--r-- | src/pagedef.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/pagedef.cpp b/src/pagedef.cpp index b2b7dc8..df5cf0d 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -35,7 +35,11 @@ PageDef::PageDef(const char *f,int l,const char *n, m_pageScope = 0; m_nestingLevel = 0; m_fileName = ::convertNameToFile(n,FALSE,TRUE); - m_showToc = FALSE; + m_showToc = Definition::None; + for (int i = 0; i < sizeof(m_localTocLevel) / sizeof(*m_localTocLevel) ; i++) + { + m_localTocLevel[i] = 0; + } } PageDef::~PageDef() @@ -209,7 +213,7 @@ void PageDef::writeDocumentation(OutputList &ol) if (m_showToc && hasSections()) { - writeToc(ol); + writeToc(ol, m_showToc, m_localTocLevel); } writePageDocumentation(ol); @@ -326,8 +330,11 @@ void PageDef::setNestingLevel(int l) m_nestingLevel = l; } -void PageDef::setShowToc(bool b) +void PageDef::setShowToc(int localToc, int *localTocLevel) { - m_showToc |= b; + m_showToc |= localToc; + for (int i = 0; i < sizeof(m_localTocLevel) / sizeof(*m_localTocLevel) ; i++) + { + m_localTocLevel[i] += localTocLevel[i]; + } } - |