]> git.lyx.org Git - lyx.git/blobdiff - src/cursor.C
ws changes mostly
[lyx.git] / src / cursor.C
index 276c4f2fc4d15f132f575cfb4b25481a8909cd62..e0b4e20453f9149743c793c8b5ca74dd3b8f81bc 100644 (file)
@@ -50,6 +50,7 @@
 #include <boost/current_function.hpp>
 
 #include <sstream>
+#include <limits>
 
 using lyx::pit_type;
 
@@ -1085,7 +1086,7 @@ Encoding const * LCursor::getEncoding() const
                if (operator[](s).text())
                        break;
        CursorSlice const & sl = operator[](s);
-       LyXText & text = *sl.text();
+       LyXText const & text = *sl.text();
        LyXFont font = text.getPar(sl.pit()).getFont(
                bv().buffer()->params(), sl.pos(), outerFont(sl.pit(), text.paragraphs()));
        return font.language()->encoding();
@@ -1126,7 +1127,7 @@ LyXFont LCursor::getFont() const
                if (operator[](s).text())
                        break;
        CursorSlice const & sl = operator[](s);
-       LyXText & text = *sl.text();
+       LyXText const & text = *sl.text();
        LyXFont font = text.getPar(sl.pit()).getFont(
                bv().buffer()->params(),
                sl.pos(),