]> git.lyx.org Git - lyx.git/commitdiff
Fix to deal with the pernicious mixed content model in tables,
authorJosé Matox <jamatos@lyx.org>
Mon, 4 Mar 2002 10:04:29 +0000 (10:04 +0000)
committerJosé Matox <jamatos@lyx.org>
Mon, 4 Mar 2002 10:04:29 +0000 (10:04 +0000)
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
src/buffer.C
src/exporter.C
src/insets/ChangeLog
src/insets/insetinclude.C

index 07485f1dba9cbc74c92c8924a3cef9e2224c7ff7..64bf241ac771277fe55d367844cac30d4f281ebf 100644 (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
index 3355eebfbfc101814cfa0e3ada5336eede29d054..b08076e05592d2f1c2da4fc6c4560a8cb0bfd1f1 100644 (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 << ">";
 }
 
 
index 4a779ca0e3ced8c9667fa8bfb4b1c0fbeabe0c91..bb3b05a2dc37c5c01957fbe3dcafbecb40740237 100644 (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);
index ab2cad024babc02ffda83f8523a2adf3cd4b0dab..b59902f7a3167f7d07db400e212031ba497489d0 100644 (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
index f2e598dffcbcc15e16ba4aa92ca45df7c4707b47..ddde4d5cd5e01d89f0da6954c32e841340e2f279 100644 (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