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:
@@ -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 */
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user