1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-20 17:17:13 +02:00

Update POCO to 1.11.0

This commit is contained in:
Sandu Liviu Catalin
2021-08-22 18:07:06 +03:00
parent 151077c799
commit 7a3d92d1d1
450 changed files with 25219 additions and 6528 deletions
.gitignore
vendor/POCO
.travis.yml
ActiveRecord
CHANGELOGCMakeLists.txt
CppParser
CppUnit
Crypto
Data
Encodings
Foundation
JSON
JWT
Makefile
Net
NetSSL_OpenSSL
NetSSL_Win
PDF
PageCompiler
PocoDoc
README.md
Redis
SevenZip
Util
VERSION
XML
appveyor.yml
appveyor
build
ci
cmake
componentsconfigure
doc
libversion
packaging
release
travis

@ -47,7 +47,8 @@
<charset>utf-8</charset>
<software>POCO C++ Libraries</software>
<company>Applied Informatics Software Engineering GmbH and Contributors</company>
<companyURI>http://pocoproject.org/</companyURI>
<companyURI>https://pocoproject.org/
</companyURI>
</PocoDoc>
<Translations>
<EN>

@ -7,6 +7,7 @@
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
<script type="text/javascript" src="js/iframeResizer.min.js"></script>
${PocoDoc.customHeadHTML}
</head>
<body>
<div class="header">
@ -28,5 +29,6 @@ ${PocoDoc.nameSpaceIndex}
Copyright &copy; ${PocoDoc.year}, <a href="${PocoDoc.companyURI}" target="_top">${PocoDoc.company}</a></p>
</div>
</div>
${PocoDoc.customBodyHTML}
</body>
</html>

@ -135,7 +135,7 @@ void DocWriter::writeNavigation()
std::string path(pathFor("navigation.html"));
std::ofstream ostr(path.c_str());
if (!ostr.good()) throw Poco::CreateFileException(path);
writeHeader(ostr, tr("Navigation"), "js/iframeResizer.contentWindow.min.js");
writeHeader(ostr, tr("Navigation"), "js/iframeResizer.contentWindow.min.js", NO_CUSTOM_HTML);
beginBody(ostr);
ostr << "<h3 class=\"overview\"><a href=\"index.html\" target=\"_top\">" << htmlize(software) << "</a></h3>\n";
@ -208,7 +208,7 @@ void DocWriter::writeNavigation()
ostr << "<div>&nbsp;</div>\n"; // workaround to avoid cutting off a few pixels from last line
endBody(ostr);
ostr << "<script>CollapsibleLists.apply(true)</script>" << std::endl;
writeFooter(ostr);
writeFooter(ostr, NO_TRACKING | NO_CUSTOM_HTML);
}
@ -627,7 +627,7 @@ std::string DocWriter::makeFileName(const std::string& str)
}
void DocWriter::writeHeader(std::ostream& ostr, const std::string& title, const std::string& extraScript)
void DocWriter::writeHeader(std::ostream& ostr, const std::string& title, const std::string& extraScript, int options)
{
Application& app = Application::instance();
std::string company(app.config().getString("PocoDoc.company", "Applied Informatics"));
@ -651,6 +651,10 @@ void DocWriter::writeHeader(std::ostream& ostr, const std::string& title, const
ostr << "<script type=\"text/javascript\" src=\"" << extraScript << "\"></script>" << std::endl;
}
ostr << "<script type=\"text/javascript\" src=\"js/CollapsibleLists.compressed.js\"></script>" << std::endl;
if ((options & NO_CUSTOM_HTML) == 0)
{
ostr << app.config().getString("PocoDoc.customHeadHTML", "");
}
ostr << "</head>" << std::endl;
ostr << "<body";
if (_prettifyCode)
@ -659,11 +663,20 @@ void DocWriter::writeHeader(std::ostream& ostr, const std::string& title, const
}
void DocWriter::writeFooter(std::ostream& ostr)
void DocWriter::writeFooter(std::ostream& ostr, int options)
{
Application& app = Application::instance();
std::string googleAnalyticsCode(app.config().getString("PocoDoc.googleAnalyticsCode", ""));
ostr << googleAnalyticsCode;
if ((options & NO_TRACKING) == 0)
{
std::string googleAnalyticsCode(app.config().getString("PocoDoc.googleAnalyticsCode", ""));
ostr << googleAnalyticsCode;
std::string hubSpotCode(app.config().getString("PocoDoc.hubSpotCode", ""));
ostr << hubSpotCode;
}
if ((options & NO_CUSTOM_HTML) == 0)
{
ostr << app.config().getString("PocoDoc.customBodyHTML", "");
}
ostr << "</body>" << std::endl;
ostr << "</html>" << std::endl;
}
@ -674,8 +687,8 @@ void DocWriter::writeCopyright(std::ostream& ostr)
Application& app = Application::instance();
std::string software(app.config().getString("PocoDoc.software", ""));
std::string version(app.config().getString("PocoDoc.version", ""));
std::string company(app.config().getString("PocoDoc.company", "Applied Informatics"));
std::string companyURI(app.config().getString("PocoDoc.companyURI", "http://www.appinf.com/"));
std::string company(app.config().getString("PocoDoc.company", "Applied Informatics Software Engineering GmbH"));
std::string companyURI(app.config().getString("PocoDoc.companyURI", "https://macchina.io/"));
std::string licenseURI(app.config().getString("PocoDoc.licenseURI", ""));
DateTime now;
ostr << "<p class=\"footer\">";
@ -1286,7 +1299,7 @@ bool DocWriter::writeSpecial(std::ostream& ostr, std::string& token, std::string
{
_htmlMode = false;
}
else if (token == "<?")
else if (token == "<?" || token == "<?=")
{
std::string prop;
nextToken(begin, end, token);
@ -1299,6 +1312,19 @@ bool DocWriter::writeSpecial(std::ostream& ostr, std::string& token, std::string
Application& app = Application::instance();
ostr << htmlize(app.config().getString(prop, std::string("NOT FOUND: ") + prop));
}
else if (token == "<?-")
{
std::string prop;
nextToken(begin, end, token);
while (!token.empty() && token != "?>")
{
prop.append(token);
nextToken(begin, end, token);
}
Poco::trimInPlace(prop);
Application& app = Application::instance();
ostr << app.config().getString(prop, "");
}
else if (_htmlMode)
{
ostr << token;

@ -82,6 +82,12 @@ protected:
NAMESPACE_INDEX_COLUMNS = 4
};
enum
{
NO_CUSTOM_HTML = 1,
NO_TRACKING = 2
};
struct TOCEntry
{
std::string title;
@ -117,9 +123,9 @@ protected:
static std::string headerFor(const Poco::CppParser::Symbol* pSymbol);
static std::string titleFor(const Poco::CppParser::Symbol* pSymbol);
void writeHeader(std::ostream& ostr, const std::string& title, const std::string& extraScript = "");
void writeHeader(std::ostream& ostr, const std::string& title, const std::string& extraScript = "", int options = 0);
void writeNavigationFrame(std::ostream& ostr, const std::string& group, const std::string& item);
static void writeFooter(std::ostream& ostr);
static void writeFooter(std::ostream& ostr, int options = 0);
void writeCopyright(std::ostream& ostr);
static void writeTitle(std::ostream& ostr, const std::string& category, const std::string& title);
static void writeTitle(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, const std::string& title);

@ -457,6 +457,9 @@ protected:
config().setString("PocoDoc.date", Poco::DateTimeFormatter::format(now, "%Y-%m-%d"));
config().setString("PocoDoc.year", Poco::DateTimeFormatter::format(now, "%Y"));
config().setString("PocoDoc.googleAnalyticsCode", generateGoogleAnalyticsCode());
config().setString("PocoDoc.hubSpotCode", generateHubSpotCode());
if (!config().has("PocoDoc.customHeadHTML")) config().setString("PocoDoc.customHeadHTML", "");
if (!config().has("PocoDoc.customBodyHTML")) config().setString("PocoDoc.customBodyHTML", "");
Poco::Stopwatch sw;
int errors = 0;
try
@ -484,17 +487,27 @@ protected:
std::string googleAnalyticsId(config().getString("PocoDoc.googleAnalyticsId", ""));
if (!googleAnalyticsId.empty())
{
ostr << "<!-- Begin Google Analytics -->\n";
ostr << "<script type=\"text/javascript\">\n";
ostr << "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\n";
ostr << "document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\n";
ostr << "<script>\n";
ostr << " (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n";
ostr << " (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n";
ostr << " m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n";
ostr << " })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n";
ostr << "\n";
ostr << " ga('create', '" << googleAnalyticsId << "', 'auto');\n";
ostr << " ga('set', 'anonymizeIp', true);\n";
ostr << " ga('send', 'pageview');\n";
ostr << "</script>\n";
ostr << "<script type=\"text/javascript\">\n";
ostr << "try {\n";
ostr << "var pageTracker = _gat._getTracker(\"" << googleAnalyticsId << "\");\n";
ostr << "pageTracker._trackPageview();\n";
ostr << "} catch(err) {}</script>\n";
ostr << "<!-- End Google Analytics -->\n";
}
return ostr.str();
}
std::string generateHubSpotCode()
{
std::stringstream ostr;
std::string hubSpotId(config().getString("PocoDoc.hubSpotId", ""));
if (!hubSpotId.empty())
{
ostr << "<script type=\"text/javascript\" id=\"hs-script-loader\" async defer src=\"//js.hs-scripts.com/" << hubSpotId << ".js\"></script>\n";
}
return ostr.str();
}