]> git.lyx.org Git - lyx.git/blobdiff - src/cursor.C
convert author names and status messages to docstring
[lyx.git] / src / cursor.C
index 3820ae29ff158c7d19042559eb47b6f551c5433f..5bccc4d13b2a146428f7c7fc8a5b7504dd58045d 100644 (file)
@@ -39,7 +39,6 @@
 #include "mathed/InsetMath.h"
 #include "mathed/InsetMathScript.h"
 #include "mathed/MathMacroTable.h"
-#include "mathed/MathParser.h"
 
 #include "support/limited_stack.h"
 
@@ -404,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;
@@ -1190,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();
 }