DocIterator::innerText(): reuse innerTextSlice()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30944 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2009-08-09 15:47:50 +00:00
parent 1919580310
commit de38a9ed5f

View File

@ -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();
}