]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.h
Partly fix for bug 1231
[lyx.git] / src / paragraph.h
index 08e897bba77ffed295453d563eb351d40df76a6c..2d25f20d2dd4fa6869af21490bc4813db1aaa177 100644 (file)
@@ -21,6 +21,8 @@
 #include "lyxlayout_ptr_fwd.h"
 #include "RowList_fwd.h"
 
+#include "insets/insetbase.h" // only for InsetBase::Code
+
 #include "support/types.h"
 
 #include <string>
@@ -139,10 +141,16 @@ public:
        ///
        void makeSameLayout(Paragraph const & par);
 
+       ///
+       void setInsetOwner(UpdatableInset * inset);
        ///
        UpdatableInset * inInset() const;
        ///
-       void setInsetOwner(UpdatableInset * inset);
+       InsetBase::Code ownerCode() const;
+       ///
+       bool autoBreakRows() const;
+       ///
+       bool forceDefaultParagraphs() const;
 
        ///
        lyx::pos_type size() const { return text_.size(); }
@@ -202,7 +210,7 @@ public:
        /// the paragraph alongside the text of the rest of the paragraph
        /// (the body). This function returns the starting position of the
        /// body of the text in the paragraph.
-       int beginOfBody() const;
+       lyx::pos_type beginOfBody() const;
        /// recompute this value
        void setBeginOfBody();
 
@@ -294,8 +302,8 @@ public:
 
        ///
        bool isHfill(lyx::pos_type pos) const;
-       ///
-       bool isInset(lyx::pos_type pos) const;
+       /// hinted by profiler
+       bool isInset(lyx::pos_type pos) const { return getChar(pos) == META_INSET; }
        ///
        bool isNewline(lyx::pos_type pos) const;
        ///
@@ -353,7 +361,7 @@ private:
        // for average tasks as buffer loading/switching etc.
        TextContainer text_;
        /// end of label
-       int begin_of_body_;
+       lyx::pos_type begin_of_body_;
 
        struct Pimpl;
        ///