changes from Angus

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3053 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-11-20 16:05:17 +00:00
parent 10f697abbe
commit 3585748871
7 changed files with 28 additions and 21 deletions

View File

@ -1,3 +1,8 @@
2001-11-19 Angus Leeming <a.leeming@ic.ac.uk>
* formula.C:
* math_arrayinset.C: add using std::getline directive.
2001-11-20 André Pönitz <poenitz@gmx.net>
* formulabase.C: fix mouse positioning using the cursor

View File

@ -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 {

View File

@ -11,6 +11,7 @@
using std::vector;
using std::istringstream;
using std::getline;
MathArrayInset::MathArrayInset(int m, int n)

View File

@ -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;
}

View File

@ -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_;
}

View File

@ -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;

View File

@ -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;
virtual void write2(MathInset const * nuc, WriteStream & os) const;
///
virtual void normalize2(MathInset const * nuc, NormalStream & os) const;
///
void normalize(MathInset const * nuc, NormalStream & os) const;
virtual void octavize2(MathInset const * nuc, OctaveStream & os) const;
///
void octavize(MathInset const * nuc, OctaveStream & os) const;
virtual void maplize2(MathInset const * nuc, MapleStream & os) const;
///
void maplize(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