]> git.lyx.org Git - features.git/commitdiff
Change forToc() to forOutliner(), to avoid confusion. The old name
authorRichard Heck <rgheck@lyx.org>
Sat, 29 Mar 2014 17:34:36 +0000 (13:34 -0400)
committerRichard Heck <rgheck@lyx.org>
Mon, 21 Apr 2014 15:51:59 +0000 (11:51 -0400)
is left over from when the outliner really did just display a TOC.

31 files changed:
src/Paragraph.cpp
src/Paragraph.h
src/Text.cpp
src/Text.h
src/insets/Inset.cpp
src/insets/Inset.h
src/insets/InsetBranch.cpp
src/insets/InsetBranch.h
src/insets/InsetCaption.cpp
src/insets/InsetCitation.cpp
src/insets/InsetCitation.h
src/insets/InsetFoot.cpp
src/insets/InsetHyperlink.cpp
src/insets/InsetHyperlink.h
src/insets/InsetIPAMacro.cpp
src/insets/InsetIPAMacro.h
src/insets/InsetIndex.cpp
src/insets/InsetMarginal.cpp
src/insets/InsetNote.cpp
src/insets/InsetQuotes.cpp
src/insets/InsetQuotes.h
src/insets/InsetRef.cpp
src/insets/InsetRef.h
src/insets/InsetSpace.cpp
src/insets/InsetSpace.h
src/insets/InsetSpecialChar.cpp
src/insets/InsetSpecialChar.h
src/insets/InsetText.cpp
src/insets/InsetText.h
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathHull.h

index 4d9b37c1f73cbea209247e9273e64ad5654213b5..098ea65574bdd270d425f25bef092f17e1bfa1ed 100644 (file)
@@ -3374,7 +3374,7 @@ docstring Paragraph::asString(pos_type beg, pos_type end, int options) const
 }
 
 
-void Paragraph::forToc(docstring & os, size_t maxlen) const
+void Paragraph::forOutliner(docstring & os, size_t maxlen) const
 {
        if (!d->params_.labelString().empty())
                os += d->params_.labelString() + ' ';
@@ -3387,7 +3387,7 @@ void Paragraph::forToc(docstring & os, size_t maxlen) const
                else if (c == '\t' || c == '\n')
                        os += ' ';
                else if (c == META_INSET)
-                       getInset(i)->forToc(os, maxlen);
+                       getInset(i)->forOutliner(os, maxlen);
        }
 }
 
index 955804871b2e04eb159d06000cc47bf767c70c0f..ba62f9bee6b6841512e8a6cf508efa8a176f0dcd 100644 (file)
@@ -177,7 +177,7 @@ public:
        docstring asString(pos_type beg, pos_type end,
                int options = AS_STR_NONE) const;
        ///
-       void forToc(docstring &, size_t maxlen) const;
+       void forOutliner(docstring &, size_t maxlen) const;
 
        /// Extract only the explicitly visible text (without any formatting),
        /// descending into insets
index cdcc200255895912f6dec665d3a61716812bd59b..589fd25d83150d3275006e9ecb74927679841836 100644 (file)
@@ -2012,14 +2012,14 @@ docstring Text::asString(pit_type beg, pit_type end, int options) const
 }
 
 
-void Text::forToc(docstring & os, size_t maxlen, bool shorten) const
+void Text::forOutliner(docstring & os, size_t maxlen, bool shorten) const
 {
        if (maxlen == 0)
                maxlen = std::numeric_limits<std::size_t>::max();
        else
                LASSERT(maxlen >= 8, maxlen = TOC_ENTRY_LENGTH);
        for (size_t i = 0; i != pars_.size() && os.length() < maxlen; ++i)
-               pars_[i].forToc(os, maxlen);
+               pars_[i].forOutliner(os, maxlen);
        if (shorten && os.length() >= maxlen)
                os = os.substr(0, maxlen - 3) + from_ascii("...");
 }
index 7ee76d232b5754c6975be75ffaef6332800e4ee7..189a422adcbcd376bf2e6b655281d1322ec98849 100644 (file)
@@ -130,7 +130,7 @@ public:
        /// if \param os is longer than maxlen chars.
        /// if \param maxlen is passed as 0, then it is ignored. (In fact,
        /// it is reset to the maximum value for size_t.)
-       void forToc(docstring & os, size_t maxlen, bool shorten = true) const;
+       void forOutliner(docstring & os, size_t maxlen, bool shorten = true) const;
 
        /// insert a character at cursor position
        /// FIXME: replace Cursor with DocIterator.
index 66bdf0b38bf49090dd0561f3b435344bb0e34c88..cce0f327feb49aa1b9fbe56790e24ba918f31689 100644 (file)
@@ -258,7 +258,7 @@ docstring Inset::toolTip(BufferView const &, int, int) const
 }
 
 
-void Inset::forToc(docstring &, size_t) const
+void Inset::forOutliner(docstring &, size_t) const
 {
 }
 
index b18f8a5f02ecefdd32a72f313cc9e987c173aacd..0ed8ff47de5c62f4ea40a4b35c1f924de130a08b 100644 (file)
@@ -333,7 +333,7 @@ public:
        virtual void toString(odocstream &) const {}
        /// Appends a potentially abbreviated version of the inset to
        /// \param str. Intended for use by the TOC.
-       virtual void forToc(docstring & str,
+       virtual void forOutliner(docstring & str,
                            size_t maxlen = TOC_ENTRY_LENGTH) const;
 
        /// can the contents of the inset be edited on screen ?
index 2676d93338855498c7ae18d5f2ef114068537119..144123f8712f00709ab1c7ce96dc1c07c357d601 100644 (file)
@@ -299,10 +299,10 @@ void InsetBranch::toString(odocstream & os) const
 }
 
 
-void InsetBranch::forToc(docstring & os, size_t maxlen) const
+void InsetBranch::forOutliner(docstring & os, size_t maxlen) const
 {
        if (isBranchSelected())
-               InsetCollapsable::forToc(os, maxlen);
+               InsetCollapsable::forOutliner(os, maxlen);
 }
 
 
@@ -355,7 +355,7 @@ void InsetBranch::addToToc(DocIterator const & cpit, bool output_active) const
 
        Toc & toc = buffer().tocBackend().toc("branch");
        docstring str = params_.branch + ": ";
-       text().forToc(str, TOC_ENTRY_LENGTH);
+       text().forOutliner(str, TOC_ENTRY_LENGTH);
        toc.push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
        // Proceed with the rest of the inset.
        bool const doing_output = output_active && isBranchSelected();
index 7521fbe0c2245ea28409dcd046cdf7c55a95b3a7..ecd2f7d7e2b5ffdeec15201629240705ead56043 100644 (file)
@@ -76,7 +76,7 @@ private:
        ///
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t) const;
        ///
        void validate(LaTeXFeatures &) const;
        ///
index f6b24672e46e221a0844659fc509ad2a2473dbf1..14baf86c5f34a4ea43d8d727669462c1e9c3eb23 100644 (file)
@@ -104,7 +104,7 @@ void InsetCaption::addToToc(DocIterator const & cpit, bool output_active) const
        Toc & toc = buffer().tocBackend().toc(floattype_);
        docstring str = full_label_;
        int length = output_active ? INT_MAX : TOC_ENTRY_LENGTH;
-       text().forToc(str, length);
+       text().forOutliner(str, length);
        toc.push_back(TocItem(pit, 0, str, output_active));
 
        // Proceed with the rest of the inset.
index 96620c1412270df573658d2eea5443c02961d766..78a9cdccb0c074ddbae1f617238972f818aa61b5 100644 (file)
@@ -403,7 +403,7 @@ void InsetCitation::toString(odocstream & os) const
 }
 
 
-void InsetCitation::forToc(docstring & os, size_t) const
+void InsetCitation::forOutliner(docstring & os, size_t) const
 {
        os += screenLabel();
 }
index 2e78e01f4ec08801f9061213166dd6a30b8c1d42..8d7bb7940b1ce596cdca7ff078e09cca331cf71a 100644 (file)
@@ -59,7 +59,7 @@ public:
        ///
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t) const;
        ///
        void validate(LaTeXFeatures &) const {}
        ///
index 372bfabe39330b2028ed23fe21cf1f6ef44e3d90..bfb637e49831dfc8f082644045539ab85a82f6a5 100644 (file)
@@ -68,7 +68,7 @@ void InsetFoot::addToToc(DocIterator const & cpit, bool output_active) const
 
        Toc & toc = buffer().tocBackend().toc("footnote");
        docstring str = custom_label_ + ": ";
-       text().forToc(str, TOC_ENTRY_LENGTH);
+       text().forOutliner(str, TOC_ENTRY_LENGTH);
        toc.push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
        // Proceed with the rest of the inset.
        InsetFootlike::addToToc(cpit, output_active);
index 81caa371c9ce3e206405ea8985d6218bbd2b1a75..cbcf613b788b3acdfaf891cb50a07a2a7012910c 100644 (file)
@@ -257,7 +257,7 @@ void InsetHyperlink::toString(odocstream & os) const
 }
 
 
-void InsetHyperlink::forToc(docstring & os, size_t) const
+void InsetHyperlink::forOutliner(docstring & os, size_t) const
 {
        docstring const & n = getParam("name");
        if (!n.empty()) {
index b33665e96a114e6d9210d744960034b2b4607d70..6bc0c64165cfd390e37238224a20388c69f04164 100644 (file)
@@ -38,7 +38,7 @@ public:
        ///
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t) const;
        ///
        docstring toolTip(BufferView const & bv, int x, int y) const;
        ///
index 21f2d114601cde4680031af70f4a932b9ebbe883..46d75194ef70b31b52c5f02493267f2bae7a1902 100644 (file)
@@ -596,7 +596,7 @@ void InsetIPAChar::toString(odocstream & os) const
 }
 
 
-void InsetIPAChar::forToc(docstring & os, size_t) const
+void InsetIPAChar::forOutliner(docstring & os, size_t) const
 {
        odocstringstream ods;
        plaintext(ods, OutputParams(0));
index 077889cedf65d2d3544b7c570df389dc57d585c5..ff07b4009c03f0461fd3896c7dfcdbdc4bbbbb53 100644 (file)
@@ -156,7 +156,7 @@ public:
        ///
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t) const;
        ///
        InsetCode lyxCode() const { return IPACHAR_CODE; }
        /// We don't need \begin_inset and \end_inset
index 57c0d07a3a496e100ab7bacebfe0b42a4aa6c285..9db1aca4dde3c485400b925f47ed587526754a2b 100644 (file)
@@ -353,7 +353,7 @@ void InsetIndex::addToToc(DocIterator const & cpit, bool output_active) const
        DocIterator pit = cpit;
        pit.push_back(CursorSlice(const_cast<InsetIndex &>(*this)));
        docstring str;
-       text().forToc(str, 0);
+       text().forOutliner(str, 0);
        buffer().tocBackend().toc("index").push_back(TocItem(pit, 0, str, output_active));
        // Proceed with the rest of the inset.
        InsetCollapsable::addToToc(cpit, output_active);
index 9543e8f52749ebe27b1c5e1701cf04a3bde59c4a..996d6ecdf6eef10d0ffa28b5a6c4af599a79e50e 100644 (file)
@@ -58,7 +58,7 @@ void InsetMarginal::addToToc(DocIterator const & cpit, bool output_active) const
 
        Toc & toc = buffer().tocBackend().toc("marginalnote");
        docstring str;
-       text().forToc(str, TOC_ENTRY_LENGTH);
+       text().forOutliner(str, TOC_ENTRY_LENGTH);
        toc.push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
        // Proceed with the rest of the inset.
        InsetFootlike::addToToc(cpit, output_active);
index 751170897ab5f60d707e06040d8d07d1ea8ebc1c..6bb294de3d98b78d6f423b507b304732a5f19279 100644 (file)
@@ -203,7 +203,7 @@ void InsetNote::addToToc(DocIterator const & cpit, bool output_active) const
        Toc & toc = buffer().tocBackend().toc("note");
        InsetLayout const & il = getLayout();
        docstring str = translateIfPossible(il.labelstring()) + from_ascii(": ");
-       text().forToc(str, TOC_ENTRY_LENGTH);
+       text().forOutliner(str, TOC_ENTRY_LENGTH);
        toc.push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
 
        // Proceed with the rest of the inset.
index 70911fd65940f7dcfcbbe40968fa10ca5a3a2003..8a183fa0fae0860b35a149719caa42c896869397 100644 (file)
@@ -337,7 +337,7 @@ void InsetQuotes::toString(odocstream & os) const
 }
 
 
-void InsetQuotes::forToc(docstring & os, size_t) const
+void InsetQuotes::forOutliner(docstring & os, size_t) const
 {
        os += displayString();
 }
index 743208ff394744380934fff9812b8c4b1b043092..932cd9168da25246a091c718156d04fdb7af4665 100644 (file)
@@ -90,7 +90,7 @@ public:
        /// 
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t maxlen) const;
+       void forOutliner(docstring &, size_t maxlen) const;
 
        ///
        void validate(LaTeXFeatures &) const;
index 464a3dd3b6931572a6bf1a89a988b9d09e10eed4..a7f48f81d1b5f5108d19b82fd89c2622caf26b13 100644 (file)
@@ -260,7 +260,7 @@ void InsetRef::toString(odocstream & os) const
 }
 
 
-void InsetRef::forToc(docstring & os, size_t) const
+void InsetRef::forOutliner(docstring & os, size_t) const
 {
        // There's no need for details in the TOC, and a long label
        // will just get in the way.
index 7cd0a11cfd27cf674c544e512993f5e300951761..255b60db4880a36a7b84ab4a9f063e5a161d6bd0 100644 (file)
@@ -62,7 +62,7 @@ public:
        /// 
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t) const;
        ///
        void validate(LaTeXFeatures & features) const;
        ///
index 16e1cb58ccc1d80d8d25d1f5c1d72910d5c00963..f7a1cd92ae8fc511171d61904e5266c9b13f7e91 100644 (file)
@@ -830,7 +830,7 @@ void InsetSpace::toString(odocstream & os) const
 }
 
 
-void InsetSpace::forToc(docstring & os, size_t) const
+void InsetSpace::forOutliner(docstring & os, size_t) const
 {
        // There's no need to be cute here.
        os += " ";
index c4315a182fc1d8165299336974645f1712b31de0..8055706c41118b0f0df5599710eae187ef1611f9 100644 (file)
@@ -135,7 +135,7 @@ public:
        ///
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t) const;
        ///
        bool hasSettings() const { return true; }
        ///
index f342d0f20d0ee24de9a2149da9e495e9b7c7ac0d..58df102dde2c4b5692e031249bb81b3dd7e99378 100644 (file)
@@ -338,7 +338,7 @@ void InsetSpecialChar::toString(odocstream & os) const
 }
 
 
-void InsetSpecialChar::forToc(docstring & os, size_t) const
+void InsetSpecialChar::forOutliner(docstring & os, size_t) const
 {
        odocstringstream ods;
        plaintext(ods, OutputParams(0));
index 423afda505ae6495b9ef02086a74e2a61560d65f..5ce620cc2eb78240fdade0c4bfdea4d5c7ecb7f7 100644 (file)
@@ -70,7 +70,7 @@ public:
        ///
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t) const;
        ///
        InsetCode lyxCode() const { return SPECIALCHAR_CODE; }
        /// We don't need \begin_inset and \end_inset
index 346e00797961cd9134dfc9e55c9a6b6d9544c7b6..609de704a1dae49f0d2b810d0a459c395950cbfd 100644 (file)
@@ -800,11 +800,11 @@ void InsetText::toString(odocstream & os) const
 }
 
 
-void InsetText::forToc(docstring & os, size_t maxlen) const
+void InsetText::forOutliner(docstring & os, size_t maxlen) const
 {
        if (!getLayout().isInToc())
                return;
-       text().forToc(os, maxlen, false);
+       text().forOutliner(os, maxlen, false);
 }
 
 
@@ -856,9 +856,9 @@ void InsetText::iterateForToc(DocIterator const & cdit, bool output_active) cons
                                tocstring = par.labelString();
                                if (!tocstring.empty())
                                        tocstring += ' ';
-                               arginset->text().forToc(tocstring, length);
+                               arginset->text().forOutliner(tocstring, length);
                        } else
-                               par.forToc(tocstring, length);
+                               par.forOutliner(tocstring, length);
                        dit.pos() = 0;
                        toc.push_back(TocItem(dit, toclevel - min_toclevel,
                                tocstring, doing_output, tocstring));
index 7343ee5899273c3a34382c2abb5a9fde9384baaa..1a6d123ac6981d98f116a26add9d18d956b1e4d6 100644 (file)
@@ -170,7 +170,7 @@ public:
        ///
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t) const;
        ///
        void addToToc(DocIterator const & di, bool output_active) const;
        ///
index 4c206250feb8c95c09c6d8ae62e78344258124b0..4a27d75d03db85413a02e1e3221424e3db48cf09 100644 (file)
@@ -2283,7 +2283,7 @@ void InsetMathHull::toString(odocstream & os) const
 }
 
 
-void InsetMathHull::forToc(docstring & os, size_t) const
+void InsetMathHull::forOutliner(docstring & os, size_t) const
 {
        odocstringstream ods;
        OutputParams op(0);
index 0cffffde950da3996ae4e4c629ba34223e05412c..6eb74e7283d2a8727fa126dd66e015989fad19b4 100644 (file)
@@ -140,7 +140,7 @@ public:
        /// 
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t) const;
 
        /// get notification when the cursor leaves this inset
        bool notifyCursorLeaves(Cursor const & old, Cursor & cur);