]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.h
remove !NEW_INSETS cruft
[lyx.git] / src / buffer.h
index 9d736bf5cc164e01df6320008740d8a6825128cb..4e6db6dc84f24a56559cc50fe51e02110e6e9aac 100644 (file)
@@ -132,12 +132,7 @@ public:
        bool parseSingleLyXformat2Token(LyXLex &, LyXParagraph *& par,
                                        LyXParagraph *& return_par,
                                        string const & token, int & pos,
-                                       char & depth, LyXFont &
-#ifndef NEW_INSETS
-                                       ,LyXParagraph::footnote_flag &,
-                                       LyXParagraph::footnote_kind &
-#endif
-               );
+                                       char & depth, LyXFont &);
 private:
        /// Parse a single inset.
        void readInset(LyXLex &, LyXParagraph *& par, int & pos, LyXFont &);
@@ -262,9 +257,11 @@ public:
        ///
        string const getIncludeonlyList(char delim = ',');
        ///
-       std::vector<std::pair<string,string> > const getBibkeyList();
+       std::vector<std::pair<string, string> > const getBibkeyList();
        ///
        struct TocItem {
+               TocItem(LyXParagraph * p, int d, string const & s)
+                       : par(p), depth(d), str(s) {}
                ///
                LyXParagraph * par;
                ///
@@ -272,15 +269,12 @@ public:
                ///
                string str;
        };
-       /// The different content list types.
-       enum TocType {
-               TOC_TOC = 0, ///< Table of Contents
-               TOC_LOF, ///< List of Figures
-               TOC_LOT, ///< List of Tables
-               TOC_LOA ///< List of Algorithms
-       };
        ///
-       std::vector<std::vector<TocItem> > const getTocList() const;
+       typedef std::vector<TocItem> SingleList;
+       ///
+       typedef std::map<string, SingleList> Lists;
+       ///
+       Lists const getLists() const;
        ///
        std::vector<string> const getLabelList();
 
@@ -325,40 +319,21 @@ public:
        /// Used when typesetting to place errorboxes.
        TexRow texrow;
 private:
-#ifndef NEW_INSETS
-        ///
-        void linuxDocHandleFootnote(std::ostream & os,
-                                   LyXParagraph * & par, int depth);
-#endif
         ///
        void DocBookHandleCaption(std::ostream & os, string & inner_tag,
                                  int depth, int desc_on,
                                  LyXParagraph * & par);
-#ifndef NEW_INSETS
-        ///
-       void DocBookHandleFootnote(std::ostream & os,
-                                  LyXParagraph * & par, int depth);
-#endif
-       ///
+       /// Open SGML/XML tag.
         void sgmlOpenTag(std::ostream & os, int depth,
                         string const & latexname) const;
-        ///
+        /// Closes SGML/XML tag.
         void sgmlCloseTag(std::ostream & os, int depth,
                          string const & latexname) const;
        ///
        void LinuxDocError(LyXParagraph * par, int pos,
                           string const & message);
         ///
-       void SimpleLinuxDocOnePar(std::ostream & os, LyXParagraph * par,
-                                 int desc_on, int depth);
-
-       /// LinuxDoc.
-       void push_tag(std::ostream & os, string const & tag,
-                     int & pos, char stack[5][3]);
-       
-       /// LinuxDoc.
-       void pop_tag(std::ostream & os, string const & tag,
-                    int & pos, char stack[5][3]);
+       void SimpleLinuxDocOnePar(std::ostream & os, LyXParagraph * par, int depth);
 
        /// is save needed
        mutable bool lyx_clean;
@@ -414,7 +389,7 @@ public:
                        if (par) {
                                ++it;
                                if (it == par->inset_iterator_end()) {
-                                       par = par->next;
+                                       par = par->next();
                                        SetParagraph();
                                }
                        }
@@ -426,7 +401,7 @@ public:
                        if (par) {
                                ++it;
                                if (it == par->inset_iterator_end()) {
-                                       par = par->next;
+                                       par = par->next();
                                        SetParagraph();
                                }
                        }
@@ -527,7 +502,7 @@ void Buffer::markBakClean()
 
 
 inline
-void Buffer::setUnnamed(bool flag = true)
+void Buffer::setUnnamed(bool flag)
 {
        unnamed = flag;
 }
@@ -578,7 +553,7 @@ BufferView * Buffer::getUser() const
 
 
 inline  
-void Buffer::Buffer::setParentName(string const & name)
+void Buffer::setParentName(string const & name)
 {
        params.parentname = name;    
 }