suppress some sources of spurious ellipsises in abstracts

This commit is contained in:
Jean-Francois Dockes
2011-08-24 14:51:59 +02:00
parent f1f6d0cf07
commit a380873029
5 changed files with 20 additions and 35 deletions
+1 -18
View File
@@ -69,7 +69,7 @@ class DocSeqFiltSpec {
by native capability (ex: docseqdb can sort and filter). The
implementation might be nicer by using more sophisticated c++ with
multiple inheritance of sort and filter virtual interfaces, but
the current one will have to do for now...
the current one will have to do for now.
*/
class DocSequence {
public:
@@ -97,17 +97,6 @@ class DocSequence {
abs.push_back(doc.meta[Rcl::Doc::keyabs]);
return true;
}
virtual string getAbstract(Rcl::Doc& doc) {
vector<string> v;
getAbstract(doc, v);
string abstract;
for (vector<string>::const_iterator it = v.begin();
it != v.end(); it++) {
abstract += *it;
abstract += "... ";
}
return abstract;
}
virtual bool getEnclosing(Rcl::Doc&, Rcl::Doc&) = 0;
/** Get estimated total count in results */
@@ -169,12 +158,6 @@ public:
return false;
return m_seq->getAbstract(doc, abs);
}
virtual string getAbstract(Rcl::Doc& doc)
{
if (m_seq.isNull())
return "";
return m_seq->getAbstract(doc);
}
virtual string getDescription()
{
if (m_seq.isNull())
+8 -6
View File
@@ -184,12 +184,14 @@ void ResListPager::displayDoc(RclConfig *config,
for (vector<string>::const_iterator it = vabs.begin();
it != vabs.end(); it++) {
// No need to call escapeHtml(), plaintorich handles it
list<string> lr;
m_hiliter->set_inputhtml(false);
m_hiliter->plaintorich(*it, lr, hdata);
richabst += lr.front();
richabst += absSep();
if (!it->empty()) {
// No need to call escapeHtml(), plaintorich handles it
list<string> lr;
m_hiliter->set_inputhtml(false);
m_hiliter->plaintorich(*it, lr, hdata);
richabst += lr.front();
richabst += absSep();
}
}
}