bool DocIterator::inRegexped() const
{
- InsetMathHull * i = inset().asInsetMath()->asHullInset();
- return i && i->getType() == hullRegexp;
+ InsetMath * im = inset().asInsetMath();
+ if (!im)
+ return false;
+ InsetMathHull * hull = im->asHullInset();
+ return hull && hull->getType() == hullRegexp;
}
}
+FontSpan DocIterator::locateWord(word_location const loc) const
+{
+ FontSpan f = FontSpan();
+
+ f.first = pos();
+ top().paragraph().locateWord(f.first, f.last, loc);
+ return f;
+}
+
+
CursorSlice const & DocIterator::innerTextSlice() const
{
LASSERT(!empty(), /**/);