change tracking:

src/lyxfind.C: some source code reformatting;
	pass trackChange parameter to Paragraph::erase(..)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15405 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Michael Schmitt 2006-10-20 13:16:15 +00:00
parent f55fd15e56
commit b6af1ce3e1

View File

@ -127,8 +127,8 @@ bool findBackwards(DocIterator & cur, MatchString const & match)
bool findChange(DocIterator & cur)
{
for (; cur; cur.forwardPos())
if (cur.inTexted() && cur.paragraph().lookupChange(cur.pos()).type
!= Change::UNCHANGED)
if (cur.inTexted() &&
cur.paragraph().lookupChange(cur.pos()).type != Change::UNCHANGED)
return true;
return false;
}
@ -185,7 +185,8 @@ int replaceAll(BufferView * bv,
lyx::pos_type pos = cur.pos();
LyXFont const font
= cur.paragraph().getFontSettings(buf.params(), pos);
int striked = ssize - cur.paragraph().erase(pos, pos + ssize);
int striked = ssize - cur.paragraph().erase(pos, pos + ssize,
buf.params().trackChanges);
cur.paragraph().insert(pos, replacestr, font,
Change(buf.params().trackChanges ?
Change::INSERTED : Change::UNCHANGED));