mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
use '1' as integrand if not given
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3006 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1d1260a3aa
commit
f200be551a
@ -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_;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user