]> git.lyx.org Git - features.git/commitdiff
Docbook related stuff:
authorJosé Matox <jamatos@lyx.org>
Fri, 3 May 2002 11:56:49 +0000 (11:56 +0000)
committerJosé Matox <jamatos@lyx.org>
Fri, 3 May 2002 11:56:49 +0000 (11:56 +0000)
  * Fixed several typos.
  * Protected emphasis inside code.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4125 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/buffer.C
src/insets/ChangeLog
src/insets/insetgraphics.C
src/tabular.C

index 4c8e694191c89f57f33896c5cd3442db2b977333..a6cdc22708520da698b7fce1a2c7c2218aa07f7d 100644 (file)
@@ -1,3 +1,10 @@
+2002-05-02  José Matos  <jamatos@fep.up.pt>
+       * buffer.C (makeDocBookFile): white space changes, add newline to
+       command styles.
+       (simpleDocBookOnePar): protect <emphasis> inside a CDATA section.
+
+       * tabular.C (docBook): fix typo.
+
 2002-05-03  Juergen Vigna  <jug@sad.it>
 
        * screen.C (drawFromTo): recalculate the rowpointer if we had a
index 271ea500006941d20740c9ab3971ced1bb1e6621..97ad27e6d8244511f46114dce1f4760df7d66e3e 100644 (file)
@@ -3236,12 +3236,18 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body)
 
                        if (command_flag) {
                                if (cmd_depth < command_base) {
-                                       for (Paragraph::depth_type j = command_depth; j >= command_base; --j)
+                                       for (Paragraph::depth_type j = command_depth;
+                                            j >= command_base; --j) {
                                                sgmlCloseTag(ofs, j, command_stack[j]);
+                                               ofs << endl;
+                                       }
                                        command_depth = command_base = cmd_depth;
                                } else if (cmd_depth <= command_depth) {
-                                       for (int j = command_depth; j >= int(cmd_depth); --j)
+                                       for (int j = command_depth;
+                                            j >= int(cmd_depth); --j) {
                                                sgmlCloseTag(ofs, j, command_stack[j]);
+                                               ofs << endl;
+                                       }
                                        command_depth = cmd_depth;
                                } else
                                        command_depth = cmd_depth;
@@ -3396,8 +3402,10 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body)
        }
 
        for (int j = command_depth; j >= 0 ; --j)
-               if (!command_stack[j].empty())
+               if (!command_stack[j].empty()) {
                        sgmlCloseTag(ofs, j, command_stack[j]);
+                       ofs << endl;
+               }
 
        ofs << "\n\n";
        sgmlCloseTag(ofs, 0, top_element);
@@ -3432,10 +3440,18 @@ void Buffer::simpleDocBookOnePar(ostream & os,
                // handle <emphasis> tag
                if (font_old.emph() != font.emph()) {
                        if (font.emph() == LyXFont::ON) {
+                               if(style.latexparam() == "CDATA")
+                                       os << "]]>";
                                os << "<emphasis>";
+                               if(style.latexparam() == "CDATA")
+                                       os << "<![CDATA[";
                                emph_flag = true;
                        } else if (i) {
+                               if(style.latexparam() == "CDATA")
+                                       os << "]]>";
                                os << "</emphasis>";
+                               if(style.latexparam() == "CDATA")
+                                       os << "<![CDATA[";
                                emph_flag = false;
                        }
                }
@@ -3472,7 +3488,11 @@ void Buffer::simpleDocBookOnePar(ostream & os,
        }
 
        if (emph_flag) {
+               if(style.latexparam() == "CDATA")
+                       os << "]]>";
                os << "</emphasis>";
+               if(style.latexparam() == "CDATA")
+                       os << "<![CDATA[";
        }
 
        // resets description flag correctly
index 60ed29946e4bb57e82c8d81489f45405a0c6091b..b47c3f7277636430040710f94efaefb4ccfd68d4 100644 (file)
@@ -1,3 +1,7 @@
+2002-05-02  José Matos  <jamatos@fep.up.pt>
+
+       * insetgraphics.C (validate): acess params as everyone else.
+
 2002-05-03  Juergen Vigna  <jug@sad.it>
 
        * insettabular.C (fitInsetCursor): recalculate the cursor position
index 1bdc1c7ba76d467e976f7da35d822a13713769ad..7c3a9783e031982b508e8d2e90f22bc6117c5210 100644 (file)
@@ -805,7 +805,7 @@ void InsetGraphics::validate(LaTeXFeatures & features) const
        if (params().filename.empty())
                return ;
 
-       features.includeFile(graphic_label, RemoveExtension(params_.filename));
+       features.includeFile(graphic_label, RemoveExtension(params().filename));
 
        features.require("graphicx");
 
index 6d26b3a4c1ad0fb8ed052d30f1768d8c2b11c6a0..fbeae9e5c5f0574431440865a0c8e4544886cea9 100644 (file)
@@ -2411,7 +2411,7 @@ int LyXTabular::docBook(Buffer const * buf, ostream & os) const
                                ret += docbookRow(buf, os, i);
                        }
                }
-               os << "<thead>\n";
+               os << "</thead>\n";
                ++ret;
        }
        // output footer info