]> git.lyx.org Git - features.git/commitdiff
use '1' as integrand if not given
authorAndré Pönitz <poenitz@gmx.net>
Mon, 12 Nov 2001 13:09:26 +0000 (13:09 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Mon, 12 Nov 2001 13:09:26 +0000 (13:09 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3006 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_exintinset.C
src/mathed/math_extern.C

index 2002a6fdd1db3a24c80a2f89147254d8fc577a15..b7de3206c6908968eb611c800e7bc39bbd292d6d 100644 (file)
@@ -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_;
index 6a9d3023130bb542f03032038ffb5eb354ef7e06..64eb18b3f3d04947df988ed0f3b186d0fc884530 100644 (file)
@@ -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);
 }