From: Richard Heck Date: Wed, 15 Dec 2010 01:34:04 +0000 (+0000) Subject: Begin undoing the tocString() mess by renaming that routine. X-Git-Tag: 2.0.0~1369 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=832d6cd7e1017b11058048a9dc6930ec08aee30c;p=features.git Begin undoing the tocString() mess by renaming that routine. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36889 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index ed22830e5a..fb9a832fe2 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -2928,7 +2928,7 @@ docstring Paragraph::asString(pos_type beg, pos_type end, int options) const || (c == '\n' && (options & AS_STR_NEWLINES))) os.put(c); else if (c == META_INSET && (options & AS_STR_INSETS)) { - getInset(i)->tocString(os); + getInset(i)->toString(os); if (getInset(i)->asInsetMath()) os << " "; } diff --git a/src/insets/Inset.h b/src/insets/Inset.h index 965fa6279a..44646b9383 100644 --- a/src/insets/Inset.h +++ b/src/insets/Inset.h @@ -323,8 +323,8 @@ public: // FIXME This method is used for things other than generating strings // for the TOC. E.g., it is called by Paragraph::asString() to get the // contents of the inset. These two functions should be disentangled. - /// the string that is passed to the TOC - virtual void tocString(odocstream &) const {} + /// + virtual void toString(odocstream &) const {} /// can the contents of the inset be edited on screen ? // true for InsetCollapsables (not ButtonOnly) (not InsetInfo), InsetText diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index 4bcd711c1b..01cd795bd9 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -238,10 +238,10 @@ docstring InsetBranch::xhtml(XHTMLStream & xs, OutputParams const & rp) const } -void InsetBranch::tocString(odocstream & os) const +void InsetBranch::toString(odocstream & os) const { if (isBranchSelected()) - InsetCollapsable::tocString(os); + InsetCollapsable::toString(os); } diff --git a/src/insets/InsetBranch.h b/src/insets/InsetBranch.h index f852ee2def..8f58a50310 100644 --- a/src/insets/InsetBranch.h +++ b/src/insets/InsetBranch.h @@ -73,7 +73,7 @@ private: /// docstring xhtml(XHTMLStream &, OutputParams const &) const; /// - void tocString(odocstream &) const; + void toString(odocstream &) const; /// void validate(LaTeXFeatures &) const; /// diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp index 5d8d8c9a20..1ef7e0fb00 100644 --- a/src/insets/InsetCitation.cpp +++ b/src/insets/InsetCitation.cpp @@ -540,7 +540,7 @@ docstring InsetCitation::xhtml(XHTMLStream & xs, OutputParams const &) const } -void InsetCitation::tocString(odocstream & os) const +void InsetCitation::toString(odocstream & os) const { plaintext(os, OutputParams(0)); } diff --git a/src/insets/InsetCitation.h b/src/insets/InsetCitation.h index 831da30dac..8ae83c4c16 100644 --- a/src/insets/InsetCitation.h +++ b/src/insets/InsetCitation.h @@ -51,7 +51,7 @@ public: /// docstring xhtml(XHTMLStream &, OutputParams const &) const; /// - void tocString(odocstream &) const; + void toString(odocstream &) const; /// void validate(LaTeXFeatures &) const; /// diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp index 42dd6917dd..468b19039d 100644 --- a/src/insets/InsetHyperlink.cpp +++ b/src/insets/InsetHyperlink.cpp @@ -236,7 +236,7 @@ docstring InsetHyperlink::xhtml(XHTMLStream & xs, OutputParams const &) const } -void InsetHyperlink::tocString(odocstream & os) const +void InsetHyperlink::toString(odocstream & os) const { plaintext(os, OutputParams(0)); } diff --git a/src/insets/InsetHyperlink.h b/src/insets/InsetHyperlink.h index ddf35af853..29439f51c5 100644 --- a/src/insets/InsetHyperlink.h +++ b/src/insets/InsetHyperlink.h @@ -36,7 +36,7 @@ public: /// bool isInToc() const { return true; } /// - void tocString(odocstream &) const; + void toString(odocstream &) const; /// docstring toolTip(BufferView const & bv, int x, int y) const; /// diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp index 4e47361bf7..0c272ffb09 100644 --- a/src/insets/InsetQuotes.cpp +++ b/src/insets/InsetQuotes.cpp @@ -327,7 +327,7 @@ docstring InsetQuotes::xhtml(XHTMLStream & xs, OutputParams const & op) const } -void InsetQuotes::tocString(odocstream & os) const +void InsetQuotes::toString(odocstream & os) const { os << displayString(); } diff --git a/src/insets/InsetQuotes.h b/src/insets/InsetQuotes.h index 0cc463e4c2..faab5ca90f 100644 --- a/src/insets/InsetQuotes.h +++ b/src/insets/InsetQuotes.h @@ -86,8 +86,8 @@ public: /// docstring xhtml(XHTMLStream &, OutputParams const &) const; - /// the string that is passed to the TOC - void tocString(odocstream &) const; + /// + void toString(odocstream &) const; /// void validate(LaTeXFeatures &) const; diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index 8324104eed..1a802a233e 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -231,7 +231,7 @@ docstring InsetRef::xhtml(XHTMLStream & xs, OutputParams const &) const } -void InsetRef::tocString(odocstream & os) const +void InsetRef::toString(odocstream & os) const { plaintext(os, OutputParams(0)); } diff --git a/src/insets/InsetRef.h b/src/insets/InsetRef.h index 61620d3f25..ceae6fc4e8 100644 --- a/src/insets/InsetRef.h +++ b/src/insets/InsetRef.h @@ -58,8 +58,8 @@ public: int docbook(odocstream &, OutputParams const &) const; /// docstring xhtml(XHTMLStream &, OutputParams const &) const; - /// the string that is passed to the TOC - void tocString(odocstream &) const; + /// + void toString(odocstream &) const; /// void validate(LaTeXFeatures & features) const; /// diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp index cccde17fc8..7ece382c43 100644 --- a/src/insets/InsetSpace.cpp +++ b/src/insets/InsetSpace.cpp @@ -734,7 +734,7 @@ void InsetSpace::validate(LaTeXFeatures & features) const } -void InsetSpace::tocString(odocstream & os) const +void InsetSpace::toString(odocstream & os) const { plaintext(os, OutputParams(0)); } diff --git a/src/insets/InsetSpace.h b/src/insets/InsetSpace.h index 089b5664e9..f013d7ca31 100644 --- a/src/insets/InsetSpace.h +++ b/src/insets/InsetSpace.h @@ -129,8 +129,8 @@ public: docstring xhtml(XHTMLStream &, OutputParams const &) const; /// void validate(LaTeXFeatures & features) const; - /// the string that is passed to the TOC - void tocString(odocstream &) const; + /// + void toString(odocstream &) const; /// bool hasSettings() const { return true; } /// diff --git a/src/insets/InsetSpecialChar.cpp b/src/insets/InsetSpecialChar.cpp index f73217d02f..e89bd003b3 100644 --- a/src/insets/InsetSpecialChar.cpp +++ b/src/insets/InsetSpecialChar.cpp @@ -318,7 +318,7 @@ docstring InsetSpecialChar::xhtml(XHTMLStream & xs, OutputParams const &) const } -void InsetSpecialChar::tocString(odocstream & os) const +void InsetSpecialChar::toString(odocstream & os) const { plaintext(os, OutputParams(0)); } diff --git a/src/insets/InsetSpecialChar.h b/src/insets/InsetSpecialChar.h index 7fff625da0..7a06c54b57 100644 --- a/src/insets/InsetSpecialChar.h +++ b/src/insets/InsetSpecialChar.h @@ -66,8 +66,8 @@ public: int docbook(odocstream &, OutputParams const &) const; /// docstring xhtml(XHTMLStream &, OutputParams const &) const; - /// the string that is passed to the TOC - void tocString(odocstream &) const; + /// + void toString(odocstream &) const; /// InsetCode lyxCode() const { return SPECIALCHAR_CODE; } /// We don't need \begin_inset and \end_inset diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 76d7d33a7a..4c5ca72f6a 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -666,7 +666,7 @@ void InsetText::updateBuffer(ParIterator const & it, UpdateType utype) } -void InsetText::tocString(odocstream & os) const +void InsetText::toString(odocstream & os) const { os << text().asString(0, 1, AS_STR_LABEL | AS_STR_INSETS); } diff --git a/src/insets/InsetText.h b/src/insets/InsetText.h index f1c23cccaf..d848cbb0ef 100644 --- a/src/insets/InsetText.h +++ b/src/insets/InsetText.h @@ -163,8 +163,8 @@ public: /// Update the counters of this inset and of its contents virtual void updateBuffer(ParIterator const &, UpdateType); - /// the string that is passed to the TOC - void tocString(odocstream &) const; + /// + void toString(odocstream &) const; /// void addToToc(DocIterator const &); /// diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 374e81be66..bf4e122453 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -1983,7 +1983,7 @@ docstring InsetMathHull::xhtml(XHTMLStream & xs, OutputParams const & op) const } -void InsetMathHull::tocString(odocstream & os) const +void InsetMathHull::toString(odocstream & os) const { plaintext(os, OutputParams(0)); } diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h index dd4255f0d9..9712460e43 100644 --- a/src/mathed/InsetMathHull.h +++ b/src/mathed/InsetMathHull.h @@ -130,8 +130,8 @@ public: int docbook(odocstream &, OutputParams const &) const; /// docstring xhtml(XHTMLStream &, OutputParams const &) const; - /// the string that is passed to the TOC - void tocString(odocstream &) const; + /// + void toString(odocstream &) const; /// get notification when the cursor leaves this inset bool notifyCursorLeaves(Cursor const & old, Cursor & cur);