X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fparagraph.h;h=2d25f20d2dd4fa6869af21490bc4813db1aaa177;hb=7f68b94d8a7fba6942890b7733403192b98b040a;hp=28067bd2c2e300a52c61f6ab92f4710f541bffac;hpb=d891a896f47df2d7f048ad7e4498f2fd4f3c5d3b;p=lyx.git diff --git a/src/paragraph.h b/src/paragraph.h index 28067bd2c2..2d25f20d2d 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -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 @@ -65,7 +67,7 @@ public: /// Paragraph(Paragraph const &); /// - void operator=(Paragraph const &); + Paragraph & operator=(Paragraph const &); /// ~Paragraph(); @@ -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; ///