X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraphMetrics.h;h=8aebfd10bf30498576017eb2d383217ea63dc128;hb=52eb91c94fb70d58dceef430659c8781de2eccda;hp=d685af837659e812a1405fd5f58f78f056082e63;hpb=b2126408cfeaa251bc966e3df49a7000a202add3;p=lyx.git diff --git a/src/ParagraphMetrics.h b/src/ParagraphMetrics.h index d685af8376..8aebfd10bf 100644 --- a/src/ParagraphMetrics.h +++ b/src/ParagraphMetrics.h @@ -31,6 +31,13 @@ public: ParagraphMetrics(): par_(0) {}; /// The only useful constructor. ParagraphMetrics(Paragraph const & par); + + /// Copy operator. + /// Important note: We don't copy \c row_change_status_ and + /// \c row_signature_ because those are updated externally with + /// \c updateRowChangeStatus() in TextMetrics::redoParagraph(). + ParagraphMetrics & operator=(ParagraphMetrics const &); + /// Row & getRow(pos_type pos, bool boundary); /// @@ -53,8 +60,11 @@ public: RowList & rows() { return rows_; } /// The painter and others use this RowList const & rows() const { return rows_; } + /// The painter and others use this + std::vector const & rowChangeStatus() const + { return row_change_status_; } /// - RowSignature & rowSignature() const { return rowSignature_; } + void updateRowChangeStatus(); /// int rightMargin(Buffer const & buffer) const; @@ -62,10 +72,14 @@ public: void dump() const; private: + /// + size_type calculateRowSignature(Row const &); /// mutable RowList rows_; /// - mutable RowSignature rowSignature_; + RowSignature row_signature_; + /// + std::vector row_change_status_; /// cached dimensions of paragraph Dimension dim_; ///