]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Update tex2lyx test reference after 754cb3d1
[lyx.git] / src / lyxfind.cpp
index d7038dedcb1e66d4bc96bb8e328e81dd26f295c1..cc8d1cf12ff07abb9c6b74cf476a117862e6ecc5 100644 (file)
@@ -727,9 +727,8 @@ private:
 static docstring buffer_to_latex(Buffer & buffer)
 {
        OutputParams runparams(&buffer.params().encoding());
-       TexRow texrow(false);
        odocstringstream ods;
-       otexstream os(ods, texrow);
+       otexstream os(ods, false);
        runparams.nice = true;
        runparams.flavor = OutputParams::LATEX;
        runparams.linelen = 80; //lyxrc.plaintext_linelen;
@@ -1048,9 +1047,8 @@ docstring latexifyFromCursor(DocIterator const & cur, int len)
        Buffer const & buf = *cur.buffer();
        LBUFERR(buf.params().isLatex());
 
-       TexRow texrow(false);
        odocstringstream ods;
-       otexstream os(ods, texrow);
+       otexstream os(ods, false);
        OutputParams runparams(&buf.params().encoding());
        runparams.nice = false;
        runparams.flavor = OutputParams::LATEX;
@@ -1395,9 +1393,8 @@ static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, M
                LYXERR(Debug::FIND, "After pasteParagraphList() cur=" << cur << endl);
                sel_len = repl_buffer.paragraphs().begin()->size();
        } else if (cur.inMathed()) {
-               TexRow texrow(false);
                odocstringstream ods;
-               otexstream os(ods, texrow);
+               otexstream os(ods, false);
                OutputParams runparams(&repl_buffer.params().encoding());
                runparams.nice = false;
                runparams.flavor = OutputParams::LATEX;
@@ -1408,6 +1405,8 @@ static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, M
                docstring repl_latex = ods.str();
                LYXERR(Debug::FIND, "Latexified replace_buffer: '" << repl_latex << "'");
                string s;
+               // false positive from coverity
+               // coverity[CHECKED_RETURN]
                regex_replace(to_utf8(repl_latex), s, "\\$(.*)\\$", "$1");
                regex_replace(s, s, "\\\\\\[(.*)\\\\\\]", "$1");
                repl_latex = from_utf8(s);