git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7854 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-10-02 15:46:33 +00:00
parent b9a8b8f4b6
commit 6e3be87101
4 changed files with 12 additions and 13 deletions

View File

@ -322,11 +322,11 @@ dispatch_result InsetFormulaBase::lfunMouseMotion(FuncRequest const & cmd)
dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd)
{
lyxerr << "InsetFormulaBase::localDispatch: act: " << cmd.action
<< " arg: '" << cmd.argument
<< "' x: '" << cmd.x
<< " y: '" << cmd.y
<< "' button: " << cmd.button() << endl;
//lyxerr << "InsetFormulaBase::localDispatch: act: " << cmd.action
// << " arg: '" << cmd.argument
// << "' x: '" << cmd.x
// << " y: '" << cmd.y
// << "' button: " << cmd.button() << endl;
BufferView * bv = cmd.view();

View File

@ -1238,7 +1238,7 @@ bool MathCursor::interpret(char c)
}
if (c == '{' || c == '}' || c == '#' || c == '&' || c == '$') {
createMathInset(string(1, c));
niceInsert(createMathInset(string(1, c)));
return true;
}

View File

@ -231,13 +231,11 @@ latexkeys const * in_word_set(string const & str)
MathAtom createMathInset(string const & s)
{
lyxerr[Debug::MATHED] << "creating inset with name: '"
<< s << '\'' << endl;;
//lyxerr << "creating inset with name: '" << s << '\'' << endl;;
latexkeys const * l = in_word_set(s);
if (l) {
string const & inset = l->inset;
lyxerr[Debug::MATHED] << " found inset: '" <<
inset << '\'' << endl;
//lyxerr << " found inset: '" << inset << '\'' << endl;
if (inset == "ref")
return MathAtom(new RefInset(l->name));
if (inset == "overset")
@ -316,7 +314,7 @@ MathAtom createMathInset(string const & s)
if (MathMacroTable::has(s))
return MathAtom(new MathMacro(s));
//lyxerr[Debug::MATHED] << "creating inset 2 with name: '" << s << '\'' << endl;
//lyxerr << "creating inset 2 with name: '" << s << '\'' << endl;
return MathAtom(new MathUnknownInset(s));
}

View File

@ -20,6 +20,7 @@
#include "LaTeXFeatures.h"
#include "debug.h"
using std::auto_ptr;
@ -55,7 +56,7 @@ void MathSymbolInset::metrics(MetricsInfo & mi, Dimension & dim) const
//lyxerr << "metrics: symbol: '" << sym_->name
// << "' in font: '" << sym_->inset
// << "' drawn as: '" << sym_->draw
// << "'\n";
// << "'" << std::endl;
int const em = mathed_char_width(mi.base.font, 'M');
FontSetChanger dummy(mi.base, sym_->inset.c_str());
@ -97,7 +98,7 @@ void MathSymbolInset::draw(PainterInfo & pi, int x, int y) const
//lyxerr << "metrics: symbol: '" << sym_->name
// << "' in font: '" << sym_->inset
// << "' drawn as: '" << sym_->draw
// << "'\n";
// << "'" << std::endl;
int const em = mathed_char_width(pi.base.font, 'M');
if (isRelOp())
x += static_cast<int>(0.25*em+0.5);