From ba4214cbe9578f5b9181cea48123dc8826d6c920 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 11 Jul 2007 13:30:56 +0000 Subject: [PATCH] Following commit 19040, those partial updateLabels() functions are not needed anymore. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19041 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/buffer_funcs.cpp | 56 -------------------------------------------- src/buffer_funcs.h | 13 ---------- 2 files changed, 69 deletions(-) diff --git a/src/buffer_funcs.cpp b/src/buffer_funcs.cpp index 901584cece..3d9cd80821 100644 --- a/src/buffer_funcs.cpp +++ b/src/buffer_funcs.cpp @@ -636,62 +636,6 @@ void setLabel(Buffer const & buf, ParIterator & it, TextClass const & textclass) } // anon namespace -bool updateCurrentLabel(Buffer const & buf, - ParIterator & it) -{ - if (it == par_iterator_end(buf.inset())) - return false; - -// if (it.lastpit == 0 && Text::isMainText(buf)) -// return false; - - switch (it->layout()->labeltype) { - - case LABEL_NO_LABEL: - case LABEL_MANUAL: - case LABEL_BIBLIO: - case LABEL_TOP_ENVIRONMENT: - case LABEL_CENTERED_TOP_ENVIRONMENT: - case LABEL_STATIC: - case LABEL_ITEMIZE: - setLabel(buf, it, buf.params().getTextClass()); - return true; - - case LABEL_SENSITIVE: - case LABEL_COUNTER: - // do more things with enumerate later - case LABEL_ENUMERATE: - return false; - } - - // This is dead code which get rid of a warning: - return true; -} - - -void updateLabels(Buffer const & buf, - ParIterator & from, ParIterator & to, bool childonly) -{ - for (ParIterator it = from; it != to; ++it) { - if (it.pit() > it.lastpit()) - return; - if (!updateCurrentLabel (buf, it)) { - updateLabels(buf, childonly); - return; - } - } -} - - -void updateLabels(Buffer const & buf, ParIterator & iter, bool childonly) -{ - if (updateCurrentLabel(buf, iter)) - return; - - updateLabels(buf, childonly); -} - - void updateLabels(Buffer const & buf, bool childonly) { Buffer const * const master = buf.getMasterBuffer(); diff --git a/src/buffer_funcs.h b/src/buffer_funcs.h index 531fb39f27..350f438161 100644 --- a/src/buffer_funcs.h +++ b/src/buffer_funcs.h @@ -56,19 +56,6 @@ void bufferErrors(Buffer const &, TeXErrors const &, ErrorList &); /// Count the number of words in the text between these two iterators int countWords(DocIterator const & from, DocIterator const & to); -/// update labels at "iter". -/** -A full updateLabels(Buffer const &) will be called if not possible. -*/ -void updateLabels(Buffer const & buf, ParIterator & it, bool childonly = false); - -/// update labels between "from" and "to" if possible. -/** -A full updateLabels(Buffer const &) will be called if not possible. -*/ -void updateLabels(Buffer const & buf, - ParIterator & from, ParIterator & to, bool childonly = false); - /// updates all counters void updateLabels(Buffer const &, bool childonly = false); -- 2.39.2