Skip to content

Commit c00a2de

Browse files
committed
issue doxygen#11593 Missing links for LaTex, RTF, ... with IMPLICIT_DIR_DOCS
1 parent 703e0d6 commit c00a2de

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

src/definition.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,16 +307,16 @@ void DefinitionImpl::addSectionsToDefinition(const std::vector<const SectionInfo
307307
// qPrint(si->label()),qPrint(name()));
308308
SectionManager &sm = SectionManager::instance();
309309
SectionInfo *gsi=sm.find(si->label());
310-
//printf("===== label=%s gsi=%p\n",qPrint(si->label),gsi);
310+
//printf("===== label=%s gsi=%p\n",qPrint(si->label()),(void*)gsi);
311311
if (gsi==nullptr)
312312
{
313313
gsi = sm.add(*si);
314314
}
315315
if (p->sectionRefs.find(gsi->label())==nullptr)
316316
{
317317
p->sectionRefs.add(gsi);
318-
gsi->setDefinition(p->def);
319318
}
319+
gsi->setDefinition(p->def);
320320
}
321321
}
322322

src/dirdef.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ DirDefImpl::~DirDefImpl()
150150

151151
bool DirDefImpl::isLinkableInProject() const
152152
{
153-
return !isReference();
153+
return !isReference() && hasDocumentation();
154154
}
155155

156156
bool DirDefImpl::isLinkable() const

src/docbookgen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ DB_GEN_C2("IndexSection " << is)
614614
{
615615
if (dd->isLinkableInProject())
616616
{
617-
m_t << "< xi:include href=\"" << dd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
617+
m_t << " <xi:include href=\"" << dd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
618618
}
619619
}
620620
}
@@ -627,7 +627,7 @@ DB_GEN_C2("IndexSection " << is)
627627
{
628628
if (nd->isLinkableInProject() && !nd->isAlias())
629629
{
630-
m_t << "<xi:include href=\"" << nd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
630+
m_t << " <xi:include href=\"" << nd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
631631
}
632632
}
633633
}
@@ -640,7 +640,7 @@ DB_GEN_C2("IndexSection " << is)
640640
{
641641
if (cd->isLinkableInProject() && !cd->isAlias())
642642
{
643-
m_t << "<xi:include href=\"" << cd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
643+
m_t << " <xi:include href=\"" << cd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
644644
}
645645
}
646646
}

src/doctokenizer.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1585,7 +1585,7 @@ static int yyread(yyscan_t yyscanner,char *buf,int max_size)
15851585
static void processSection(yyscan_t yyscanner)
15861586
{
15871587
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
1588-
//printf("%s: found section/anchor with name '%s'\n",qPrint(g_fileName),qPrint(g_secLabel));
1588+
//printf("%s: found section/anchor with name '%s'\n",qPrint(yyextra->fileName),qPrint(yyextra->secLabel));
15891589
QCString file;
15901590
if (yyextra->definition)
15911591
{

src/doxygen.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9612,10 +9612,11 @@ static void findDirDocumentation(const Entry *root)
96129612
}
96139613
if (matchingDir)
96149614
{
9615-
//printf("Match for with dir %s\n",qPrint(matchingDir->name()));
9615+
//printf("Match for with dir %s #anchor=%zu\n",qPrint(matchingDir->name()),root->anchors.size());
96169616
matchingDir->setBriefDescription(root->brief,root->briefFile,root->briefLine);
96179617
matchingDir->setDocumentation(root->doc,root->docFile,root->docLine);
96189618
matchingDir->setRefItems(root->sli);
9619+
matchingDir->addSectionsToDefinition(root->anchors);
96199620
root->commandOverrides.apply_directoryGraph([&](bool b) { matchingDir->overrideDirectoryGraph(b); });
96209621
addDirToGroups(root,matchingDir);
96219622
}
@@ -12074,6 +12075,11 @@ static void writeTagFile()
1207412075
{
1207512076
if (pd->isLinkableInProject()) pd->writeTagFile(tagFile);
1207612077
}
12078+
// for each directory
12079+
for (const auto &dd : *Doxygen::dirLinkedMap)
12080+
{
12081+
if (dd->isLinkableInProject()) dd->writeTagFile(tagFile);
12082+
}
1207712083
if (Doxygen::mainPage) Doxygen::mainPage->writeTagFile(tagFile);
1207812084

1207912085
tagFile << "</tagfile>\n";

0 commit comments

Comments
 (0)