]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_pimpl.h
remove noload/don't typeset
[lyx.git] / src / paragraph_pimpl.h
index 922b52eb0503e972cb49c0f00c9478626ab33be1..a29de09e2446db3415a0737e4132ef26936a7c0e 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
@@ -18,7 +18,9 @@
 
 #include "paragraph.h"
 #include "ParagraphParameters.h"
-#include <boost/array.hpp>
+#include "counters.h"
+
+class LyXLayout;
 
 struct Paragraph::Pimpl {
        ///
@@ -33,6 +35,10 @@ struct Paragraph::Pimpl {
                return text.size();
        }
        ///
+       bool empty() const {
+               return text.empty();
+       }
+       ///
        void clear();
        ///
        void setContentsFromPar(Paragraph const * par);
@@ -51,19 +57,7 @@ struct Paragraph::Pimpl {
                                  BufferParams const & bparams) const;
        ///
        Inset * inset_owner;
-       ///
-       boost::array<int, 10> counter_;
-
-       ///
-       friend struct matchIT;
-       ///
-       struct matchIT {
-               /// used by lower_bound and upper_bound
-               inline
-               int operator()(InsetTable const & a, InsetTable const & b) const {
-                       return a.pos < b.pos;
-               }
-       };
+       
        /** A font entry covers a range of positions. Notice that the
            entries in the list are inserted in random order.
            I don't think it's worth the effort to implement a more effective
@@ -94,12 +88,12 @@ struct Paragraph::Pimpl {
                /// End position of paragraph this font attribute covers
                lyx::pos_type pos_;
                /** Font. Interpretation of the font values:
-                   If a value is LyXFont::INHERIT_*, it means that the font 
+                   If a value is LyXFont::INHERIT_*, it means that the font
                    attribute is inherited from either the layout of this
-                   paragraph or, in the case of nested paragraphs, from the 
-                   layout in the environment one level up until completely 
+                   paragraph or, in the case of nested paragraphs, from the
+                   layout in the environment one level up until completely
                    resolved.
-                   The values LyXFont::IGNORE_* and LyXFont::TOGGLE are NOT 
+                   The values LyXFont::IGNORE_* and LyXFont::TOGGLE are NOT
                    allowed in these font tables.
                */
                boost::shared_ptr<LyXFont> font_;
@@ -138,6 +132,11 @@ struct Paragraph::Pimpl {
                                   LyXLayout const & style,
                                   lyx::pos_type & i,
                                   int & column, value_type const c);
+
+       ///
+       void validate(LaTeXFeatures & features,
+                     LyXLayout const & layout) const;
+
        ///
        Paragraph * getParFromID(int id) const;
        ///
@@ -146,11 +145,11 @@ struct Paragraph::Pimpl {
        static unsigned int paragraph_id;
        ///
        ParagraphParameters params;
+
 private:
        /// match a string against a particular point in the paragraph
-       bool isTextAt(BufferParams const &, LyXFont &,
-                     string const & str, lyx::pos_type pos);
+       bool isTextAt(string const & str, lyx::pos_type pos) const;
+
        /// Who owns us?
        Paragraph * owner_;
        ///