}
if (end_pos == s.size()) {
s.replace(new_pos, end_pos - new_pos, t);
- pos = s.size();
LYXERR(Debug::FIND, "Regexp after \\regexp{} removal: " << s);
break;
}
static docstring buffer_to_latex(Buffer & buffer)
{
OutputParams runparams(&buffer.params().encoding());
- TexRow texrow;
+ TexRow texrow(false);
odocstringstream ods;
otexstream os(ods, texrow);
runparams.nice = true;
pos_type end = ( len == -1 || cur.pos() + len > int(par.size()) ) ?
int(par.size()) : cur.pos() + len;
OutputParams runparams(&cur.buffer()->params().encoding());
- odocstringstream os;
runparams.nice = true;
runparams.flavor = OutputParams::LATEX;
runparams.linelen = 100000; //lyxrc.plaintext_linelen;
Buffer const & buf = *cur.buffer();
LBUFERR(buf.params().isLatex());
- TexRow texrow;
+ TexRow texrow(false);
odocstringstream ods;
otexstream os(ods, texrow);
OutputParams runparams(&buf.params().encoding());
// Retrieve the math environment type, and add '$' or '$[' or others (\begin{equation}) accordingly
for (int s = cur.depth() - 1; s >= 0; --s) {
CursorSlice const & cs = cur[s];
- if (cs.asInsetMath() && cs.asInsetMath() && cs.asInsetMath()->asHullInset()) {
- WriteStream ws(ods);
+ if (cs.asInsetMath() && cs.asInsetMath()->asHullInset()) {
+ WriteStream ws(os);
cs.asInsetMath()->asHullInset()->header_write(ws);
break;
}
CursorSlice const & cs = cur[s];
InsetMath * inset = cs.asInsetMath();
if (inset && inset->asHullInset()) {
- WriteStream ws(ods);
+ WriteStream ws(os);
inset->asHullInset()->footer_write(ws);
break;
}
return 0;
cur.backwardPos();
DocIterator cur_orig(cur);
- bool found_match;
bool pit_changed = false;
- found_match = false;
do {
cur.pos() = 0;
- found_match = match(cur, -1, false);
+ bool found_match = match(cur, -1, false);
if (found_match) {
if (pit_changed)
if (len > cur.lastpos() + 1 - beg_pos) {
LYXERR(Debug::FIND, "This should not happen, more debug needed");
len = cur.lastpos() + 1 - beg_pos;
+ end_pos = beg_pos + len;
}
for (pos_type pos = beg_pos; pos != end_pos; ++pos)
if (isLowerCase(cur.paragraph().getChar(pos)))
LYXERR(Debug::FIND, "After pasteParagraphList() cur=" << cur << endl);
sel_len = repl_buffer.paragraphs().begin()->size();
} else if (cur.inMathed()) {
- TexRow texrow;
+ TexRow texrow(false);
odocstringstream ods;
otexstream os(ods, texrow);
OutputParams runparams(&repl_buffer.params().encoding());