Arrange for plaintorich to keep track of the link between match area and search terms. Use this in preview to allow walking the matches for a given search term group

This commit is contained in:
"Jean-Francois Dockes ext:(%22)
2012-08-18 12:15:43 +02:00
parent dc7b3420a0
commit 20c04952f2
8 changed files with 291 additions and 156 deletions
+19 -11
View File
@@ -204,24 +204,32 @@ void RecollProtocol::queryDetails()
class PlainToRichKio : public PlainToRich {
public:
PlainToRichKio(const string& nm)
: PlainToRich() , m_name(nm)
: m_name(nm)
{
}
virtual ~PlainToRichKio() {}
virtual string header() {
if (m_inputhtml) {
return snull;
return cstr_null;
} else {
return
string("<html><head>"
"<META http-equiv=\"Content-Type\""
"content=\"text/html;charset=UTF-8\"><title>") +
m_name +
string("</title></head><body><pre>");
return string("<html><head>"
"<META http-equiv=\"Content-Type\""
"content=\"text/html;charset=UTF-8\"><title>").
append(m_name).
append("</title></head><body><pre>");
}
}
virtual string startMatch() {return string("<font color=\"blue\">");}
virtual string endMatch() {return string("</font>");}
virtual string startMatch(unsigned int)
{
return string("<font color=\"blue\">");
}
virtual string endMatch()
{
return string("</font>");
}
const string &m_name;
};