bazaar: Functions4U: removed dependency on Web.h

git-svn-id: svn://ultimatepp.org/upp/trunk@5412 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-10-07 17:39:09 +00:00
parent 4716b023a7
commit b35bd0b014
5 changed files with 1006 additions and 974 deletions

View file

@ -5,7 +5,6 @@
#include <Draw/Draw.h>
#ifdef flagGUI
#include <ide/Browser/Browser.h>
#include <Web/Web.h>
#include "GatherTpp.h"
#endif

View file

@ -3,7 +3,6 @@ description "Functions and classes for general use\377B255,170,0";
uses
Core,
plugin\bz2,
Web,
Draw,
plugin\jpg,
plugin\gif,

View file

@ -62,7 +62,6 @@ struct GatherLinkIterator : RichText::Iterator {
if(!IsNull(l)) {
if(l[0] == ':') {
int q = reflink->Find(l);
int w = q;
if(q < 0)
q = reflink->Find(l + "::class");
if(q < 0)
@ -102,12 +101,14 @@ void QtfAsPdf(PdfDraw &pdf, const char *qtf)
UPP::Print(pdf, txt, page);
}
/*
Htmls RoundFrame(Htmls data, String border, Color bg)
{
return HtmlPackedTable().BgColor(bg).Width(-100)
.Attr("style", "border-style: solid; border-width: 1px; border-color: #" + border + ";")
/ HtmlLine() / data;
}
*/
bool ContainsAt(const String &source, const String &pattern, int pos)
{
@ -145,8 +146,6 @@ void GatherTpp::ExportPage(int i, String htmlFolder, String keywords)
String path = links.GetKey(i);
String text = GetText(path);
int h;
h = ParseQTF(tt[i].text).GetHeight(1000);
String qtflangs;
String strlang;
@ -154,6 +153,7 @@ void GatherTpp::ExportPage(int i, String htmlFolder, String keywords)
String page = tt[i];
page = QtfAsHtml(page, css, links, labels, htmlFolder, links[i]);
/*
Color paper = SWhite;
Color bg = Color(210, 217, 210);
@ -169,7 +169,7 @@ void GatherTpp::ExportPage(int i, String htmlFolder, String keywords)
)
)
);
*/
String topicTitle = tt.GetKey(i);
String pageTitle = tt[i].title;
if(IsNull(pageTitle))
@ -182,7 +182,7 @@ void GatherTpp::ExportPage(int i, String htmlFolder, String keywords)
*/
if(pageTitle != title)
pageTitle << " :: " << title;
/*
Htmls content =
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n" +
HtmlHeader(pageTitle, AsCss(css) +
@ -205,7 +205,43 @@ void GatherTpp::ExportPage(int i, String htmlFolder, String keywords)
.BgColor(bg)
.Alink(Red).Link(Black).Vlink(Blue)
/ html;
SaveFile(AppendFileName(htmlFolder, links[i]), content);
*/
SaveFile(AppendFileName(htmlFolder, links[i]),
String().Cat() <<
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
"<HTML>"
"<HEAD>"
"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">"
"<META NAME=\"Generator\" CONTENT=\"U++ HTML Package\">"
"<TITLE>" << pageTitle << "</TITLE>"
"<STYLE TYPE=\"text/css\"><!--"
<< AsCss(css) << "a.l1 { text-decoration:none; font-size: 8pt; font-family: sans-serif; font-weight: normal; }"
"a.l1:link { color:#000000; }"
"a.l1:visited { color:#000080; }"
"a.l1:hover { color:#9933CC; }"
"a.l1:active { color:#000000; }"
"a.l2 { text-decoration:none; font-size: 12pt; font-family: sans-serif; font-variant: small-caps; }"
"a.l2:link { color:#0066FF; }"
"a.l2:visited { color:#FF6600; }"
"a.l2:hover { color:#BC0624; }"
"a.l2:active { color:#BC0024; }"
"-->"
"</STYLE>"
"<META NAME=\"keywords\" CONTENT=\"" << keywords << "\"><META name=\"robots\" content=\"index,follow\"></HEAD><BODY BGCOLOR=\"#D2D9D2\" ALINK=\"#800000\" LINK=\"#000000\" VLINK=\"#000080\"><TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" WIDTH=\"100%\"><TR><TD COLSPAN=\"3\"></TD>"
"</TR>"
"</TABLE>"
"<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" WIDTH=\"100%\"><TR><TD COLSPAN=\"3\" BGCOLOR=\"#D2D9D2\" HEIGHT=\"6\"></TD>"
"</TR>"
"<TR><TD VALIGN=\"TOP\" WIDTH=\"100%\" BGCOLOR=\"#D2D9D2\"><TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" BGCOLOR=\"#FFFFFF\" WIDTH=\"100%\" style=\"border-style: solid; border-width: 1px; border-color: #6E89AE;padding: 10px;;\"><TR>"
"<TD>" << page << "</TD>"
"</TR>"
"</TABLE>"
"</TD>"
"</TR>"
"</TABLE>"
"</BODY>"
);
}
String GatherTpp::TopicFileName(const char *topic)

View file

@ -27,7 +27,6 @@ private:
VectorMap<String, String> reflink;
VectorMap<String, Topic> tt;
Htmls header;
String keywords; //
String title; //
String indexTopic;

View file

@ -2,7 +2,6 @@
#define _Functions4U_icpp_init_stub
#include "Core/init"
#include "plugin\bz2/init"
#include "Web/init"
#include "Draw/init"
#include "plugin\jpg/init"
#include "plugin\gif/init"