mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-13 20:09:59 +00:00
* paragraph_funcs.C (TeXDeeper): reduce number of args, move into
anon namespace (TeXEnvironment): ditto (TeXOnePar): ditto git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6524 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3e69f1b800
commit
a9a4ba97b6
@ -1,3 +1,10 @@
|
||||
2003-03-17 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* paragraph_funcs.C (TeXDeeper): reduce number of args, move into
|
||||
anon namespace
|
||||
(TeXEnvironment): ditto
|
||||
(TeXOnePar): ditto
|
||||
|
||||
2003-03-17 John Levon <levon@movementarian.org>
|
||||
|
||||
* text.C (rowBreakPoint): remove attempt to fix displayed
|
||||
|
@ -262,9 +262,24 @@ int getEndLabel(Paragraph * para, BufferParams const & bparams)
|
||||
#endif
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
ParagraphList::iterator
|
||||
TeXEnvironment(Buffer const * buf,
|
||||
ParagraphList const & paragraphs,
|
||||
ParagraphList::iterator pit,
|
||||
ostream & os, TexRow & texrow);
|
||||
|
||||
ParagraphList::iterator
|
||||
TeXOnePar(Buffer const * buf,
|
||||
ParagraphList const & paragraphs,
|
||||
ParagraphList::iterator pit,
|
||||
ostream & os, TexRow & texrow,
|
||||
bool moving_arg);
|
||||
|
||||
|
||||
ParagraphList::iterator
|
||||
TeXDeeper(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList const & paragraphs,
|
||||
ParagraphList::iterator pit,
|
||||
ostream & os, TexRow & texrow)
|
||||
@ -274,10 +289,10 @@ TeXDeeper(Buffer const * buf,
|
||||
|
||||
while (par != paragraphs.end()&& par->params().depth() == pit->params().depth()) {
|
||||
if (par->layout()->isEnvironment()) {
|
||||
par = TeXEnvironment(buf, bparams, paragraphs, par,
|
||||
par = TeXEnvironment(buf, paragraphs, par,
|
||||
os, texrow);
|
||||
} else {
|
||||
par = TeXOnePar(buf, bparams, paragraphs, par,
|
||||
par = TeXOnePar(buf, paragraphs, par,
|
||||
os, texrow, false);
|
||||
}
|
||||
}
|
||||
@ -289,13 +304,14 @@ TeXDeeper(Buffer const * buf,
|
||||
|
||||
ParagraphList::iterator
|
||||
TeXEnvironment(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList const & paragraphs,
|
||||
ParagraphList::iterator pit,
|
||||
ostream & os, TexRow & texrow)
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "TeXEnvironment... " << &*pit << endl;
|
||||
|
||||
BufferParams const & bparams = buf->params;
|
||||
|
||||
LyXLayout_ptr const & style = pit->layout();
|
||||
|
||||
Language const * language = pit->getParLanguage(bparams);
|
||||
@ -350,7 +366,7 @@ TeXEnvironment(Buffer const * buf,
|
||||
}
|
||||
ParagraphList::iterator par = pit;
|
||||
do {
|
||||
par = TeXOnePar(buf, bparams, paragraphs, par, os, texrow, false);
|
||||
par = TeXOnePar(buf, paragraphs, par, os, texrow, false);
|
||||
|
||||
if (par != paragraphs.end()&& par->params().depth() > pit->params().depth()) {
|
||||
if (par->layout()->isParagraph()) {
|
||||
@ -372,7 +388,7 @@ TeXEnvironment(Buffer const * buf,
|
||||
os << '\n';
|
||||
texrow.newline();
|
||||
}
|
||||
par = TeXDeeper(buf, bparams, paragraphs, par, os, texrow);
|
||||
par = TeXDeeper(buf, paragraphs, par, os, texrow);
|
||||
}
|
||||
} while (par != paragraphs.end()
|
||||
&& par->layout() == pit->layout()
|
||||
@ -394,8 +410,6 @@ TeXEnvironment(Buffer const * buf,
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
InsetOptArg * optArgInset(Paragraph const & par)
|
||||
{
|
||||
// Find the entry.
|
||||
@ -410,18 +424,17 @@ InsetOptArg * optArgInset(Paragraph const & par)
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // end namespace
|
||||
|
||||
|
||||
ParagraphList::iterator
|
||||
TeXOnePar(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList const & paragraphs,
|
||||
ParagraphList::iterator pit,
|
||||
ostream & os, TexRow & texrow,
|
||||
bool moving_arg)
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "TeXOnePar... " << &*pit << endl;
|
||||
BufferParams const & bparams = buf->params;
|
||||
|
||||
Inset const * in = pit->inInset();
|
||||
bool further_blank_line = false;
|
||||
LyXLayout_ptr style;
|
||||
@ -648,6 +661,8 @@ TeXOnePar(Buffer const * buf,
|
||||
return ++pit;
|
||||
}
|
||||
|
||||
} // anon namespace
|
||||
|
||||
|
||||
//
|
||||
// LaTeX all paragraphs from par to endpar, if endpar == 0 then to the end
|
||||
@ -705,12 +720,12 @@ void latexParagraphs(Buffer const * buf,
|
||||
if (layout->isEnvironment() ||
|
||||
!par->params().leftIndent().zero())
|
||||
{
|
||||
par = TeXEnvironment(buf, buf->params, paragraphs, par, ofs, texrow);
|
||||
par = TeXEnvironment(buf, paragraphs, par, ofs, texrow);
|
||||
} else {
|
||||
par = TeXOnePar(buf, buf->params, paragraphs, par, ofs, texrow, moving_arg);
|
||||
par = TeXOnePar(buf, paragraphs, par, ofs, texrow, moving_arg);
|
||||
}
|
||||
} else {
|
||||
par = TeXOnePar(buf, buf->params, paragraphs, par, ofs, texrow, moving_arg);
|
||||
par = TeXOnePar(buf, paragraphs, par, ofs, texrow, moving_arg);
|
||||
}
|
||||
}
|
||||
// It might be that we only have a title in this document
|
||||
|
@ -57,27 +57,6 @@ bool isFirstInSequence(Paragraph * par);
|
||||
int getEndLabel(Paragraph * para, BufferParams const & bparams);
|
||||
#endif
|
||||
|
||||
ParagraphList::iterator
|
||||
TeXDeeper(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList const & paragraphs,
|
||||
ParagraphList::iterator pit,
|
||||
std::ostream & os, TexRow & texrow);
|
||||
|
||||
ParagraphList::iterator
|
||||
TeXEnvironment(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList const & paragraphs,
|
||||
ParagraphList::iterator pit,
|
||||
std::ostream & os, TexRow & texrow);
|
||||
|
||||
ParagraphList::iterator
|
||||
TeXOnePar(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList const & paragraphs,
|
||||
ParagraphList::iterator pit,
|
||||
std::ostream & os, TexRow & texrow,
|
||||
bool moving_arg);
|
||||
|
||||
void latexParagraphs(Buffer const * buf,
|
||||
ParagraphList const & paragraphs,
|
||||
|
Loading…
x
Reference in New Issue
Block a user