]> git.lyx.org Git - lyx.git/commitdiff
Rename hasToString() to findUsesToString()
authorKornel Benko <kornel@lyx.org>
Sun, 31 Dec 2023 13:09:17 +0000 (14:09 +0100)
committerKornel Benko <kornel@lyx.org>
Tue, 2 Apr 2024 07:22:53 +0000 (09:22 +0200)
There are special cases where the toString() exist,
but still plaintext() is not to be used by find.

12 files changed:
src/Paragraph.cpp
src/insets/Inset.h
src/insets/InsetBranch.h
src/insets/InsetCitation.h
src/insets/InsetCounter.h
src/insets/InsetHyperlink.h
src/insets/InsetIPAMacro.h
src/insets/InsetQuotes.h
src/insets/InsetRef.h
src/insets/InsetSpace.h
src/insets/InsetSpecialChar.h
src/insets/InsetText.h

index 49713a8b9a801c6415a1f617ea36b71134182ca7..4282defa4a8fc5fed58bd71507138b012a8a6537 100644 (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);
index d2b407675bdc25c9f86a5844acb71320c5848e67..2fa3e262341051e99a1a38a34c5cdfc9c3621779 100644 (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.
index e2b2958f18f5121a02e4d6eadb1d94968ef02bc8..5098e70afb795fe8441fb8d3134a3058f12f95b7 100644 (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;
        ///
index 56ad45a9b6a599d06c6540ff0c3c87aa37d9130c..b1b27e02911ba9b976810fc7bdbd246be3931aee 100644 (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;
        ///
index eb6338dde2a22624b46e06e8fe3d49886ab4d452..65a38ab3258efc145d1ba59ce66e829357d9d554 100644 (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;
        ///
index 59615b0d5bbe6ed1632505a2db6b66b0e79d5766..36bd249902f76c98cf2415c0a9c94094fcd1e3c8 100644 (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;
        ///
index 5855da9e95497a76c34e293174ba45bded99ab44..dc1977f977675ad39bc2eba7bae3b6c2ae4035b0 100644 (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;
        ///
index 5e6cb3c4aac9d42c06d40ecf10d58e9527f0943e..2eeb5fa866f157d8721ca7ccf639c40e45bff5ae 100644 (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;
        ///
index 09d5e18e344aef9ce502b8ba309099971a1a2005..97e64a69e2b05195c8b1600344dac1284b04004b 100644 (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;
        ///
index 0b1bd7bfe513c9364ce64d3c34ac2da1f6fc7011..04edaed2c4f3312b7ac5c68c0c3234ad55cd6680 100644 (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;
        ///
index 36afa15fed610372bd67133970d046cecd1f46af..5f7338b8ddfd97a860fb16fe85367a62b44a3f72 100644 (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;
        ///
index e271478114747bfcbe296af51e273ec862c63969..bce125bccaba6496aa176f5d228682f79257fc44 100644 (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;
        ///