]> git.lyx.org Git - lyx.git/blobdiff - src/text2.C
cleanup after svn hang-up, #undef CursorShape. Should be compilable ganin now.
[lyx.git] / src / text2.C
index ea0abd304b64da70fe6b49d6420ff546a18f651b..09b9a2ce93747ded3f0604b420cb6074e439c1fd 100644 (file)
@@ -51,7 +51,7 @@
 
 #include "insets/insetenv.h"
 
-#include "mathed/math_hullinset.h"
+#include "mathed/InsetMathHull.h"
 
 #include "support/textutils.h"
 
@@ -554,8 +554,8 @@ void LyXText::toggleFree(LCursor & cur, LyXFont const & font, bool toggleall)
        // If the mask is completely neutral, tell user
        if (font == LyXFont(LyXFont::ALL_IGNORE)) {
                // Could only happen with user style
-               cur.message(lyx::to_utf8(_("No font change defined. "
-                                          "Use Character under the Layout menu to define font change.")));
+               cur.message(_("No font change defined. "
+                                          "Use Character under the Layout menu to define font change."));
                return;
        }
 
@@ -596,9 +596,9 @@ string LyXText::getStringToIndex(LCursor const & cur)
                selectWord(tmpcur, lyx::PREVIOUS_WORD);
 
                if (!tmpcur.selection())
-                       cur.message(lyx::to_utf8(_("Nothing to index!")));
+                       cur.message(_("Nothing to index!"));
                else if (tmpcur.selBegin().pit() != tmpcur.selEnd().pit())
-                       cur.message(lyx::to_utf8(_("Cannot index more than one paragraph!")));
+                       cur.message(_("Cannot index more than one paragraph!"));
                else
                        idxstring = tmpcur.selectionAsString(false);
        }
@@ -719,6 +719,7 @@ void LyXText::setCursor(CursorSlice & cur, pit_type par, pos_type pos)
 void LyXText::setCursorIntern(LCursor & cur,
                              pit_type par, pos_type pos, bool setfont, bool boundary)
 {
+       BOOST_ASSERT(this == cur.text());
        cur.boundary(boundary);
        setCursor(cur.top(), par, pos);
        cur.setTargetX();
@@ -1082,7 +1083,7 @@ bool LyXText::cursorUp(LCursor & cur)
                LCursor old = cur;
                // Go to middle of previous row. 16 found to work OK;
                // 12 = top/bottom margin of display math
-               int const margin = 3 * MathHullInset::displayMargin() / 2;
+               int const margin = 3 * InsetMathHull::displayMargin() / 2;
                editXY(cur, x, y - par.rows()[row].ascent() - margin);
                cur.clearSelection();
 
@@ -1130,7 +1131,7 @@ bool LyXText::cursorDown(LCursor & cur)
                int const y = bv_funcs::getPos(cur, cur.boundary()).y_;
                LCursor old = cur;
                // To middle of next row
-               int const margin = 3 * MathHullInset::displayMargin() / 2;
+               int const margin = 3 * InsetMathHull::displayMargin() / 2;
                editXY(cur, x, y + par.rows()[row].descent() + margin);
                cur.clearSelection();