X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FParagraph.h;h=8fd17c2897dacdda25679b6a518fcfba14e0d380;hb=e54ae72e5fac6f750c3f7972c74bb42b57f3a049;hp=85d58939fee3f41039ebe68bb7591105ad75ef0b;hpb=fc6ce7cd08562fd7bab4427880b46390bb7d2f07;p=lyx.git diff --git a/src/Paragraph.h b/src/Paragraph.h index 85d58939fe..8fd17c2897 100644 --- a/src/Paragraph.h +++ b/src/Paragraph.h @@ -20,7 +20,7 @@ #include "Dimension.h" #include "InsetList.h" #include "lyxlayout_ptr_fwd.h" -#include "RowList_fwd.h" +#include "Row.h" #include "insets/Inset.h" // only for Inset::Code @@ -115,11 +115,11 @@ public: void validate(LaTeXFeatures &) const; /// - int startTeXParParams(BufferParams const &, odocstream &, TexRow &, + int startTeXParParams(BufferParams const &, odocstream &, TexRow &, bool) const; /// - int endTeXParParams(BufferParams const &, odocstream &, TexRow &, + int endTeXParParams(BufferParams const &, odocstream &, TexRow &, bool) const; @@ -172,9 +172,9 @@ public: bool empty() const { return text_.empty(); } /// - LyXLayout_ptr const & layout() const; + Layout_ptr const & layout() const; /// - void layout(LyXLayout_ptr const & new_layout); + void layout(Layout_ptr const & new_layout); /// This is the item depth, only used by enumerate and itemize signed char itemdepth; @@ -236,7 +236,7 @@ public: docstring const translateIfPossible(docstring const & label, BufferParams const & bparams) const; /// Expand the counters for the labelstring of \c layout - docstring expandLabel(LyXLayout_ptr const &, BufferParams const &, + docstring expandLabel(Layout_ptr const &, BufferParams const &, bool process_appendix = true) const; /// Actual paragraph alignment used char getAlign() const; @@ -245,7 +245,7 @@ public: /// The maximal possible depth of a paragraph after this one depth_type getMaxDepthAfter() const; /// - void applyLayout(LyXLayout_ptr const & new_layout); + void applyLayout(Layout_ptr const & new_layout); /// (logically) erase the char at pos; return true if it was actually erased bool eraseChar(pos_type pos, bool trackChanges); @@ -293,21 +293,21 @@ public: pos_type endpos, Font_size def_size) const; /// void insert(pos_type pos, docstring const & str, - Font const & font, Change const & change); + Font const & font, Change const & change); /// void insertChar(pos_type pos, value_type c, bool trackChanges); /// void insertChar(pos_type pos, value_type c, - Font const &, bool trackChanges); + Font const &, bool trackChanges); /// void insertChar(pos_type pos, value_type c, - Font const &, Change const & change); + Font const &, Change const & change); /// void insertInset(pos_type pos, Inset * inset, - Change const & change); + Change const & change); /// void insertInset(pos_type pos, Inset * inset, - Font const &, Change const & change); + Font const &, Change const & change); /// bool insetAllowed(Inset_code code); /// @@ -341,7 +341,7 @@ public: /// returns -1 if inset not found int getPositionOfInset(Inset const * inset) const; - /// returns true if at least one line break or line separator has been deleted + /// returns true if at least one line break or line separator has been deleted /// at the beginning of the paragraph (either physically or logically) bool stripLeadingSpaces(bool trackChanges); @@ -359,9 +359,18 @@ public: /// bool hfillExpansion(Row const & row, pos_type pos) const; - /// Check if we are in a Biblio environment. - /// \retval true if the cursor needs to be moved right. - bool checkBiblio(bool track_changes); + /// Check if we are in a Biblio environment and insert or + /// delete InsetBibitems as necessary. + /// \retval int 1, if we had to add an inset, in which case + /// the cursor will need to move cursor forward; -pos, if we deleted + /// an inset, in which case pos is the position from which the inset + /// was deleted, and the cursor will need to be moved back one if it + /// was previously past that position. Return 0 otherwise. + int checkBiblio(bool track_changes); + + /// For each author, set 'used' to true if there is a change + /// by this author in the paragraph. + void checkAuthors(AuthorList const & authorList); public: /// @@ -370,7 +379,7 @@ public: private: /// - LyXLayout_ptr layout_; + Layout_ptr layout_; /** * Keeping this here instead of in the pimpl makes LyX >10% faster * for average tasks as buffer loading/switching etc.