X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fparagraph.h;h=2d25f20d2dd4fa6869af21490bc4813db1aaa177;hb=7f68b94d8a7fba6942890b7733403192b98b040a;hp=b7324920c78dcf1db78ba6215663c8802d313b19;hpb=df974a39043a061da4fa103233f7a07341601507;p=lyx.git diff --git a/src/paragraph.h b/src/paragraph.h index b7324920c7..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(); @@ -80,7 +82,7 @@ public: void changeLanguage(BufferParams const & bparams, Language const * from, Language const * to); /// - bool isMultiLingual(BufferParams const &); + bool isMultiLingual(BufferParams const &) const; /// std::string const asString(Buffer const &, @@ -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; ///