add capability to remember page breaks generated by, e.g. pdftotext, and use them to start an external viewer on a match page

This commit is contained in:
"Jean-Francois Dockes ext:(%22)
2012-08-21 15:03:02 +02:00
parent ec3dbb4092
commit 0ebfc496d8
15 changed files with 292 additions and 85 deletions
+5
View File
@@ -95,6 +95,11 @@ class DocSequence {
abs.push_back(doc.meta[Rcl::Doc::keyabs]);
return true;
}
virtual int getFirstMatchPage(Rcl::Doc&)
{
return -1;
}
virtual bool getEnclosing(Rcl::Doc&, Rcl::Doc&) = 0;
/** Get estimated total count in results */
+9 -1
View File
@@ -74,10 +74,18 @@ bool DocSequenceDb::getAbstract(Rcl::Doc &doc, vector<string>& vabs)
}
if (vabs.empty())
vabs.push_back(doc.meta[Rcl::Doc::keyabs]);
return true;
}
int DocSequenceDb::getFirstMatchPage(Rcl::Doc &doc)
{
setQuery();
if (m_q->whatDb()) {
return m_q->whatDb()->getFirstMatchPage(doc, m_q.getptr());
}
return -1;
}
bool DocSequenceDb::getEnclosing(Rcl::Doc& doc, Rcl::Doc& pdoc)
{
setQuery();
+1
View File
@@ -32,6 +32,7 @@ class DocSequenceDb : public DocSequence {
virtual int getResCnt();
virtual void getTerms(HighlightData& hld);
virtual bool getAbstract(Rcl::Doc &doc, vector<string>&);
virtual int getFirstMatchPage(Rcl::Doc&);
virtual bool getEnclosing(Rcl::Doc& doc, Rcl::Doc& pdoc);
virtual string getDescription();
virtual list<string> expand(Rcl::Doc &doc);