]> git.lyx.org Git - features.git/commitdiff
Removed obsolete code.
authorJosé Matox <jamatos@lyx.org>
Thu, 8 Nov 2001 11:32:18 +0000 (11:32 +0000)
committerJosé Matox <jamatos@lyx.org>
Thu, 8 Nov 2001 11:32:18 +0000 (11:32 +0000)
Replaced linuxdoc by sgml in two sgml helper functions.

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

src/ChangeLog
src/buffer.C
src/paragraph.C
src/paragraph.h

index 2fb5f37712e855073d79b63dd23aa0d1161d5c7c..c24cb41301ed796be653b8e26c9c4b27e2fc5f7f 100644 (file)
@@ -1,3 +1,11 @@
+2001-11-08  José Matos  <jamatos@fep.up.pt>
+
+       * buffer.C (sgmlLineBreak): renamed from linux_doc_line_break.
+       (simpleDocBookOnePar): removed code made obsolete by the new inset code.
+
+       * paragraph.h:
+       * paragraph.C (sgmlConvertChar): renamed from linuxDocConvertChar.
+
 2001-11-07  José Matos  <jamatos@fep.up.pt>
 
        * buffer.h:
index 3455879be76b81966d351733f6914187fc5b13ff..f1d774986ea65ab201cfa790c35010ce39eadeac 100644 (file)
@@ -2708,7 +2708,7 @@ void Buffer::makeLinuxDocFile(string const & fname, bool nice, bool body_only)
 // writes newline, if necessary.
 namespace {
 
-void linux_doc_line_break(ostream & os, string::size_type & colcount,
+void sgmlLineBreak(ostream & os, string::size_type & colcount,
                          string::size_type newcol)
 {
        colcount += newcol;
@@ -2916,18 +2916,18 @@ void Buffer::simpleLinuxDocOnePar(ostream & os,
                        ++char_line_count;
                } else {
                        string sgml_string;
-                       if (par->linuxDocConvertChar(c, sgml_string)
+                       if (par->sgmlConvertChar(c, sgml_string)
                            && !style.free_spacing) { 
                                // in freespacing mode, spaces are
                                // non-breaking characters
                                if (desc_on) {// if char is ' ' then...
 
                                        ++char_line_count;
-                                       linux_doc_line_break(os, char_line_count, 6);
+                                       sgmlLineBreak(os, char_line_count, 6);
                                        os << "</tag>";
                                        desc_on = false;
                                } else  {
-                                       linux_doc_line_break(os, char_line_count, 1);
+                                       sgmlLineBreak(os, char_line_count, 1);
                                        os << c;
                                }
                        } else {
@@ -2946,7 +2946,7 @@ void Buffer::simpleLinuxDocOnePar(ostream & os,
        // resets description flag correctly
        if (desc_on) {
                // <tag> not closed...
-               linux_doc_line_break(os, char_line_count, 6);
+               sgmlLineBreak(os, char_line_count, 6);
                os << "</tag>";
        }
 }
@@ -3299,33 +3299,10 @@ void Buffer::simpleDocBookOnePar(ostream & os, string & extra,
 
                if (c == Paragraph::META_INSET) {
                        Inset * inset = par->getInset(i);
-                       ostringstream ost;
-                       inset->docbook(this, ost);
-                       string tmp_out = ost.str().c_str();
-
-                       //
-                       // This code needs some explanation:
-                       // Two insets are treated specially
-                       //   label if it is the first element in a command paragraph
-                       //         desc_on == 3
-                       //   graphics inside tables or figure floats can't go on
-                       //   title (the equivalente in latex for this case is caption
-                       //   and title should come first
-                       //         desc_on == 4
-                       //
-                       if (desc_on!= 3 || i!= 0) {
-                               if (!tmp_out.empty() && tmp_out[0] == '@') {
-                                       if (desc_on == 4)
-                                               extra += frontStrip(tmp_out, '@');
-                                       else
-                                               os << frontStrip(tmp_out, '@');
-                               }
-                               else
-                                       os << tmp_out;
-                       }
+                       inset->docbook(this, os);
                } else {
                        string sgml_string;
-                       par->linuxDocConvertChar(c, sgml_string);
+                       par->sgmlConvertChar(c, sgml_string);
 
                        if (style.pass_thru) {
                                os << c;
index fbdeb4f36dd14b4c7a253514ad066cfd47996b42..c6b27ee944b54c1057066d470a0a32ce9f615cdb 100644 (file)
@@ -1685,7 +1685,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
 }
 
 
-bool Paragraph::linuxDocConvertChar(char c, string & sgml_string)
+bool Paragraph::sgmlConvertChar(char c, string & sgml_string)
 {
        bool retval = false;
        switch (c) {
index 0b4ba210e805f5d0a091f54ce084d2200ec31a17..604c9f034dfb02ad0390871933bf9ce28207cc84 100644 (file)
@@ -341,7 +341,7 @@ public:
         void unsetPExtraType(BufferParams const &);
 #endif
        ///
-       bool linuxDocConvertChar(char c, string & sgml_string);
+       bool sgmlConvertChar(char c, string & sgml_string);
 
        ParagraphParameters & params();
        ParagraphParameters const & params() const;