* src/Text.cpp:

- safer (but slightly less nice) fix for bug 4334. Fixes bug 4347 that was introduced in r21489.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21541 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-11-10 11:05:38 +00:00
parent 246baa610e
commit 208feabc07

View File

@ -86,8 +86,8 @@ namespace lyx {
using support::bformat; using support::bformat;
using support::contains; using support::contains;
using support::rsplit;
using support::split; using support::split;
using support::subst;
using cap::cutSelection; using cap::cutSelection;
using cap::pasteParagraphList; using cap::pasteParagraphList;
@ -1278,8 +1278,7 @@ docstring Text::getPossibleLabel(Cursor & cur) const
docstring par_text = pars_[pit].asString(cur.buffer(), false); docstring par_text = pars_[pit].asString(cur.buffer(), false);
string piece; string piece;
// the return string of math matrices might contain linebreaks // the return string of math matrices might contain linebreaks
// FIXME: unicode par_text = subst(par_text, '\n', '-');
par_text = from_utf8(rsplit(to_utf8(par_text), piece, '\n'));
for (int i = 0; i < lyxrc.label_init_length; ++i) { for (int i = 0; i < lyxrc.label_init_length; ++i) {
if (par_text.empty()) if (par_text.empty())
break; break;