From 427f6a68ff838dd063e38e48f0f34efd01f9ef60 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Matox?= Date: Mon, 4 Mar 2002 10:04:29 +0000 Subject: [PATCH] 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 --- src/ChangeLog | 8 ++++++++ src/buffer.C | 8 ++++---- src/exporter.C | 4 ++-- src/insets/ChangeLog | 5 +++++ src/insets/insetinclude.C | 6 +++--- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 07485f1dba..64bf241ac7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2002-03-04 Jose Abilio Oliveira Matos + + * 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 * text.C (getRowNearY): comment out debug msg diff --git a/src/buffer.C b/src/buffer.C index 3355eebfbf..b08076e055 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -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 << "" << "<" << 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 << "" << "\n"; - os << string(depth, ' ') << "\n"; + os << ""; } diff --git a/src/exporter.C b/src/exporter.C index 4a779ca0e3..bb3b05a2dc 100644 --- a/src/exporter.C +++ b/src/exporter.C @@ -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); diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index ab2cad024b..b59902f7a3 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2002-03-04 Jose Abilio Oliveira Matos + + * insetinclude.C (linuxdoc, docbook): deal correctly with the niceFile + argument. + 2002-03-03 Lars Gullik Bjønnes * insettext.C (InsetText): initalize newly created par with diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index f2e598dffc..ddde4d5cd5 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -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 -- 2.39.5