Merge branch 'master' of https://framagit.org/medoc88/recoll
This commit is contained in:
commit
7baffdaea6
@ -35,11 +35,11 @@ public:
|
|||||||
}
|
}
|
||||||
virtual ~RecollFilter() {}
|
virtual ~RecollFilter() {}
|
||||||
|
|
||||||
virtual void setConfig(RclConfig *config) {
|
virtual void setConfig(RclConfig *config) override {
|
||||||
m_config = config;
|
m_config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool set_property(Properties p, const std::string &v) {
|
virtual bool set_property(Properties p, const std::string &v) override {
|
||||||
switch (p) {
|
switch (p) {
|
||||||
case DJF_UDI:
|
case DJF_UDI:
|
||||||
m_udi = v;
|
m_udi = v;
|
||||||
@ -58,31 +58,26 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We don't use this for now
|
// We don't use this for now
|
||||||
virtual bool set_document_uri(const std::string& mtype,
|
virtual bool set_document_uri(const std::string& mtype, const std::string &) override {
|
||||||
const std::string &) {
|
|
||||||
m_mimeType = mtype;
|
m_mimeType = mtype;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool set_document_file(const std::string& mtype,
|
virtual bool set_document_file(const std::string& mtype,const std::string &file_path) override {
|
||||||
const std::string &file_path) {
|
|
||||||
m_mimeType = mtype;
|
m_mimeType = mtype;
|
||||||
return set_document_file_impl(mtype, file_path);
|
return set_document_file_impl(mtype, file_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool set_document_string(const std::string& mtype,
|
virtual bool set_document_string(const std::string& mtype,const std::string &contents) override{
|
||||||
const std::string &contents) {
|
|
||||||
m_mimeType = mtype;
|
m_mimeType = mtype;
|
||||||
return set_document_string_impl(mtype, contents);
|
return set_document_string_impl(mtype, contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool set_document_data(const std::string& mtype,
|
virtual bool set_document_data(const std::string& mtype, const char *cp, size_t sz) override {
|
||||||
const char *cp, size_t sz)
|
|
||||||
{
|
|
||||||
return set_document_string(mtype, std::string(cp, sz));
|
return set_document_string(mtype, std::string(cp, sz));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void set_docsize(int64_t size) {
|
virtual void set_docsize(int64_t size) override {
|
||||||
m_docsize = size;
|
m_docsize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,24 +85,24 @@ public:
|
|||||||
return m_docsize;
|
return m_docsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool has_documents() const {
|
virtual bool has_documents() const override {
|
||||||
return m_havedoc;
|
return m_havedoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Most doc types are single-doc
|
// Most doc types are single-doc
|
||||||
virtual bool skip_to_document(const std::string& s) {
|
virtual bool skip_to_document(const std::string& s) override {
|
||||||
if (s.empty())
|
if (s.empty())
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool is_data_input_ok(DataInput input) const {
|
virtual bool is_data_input_ok(DataInput input) const override {
|
||||||
if (input == DOCUMENT_FILE_NAME)
|
if (input == DOCUMENT_FILE_NAME)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::string get_error() const {
|
virtual std::string get_error() const override {
|
||||||
return m_reason;
|
return m_reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -253,21 +253,21 @@ public:
|
|||||||
DocSource(RclConfig *config, std::shared_ptr<DocSequence> iseq)
|
DocSource(RclConfig *config, std::shared_ptr<DocSequence> iseq)
|
||||||
: DocSeqModifier(iseq), m_config(config)
|
: DocSeqModifier(iseq), m_config(config)
|
||||||
{}
|
{}
|
||||||
virtual bool canFilter() {return true;}
|
virtual bool canFilter() override {return true;}
|
||||||
virtual bool canSort() {return true;}
|
virtual bool canSort() override {return true;}
|
||||||
virtual bool setFiltSpec(const DocSeqFiltSpec &);
|
virtual bool setFiltSpec(const DocSeqFiltSpec &) override;
|
||||||
virtual bool setSortSpec(const DocSeqSortSpec &);
|
virtual bool setSortSpec(const DocSeqSortSpec &) override;
|
||||||
virtual bool getDoc(int num, Rcl::Doc &doc, std::string *sh = 0) {
|
virtual bool getDoc(int num, Rcl::Doc &doc, std::string *sh = 0) override {
|
||||||
if (!m_seq)
|
if (!m_seq)
|
||||||
return false;
|
return false;
|
||||||
return m_seq->getDoc(num, doc, sh);
|
return m_seq->getDoc(num, doc, sh);
|
||||||
}
|
}
|
||||||
virtual int getResCnt() {
|
virtual int getResCnt() override {
|
||||||
if (!m_seq)
|
if (!m_seq)
|
||||||
return 0;
|
return 0;
|
||||||
return m_seq->getResCnt();
|
return m_seq->getResCnt();
|
||||||
}
|
}
|
||||||
virtual std::string title();
|
virtual std::string title() override;
|
||||||
private:
|
private:
|
||||||
bool buildStack();
|
bool buildStack();
|
||||||
void stripStack();
|
void stripStack();
|
||||||
|
|||||||
@ -66,15 +66,15 @@ class RclSListEntry : public DynConfEntry {
|
|||||||
RclSListEntry(const std::string& v)
|
RclSListEntry(const std::string& v)
|
||||||
: value(v) {
|
: value(v) {
|
||||||
}
|
}
|
||||||
virtual bool decode(const std::string &enc) {
|
virtual bool decode(const std::string &enc) override {
|
||||||
base64_decode(enc, value);
|
base64_decode(enc, value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual bool encode(std::string& enc) {
|
virtual bool encode(std::string& enc) override {
|
||||||
base64_encode(value, enc);
|
base64_encode(value, enc);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual bool equal(const DynConfEntry& other) {
|
virtual bool equal(const DynConfEntry& other) override {
|
||||||
const RclSListEntry& e = dynamic_cast<const RclSListEntry&>(other);
|
const RclSListEntry& e = dynamic_cast<const RclSListEntry&>(other);
|
||||||
return e.value == value;
|
return e.value == value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -360,7 +360,7 @@ public:
|
|||||||
* @return 0 if name not found, 1 else
|
* @return 0 if name not found, 1 else
|
||||||
*/
|
*/
|
||||||
virtual int get(const std::string& name, std::string& value,
|
virtual int get(const std::string& name, std::string& value,
|
||||||
const std::string& sk) const;
|
const std::string& sk) const override;
|
||||||
using ConfSimple::get;
|
using ConfSimple::get;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user