mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 14:29:21 +00:00
latex export optimisation step 1: There is no need for TeXOnePar to return a par iterator and to depend on that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36893 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
40e705e699
commit
fbcbeb5130
@ -87,8 +87,9 @@ TeXDeeper(Buffer const & buf,
|
||||
par = TeXEnvironment(buf, text, par,
|
||||
os, texrow, runparams);
|
||||
} else {
|
||||
par = TeXOnePar(buf, text, par,
|
||||
os, texrow, runparams);
|
||||
TeXOnePar(buf, text, par, os, texrow, runparams);
|
||||
if (par != text.paragraphs().end())
|
||||
par++;
|
||||
}
|
||||
}
|
||||
LYXERR(Debug::LATEX, "TeXDeeper...done ");
|
||||
@ -234,7 +235,9 @@ TeXEnvironment(Buffer const & buf,
|
||||
|
||||
ParagraphList::const_iterator par = pit;
|
||||
do {
|
||||
par = TeXOnePar(buf, text, par, os, texrow, runparams);
|
||||
TeXOnePar(buf, text, par, os, texrow, runparams);
|
||||
if (par != paragraphs.end())
|
||||
par++;
|
||||
|
||||
if (par == paragraphs.end()) {
|
||||
// Make sure that the last paragraph is
|
||||
@ -364,7 +367,7 @@ int latexArgInsets(Paragraph const & par, odocstream & os,
|
||||
|
||||
|
||||
// FIXME: this should be anonymous
|
||||
ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
|
||||
void TeXOnePar(Buffer const & buf,
|
||||
Text const & text,
|
||||
ParagraphList::const_iterator const pit,
|
||||
odocstream & os, TexRow & texrow,
|
||||
@ -388,7 +391,7 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
|
||||
pit == paragraphs.end() ? pit : boost::next(pit);
|
||||
|
||||
if (style.inpreamble)
|
||||
return nextpit;
|
||||
return;
|
||||
|
||||
OutputParams runparams = runparams_in;
|
||||
runparams.isLastPar = nextpit == paragraphs.end();
|
||||
@ -418,7 +421,7 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
|
||||
|
||||
pit->latex(bparams, outerfont, os, texrow,
|
||||
runparams, start_pos, end_pos);
|
||||
return nextpit;
|
||||
return;
|
||||
}
|
||||
|
||||
if (style.pass_thru) {
|
||||
@ -440,7 +443,7 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
|
||||
}
|
||||
}
|
||||
|
||||
return nextpit;
|
||||
return;
|
||||
}
|
||||
|
||||
// This paragraph's language
|
||||
@ -903,7 +906,7 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
|
||||
if (nextpit != paragraphs.end())
|
||||
LYXERR(Debug::LATEX, "TeXOnePar...done " << &*nextpit);
|
||||
|
||||
return nextpit;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -1012,8 +1015,9 @@ void latexParagraphs(Buffer const & buf,
|
||||
par = TeXEnvironment(buf, text, par, os,
|
||||
texrow, runparams);
|
||||
} else {
|
||||
par = TeXOnePar(buf, text, par, os, texrow,
|
||||
runparams, everypar);
|
||||
TeXOnePar(buf, text, par, os, texrow, runparams, everypar);
|
||||
if (par != paragraphs.end())
|
||||
par++;
|
||||
}
|
||||
if (distance(lastpar, par) >= distance(lastpar, endpar))
|
||||
break;
|
||||
|
@ -61,13 +61,13 @@ std::pair<bool, int> switchEncoding(odocstream & os,
|
||||
bool force = false);
|
||||
|
||||
/// FIXME: this should not be visible.
|
||||
ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
|
||||
Text const & text,
|
||||
ParagraphList::const_iterator pit,
|
||||
odocstream & os, TexRow & texrow,
|
||||
OutputParams const & runparams,
|
||||
std::string const & everypar = std::string(),
|
||||
int start_pos = -1, int end_pos = -1);
|
||||
void TeXOnePar(Buffer const & buf,
|
||||
Text const & text,
|
||||
ParagraphList::const_iterator pit,
|
||||
odocstream & os, TexRow & texrow,
|
||||
OutputParams const & runparams,
|
||||
std::string const & everypar = std::string(),
|
||||
int start_pos = -1, int end_pos = -1);
|
||||
|
||||
} // namespace lyx
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user