// needed to insert the selection
void Buffer::insertStringAsLines(Paragraph *& par, pos_type & pos,
- LyXFont const & fn,string const & str) const
+ LyXFont const & fn,string const & str)
{
LyXLayout_ptr const & layout = par->layout();
cit != str.end(); ++cit) {
if (*cit == '\n') {
if (autobreakrows && (!par->empty() || layout->keepempty)) {
- breakParagraph(params, par, pos,
+ breakParagraph(this, par, pos,
layout->isEnvironment());
par = par->next();
pos = 0;
inset = new InsetParent(inscmd, *this);
}
} else {
- bool alreadyread = false;
if (tmptok == "Quotes") {
inset = new InsetQuotes;
} else if (tmptok == "External") {
inset = new InsetFormulaMacro;
} else if (tmptok == "Formula") {
inset = new InsetFormula;
- } else if (tmptok == "Figure") { // Backward compatibility
-// inset = new InsetFig(100, 100, *this);
- inset = new InsetGraphics;
} else if (tmptok == "Graphics") {
inset = new InsetGraphics;
- } else if (tmptok == "Info") {// backwards compatibility
- inset = new InsetNote(this,
- lex.getLongString("\\end_inset"),
- true);
- alreadyread = true;
} else if (tmptok == "Note") {
inset = new InsetNote(params);
} else if (tmptok == "Include") {
inset = new InsetFloatList;
}
- if (inset && !alreadyread) inset->read(this, lex);
+ if (inset)
+ inset->read(this, lex);
}
if (inset) {
texrow.newline();
}
- latexParagraphs(os, &*(paragraphs.begin()), 0, texrow);
+ latexParagraphs(os, paragraphs.begin(), paragraphs.end(), texrow);
// add this just in case after all the paragraphs
os << endl;
//
// LaTeX all paragraphs from par to endpar, if endpar == 0 then to the end
//
-void Buffer::latexParagraphs(ostream & ofs, Paragraph * par,
- Paragraph * endpar, TexRow & texrow,
+void Buffer::latexParagraphs(ostream & ofs,
+ ParagraphList::iterator par,
+ ParagraphList::iterator endpar,
+ TexRow & texrow,
bool moving_arg) const
{
bool was_title = false;
if (layout->isEnvironment() ||
!par->params().leftIndent().zero())
{
- par = par->TeXEnvironment(this, params, ofs, texrow);
+ par = TeXEnvironment(this, params, par, ofs, texrow);
} else {
- par = par->TeXOnePar(this, params, ofs, texrow, moving_arg);
+ par = TeXOnePar(this, params, par, ofs, texrow, moving_arg);
}
} else {
- par = par->TeXOnePar(this, params, ofs, texrow, moving_arg);
+ par = TeXOnePar(this, params, par, ofs, texrow, moving_arg);
}
}
// It might be that we only have a title in this document