X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraphMetrics.cpp;h=1d3ce0db5cfe196c718e632629dffa21f7276265;hb=874ad18178ac387c407534fd18e33c116c753430;hp=01db6cb934b0be5c019ab2998300e84b5b56178a;hpb=489dca71cd99bbc78780fa40311a2eb042c0320e;p=lyx.git diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp index 01db6cb934..1d3ce0db5c 100644 --- a/src/ParagraphMetrics.cpp +++ b/src/ParagraphMetrics.cpp @@ -47,8 +47,6 @@ #include "support/lstrings.h" #include "support/textutils.h" -#include - #include #include #include @@ -84,42 +82,6 @@ void ParagraphMetrics::reset(Paragraph const & par) } -size_t ParagraphMetrics::computeRowSignature(Row const & row, - BufferView const & bv) const -{ - boost::crc_32_type crc; - for (pos_type i = row.pos(); i < row.endpos(); ++i) { - if (par_->isInset(i)) { - Inset const * in = par_->getInset(i); - Dimension const d = in->dimension(bv); - int const b[] = { d.wid, d.asc, d.des }; - crc.process_bytes(b, sizeof(b)); - } else { - char_type const b[] = { par_->getChar(i) }; - crc.process_bytes(b, sizeof(char_type)); - } - if (bv.buffer().params().track_changes) { - Change change = par_->lookupChange(i); - char_type const b[] = { static_cast(change.type) }; - // 1 byte is enough to encode Change::Type - crc.process_bytes(b, 1); - } - } - - pos_type const b1[] = { row.sel_beg, row.sel_end }; - crc.process_bytes(b1, sizeof(b1)); - - Dimension const & d = row.dimension(); - int const b2[] = { row.begin_margin_sel, - row.end_margin_sel, - d.wid, d.asc, d.des }; - crc.process_bytes(b2, sizeof(b2)); - crc.process_bytes(&row.separator, sizeof(row.separator)); - - return crc.checksum(); -} - - void ParagraphMetrics::setPosition(int position) { position_ = position;