]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
* temporary fix for the crash of the pixmap cache on Mac with Qt 4.4.
[lyx.git] / src / Text3.cpp
index 22408657cb4ddcb97a7d58c88f9ec1cbff53e8a9..2a5ebfc5737547e1bda398fce3101e86ba8f8041 100644 (file)
@@ -67,7 +67,6 @@
 
 #include "mathed/InsetMathHull.h"
 #include "mathed/MathMacroTemplate.h"
-#include "mathed/MathParser.h"
 
 #include <boost/next_prior.hpp>
 
@@ -164,13 +163,12 @@ static void mathDispatch(Cursor & cur, FuncRequest const & cmd, bool display)
                        istringstream is(selstr);
                        Lexer lex;
                        lex.setStream(is);
-                       mathed_parser_warn_contents(false);
-                       formula->read(lex);
+                       formula->readQuiet(lex);
                        if (formula->getType() == hullNone) {
                                // No valid formula, let's try with delims
                                is.str("$" + selstr + "$");
                                lex.setStream(is);
-                               formula->read(lex);
+                               formula->readQuiet(lex);
                                if (formula->getType() == hullNone) {
                                        // Still not valid, leave it as is
                                        valid = false;
@@ -180,7 +178,6 @@ static void mathDispatch(Cursor & cur, FuncRequest const & cmd, bool display)
                                        cur.insert(formula);
                        } else
                                cur.insert(formula);
-                       mathed_parser_warn_contents(true);
                } else {
                        cur.insert(new MathMacroTemplate(sel));
                }
@@ -1315,10 +1312,9 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        cutSelection(cur, false, false);
 
                cur.clearSelection();
-               Font const old_font = cur.real_current_font;
 
                docstring::const_iterator cit = cmd.argument().begin();
-               docstring::const_iterator end = cmd.argument().end();
+               docstring::const_iterator const end = cmd.argument().end();
                for (; cit != end; ++cit)
                        bv->translateAndInsert(*cit, this, cur);
 
@@ -1875,8 +1871,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
 {
        LASSERT(cur.text() == this, /**/);
 
-       Font const & font = cur.real_current_font;
-       FontInfo const & fontinfo = font.fontInfo();
+       FontInfo const & fontinfo = cur.real_current_font.fontInfo();
        bool enable = true;
        InsetCode code = NO_CODE;