]> git.lyx.org Git - lyx.git/blobdiff - src/Text.cpp
cleanup and reorder initialisation code of GuiView and GuiToolbars. Move some things...
[lyx.git] / src / Text.cpp
index 88341f6f97d8d62aab76e87fcfaafc91f7d9e6a0..0af0731f89187a3e953f2a568f134a8142443398 100644 (file)
@@ -86,8 +86,8 @@ namespace lyx {
 
 using support::bformat;
 using support::contains;
-using support::rsplit;
 using support::split;
+using support::subst;
 
 using cap::cutSelection;
 using cap::pasteParagraphList;
@@ -310,8 +310,7 @@ void readParagraph(Buffer const & buf, Paragraph & par, Lexer & lex,
                        break;
                }
 
-               LYXERR(Debug::PARSER) << "Handling paragraph token: `"
-                                     << token << '\'' << endl;
+               LYXERR(Debug::PARSER, "Handling paragraph token: `" << token << '\'');
                if (token == "\\begin_layout" || token == "\\end_document"
                    || token == "\\end_inset" || token == "\\begin_deeper"
                    || token == "\\end_deeper") {
@@ -1278,8 +1277,7 @@ docstring Text::getPossibleLabel(Cursor & cur) const
        docstring par_text = pars_[pit].asString(cur.buffer(), false);
        string piece;
        // the return string of math matrices might contain linebreaks
-       // FIXME: unicode
-       par_text = from_utf8(rsplit(to_utf8(par_text), piece, '\n'));
+       par_text = subst(par_text, '\n', '-');
        for (int i = 0; i < lyxrc.label_init_length; ++i) {
                if (par_text.empty())
                        break;