]> git.lyx.org Git - lyx.git/blobdiff - src/cursor.C
convert author names and status messages to docstring
[lyx.git] / src / cursor.C
index 4d95d0de0b632c4c3d09b0f0b0c3f2741f21616d..5bccc4d13b2a146428f7c7fc8a5b7504dd58045d 100644 (file)
@@ -403,6 +403,20 @@ void LCursor::getPos(int & x, int & y) const
 }
 
 
+Row & LCursor::textRow()
+{
+       BOOST_ASSERT(!paragraph().rows().empty());
+       return paragraph().getRow(pos(), boundary());
+}
+
+
+Row const & LCursor::textRow() const
+{
+       BOOST_ASSERT(!paragraph().rows().empty());
+       return paragraph().getRow(pos(), boundary());
+}
+
+
 void LCursor::resetAnchor()
 {
        anchor_ = *this;
@@ -1189,18 +1203,18 @@ docstring LCursor::selectionAsString(bool label) const
 }
 
 
-string LCursor::currentState()
+docstring LCursor::currentState()
 {
        if (inMathed()) {
                odocstringstream os;
                info(os);
-               return to_utf8(os.str());
+               return os.str();
        }
 
        if (inTexted())
                return text()->currentState(*this);
 
-       return string();
+       return docstring();
 }