From 3585748871d0928b22543f3e4697d75ad6c164d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 20 Nov 2001 16:05:17 +0000 Subject: [PATCH] changes from Angus git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3053 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 5 +++++ src/mathed/formula.C | 2 +- src/mathed/math_arrayinset.C | 1 + src/mathed/math_extern.C | 12 ++++++------ src/mathed/math_limitopinset.C | 2 +- src/mathed/math_scriptinset.C | 14 +++++++------- src/mathed/math_scriptinset.h | 13 +++++++------ 7 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 898bd45f37..7097cebff2 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2001-11-19 Angus Leeming + + * formula.C: + * math_arrayinset.C: add using std::getline directive. + 2001-11-20 André Pönitz * formulabase.C: fix mouse positioning using the cursor diff --git a/src/mathed/formula.C b/src/mathed/formula.C index e1127d46a1..bc70649fb3 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -31,7 +31,6 @@ #include "gettext.h" #include "debug.h" #include "lyx_gui_misc.h" -#include "lyxtext.h" #include "support/LOstream.h" #include "support/LAssert.h" #include "support/lyxlib.h" @@ -51,6 +50,7 @@ using std::istream; using std::pair; using std::endl; using std::vector; +using std::getline; namespace { diff --git a/src/mathed/math_arrayinset.C b/src/mathed/math_arrayinset.C index 862e3b4173..4c0490af7f 100644 --- a/src/mathed/math_arrayinset.C +++ b/src/mathed/math_arrayinset.C @@ -11,6 +11,7 @@ using std::vector; using std::istringstream; +using std::getline; MathArrayInset::MathArrayInset(int m, int n) diff --git a/src/mathed/math_extern.C b/src/mathed/math_extern.C index 4cf321c2b6..3d7593540d 100644 --- a/src/mathed/math_extern.C +++ b/src/mathed/math_extern.C @@ -639,12 +639,12 @@ void extractDiff(MathArray & ar) // collect function, let jt point behind last used item MathArray::iterator jt = it + 1; - int n = 1; + //int n = 1; MathArray & numer = f->cell(0); if (numer.size() > 1 && numer.at(1)->asScriptInset()) { // this is something like d^n f(x) / d... or d^n / d... // FIXME - n = 1; + //n = 1; if (numer.size() > 2) diff->cell(0) = MathArray(numer.begin() + 2, numer.end()); else @@ -717,7 +717,7 @@ void write(MathArray const & dat, WriteStream & wi) MathInset const * p = it->nucleus(); if (it + 1 != ar.end()) { if (MathScriptInset const * q = asScript(it)) { - q->write(p, wi); + q->write2(p, wi); ++it; continue; } @@ -742,7 +742,7 @@ void octavize(MathArray const & dat, OctaveStream & os) MathInset const * p = it->nucleus(); if (it + 1 != ar.end()) { if (MathScriptInset const * q = asScript(it)) { - q->octavize(p, os); + q->octavize2(p, os); ++it; continue; } @@ -760,7 +760,7 @@ void maplize(MathArray const & dat, MapleStream & os) MathInset const * p = it->nucleus(); if (it + 1 != ar.end()) { if (MathScriptInset const * q = asScript(it)) { - q->maplize(p, os); + q->maplize2(p, os); ++it; continue; } @@ -784,7 +784,7 @@ void mathmlize(MathArray const & dat, MathMLStream & os) MathInset const * p = it->nucleus(); if (it + 1 != ar.end()) { if (MathScriptInset const * q = asScript(it)) { - q->mathmlize(p, os); + q->mathmlize2(p, os); ++it; continue; } diff --git a/src/mathed/math_limitopinset.C b/src/mathed/math_limitopinset.C index ee5460e7c9..f43fbb971f 100644 --- a/src/mathed/math_limitopinset.C +++ b/src/mathed/math_limitopinset.C @@ -20,7 +20,7 @@ MathInset * MathLimitOpInset::clone() const void MathLimitOpInset::write(WriteStream & os) const { - scripts_.write(int_.nucleus(), os); + scripts_.write2(int_.nucleus(), os); os << core_ << "d" << diff_; } diff --git a/src/mathed/math_scriptinset.C b/src/mathed/math_scriptinset.C index b403760e0b..2de23d00ee 100644 --- a/src/mathed/math_scriptinset.C +++ b/src/mathed/math_scriptinset.C @@ -315,11 +315,11 @@ bool MathScriptInset::idxLastDown(idx_type & idx, pos_type & pos) const void MathScriptInset::write(WriteStream & os) const { //lyxerr << "unexpected call to MathScriptInset::write()\n"; - write(0, os); + write2(0, os); } -void MathScriptInset::write(MathInset const * nuc, WriteStream & os) const +void MathScriptInset::write2(MathInset const * nuc, WriteStream & os) const { if (nuc) { os << nuc; @@ -346,11 +346,11 @@ void MathScriptInset::write(MathInset const * nuc, WriteStream & os) const void MathScriptInset::normalize(NormalStream & os) const { //lyxerr << "unexpected call to MathScriptInset::normalize()\n"; - normalize(0, os); + normalize2(0, os); } -void MathScriptInset::normalize(MathInset const * nuc, NormalStream & os) const +void MathScriptInset::normalize2(MathInset const * nuc, NormalStream & os) const { bool d = hasDown() && down().data_.size(); bool u = hasUp() && up().data_.size(); @@ -372,7 +372,7 @@ void MathScriptInset::normalize(MathInset const * nuc, NormalStream & os) const } -void MathScriptInset::maplize(MathInset const * nuc, MapleStream & os) const +void MathScriptInset::maplize2(MathInset const * nuc, MapleStream & os) const { if (nuc) os << nuc; @@ -383,7 +383,7 @@ void MathScriptInset::maplize(MathInset const * nuc, MapleStream & os) const } -void MathScriptInset::mathmlize(MathInset const * nuc, MathMLStream & os) const +void MathScriptInset::mathmlize2(MathInset const * nuc, MathMLStream & os) const { bool d = hasDown() && down().data_.size(); bool u = hasUp() && up().data_.size(); @@ -409,7 +409,7 @@ void MathScriptInset::mathmlize(MathInset const * nuc, MathMLStream & os) const } -void MathScriptInset::octavize(MathInset const * nuc, OctaveStream & os) const +void MathScriptInset::octavize2(MathInset const * nuc, OctaveStream & os) const { if (nuc) os << nuc; diff --git a/src/mathed/math_scriptinset.h b/src/mathed/math_scriptinset.h index 6ecf64f4db..45920dbc73 100644 --- a/src/mathed/math_scriptinset.h +++ b/src/mathed/math_scriptinset.h @@ -85,16 +85,17 @@ public: /// void ensure(bool up); + // call these methods ...2 to make compaq cxx in anal mode happy... /// suppresses empty braces if necessary - void write(MathInset const * nuc, WriteStream & os) const; - /// - void normalize(MathInset const * nuc, NormalStream & os) const; + virtual void write2(MathInset const * nuc, WriteStream & os) const; + /// + virtual void normalize2(MathInset const * nuc, NormalStream & os) const; /// - void octavize(MathInset const * nuc, OctaveStream & os) const; + virtual void octavize2(MathInset const * nuc, OctaveStream & os) const; /// - void maplize(MathInset const * nuc, MapleStream & os) const; + virtual void maplize2(MathInset const * nuc, MapleStream & os) const; /// - void mathmlize(MathInset const * nuc, MathMLStream & os) const; + virtual void mathmlize2(MathInset const * nuc, MathMLStream & os) const; public: /// returns x offset for main part -- 2.39.2