diff options
author | albert-github <albert.tests@gmail.com> | 2014-08-15 12:57:32 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2014-08-15 12:57:32 (GMT) |
commit | 595943c96860425f9086028b00e1e155e8ec434f (patch) | |
tree | 60406c7761f188e2855efaeda06c2fb5bf7ca7f6 /src/htmlgen.cpp | |
parent | 7d9d4320f5d183c4e1ebc87a316589c36f0afeed (diff) | |
download | Doxygen-595943c96860425f9086028b00e1e155e8ec434f.zip Doxygen-595943c96860425f9086028b00e1e155e8ec434f.tar.gz Doxygen-595943c96860425f9086028b00e1e155e8ec434f.tar.bz2 |
Support multiple extra HTML stylesheets.
In regular use it happens that it is more convenient to have multiple extra HTML stylesheets, e.g. in case of different levels of requirements: company, department, project
With this patch it is possible to specify multiple HTML stylesheets.
Note: for compatibility the configuration parameter HTML_EXTRA_STYLESHEET has not been renamed to HTM_EXTRA_STYLESHEETS.
Diffstat (limited to 'src/htmlgen.cpp')
-rw-r--r-- | src/htmlgen.cpp | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 27091b4..62ae1c7 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1061,7 +1061,7 @@ static QCString substituteHtmlKeywords(const QCString &s, { // Build CSS/Javascript tags depending on treeview, search engine settings QCString cssFile; - QCString extraCssFile; + QStrList extraCssFile; QCString generatedBy; QCString treeViewCssJs; QCString searchCssJs; @@ -1100,10 +1100,20 @@ static QCString substituteHtmlKeywords(const QCString &s, cssFile = "doxygen.css"; } } - extraCssFile = Config_getString("HTML_EXTRA_STYLESHEET"); - if (!extraCssFile.isEmpty()) + + extraCssText = ""; + extraCssFile = Config_getList("HTML_EXTRA_STYLESHEET"); + for (uint i=0; i<extraCssFile.count(); ++i) { - extraCssText = "<link href=\"$relpath^"+stripPath(extraCssFile)+"\" rel=\"stylesheet\" type=\"text/css\"/>\n"; + QCString fileName(extraCssFile.at(i)); + if (!fileName.isEmpty()) + { + QFileInfo fi(fileName); + if (fi.exists()) + { + extraCssText += "<link href=\"$relpath^"+stripPath(fileName)+"\" rel=\"stylesheet\" type=\"text/css\"/>\n"; + } + } } if (timeStamp) @@ -1823,13 +1833,17 @@ void HtmlGenerator::writeStyleInfo(int part) } Doxygen::indexList->addStyleSheetFile(cssfi.fileName().utf8()); } - static QCString extraCssFile = Config_getString("HTML_EXTRA_STYLESHEET"); - if (!extraCssFile.isEmpty()) + static QStrList extraCssFile = Config_getList("HTML_EXTRA_STYLESHEET"); + for (uint i=0; i<extraCssFile.count(); ++i) { - QFileInfo fi(extraCssFile); - if (fi.exists()) + QCString fileName(extraCssFile.at(i)); + if (!fileName.isEmpty()) { - Doxygen::indexList->addStyleSheetFile(fi.fileName().utf8()); + QFileInfo fi(fileName); + if (fi.exists()) + { + Doxygen::indexList->addStyleSheetFile(fi.fileName().utf8()); + } } } } |