src/paragraph.h:

src/BufferView_pimpl.C:
	src/lyxfunc.C:
	src/paragraph_funcs.C:
	src/lyxfind.C:
	src/bufferparams.h:
	src/rowpainter.C:
	src/paragraph.C:
	src/text.C: rename methods: lookupChange => lookupChangeType,
	lookupChangeFull => lookupChange


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13802 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Michael Schmitt 2006-05-05 23:11:19 +00:00
parent da65e2b7fb
commit d7bcff50a9
9 changed files with 23 additions and 23 deletions

View File

@ -771,7 +771,7 @@ Change const BufferView::Pimpl::getCurrentChange()
return Change(Change::UNCHANGED);
return text->getPar(cur.selBegin().pit()).
lookupChangeFull(cur.selBegin().pos());
lookupChange(cur.selBegin().pos());
}

View File

@ -205,7 +205,7 @@ public:
bool use_bibtopic;
/// revision tracking for this buffer ?
bool tracking_changes;
/** This param decides if change tracking marks should be output
/** This param decides whether change tracking marks should be output
* (using the dvipost package) or if the current "state" of the
* document should be output instead. Since dvipost needs dvi
* specials, it only works with dvi/ps output (the param will be

View File

@ -128,7 +128,7 @@ bool findBackwards(DocIterator & cur, MatchString const & match)
bool findChange(DocIterator & cur)
{
for (; cur; cur.forwardPos())
if (cur.inTexted() && cur.paragraph().lookupChange(cur.pos())
if (cur.inTexted() && cur.paragraph().lookupChangeType(cur.pos())
!= Change::UNCHANGED)
return true;
return false;
@ -346,11 +346,11 @@ bool findNextChange(BufferView * bv)
bv->cursor().setCursor(cur);
bv->cursor().resetAnchor();
Change orig_change = cur.paragraph().lookupChangeFull(cur.pos());
Change orig_change = cur.paragraph().lookupChange(cur.pos());
DocIterator et = doc_iterator_end(cur.inset());
for (; cur != et; cur.forwardPosNoDescend()) {
Change change = cur.paragraph().lookupChangeFull(cur.pos());
Change change = cur.paragraph().lookupChange(cur.pos());
if (change != orig_change) {
break;
}

View File

@ -183,7 +183,7 @@ bool getStatus(LCursor cursor,
* footnote is deleted).
* When \param outer is true, the top slice is not looked at.
*/
Change::Type lookupChange(DocIterator const & dit, bool outer = false)
Change::Type lookupChangeType(DocIterator const & dit, bool outer = false)
{
size_t const depth = dit.depth() - (outer ? 1 : 0);
@ -191,7 +191,7 @@ Change::Type lookupChange(DocIterator const & dit, bool outer = false)
CursorSlice const & slice = dit[i];
if (!slice.inset().inMathed()
&& slice.pos() < slice.paragraph().size()) {
Change::Type const ch = slice.paragraph().lookupChange(slice.pos());
Change::Type const ch = slice.paragraph().lookupChangeType(slice.pos());
if (ch != Change::UNCHANGED)
return ch;
}
@ -635,7 +635,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
// Are we in a DELETED change-tracking region?
if (buf && buf->params().tracking_changes
&& lookupChange(cur, true) == Change::DELETED
&& lookupChangeType(cur, true) == Change::DELETED
&& !lyxaction.funcHasFlag(cmd.action, LyXAction::ReadOnly)
&& !lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer)) {
flag.message(N_("This portion of the document is deleted."));

View File

@ -1626,14 +1626,14 @@ void Paragraph::cleanChanges(ChangeTracking ct)
}
Change::Type Paragraph::lookupChange(lyx::pos_type pos) const
Change::Type Paragraph::lookupChangeType(lyx::pos_type pos) const
{
BOOST_ASSERT(pos <= size());
return pimpl_->lookupChange(pos);
}
Change const Paragraph::lookupChangeFull(lyx::pos_type pos) const
Change const Paragraph::lookupChange(lyx::pos_type pos) const
{
BOOST_ASSERT(pos <= size());
return pimpl_->lookupChangeFull(pos);

View File

@ -221,10 +221,10 @@ public:
void cleanChanges(ChangeTracking ct = trackingUnknown);
/// look up change type at given pos
Change::Type lookupChange(lyx::pos_type pos) const;
Change::Type lookupChangeType(lyx::pos_type pos) const;
/// look up change at given pos
Change const lookupChangeFull(lyx::pos_type pos) const;
Change const lookupChange(lyx::pos_type pos) const;
/// is there a change within the given range ?
bool isChanged(lyx::pos_type start, lyx::pos_type end) const;
@ -447,13 +447,13 @@ private:
inline bool isInsertedText(Paragraph const & par, lyx::pos_type pos)
{
return par.lookupChange(pos) == Change::INSERTED;
return par.lookupChangeType(pos) == Change::INSERTED;
}
inline bool isDeletedText(Paragraph const & par, lyx::pos_type pos)
{
return par.lookupChange(pos) == Change::DELETED;
return par.lookupChangeType(pos) == Change::DELETED;
}
#endif // PARAGRAPH_H

View File

@ -144,7 +144,7 @@ void breakParagraph(BufferParams const & bparams,
pos_type pos_end = par.size() - 1;
for (pos_type i = pos, j = pos; i <= pos_end; ++i) {
Change::Type change = par.lookupChange(i);
Change::Type change = par.lookupChangeType(i);
if (moveItem(par, *tmp, bparams, i, j - pos)) {
tmp->setChange(j - pos, change);
++j;
@ -212,12 +212,12 @@ void breakParagraphConservative(BufferParams const & bparams,
pos_type pos_end = par.size() - 1;
for (pos_type i = pos, j = pos; i <= pos_end; ++i) {
Change::Type change = par.lookupChange(i);
Change::Type change = par.lookupChangeType(i);
if (moveItem(par, tmp, bparams, i, j - pos, change))
++j;
}
// Move over end-of-par change attr
tmp.setChange(tmp.size(), par.lookupChange(par.size()));
tmp.setChange(tmp.size(), par.lookupChangeType(par.size()));
// If tracking changes, set all the text that is to be
// erased to Type::INSERTED.
@ -252,10 +252,10 @@ void mergeParagraph(BufferParams const & bparams,
// forcibly to "black" prevents this scenario. -- MV 13.3.2006
par.setChange(par.size(), Change::UNCHANGED);
Change::Type cr = next.lookupChange(next.size());
Change::Type cr = next.lookupChangeType(next.size());
// ok, now copy the paragraph
for (pos_type i = 0, j = 0; i <= pos_end; ++i) {
Change::Type change = next.lookupChange(i);
Change::Type change = next.lookupChangeType(i);
if (moveItem(next, par, bparams, i, pos_insert + j, change))
++j;
}

View File

@ -250,7 +250,7 @@ void RowPainter::paintChars(pos_type & vpos, LyXFont font,
pos_type pos = text_.bidi.vis2log(vpos);
pos_type const end = row_.endpos();
FontSpan const font_span = par_.fontSpan(pos);
Change::Type const prev_change = par_.lookupChange(pos);
Change::Type const prev_change = par_.lookupChangeType(pos);
// first character
string str;

View File

@ -1411,7 +1411,7 @@ void LyXText::acceptChange(LCursor & cur)
DocIterator it = cur.selectionBegin();
DocIterator et = cur.selectionEnd();
pit_type pit = it.pit();
Change::Type const type = pars_[pit].lookupChange(it.pos());
Change::Type const type = pars_[pit].lookupChangeType(it.pos());
for (; pit <= et.pit(); ++pit) {
pos_type left = ( pit == it.pit() ? it.pos() : 0 );
pos_type right =
@ -1448,7 +1448,7 @@ void LyXText::rejectChange(LCursor & cur)
DocIterator it = cur.selectionBegin();
DocIterator et = cur.selectionEnd();
pit_type pit = it.pit();
Change::Type const type = pars_[pit].lookupChange(it.pos());
Change::Type const type = pars_[pit].lookupChangeType(it.pos());
for (; pit <= et.pit(); ++pit) {
pos_type left = ( pit == it.pit() ? it.pos() : 0 );
pos_type right =
@ -2260,7 +2260,7 @@ string LyXText::currentState(LCursor & cur)
os << "[C] ";
if (show_change) {
Change change = par.lookupChangeFull(cur.pos());
Change change = par.lookupChange(cur.pos());
Author const & a = buf.params().authors().get(change.author);
os << _("Change: ") << a.name();
if (!a.email().empty())