From de38a9ed5f72a4fa53735fbd41c0b5585a7345dc Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 9 Aug 2009 15:47:50 +0000 Subject: [PATCH] DocIterator::innerText(): reuse innerTextSlice() git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30944 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/DocIterator.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index 63e9e7be99..ec1f6b89cd 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -249,12 +249,7 @@ MathData & DocIterator::cell() const Text * DocIterator::innerText() const { LASSERT(!empty(), /**/); - // go up until first non-0 text is hit - // (innermost text is 0 in mathed) - for (int i = depth() - 1; i >= 0; --i) - if (slices_[i].text()) - return slices_[i].text(); - return 0; + return innerTextSlice().text(); }