]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_scriptinset.C
more IU
[lyx.git] / src / mathed / math_scriptinset.C
index fad41bd229fbc8dc89e8d153f91868f0c0e5f551..1118070fe76bf63b34a64b20214b594673d123a0 100644 (file)
 #include "math_mathmlstream.h"
 #include "math_support.h"
 #include "math_symbolinset.h"
+#include "dispatchresult.h"
 #include "debug.h"
 #include "funcrequest.h"
 
+#include <boost/assert.hpp>
+
+
+using std::string;
 using std::max;
 using std::auto_ptr;
 using std::endl;
@@ -507,8 +512,9 @@ void MathScriptInset::notifyCursorLeaves(idx_type idx)
 }
 
 
-dispatch_result MathScriptInset::dispatch
-       (FuncRequest const & cmd, idx_type & idx, pos_type & pos)
+DispatchResult
+MathScriptInset::priv_dispatch(FuncRequest const & cmd,
+                         idx_type & idx, pos_type & pos)
 {
        if (cmd.action == LFUN_MATH_LIMITS) {
                if (!cmd.argument.empty()) {
@@ -519,11 +525,11 @@ dispatch_result MathScriptInset::dispatch
                        else
                                limits_ = 0;
                } else if (limits_ == 0)
-                       limits_ =  (hasLimits()) ? -1 : 1;
+                       limits_ = hasLimits() ? -1 : 1;
                else
                        limits_ = 0;
-               return DISPATCHED;
+               return DispatchResult(true, true);
        }
 
-       return MathNestInset::dispatch(cmd, idx, pos);
+       return MathNestInset::priv_dispatch(cmd, idx, pos);
 }