From d7bcff50a9db55b3e04b8af8be1de8a25fd93601 Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Fri, 5 May 2006 23:11:19 +0000 Subject: [PATCH] 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 --- src/BufferView_pimpl.C | 2 +- src/bufferparams.h | 2 +- src/lyxfind.C | 6 +++--- src/lyxfunc.C | 6 +++--- src/paragraph.C | 4 ++-- src/paragraph.h | 8 ++++---- src/paragraph_funcs.C | 10 +++++----- src/rowpainter.C | 2 +- src/text.C | 6 +++--- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 97e6bce6ef..83da6b044d 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -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()); } diff --git a/src/bufferparams.h b/src/bufferparams.h index bfbaf7c936..80d7e606da 100644 --- a/src/bufferparams.h +++ b/src/bufferparams.h @@ -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 diff --git a/src/lyxfind.C b/src/lyxfind.C index 6d6b75ddf0..e47110177f 100644 --- a/src/lyxfind.C +++ b/src/lyxfind.C @@ -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; } diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 325cb1666c..98c25f9312 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -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.")); diff --git a/src/paragraph.C b/src/paragraph.C index 6af0a4205e..7fba24711d 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -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); diff --git a/src/paragraph.h b/src/paragraph.h index 134f00f7bf..d8f1cd7a00 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -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 diff --git a/src/paragraph_funcs.C b/src/paragraph_funcs.C index 5f67d40469..053489e88a 100644 --- a/src/paragraph_funcs.C +++ b/src/paragraph_funcs.C @@ -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; } diff --git a/src/rowpainter.C b/src/rowpainter.C index 5971b39d46..18ab023241 100644 --- a/src/rowpainter.C +++ b/src/rowpainter.C @@ -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; diff --git a/src/text.C b/src/text.C index 3da5249604..1d87200dd2 100644 --- a/src/text.C +++ b/src/text.C @@ -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()) -- 2.39.2