]> git.lyx.org Git - lyx.git/blobdiff - src/DocIterator.cpp
* id.po: update from Waluyo.
[lyx.git] / src / DocIterator.cpp
index 2c244ae2e11c224f20429b8eb764927084eeb404..0555a9f75f1db9dc2b467c22ee80f54415e4becf 100644 (file)
@@ -91,8 +91,11 @@ DocIterator DocIterator::clone(Buffer * buffer) const
 
 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;
 }
 
 
@@ -189,6 +192,16 @@ Paragraph & DocIterator::innerParagraph() const
 }
 
 
+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(), /**/);