Paragraph::latex() always returned false. So remove the return value.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34676 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-06-15 15:49:24 +00:00
parent c952f9a7be
commit 84a4ec80ab
3 changed files with 8 additions and 15 deletions

View File

@ -1980,7 +1980,7 @@ int Paragraph::Private::endTeXParParams(BufferParams const & bparams,
// This one spits out the text of the paragraph
bool Paragraph::latex(BufferParams const & bparams,
void Paragraph::latex(BufferParams const & bparams,
Font const & outerfont,
odocstream & os, TexRow & texrow,
OutputParams const & runparams,
@ -1994,9 +1994,7 @@ bool Paragraph::latex(BufferParams const & bparams,
bparams.documentClass().plainLayout() : *d->layout_;
if (!force && style.inpreamble)
return false;
bool return_value = false;
return;
bool const allowcust = allowParagraphCustomization();
@ -2256,7 +2254,6 @@ bool Paragraph::latex(BufferParams const & bparams,
// Needed if there is an optional argument but no contents.
if (body_pos > 0 && body_pos == size()) {
os << "}]~";
return_value = false;
}
if (allowcust && d->endTeXParParams(bparams, os, texrow, runparams)
@ -2267,7 +2264,6 @@ bool Paragraph::latex(BufferParams const & bparams,
}
LYXERR(Debug::LATEX, "Paragraph::latex... done " << this);
return return_value;
}

View File

@ -144,7 +144,7 @@ public:
void validate(LaTeXFeatures &) const;
/// \param force means: output even if layout.inpreamble is true.
bool latex(BufferParams const &, Font const & outerfont, odocstream &,
void latex(BufferParams const &, Font const & outerfont, odocstream &,
TexRow & texrow, OutputParams const &,
int start_pos = 0, int end_pos = -1, bool force = false) const;

View File

@ -383,8 +383,8 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
texrow.newline();
}
/*bool need_par = */ pit->latex(bparams, outerfont,
os, texrow, runparams, start_pos, end_pos);
pit->latex(bparams, outerfont, os, texrow,
runparams, start_pos, end_pos);
return nextpit;
}
@ -608,8 +608,8 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
// FIXME UNICODE
os << from_utf8(everypar);
bool need_par = pit->latex(bparams, outerfont,
os, texrow, runparams, start_pos, end_pos);
pit->latex(bparams, outerfont, os, texrow,
runparams, start_pos, end_pos);
// Make sure that \\par is done with the font of the last
// character if this has another size as the default.
@ -630,11 +630,8 @@ ParagraphList::const_iterator TeXOnePar(Buffer const & buf,
if (style.resfont.size() != font.fontInfo().size()
&& nextpit != paragraphs.end()
&& !is_command) {
if (!need_par)
os << '{';
os << '{';
os << "\\" << from_ascii(font.latexSize()) << " \\par}";
} else if (need_par) {
os << "\\par}";
} else if (is_command) {
os << '}';
if (runparams.encoding != prev_encoding) {