diff options
Diffstat (limited to 'src/htmlgen.cpp')
-rw-r--r-- | src/htmlgen.cpp | 263 |
1 files changed, 153 insertions, 110 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 7b125af..cd615e4 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -16,8 +16,10 @@ */ #include <stdlib.h> - #include <assert.h> + +#include <mutex> + #include <qdir.h> #include <qregexp.h> #include "message.h" @@ -58,8 +60,7 @@ static QCString g_header; static QCString g_footer; static QCString g_mathjax_code; static QCString g_latex_macro; - -static bool DoxyCodeLineOpen = FALSE; +static const char *hex="0123456789ABCDEF"; // note: this is only active if DISABLE_INDEX=YES, if DISABLE_INDEX is disabled, this // part will be rendered inside menu.js @@ -87,7 +88,7 @@ static void writeClientSearchBox(FTextStream &t,const char *relPath) // part will be rendered inside menu.js static void writeServerSearchBox(FTextStream &t,const char *relPath,bool highlightSearch) { - static bool externalSearch = Config_getBool(EXTERNAL_SEARCH); + bool externalSearch = Config_getBool(EXTERNAL_SEARCH); t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n"; t << " <div class=\"left\">\n"; t << " <form id=\"FSearchBox\" action=\"" << relPath; @@ -422,18 +423,18 @@ static QCString substituteHtmlKeywords(const QCString &str, QCString mathJaxJs; QCString extraCssText; - static QCString projectName = Config_getString(PROJECT_NAME); - static bool timeStamp = Config_getBool(HTML_TIMESTAMP); - static bool treeView = Config_getBool(GENERATE_TREEVIEW); - static bool searchEngine = Config_getBool(SEARCHENGINE); - static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); - static bool mathJax = Config_getBool(USE_MATHJAX); - static QCString mathJaxFormat = Config_getEnum(MATHJAX_FORMAT); - static bool disableIndex = Config_getBool(DISABLE_INDEX); - static bool hasProjectName = !projectName.isEmpty(); - static bool hasProjectNumber = !Config_getString(PROJECT_NUMBER).isEmpty(); - static bool hasProjectBrief = !Config_getString(PROJECT_BRIEF).isEmpty(); - static bool hasProjectLogo = !Config_getString(PROJECT_LOGO).isEmpty(); + QCString projectName = Config_getString(PROJECT_NAME); + bool timeStamp = Config_getBool(HTML_TIMESTAMP); + bool treeView = Config_getBool(GENERATE_TREEVIEW); + bool searchEngine = Config_getBool(SEARCHENGINE); + bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); + bool mathJax = Config_getBool(USE_MATHJAX); + QCString mathJaxFormat = Config_getEnum(MATHJAX_FORMAT); + bool disableIndex = Config_getBool(DISABLE_INDEX); + bool hasProjectName = !projectName.isEmpty(); + bool hasProjectNumber = !Config_getString(PROJECT_NUMBER).isEmpty(); + bool hasProjectBrief = !Config_getString(PROJECT_BRIEF).isEmpty(); + bool hasProjectLogo = !Config_getString(PROJECT_LOGO).isEmpty(); static bool titleArea = (hasProjectName || hasProjectBrief || hasProjectLogo || (disableIndex && searchEngine)); cssFile = Config_getString(HTML_STYLESHEET); @@ -608,12 +609,11 @@ static QCString substituteHtmlKeywords(const QCString &str, //-------------------------------------------------------------------------- HtmlCodeGenerator::HtmlCodeGenerator() - : m_streamSet(FALSE), m_col(0) { } HtmlCodeGenerator::HtmlCodeGenerator(FTextStream &t,const QCString &relPath) - : m_col(0), m_relPath(relPath) + : m_relPath(relPath) { setTextStream(t); } @@ -631,7 +631,7 @@ void HtmlCodeGenerator::setRelativePath(const QCString &path) void HtmlCodeGenerator::codify(const char *str) { - static int tabSize = Config_getInt(TAB_SIZE); + int tabSize = Config_getInt(TAB_SIZE); if (str && m_streamSet) { const char *p=str; @@ -673,9 +673,21 @@ void HtmlCodeGenerator::codify(const char *str) m_t << "\\"; m_col++; break; - default: p=writeUtf8Char(m_t,p-1); - m_col++; - break; + default: + { + uchar uc = static_cast<uchar>(c); + if (uc<32) + { + m_t << "$" << hex[uc>>4] << hex[uc&0xF] << ";"; + m_col++; + } + else + { + p=writeUtf8Char(m_t,p-1); + m_col++; + } + } + break; } } } @@ -699,18 +711,30 @@ void HtmlCodeGenerator::docify(const char *str) case '&': m_t << "&"; break; case '"': m_t << """; break; case '\\': - if (*p=='<') - { m_t << "<"; p++; } - else if (*p=='>') - { m_t << ">"; p++; } - else if (*p=='(') - { m_t << "\\‍("; p++; } - else if (*p==')') - { m_t << "\\‍)"; p++; } - else - m_t << "\\"; - break; - default: m_t << c; + if (*p=='<') + { m_t << "<"; p++; } + else if (*p=='>') + { m_t << ">"; p++; } + else if (*p=='(') + { m_t << "\\‍("; p++; } + else if (*p==')') + { m_t << "\\‍)"; p++; } + else + m_t << "\\"; + break; + default: + { + uchar uc = static_cast<uchar>(c); + if (uc<32 && !isspace(c)) + { + m_t << "$" << hex[uc>>4] << hex[uc&0xF] << ";"; + } + else + { + m_t << c; + } + } + break; } } } @@ -726,10 +750,10 @@ void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename, qsnprintf(lineNumber,maxLineNrStr,"%5d",l); qsnprintf(lineAnchor,maxLineNrStr,"l%05d",l); - if (!DoxyCodeLineOpen) + if (!m_lineOpen) { m_t << "<div class=\"line\">"; - DoxyCodeLineOpen = TRUE; + m_lineOpen = TRUE; } m_t << "<a name=\"" << lineAnchor << "\"></a><span class=\"lineno\">"; @@ -868,10 +892,10 @@ void HtmlCodeGenerator::startCodeLine(bool) if (m_streamSet) { m_col=0; - if (!DoxyCodeLineOpen) + if (!m_lineOpen) { m_t << "<div class=\"line\">"; - DoxyCodeLineOpen = TRUE; + m_lineOpen = TRUE; } } } @@ -885,10 +909,10 @@ void HtmlCodeGenerator::endCodeLine() m_t << " "; m_col++; } - if (DoxyCodeLineOpen) + if (m_lineOpen) { m_t << "</div>\n"; - DoxyCodeLineOpen = FALSE; + m_lineOpen = FALSE; } } } @@ -908,13 +932,39 @@ void HtmlCodeGenerator::writeCodeAnchor(const char *anchor) if (m_streamSet) m_t << "<a name=\"" << anchor << "\"></a>"; } +void HtmlCodeGenerator::startCodeFragment(const char *) +{ + if (m_streamSet) m_t << "<div class=\"fragment\">"; +} + +void HtmlCodeGenerator::endCodeFragment(const char *) +{ + //endCodeLine checks is there is still an open code line, if so closes it. + endCodeLine(); + + if (m_streamSet) m_t << "</div><!-- fragment -->"; +} + + //-------------------------------------------------------------------------- -HtmlGenerator::HtmlGenerator() : OutputGenerator() +HtmlGenerator::HtmlGenerator() : OutputGenerator(Config_getString(HTML_OUTPUT)) { - m_dir=Config_getString(HTML_OUTPUT); - m_emptySection=FALSE; - m_sectionCount=0; +} + +HtmlGenerator::HtmlGenerator(const HtmlGenerator &og) : OutputGenerator(og) +{ +} + +HtmlGenerator &HtmlGenerator::operator=(const HtmlGenerator &og) +{ + OutputGenerator::operator=(og); + return *this; +} + +std::unique_ptr<OutputGenerator> HtmlGenerator::clone() const +{ + return std::make_unique<HtmlGenerator>(*this); } HtmlGenerator::~HtmlGenerator() @@ -922,9 +972,10 @@ HtmlGenerator::~HtmlGenerator() //printf("HtmlGenerator::~HtmlGenerator()\n"); } + void HtmlGenerator::init() { - QCString dname=Config_getString(HTML_OUTPUT); + QCString dname = Config_getString(HTML_OUTPUT); QDir d(dname); if (!d.exists() && !d.mkdir(dname)) { @@ -1032,32 +1083,32 @@ void HtmlGenerator::writeTabData() mgr.copyResource("nav_g.png",dname); } -void HtmlGenerator::writeSearchData(const char *dir) +void HtmlGenerator::writeSearchData(const char *dname) { - static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); - //writeImgData(dir,serverBasedSearch ? search_server_data : search_client_data); + bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); + //writeImgData(dname,serverBasedSearch ? search_server_data : search_client_data); ResourceMgr &mgr = ResourceMgr::instance(); - mgr.copyResource("search_l.png",dir); + mgr.copyResource("search_l.png",dname); Doxygen::indexList->addImageFile("search/search_l.png"); - mgr.copyResource("search_m.png",dir); + mgr.copyResource("search_m.png",dname); Doxygen::indexList->addImageFile("search/search_m.png"); - mgr.copyResource("search_r.png",dir); + mgr.copyResource("search_r.png",dname); Doxygen::indexList->addImageFile("search/search_r.png"); if (serverBasedSearch) { - mgr.copyResource("mag.svg",dir); + mgr.copyResource("mag.svg",dname); Doxygen::indexList->addImageFile("search/mag.svg"); } else { - mgr.copyResource("close.svg",dir); + mgr.copyResource("close.svg",dname); Doxygen::indexList->addImageFile("search/close.svg"); - mgr.copyResource("mag_sel.svg",dir); + mgr.copyResource("mag_sel.svg",dname); Doxygen::indexList->addImageFile("search/mag_sel.svg"); } - QCString searchDirName = Config_getString(HTML_OUTPUT)+"/search"; + QCString searchDirName = dname; QFile f(searchDirName+"/search.css"); if (f.open(IO_WriteOnly)) { @@ -1101,8 +1152,10 @@ void HtmlGenerator::writeFooterFile(QFile &file) t << ResourceMgr::instance().getAsString("footer.html"); } +static std::mutex g_indexLock; + void HtmlGenerator::startFile(const char *name,const char *, - const char *title) + const char *title,int id) { //printf("HtmlGenerator::startFile(%s)\n",name); m_relPath = relativePathToRoot(name); @@ -1110,23 +1163,27 @@ void HtmlGenerator::startFile(const char *name,const char *, m_lastTitle=title; startPlainFile(fileName); + m_codeGen.setId(id); m_codeGen.setTextStream(t); m_codeGen.setRelativePath(m_relPath); - Doxygen::indexList->addIndexFile(fileName); + { + std::lock_guard<std::mutex> lock(g_indexLock); + Doxygen::indexList->addIndexFile(fileName); + } m_lastFile = fileName; t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),m_relPath); t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " << getDoxygenVersion() << " -->" << endl; - //static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); - static bool searchEngine = Config_getBool(SEARCHENGINE); + //bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); + bool searchEngine = Config_getBool(SEARCHENGINE); if (searchEngine /*&& !generateTreeView*/) { t << "<script type=\"text/javascript\">\n"; t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" - << m_relPath<< "search\",false,'" << theTranslator->trSearch() << "');\n"; + << m_relPath<< "search\",false,'" << theTranslator->trSearch() << "','" << Doxygen::htmlFileExtension << "');\n"; t << "/* @license-end */\n"; t << "</script>\n"; } @@ -1136,8 +1193,8 @@ void HtmlGenerator::startFile(const char *name,const char *, void HtmlGenerator::writeSearchInfo(FTextStream &t,const QCString &) { - static bool searchEngine = Config_getBool(SEARCHENGINE); - static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); + bool searchEngine = Config_getBool(SEARCHENGINE); + bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); if (searchEngine && !serverBasedSearch) { t << "<!-- window showing the filter options -->\n"; @@ -1165,7 +1222,7 @@ void HtmlGenerator::writeSearchInfo() QCString HtmlGenerator::writeLogoAsString(const char *path) { - static bool timeStamp = Config_getBool(HTML_TIMESTAMP); + bool timeStamp = Config_getBool(HTML_TIMESTAMP); QCString result; if (timeStamp) { @@ -1178,7 +1235,7 @@ QCString HtmlGenerator::writeLogoAsString(const char *path) { result += theTranslator->trGeneratedBy(); } - result += " \n<a href=\"http://www.doxygen.org/index.html\">\n" + result += " \n<a href=\"https://www.doxygen.org/index.html\">\n" "<img class=\"footer\" src=\""; result += path; result += "doxygen.svg\" width=\"104\" height=\"31\" alt=\"doxygen\"/></a> "; @@ -1200,9 +1257,6 @@ void HtmlGenerator::writePageFooter(FTextStream &t,const QCString &lastTitle, void HtmlGenerator::writeFooter(const char *navPath) { - // Currently only tooltips in HTML - TooltipManager::instance()->writeTooltips(m_codeGen); - writePageFooter(t,m_lastTitle,m_relPath,navPath); } @@ -1409,7 +1463,7 @@ void HtmlGenerator::endTextLink() void HtmlGenerator::startHtmlLink(const char *url) { - static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); + bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); t << "<a "; if (generateTreeView) t << "target=\"top\" "; t << "href=\""; @@ -1534,7 +1588,7 @@ static void startSectionHeader(FTextStream &t, const QCString &relPath,int sectionCount) { //t << "<!-- startSectionHeader -->"; - static bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS); + bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS); if (dynamicSections) { t << "<div id=\"dynsection-" << sectionCount << "\" " @@ -1559,7 +1613,7 @@ static void endSectionHeader(FTextStream &t) static void startSectionSummary(FTextStream &t,int sectionCount) { //t << "<!-- startSectionSummary -->"; - static bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS); + bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS); if (dynamicSections) { t << "<div id=\"dynsection-" << sectionCount << "-summary\" " @@ -1571,7 +1625,7 @@ static void startSectionSummary(FTextStream &t,int sectionCount) static void endSectionSummary(FTextStream &t) { //t << "<!-- endSectionSummary -->"; - static bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS); + bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS); if (dynamicSections) { t << "</div>" << endl; @@ -1581,7 +1635,7 @@ static void endSectionSummary(FTextStream &t) static void startSectionContent(FTextStream &t,int sectionCount) { //t << "<!-- startSectionContent -->"; - static bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS); + bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS); if (dynamicSections) { t << "<div id=\"dynsection-" << sectionCount << "-content\" " @@ -1617,7 +1671,7 @@ void HtmlGenerator::endClassDiagram(const ClassDiagram &d, startSectionSummary(t,m_sectionCount); endSectionSummary(t); startSectionContent(t,m_sectionCount); - d.writeImage(tt,m_dir,m_relPath,fileName); + d.writeImage(tt,dir(),m_relPath,fileName); if (!result.isEmpty()) { t << " <div class=\"center\">" << endl; @@ -2000,7 +2054,7 @@ void HtmlGenerator::endDotGraph(DotClassGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,GOF_BITMAP,EOF_Html,m_dir,m_fileName,m_relPath,TRUE,TRUE,m_sectionCount); + g.writeGraph(t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,TRUE,m_sectionCount); if (generateLegend && !umlLook) { t << "<center><span class=\"legend\">["; @@ -2026,7 +2080,7 @@ void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,GOF_BITMAP,EOF_Html,m_dir,m_fileName,m_relPath,TRUE,m_sectionCount); + g.writeGraph(t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2044,7 +2098,7 @@ void HtmlGenerator::endGroupCollaboration(DotGroupCollaboration &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,GOF_BITMAP,EOF_Html,m_dir,m_fileName,m_relPath,TRUE,m_sectionCount); + g.writeGraph(t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2062,7 +2116,7 @@ void HtmlGenerator::endCallGraph(DotCallGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,GOF_BITMAP,EOF_Html,m_dir,m_fileName,m_relPath,TRUE,m_sectionCount); + g.writeGraph(t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2080,7 +2134,7 @@ void HtmlGenerator::endDirDepGraph(DotDirDeps &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,GOF_BITMAP,EOF_Html,m_dir,m_fileName,m_relPath,TRUE,m_sectionCount); + g.writeGraph(t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2088,7 +2142,7 @@ void HtmlGenerator::endDirDepGraph(DotDirDeps &g) void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g) { - g.writeGraph(t,m_dir,m_fileName); + g.writeGraph(t,dir(),fileName()); } void HtmlGenerator::startMemberGroupHeader(bool) @@ -2210,8 +2264,9 @@ void HtmlGenerator::endParamList() t << "</dl>"; } -void HtmlGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *) +void HtmlGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int id) { + m_codeGen.setId(id); HtmlDocVisitor *visitor = new HtmlDocVisitor(t,m_codeGen,ctx); n->accept(visitor); delete visitor; @@ -2275,8 +2330,8 @@ static void endQuickIndexItem(FTextStream &t,const char *l) static bool quickLinkVisible(LayoutNavEntry::Kind kind) { - static bool showFiles = Config_getBool(SHOW_FILES); - static bool showNamespaces = Config_getBool(SHOW_NAMESPACES); + bool showFiles = Config_getBool(SHOW_FILES); + bool showNamespaces = Config_getBool(SHOW_NAMESPACES); switch (kind) { case LayoutNavEntry::MainPage: return TRUE; @@ -2384,8 +2439,8 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath, } if (hlEntry->parent()==LayoutDocManager::instance().rootNavEntry()) // first row is special as it contains the search box { - static bool searchEngine = Config_getBool(SEARCHENGINE); - static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); + bool searchEngine = Config_getBool(SEARCHENGINE); + bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); if (searchEngine) { t << " <li>\n"; @@ -2422,9 +2477,9 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact, const char *file, const QCString &relPath) { - static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); - static bool searchEngine = Config_getBool(SEARCHENGINE); - static bool externalSearch = Config_getBool(EXTERNAL_SEARCH); + bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH); + bool searchEngine = Config_getBool(SEARCHENGINE); + bool externalSearch = Config_getBool(EXTERNAL_SEARCH); LayoutNavEntry *root = LayoutDocManager::instance().rootNavEntry(); LayoutNavEntry::Kind kind = (LayoutNavEntry::Kind)-1; LayoutNavEntry::Kind altKind = (LayoutNavEntry::Kind)-1; // fall back for the old layout file @@ -2546,7 +2601,7 @@ void HtmlGenerator::endQuickIndices() QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpath) { - static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); + bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); QCString result; // write split bar if (generateTreeView) @@ -2613,10 +2668,10 @@ void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli,const char // PHP based search script void HtmlGenerator::writeSearchPage() { - static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); - static bool disableIndex = Config_getBool(DISABLE_INDEX); - static QCString projectName = Config_getString(PROJECT_NAME); - static QCString htmlOutput = Config_getString(HTML_OUTPUT); + bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); + bool disableIndex = Config_getBool(DISABLE_INDEX); + QCString projectName = Config_getString(PROJECT_NAME); + QCString htmlOutput = Config_getString(HTML_OUTPUT); // OPENSEARCH_PROVIDER { QCString configFileName = htmlOutput+"/search_config.php"; @@ -2661,7 +2716,7 @@ void HtmlGenerator::writeSearchPage() t << "<script type=\"text/javascript\">\n"; t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" - << "search\",false,'" << theTranslator->trSearch() << "');\n"; + << "search\",false,'" << theTranslator->trSearch() << "','" << Doxygen::htmlFileExtension << "');\n"; t << "/* @license-end */\n"; t << "</script>\n"; if (!Config_getBool(DISABLE_INDEX)) @@ -2701,8 +2756,9 @@ void HtmlGenerator::writeSearchPage() void HtmlGenerator::writeExternalSearchPage() { - static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); - QCString fileName = Config_getString(HTML_OUTPUT)+"/search"+Doxygen::htmlFileExtension; + bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); + QCString dname = Config_getString(HTML_OUTPUT); + QCString fileName = dname+"/search"+Doxygen::htmlFileExtension; QFile f(fileName); if (f.open(IO_WriteOnly)) { @@ -2714,7 +2770,7 @@ void HtmlGenerator::writeExternalSearchPage() t << "<script type=\"text/javascript\">\n"; t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" - << "search\",false,'" << theTranslator->trSearch() << "');\n"; + << "search\",false,'" << theTranslator->trSearch() << "','" << Doxygen::htmlFileExtension << "');\n"; t << "/* @license-end */\n"; t << "</script>\n"; if (!Config_getBool(DISABLE_INDEX)) @@ -2752,7 +2808,7 @@ void HtmlGenerator::writeExternalSearchPage() writePageFooter(t,"Search","",""); } - QCString scriptName = Config_getString(HTML_OUTPUT)+"/search/search.js"; + QCString scriptName = dname+"/search/search.js"; QFile sf(scriptName); if (sf.open(IO_WriteOnly)) { @@ -2847,19 +2903,6 @@ void HtmlGenerator::endConstraintList() t << "</div>" << endl; } -void HtmlGenerator::startCodeFragment() -{ - t << PREFRAG_START; -} - -void HtmlGenerator::endCodeFragment() -{ - //endCodeLine checks is there is still an open code line, if so closes it. - endCodeLine(); - - t << PREFRAG_END; -} - void HtmlGenerator::lineBreak(const char *style) { if (style) |