mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-12 14:05:59 +00:00
mathed46.diff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1696 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2338154427
commit
7abb55666c
@ -393,7 +393,7 @@ void InsetFormula::draw(BufferView * bv, LyXFont const & f,
|
||||
} else {
|
||||
MathMatrixInset * mt =
|
||||
static_cast<MathMatrixInset*>(par);
|
||||
MathedRowSt const * crow = mt->getRowSt();
|
||||
MathedRowContainer::iterator crow = mt->getRowSt().begin();
|
||||
while (crow) {
|
||||
int const y = baseline + crow->getBaseline();
|
||||
if (crow->isNumbered()) {
|
||||
@ -404,7 +404,7 @@ void InsetFormula::draw(BufferView * bv, LyXFont const & f,
|
||||
str = "(#)";
|
||||
pain.text(int(x + 20), y, str, wfont);
|
||||
}
|
||||
crow = crow->getNext();
|
||||
++crow;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -557,11 +557,11 @@ vector<string> const InsetFormula::getLabelList() const
|
||||
|
||||
if (is_multi_numbered(par->GetType())) {
|
||||
MathMatrixInset * mt = static_cast<MathMatrixInset*>(par);
|
||||
MathedRowSt const * crow = mt->getRowSt();
|
||||
MathedRowContainer::iterator crow = mt->getRowSt().begin();
|
||||
while (crow) {
|
||||
if (!crow->getLabel().empty())
|
||||
label_list.push_back(crow->getLabel());
|
||||
crow = crow->getNext();
|
||||
++crow;
|
||||
}
|
||||
} else if (!label_.empty())
|
||||
label_list.push_back(label_);
|
||||
|
@ -53,7 +53,7 @@ MathMatrixInset::MathMatrixInset(MathMatrixInset const & mt)
|
||||
row_ = r;
|
||||
else
|
||||
ro->setNext(r);
|
||||
mrow = mrow->getNext();
|
||||
mrow = mrow->next_;
|
||||
ro = r;
|
||||
++nr_;
|
||||
}
|
||||
@ -67,7 +67,7 @@ MathMatrixInset::~MathMatrixInset()
|
||||
{
|
||||
MathedRowSt * r = row_.data_;
|
||||
while (r) {
|
||||
MathedRowSt * q = r->getNext();
|
||||
MathedRowSt * q = r->next_;
|
||||
delete r;
|
||||
r = q;
|
||||
}
|
||||
@ -184,7 +184,7 @@ void MathMatrixInset::Metrics()
|
||||
ascent = h - hl;
|
||||
break;
|
||||
default:
|
||||
ascent = (row_.data_->getNext()) ? h / 2 : h - hl;
|
||||
ascent = (row_.begin().is_last()) ? h / 2 : h - hl;
|
||||
break;
|
||||
}
|
||||
descent = h - ascent + 2;
|
||||
|
@ -45,9 +45,9 @@ public:
|
||||
virtual bool isMatrix() const;
|
||||
|
||||
/// Use this to manage the extra information independently of paragraph
|
||||
MathedRowSt * getRowSt() const;
|
||||
MathedRowContainer & getRowSt();
|
||||
///
|
||||
void setRowSt(MathedRowSt * r);
|
||||
void setRowSt(MathedRowContainer & r);
|
||||
private:
|
||||
/// Number of columns & rows
|
||||
int nc_;
|
||||
@ -87,14 +87,14 @@ bool MathMatrixInset::isMatrix() const
|
||||
|
||||
|
||||
inline
|
||||
MathedRowSt * MathMatrixInset::getRowSt() const
|
||||
MathedRowContainer & MathMatrixInset::getRowSt()
|
||||
{
|
||||
return row_.data_;
|
||||
return row_;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
void MathMatrixInset::setRowSt(MathedRowSt * r)
|
||||
void MathMatrixInset::setRowSt(MathedRowContainer & r)
|
||||
{
|
||||
row_ = r;
|
||||
}
|
||||
|
@ -21,9 +21,10 @@ using std::endl;
|
||||
extern int number_of_newlines;
|
||||
|
||||
|
||||
MathedRowSt * MathParInset::getRowSt() const
|
||||
MathedRowContainer & MathParInset::getRowSt()
|
||||
{
|
||||
return 0;
|
||||
static MathedRowContainer dummy;
|
||||
return dummy;
|
||||
}
|
||||
|
||||
|
||||
@ -270,7 +271,7 @@ void MathParInset::Write(ostream & os, bool fragile)
|
||||
latexkeys const * l;
|
||||
MathedIter data(&array);
|
||||
// hack
|
||||
MathedRowSt const * crow = getRowSt();
|
||||
MathedRowContainer::iterator crow = getRowSt().begin();
|
||||
data.Reset();
|
||||
|
||||
if (!Permit(LMPF_FIXED_SIZE)) {
|
||||
@ -348,7 +349,7 @@ void MathParInset::Write(ostream & os, bool fragile)
|
||||
<< crow->getLabel()
|
||||
<< "} ";
|
||||
}
|
||||
crow = crow->getNext();
|
||||
++crow;
|
||||
}
|
||||
if (fragile)
|
||||
os << "\\protect";
|
||||
|
@ -67,9 +67,9 @@ public:
|
||||
///
|
||||
virtual void SetStyle(short);
|
||||
///
|
||||
virtual MathedRowSt * getRowSt() const;
|
||||
virtual MathedRowContainer & getRowSt();
|
||||
///
|
||||
virtual void setRowSt(MathedRowSt *);
|
||||
virtual void setRowSt(MathedRowContainer &);
|
||||
///
|
||||
virtual bool Permit(short f) const;
|
||||
///
|
||||
@ -150,7 +150,7 @@ int MathParInset::getMaxArgumentIdx() const
|
||||
|
||||
|
||||
inline
|
||||
void MathParInset::setRowSt(MathedRowSt *)
|
||||
void MathParInset::setRowSt(MathedRowContainer &)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -424,7 +424,7 @@ void mathed_parse(MathedArray & array, unsigned flags = 0,
|
||||
int acc_brace = 0;
|
||||
int acc_braces[8];
|
||||
MathParInset * mt = (mtx) ? *mtx : 0;
|
||||
MathedRowSt * crow = (mt) ? mt->getRowSt() : 0;
|
||||
MathedRowSt * crow = (mt) ? mt->getRowSt().data_ : 0;
|
||||
|
||||
++plevel;
|
||||
MathedIter data(&array);
|
||||
@ -869,7 +869,7 @@ void mathed_parse(MathedArray & array, unsigned flags = 0,
|
||||
}
|
||||
mt->SetStyle(size);
|
||||
mt->SetType(mathed_env);
|
||||
crow = mt->getRowSt();
|
||||
crow = mt->getRowSt().data_;
|
||||
}
|
||||
|
||||
lyxerr[Debug::MATHED] << "MATH BEGIN[" << mathed_env << "]" << endl;
|
||||
|
@ -186,7 +186,7 @@ void MathedXIter::SetData(MathParInset * pp)
|
||||
x_ = y_ = 0;
|
||||
array = &p_->GetData();
|
||||
ncols = p_->GetColumns();
|
||||
crow_ = p_->getRowSt();
|
||||
crow_ = p_->getRowSt().data_;
|
||||
if (p_->Permit(LMPF_ALLOW_CR))
|
||||
flags |= MthIF_CR;
|
||||
if (p_->Permit(LMPF_ALLOW_TAB))
|
||||
@ -272,7 +272,7 @@ void MathedXIter::GoBegin()
|
||||
x_ = y_ = 0;
|
||||
sw_ = sx_ = 0;
|
||||
if (p_) {
|
||||
crow_ = p_->getRowSt();
|
||||
crow_ = p_->getRowSt().data_;
|
||||
if (crow_) {
|
||||
x_ = crow_->getTab(0);
|
||||
y_ = crow_->getBaseline();
|
||||
@ -447,7 +447,7 @@ void MathedXIter::ipop()
|
||||
x_ = stck.x;
|
||||
y_ = stck.y;
|
||||
if (p_) {
|
||||
crow_ = p_->getRowSt();
|
||||
crow_ = p_->getRowSt().data_;
|
||||
if (crow_)
|
||||
for (int i = 0; i < row; ++i)
|
||||
crow_ = crow_->getNext();
|
||||
|
Loading…
Reference in New Issue
Block a user