From: André Pönitz Date: Mon, 12 Nov 2001 13:09:26 +0000 (+0000) Subject: use '1' as integrand if not given X-Git-Tag: 1.6.10~20359 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f200be551a139f8cae905fc7c81b9ef5c58dcf5b;p=features.git use '1' as integrand if not given git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3006 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_exintinset.C b/src/mathed/math_exintinset.C index 2002a6fdd1..b7de3206c6 100644 --- a/src/mathed/math_exintinset.C +++ b/src/mathed/math_exintinset.C @@ -72,7 +72,12 @@ void MathExIntInset::draw(Painter &, int, int) const void MathExIntInset::maplize(MapleStream & os) const { - os << int_.nucleus() << '(' << core_ << ',' << diff_; + os << int_.nucleus() << '('; + if (core_.size()) + os << core_; + else + os << '1'; + os << ',' << diff_; if (hasScripts()) { MathScriptInset * p = scripts_->asScriptInset(); os << '=' << p->down().data_ << ".." << p->up().data_; diff --git a/src/mathed/math_extern.C b/src/mathed/math_extern.C index 6a9d302313..64eb18b3f3 100644 --- a/src/mathed/math_extern.C +++ b/src/mathed/math_extern.C @@ -264,8 +264,7 @@ bool intSymbolTest(MathInset * p) bool differentialTest(MathInset * p) { - string s = extractString(p); - return s.size() && s[0] == 'd'; + return extractString(p) == "d"; } @@ -305,16 +304,12 @@ void extractIntegrals(MathArray & ar) p->core(MathArray(st, jt)); } - // is the differential just 'd' oder 'dsomething'? - // and replace the original stuff by the new inset - string s = extractString(jt->nucleus()); + // use the atom behind the 'd' as differential MathArray diff; - if (s.size() == 1 && jt + 1 != ar.end()) { - // use the next atom as differential + if (jt + 1 != ar.end()) { diff.push_back(*(jt + 1)); ar.erase(it + 1, jt + 2); } else { - diff.push_back(MathAtom(new MathStringInset(s.substr(1)))); ar.erase(it + 1, jt + 1); } p->differential(diff); @@ -326,11 +321,11 @@ void extractIntegrals(MathArray & ar) void extractStructure(MathArray & ar) { - extractStrings(ar); extractMatrices(ar); extractDelims(ar); extractFunctions(ar); extractIntegrals(ar); + extractStrings(ar); }