Rename arguments of makeLaTeXFile to a sane scheme.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7370 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2003-07-26 21:37:10 +00:00
parent b52b324d64
commit 00a58355dd
8 changed files with 30 additions and 15 deletions

View File

@ -1,3 +1,9 @@
2003-07-27 José Matos <jamatos@fep.up.pt>
* buffer.[Ch] (makeLaTeXFile): changed name of arguments for
consistency in both functions.
* bufferlist.C (updateIncludedTeXfiles): change client to comply.
2003-07-26 Asger Alstrup <alstrup@local>
* rowpainter.C (paintRows): Change algorithm to work directly on

View File

@ -910,7 +910,7 @@ void Buffer::writeFileAscii(ostream & os, int linelen)
void Buffer::makeLaTeXFile(string const & fname,
string const & original_path,
LatexRunParams const & runparams,
bool only_body, bool only_preamble)
bool output_preamble, bool output_body)
{
lyxerr[Debug::LATEX] << "makeLaTeXFile..." << endl;
@ -919,7 +919,7 @@ void Buffer::makeLaTeXFile(string const & fname,
return;
makeLaTeXFile(ofs, original_path,
runparams, only_body, only_preamble);
runparams, output_preamble, output_body);
ofs.close();
if (ofs.fail()) {
@ -931,7 +931,7 @@ void Buffer::makeLaTeXFile(string const & fname,
void Buffer::makeLaTeXFile(ostream & os,
string const & original_path,
LatexRunParams const & runparams_in,
bool only_body, bool only_preamble)
bool output_preamble, bool output_body)
{
LatexRunParams runparams = runparams_in;
niceFile = runparams.nice; // this will be used by Insetincludes.
@ -947,7 +947,7 @@ void Buffer::makeLaTeXFile(ostream & os,
// first paragraph of the document. (Asger)
texrow.start(paragraphs.begin()->id(), 0);
if (!only_body && runparams.nice) {
if (output_preamble && runparams.nice) {
os << "%% " << lyx_docversion << " created this file. "
"For more info, see http://www.lyx.org/.\n"
"%% Do not edit unless you really know what "
@ -963,7 +963,7 @@ void Buffer::makeLaTeXFile(ostream & os,
// input@path is set when the actual parameter
// original_path is set. This is done for usual tex-file, but not
// for nice-latex-file. (Matthias 250696)
if (!only_body) {
if (output_preamble) {
if (!runparams.nice) {
// code for usual, NOT nice-latex-file
os << "\\batchmode\n"; // changed
@ -985,13 +985,13 @@ void Buffer::makeLaTeXFile(ostream & os,
// Write the preamble
runparams.use_babel = params.writeLaTeX(os, features, texrow);
if (only_preamble)
if (!output_body)
return;
// make the body.
os << "\\begin{document}\n";
texrow.newline();
} // only_body
} // output_preamble
lyxerr[Debug::INFO] << "preamble finished, now the body." << endl;
if (!lyxrc.language_auto_begin) {
@ -1014,7 +1014,7 @@ void Buffer::makeLaTeXFile(ostream & os,
texrow.newline();
}
if (!only_body) {
if (output_preamble) {
os << "\\end{document}\n";
texrow.newline();

View File

@ -141,14 +141,14 @@ public:
void makeLaTeXFile(string const & filename,
string const & original_path,
LatexRunParams const &,
bool only_body = false,
bool only_preamble = false);
bool output_preamble = true,
bool output_body = true);
///
void makeLaTeXFile(std::ostream & os,
string const & original_path,
LatexRunParams const &,
bool only_body = false,
bool only_preamble = false);
bool output_preamble = true,
bool output_body = true);
///
void simpleDocBookOnePar(std::ostream &,
ParagraphList::iterator par, int & desc_on,

View File

@ -236,7 +236,7 @@ void BufferList::updateIncludedTeXfiles(string const & mastertmpdir,
writefile += '/';
writefile += (*it)->getLatexName();
(*it)->makeLaTeXFile(writefile, mastertmpdir,
runparams, true);
runparams, false);
(*it)->markDepClean(mastertmpdir);
}
}

View File

@ -1,3 +1,8 @@
2003-07-27 José Matos <jamatos@fep.up.pt>
* PreviewLoader.C (Impl::dumpPreamble): comply with makeLaTeXFile
argument change.
2003-07-21 Angus Leeming <leeming@lyx.org>
* GraphicsCache.h:

View File

@ -575,7 +575,7 @@ void PreviewLoader::Impl::dumpPreamble(ostream & os) const
runparams.nice = true;
runparams.moving_arg = true;
runparams.free_spacing = true;
tmp.makeLaTeXFile(os, buffer_.filePath(), runparams, false, true);
tmp.makeLaTeXFile(os, buffer_.filePath(), runparams, true, false);
// FIXME! This is a HACK! The proper fix is to control the 'true'
// passed to WriteStream below:

View File

@ -1,3 +1,7 @@
2003-07-27 José Matos <jamatos@fep.up.pt>
* insetinclude (latex): comply with makeLaTeXFile argument change.
2003-07-26 Asger Alstrup <alstrup@local>
* insettext.C (reinitLyXText): Get rid of updateLocal which causes

View File

@ -345,7 +345,7 @@ int InsetInclude::latex(Buffer const * buffer, ostream & os,
tmp->markDepClean(buffer->tmppath);
tmp->makeLaTeXFile(writefile, OnlyPath(getMasterFilename()),
runparams, true);
runparams, false);
}
if (isVerbatim()) {