Rename hasToString() to findUsesToString()

There are special cases where the toString() exist,
but still plaintext() is not to be used by find.
This commit is contained in:
Kornel Benko 2023-12-31 14:09:17 +01:00
parent 645ab7fa73
commit 8de81e8dc1
12 changed files with 12 additions and 12 deletions

View File

@ -4425,7 +4425,7 @@ docstring Paragraph::asString(pos_type beg, pos_type end, int options, const Out
else if (c == META_INSET && (options & AS_STR_INSETS)) {
if (c == META_INSET && (options & AS_STR_PLAINTEXT)) {
LASSERT(runparams != nullptr, return docstring());
if (runparams->find_effective() && getInset(i)->hasToString())
if (runparams->find_effective() && getInset(i)->findUsesToString())
getInset(i)->toString(os);
else
getInset(i)->plaintext(os, *runparams);

View File

@ -350,7 +350,7 @@ public:
virtual docstring xhtml(XMLStream &, OutputParams const &) const;
///
virtual bool hasToString() const { return false; }
virtual bool findUsesToString() const { return false; }
/// Writes a string representation of the inset to the odocstream.
/// This one should be called when you want the whole contents of
/// the inset.

View File

@ -80,7 +80,7 @@ private:
///
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
bool hasToString() const override { return true; }
bool findUsesToString() const override { return true; }
///
void toString(odocstream &) const override;
///

View File

@ -62,7 +62,7 @@ public:
///
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
bool hasToString() const override { return true; }
bool findUsesToString() const override { return true; }
///
void toString(odocstream &) const override;
///

View File

@ -43,7 +43,7 @@ public:
///
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
bool hasToString() const override { return true; }
bool findUsesToString() const override { return true; }
///
void toString(odocstream &) const override;
///

View File

@ -34,7 +34,7 @@ public:
///
bool isInToc() const override { return true; }
///
bool hasToString() const override { return true; }
bool findUsesToString() const override { return true; }
///
void toString(odocstream &) const override;
///

View File

@ -154,7 +154,7 @@ public:
///
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
bool hasToString() const override { return true; }
bool findUsesToString() const override { return true; }
///
void toString(odocstream &) const override;
///

View File

@ -157,7 +157,7 @@ public:
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
bool hasToString() const override { return true; }
bool findUsesToString() const override { return true; }
///
void toString(odocstream &) const override;
///

View File

@ -65,7 +65,7 @@ public:
///
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
bool hasToString() const override { return true; }
bool findUsesToString() const override { return true; }
///
void toString(odocstream &) const override;
///

View File

@ -136,7 +136,7 @@ public:
///
void validate(LaTeXFeatures & features) const override;
///
bool hasToString() const override { return true; }
bool findUsesToString() const override { return true; }
///
void toString(odocstream &) const override;
///

View File

@ -82,7 +82,7 @@ public:
///
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
bool hasToString() const override { return true; }
bool findUsesToString() const override { return true; }
///
void toString(odocstream &) const override;
///

View File

@ -180,7 +180,7 @@ public:
///
void setMacrocontextPositionRecursive(DocIterator const & pos);
///
bool hasToString() const override { return true; }
bool findUsesToString() const override { return true; }
///
void toString(odocstream &) const override;
///