* src/ParagraphMetrics::computeRowSignature():

- Fix crc computing (wrt multibyte chars)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@21679 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-11-19 15:07:00 +00:00
parent 1ae45c1a8c
commit 6453bd97d8
2 changed files with 5 additions and 3 deletions

View File

@ -94,15 +94,15 @@ size_type ParagraphMetrics::calculateRowSignature(Row const & row,
boost::crc_32_type crc;
for (pos_type i = row.pos(); i < row.endpos(); ++i) {
char_type const b[] = { par_->getChar(i) };
crc.process_bytes(b, 1);
crc.process_bytes(b, sizeof(char_type));
if (bparams.trackChanges) {
Change change = par_->lookupChange(i);
char_type const b[] = { change.type };
crc.process_bytes(b, 1);
}
}
char_type const b[] = { row.width(), row.ascent(), row.descent()};
crc.process_bytes(b, 3);
int const b[] = { row.width(), row.ascent(), row.descent()};
crc.process_bytes(b, 3 * sizeof(int));
return crc.checksum();
}

View File

@ -162,6 +162,8 @@ What's new
- Disallow paragraph breaks in optional arguments (aka short title) (bug 4359).
- Fix calculation of row metrics with multibyte characters.
* DOCUMENTATION