mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
small cosmetic fix and removing some debug output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10198 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
38cca87459
commit
97a158fd8e
@ -1,4 +1,8 @@
|
||||
|
||||
2005-07-15 André Pönitz <poenitz@lyx.org>
|
||||
|
||||
* math_inset.C (write): don't output too many spaces
|
||||
|
||||
2005-07-15 Andreas Vox <vox@arcor.de>
|
||||
|
||||
* math_hullinset.C (editXY): partial fix for #622
|
||||
|
@ -133,7 +133,7 @@ void MathCharInset::write(WriteStream & os) const
|
||||
|
||||
void MathCharInset::normalize(NormalStream & os) const
|
||||
{
|
||||
os << "[char " << char_ << ' ' << "mathalpha]";
|
||||
os << "[char " << char_ << " mathalpha]";
|
||||
}
|
||||
|
||||
|
||||
|
@ -234,9 +234,7 @@ void initMath()
|
||||
latexkeys const * in_word_set(string const & str)
|
||||
{
|
||||
WordList::iterator it = theWordList.find(str);
|
||||
//lyxerr << "looking up '" << str << "' found: "
|
||||
// << (it != theWordList.end()) << endl;
|
||||
return (it != theWordList.end()) ? &(it->second) : 0;
|
||||
return it != theWordList.end() ? &(it->second) : 0;
|
||||
}
|
||||
|
||||
|
||||
@ -366,3 +364,4 @@ bool createMathInset_fromDialogStr(string const & str, MathArray & ar)
|
||||
|
||||
return ar[0].nucleus();
|
||||
}
|
||||
|
||||
|
@ -712,7 +712,7 @@ void MathHullInset::setType(string const & type)
|
||||
|
||||
void MathHullInset::mutate(string const & newtype)
|
||||
{
|
||||
lyxerr << "mutating from '" << type_ << "' to '" << newtype << "'" << endl;
|
||||
//lyxerr << "mutating from '" << type_ << "' to '" << newtype << "'" << endl;
|
||||
|
||||
// we try to move along the chain
|
||||
// none <-> simple <-> equation <-> eqnarray -> *align* -> multline, gather -+
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include "math_mathmlstream.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
using std::string;
|
||||
using std::ostream;
|
||||
using std::endl;
|
||||
@ -65,7 +67,11 @@ void MathInset::drawT(TextPainter &, int, int) const
|
||||
|
||||
void MathInset::write(WriteStream & os) const
|
||||
{
|
||||
os << '\\' << name().c_str();
|
||||
string const s = name();
|
||||
os << '\\' << s.c_str();S
|
||||
// We need an extra ' ' unless this is a single-char-non-ASCII name
|
||||
// or anything non-ASCII follows
|
||||
if (s.size() != 1 || isalpha(s[0]))
|
||||
os.pendingSpace(true);
|
||||
}
|
||||
|
||||
@ -113,7 +119,7 @@ void MathInset::mathmlize(MathMLStream & os) const
|
||||
|
||||
string const & MathInset::getType() const
|
||||
{
|
||||
static string const t("none");
|
||||
static string const t = "none";
|
||||
return t;
|
||||
}
|
||||
|
||||
|
@ -983,7 +983,7 @@ void MathNestInset::edit(LCursor & cur, bool left)
|
||||
cur.idx() = left ? 0 : cur.lastidx();
|
||||
cur.pos() = left ? 0 : cur.lastpos();
|
||||
cur.resetAnchor();
|
||||
lyxerr << "MathNestInset::edit, cur:\n" << cur << endl;
|
||||
//lyxerr << "MathNestInset::edit, cur:\n" << cur << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -1002,7 +1002,7 @@ InsetBase * MathNestInset::editXY(LCursor & cur, int x, int y)
|
||||
cur.push(*this);
|
||||
cur.idx() = idx_min;
|
||||
cur.pos() = ar.x2pos(x - ar.xo());
|
||||
lyxerr << "found cell : " << idx_min << " pos: " << cur.pos() << endl;
|
||||
//lyxerr << "found cell : " << idx_min << " pos: " << cur.pos() << endl;
|
||||
if (dist_min == 0) {
|
||||
// hit inside cell
|
||||
for (pos_type i = 0, n = ar.size(); i < n; ++i)
|
||||
@ -1077,7 +1077,7 @@ void MathNestInset::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
|
||||
|
||||
bool MathNestInset::interpret(LCursor & cur, char c)
|
||||
{
|
||||
lyxerr << "interpret 2: '" << c << "'" << endl;
|
||||
//lyxerr << "interpret 2: '" << c << "'" << endl;
|
||||
cur.clearTargetX();
|
||||
|
||||
// handle macroMode
|
||||
@ -1189,7 +1189,6 @@ bool MathNestInset::interpret(LCursor & cur, char c)
|
||||
script(cur, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (c == '^') {
|
||||
script(cur, true);
|
||||
return true;
|
||||
@ -1200,7 +1199,8 @@ bool MathNestInset::interpret(LCursor & cur, char c)
|
||||
}
|
||||
}
|
||||
|
||||
if (c == '{' || c == '}' || c == '&' || c == '$' || c == '#' || c == '%') {
|
||||
if (c == '{' || c == '}' || c == '&' || c == '$' || c == '#' || c == '%'
|
||||
|| c == '_' || c == '^') {
|
||||
cur.niceInsert(createMathInset(string(1, c)));
|
||||
return true;
|
||||
}
|
||||
@ -1248,10 +1248,10 @@ bool MathNestInset::script(LCursor & cur, bool up)
|
||||
// convert the thing to our left to a scriptinset or create a new
|
||||
// one if in the very first position of the array
|
||||
if (cur.pos() == 0) {
|
||||
lyxerr << "new scriptinset" << endl;
|
||||
//lyxerr << "new scriptinset" << endl;
|
||||
cur.insert(new MathScriptInset(up));
|
||||
} else {
|
||||
lyxerr << "converting prev atom " << endl;
|
||||
//lyxerr << "converting prev atom " << endl;
|
||||
cur.prevAtom() = MathAtom(new MathScriptInset(cur.prevAtom(), up));
|
||||
}
|
||||
--cur.pos();
|
||||
@ -1260,9 +1260,9 @@ bool MathNestInset::script(LCursor & cur, bool up)
|
||||
cur.idx() = 1;
|
||||
cur.pos() = 0;
|
||||
}
|
||||
lyxerr << "pasting 1: safe:\n" << safe << endl;
|
||||
//lyxerr << "pasting 1: safe:\n" << safe << endl;
|
||||
cur.paste(safe);
|
||||
cur.resetAnchor();
|
||||
lyxerr << "pasting 2: safe:\n" << safe << endl;
|
||||
//lyxerr << "pasting 2: safe:\n" << safe << endl;
|
||||
return true;
|
||||
}
|
||||
|
@ -556,7 +556,7 @@ void MathScriptInset::notifyCursorLeaves(LCursor & cur)
|
||||
{
|
||||
MathNestInset::notifyCursorLeaves(cur);
|
||||
|
||||
lyxerr << "MathScriptInset::notifyCursorLeaves: 1 " << cur << endl;
|
||||
//lyxerr << "MathScriptInset::notifyCursorLeaves: 1 " << cur << endl;
|
||||
|
||||
// remove empty scripts if possible
|
||||
if (1) {
|
||||
@ -569,7 +569,7 @@ if (1) {
|
||||
}
|
||||
}
|
||||
|
||||
lyxerr << "MathScriptInset::notifyCursorLeaves: 2 " << cur << endl;
|
||||
//lyxerr << "MathScriptInset::notifyCursorLeaves: 2 " << cur << endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -928,7 +928,7 @@ InsetBase * LyXText::editXY(LCursor & cur, int x, int y)
|
||||
|
||||
// try to descend into nested insets
|
||||
InsetBase * inset = checkInsetHit(x, y);
|
||||
lyxerr << "inset " << inset << " hit at x: " << x << " y: " << y << endl;
|
||||
//lyxerr << "inset " << inset << " hit at x: " << x << " y: " << y << endl;
|
||||
if (!inset) {
|
||||
// Either we deconst editXY or better we move current_font
|
||||
// and real_current_font to LCursor
|
||||
|
@ -132,7 +132,7 @@ namespace {
|
||||
{
|
||||
recordUndo(cur);
|
||||
string sel = cur.selectionAsString(false);
|
||||
lyxerr << "selection is: '" << sel << "'" << endl;
|
||||
//lyxerr << "selection is: '" << sel << "'" << endl;
|
||||
|
||||
if (sel.empty()) {
|
||||
const int old_pos = cur.pos();
|
||||
|
Loading…
Reference in New Issue
Block a user