Not sure why I introduced this test at r28378, but it causes pasting to

fail e.g., of URLs in math, since tocString() is called by
Paragraph::asString() to give us the contents of insets. Probably, I was
misled by the name, and the comment in Inset.h. That means, at least,
that this method is misnamed, but it probably means we do the wrong
thing in other cases.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36517 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-11-26 17:08:40 +00:00
parent 9a272ec26d
commit c9f9cb88c0
2 changed files with 4 additions and 2 deletions

View File

@ -319,6 +319,10 @@ public:
/// normal stream, and which will in fact be written after the current
/// paragraph closes. this is appropriate e.g. for floats.
virtual docstring xhtml(XHTMLStream & xs, OutputParams const &) const;
// 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 {}

View File

@ -667,8 +667,6 @@ void InsetText::updateBuffer(ParIterator const & it, UpdateType utype)
void InsetText::tocString(odocstream & os) const
{
if (!getLayout().isInToc())
return;
os << text().asString(0, 1, AS_STR_LABEL | AS_STR_INSETS);
}