Fix to deal with the pernicious mixed content model in tables,

the exported docbook and linuxdoc output now is ugly but correct.
Included files final fix, now they work in all cases, with or
without temp directory.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3651 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2002-03-04 10:04:29 +00:00
parent 8964835ac6
commit 427f6a68ff
5 changed files with 22 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2002-03-04 Jose Abilio Oliveira Matos <jamatos@novalis.fc.up.pt>
* exporter.C (Export): for linuxdoc and docbook the buffer is a nice
file if it doesn't go to a temporary file.
* buffer.C (sgmlOpenTag):
(sgmlCloseTag): remove extra newline insertion.
2002-03-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
* text.C (getRowNearY): comment out debug msg

View File

@ -2584,21 +2584,21 @@ bool Buffer::isSGML() const
}
void Buffer::sgmlOpenTag(ostream & os, Paragraph::depth_type depth,
void Buffer::sgmlOpenTag(ostream & os, Paragraph::depth_type,
string const & latexname) const
{
if (!latexname.empty() && latexname != "!-- --")
//os << "<!-- " << depth << " -->" << "<" << latexname << ">";
os << string(depth, ' ') << "<" << latexname << ">\n";
os << "<" << latexname << ">";
}
void Buffer::sgmlCloseTag(ostream & os, Paragraph::depth_type depth,
void Buffer::sgmlCloseTag(ostream & os, Paragraph::depth_type,
string const & latexname) const
{
if (!latexname.empty() && latexname != "!-- --")
//os << "<!-- " << depth << " -->" << "</" << latexname << ">\n";
os << string(depth, ' ') << "</" << latexname << ">\n";
os << "</" << latexname << ">";
}

View File

@ -64,10 +64,10 @@ bool Exporter::Export(Buffer * buffer, string const & format,
buffer->writeFileAscii(filename, lyxrc.ascii_linelen);
// Linuxdoc backend
else if (buffer->isLinuxDoc())
buffer->makeLinuxDocFile(filename, true);
buffer->makeLinuxDocFile(filename, !put_in_tempdir);
// Docbook backend
else if (buffer->isDocBook())
buffer->makeDocBookFile(filename, true);
buffer->makeDocBookFile(filename, !put_in_tempdir);
// LaTeX backend
else if (backend_format == format)
buffer->makeLaTeXFile(filename, string(), true);

View File

@ -1,3 +1,8 @@
2002-03-04 Jose Abilio Oliveira Matos <jamatos@novalis.fc.up.pt>
* insetinclude.C (linuxdoc, docbook): deal correctly with the niceFile
argument.
2002-03-03 Lars Gullik Bjønnes <larsbj@birdstep.com>
* insettext.C (InsetText): initalize newly created par with

View File

@ -316,7 +316,7 @@ int InsetInclude::linuxdoc(Buffer const * buffer, ostream & os) const
// write it to a file (so far the complete file)
string writefile = ChangeExtension(getFileName(), ".sgml");
if (!buffer->tmppath.empty() && buffer->niceFile) {
if (!buffer->tmppath.empty() && !buffer->niceFile) {
incfile = subst(incfile, '/','@');
writefile = AddName(buffer->tmppath, incfile);
} else
@ -355,7 +355,7 @@ int InsetInclude::docbook(Buffer const * buffer, ostream & os) const
// write it to a file (so far the complete file)
string writefile = ChangeExtension(getFileName(), ".sgml");
if (!buffer->tmppath.empty() && buffer->niceFile) {
if (!buffer->tmppath.empty() && !buffer->niceFile) {
incfile = subst(incfile, '/','@');
writefile = AddName(buffer->tmppath, incfile);
} else
@ -388,7 +388,7 @@ void InsetInclude::validate(LaTeXFeatures & features) const
Buffer const * const b = bufferlist.getBuffer(getMasterFilename());
if (b && !b->tmppath.empty() && b->niceFile && !isVerbatim()) {
if (b && !b->tmppath.empty() && !b->niceFile && !isVerbatim()) {
incfile = subst(incfile, '/','@');
writefile = AddName(b->tmppath, incfile);
} else