]> git.lyx.org Git - lyx.git/commitdiff
docbook code cleanup.
authorJosé Matox <jamatos@lyx.org>
Fri, 30 Nov 2001 11:56:04 +0000 (11:56 +0000)
committerJosé Matox <jamatos@lyx.org>
Fri, 30 Nov 2001 11:56:04 +0000 (11:56 +0000)
renamed some DocBook to docbook that Lars forgot. (inset methods)

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

src/ChangeLog
src/buffer.C
src/insets/ChangeLog
src/insets/insettoc.C
src/insets/insettoc.h
src/insets/inseturl.C
src/insets/inseturl.h

index 5d0d4cacf3a7aed174bd113ca8186501df6de0b4..b82401af6f6561fe95b73b1a155f0e098c173921 100644 (file)
@@ -1,3 +1,9 @@
+2001-11-30  José Matos <jamatos@fep.up.pt>
+
+       * buffer.C (makeDocBookFile): add a comment to point a hack.
+       (simpleDocBookOnePar): changed a PAR::META_INSET to isInset().
+       Fixed a double write of labels.
+       
 2001-11-28  André Pönitz <poenitz@gmx.net>
 
        * all the files from the change on 2001/11/26:
        Change return code to string::npos when there have been no error
        (0 was a bad idea when error is at first character)
 
+2001-11-14  José Matos  <jamatos@fep.up.pt>
+
+       * buffer.h:
+       * buffer.C (simpleDocBookOnePar): removed unused argument.
+
 2001-11-13  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * text.C (selectNextWordToSpellcheck): do not test explicitely for
index a89d1e316039dca66d55a62f2be989fbcfe31b22..fd042864410e98aed704a8533afbdcdf68b8f41e 100644 (file)
@@ -3126,6 +3126,8 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body)
 
                        // treat label as a special case for
                        // more WYSIWYM handling.
+                       // This is a hack while paragraphs can't have
+                       // attributes, like id in this case.
                        if (par->isInset(0)) {
                                Inset * inset = par->getInset(0);
                                Inset::Code lyx_code = inset->lyxCode();
@@ -3306,12 +3308,14 @@ void Buffer::simpleDocBookOnePar(ostream & os,
                        }
                }
       
-               char c = par->getChar(i);
 
-               if (c == Paragraph::META_INSET) {
+               if ( par->isInset(i) ) {
                        Inset * inset = par->getInset(i);
-                       inset->docbook(this, os);
+                       // don't print the inset in position 0 if desc_on == 3 (label)
+                       if ( i || desc_on != 3)
+                               inset->docbook(this, os);
                } else {
+                       char c = par->getChar(i);
                        string sgml_string;
                        par->sgmlConvertChar(c, sgml_string);
 
index d697ee9208c2efe01b54941dc97bb8ab23194ef4..a1f43772a23360b1c77c0e2c2c2568875b6888f8 100644 (file)
@@ -1,3 +1,7 @@
+2001-11-30  José Matos <jamatos@fep.up.pt>
+
+       * inseturl.[Ch]:
+       * insettoc.[Ch]: DocBook -> docbook.
 
 2001-11-29  André Pönitz <poenitz@gmx.net>
        
index d78ef8f37b8999dc1db3f926e3f3cc03c4e5ce0b..5c52074cfad642178a534d920c599731e72f4676 100644 (file)
@@ -77,7 +77,7 @@ int InsetTOC::linuxdoc(Buffer const *, std::ostream & os) const
 }
 
 
-int InsetTOC::DocBook(Buffer const *, std::ostream & os) const
+int InsetTOC::docbook(Buffer const *, std::ostream & os) const
 {
        if (getCmdName() == "tableofcontents")
                os << "<toc></toc>";
index 349cf61171328c58067a8561300b0cf9f6f37f4d..413740f4860ebbfe5c9950107a255ba70a108a7d 100644 (file)
@@ -46,7 +46,7 @@ public:
        ///
        int linuxdoc(Buffer const *, std::ostream &) const;
        ///
-       int DocBook(Buffer const *, std::ostream &) const;
+       int docbook(Buffer const *, std::ostream &) const;
 };
 
 #endif
index 0b95b22a27a28f518fa77719a892d29fb2ef657b..2be9d6d96f648a49064bb6dff13329412c6cdc61 100644 (file)
@@ -81,7 +81,7 @@ int InsetUrl::linuxdoc(Buffer const *, ostream & os) const
 }
 
 
-int InsetUrl::DocBook(Buffer const *, ostream & os) const
+int InsetUrl::docbook(Buffer const *, ostream & os) const
 {
        os << "<ulink url=\"" << getContents() << "\">"
           << getOptions() << "</ulink>";
index b97913009d41574b8e9106f2e8b0daa1c26cde61..d077e33daebfe3ca7833428bf835e62fa48f96dc 100644 (file)
@@ -52,7 +52,7 @@ public:
        ///
        int linuxdoc(Buffer const *, std::ostream &) const;
        ///
-       int DocBook(Buffer const *, std::ostream &) const;
+       int docbook(Buffer const *, std::ostream &) const;
 };
 
 #endif