mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
mathed37.diff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1652 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6c2fde690b
commit
b429849306
@ -56,28 +56,6 @@ MathMacro::MathMacro(boost::shared_ptr<MathMacroTemplate> const & t)
|
||||
}
|
||||
|
||||
|
||||
MathMacro::MathMacro(MathMacro const & m)
|
||||
: MathParInset(LM_ST_TEXT, m.GetName(), LM_OT_MACRO),
|
||||
tmplate_(m.tmplate_), idx_(0)
|
||||
{
|
||||
nargs_ = tmplate_->getNoArgs();
|
||||
tcode_ = tmplate_->getTCode();
|
||||
SetName(tmplate_->GetName());
|
||||
|
||||
std::vector<MacroArgumentBase>::const_iterator cit = m.args_.begin();
|
||||
std::vector<MacroArgumentBase>::const_iterator end = m.args_.end();
|
||||
|
||||
//args_.resize(nargs_);
|
||||
//for (int i = 0; i < tmplate_->getNoArgs(); ++i) {
|
||||
// args_[i].row = m->args_[i].row;
|
||||
// args_[i].array = m->args_[i].array;
|
||||
//}
|
||||
for (; cit != end; ++cit) {
|
||||
args_.push_back(*cit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MathedInset * MathMacro::Clone()
|
||||
{
|
||||
return new MathMacro(*this);
|
||||
|
@ -35,12 +35,9 @@ class MathMacroTemplate;
|
||||
*/
|
||||
class MathMacro : public MathParInset {
|
||||
public:
|
||||
/// A macro can only be builded from an existing template
|
||||
/// A macro can only be built from an existing template
|
||||
explicit
|
||||
MathMacro(boost::shared_ptr<MathMacroTemplate> const &);
|
||||
/// or from another macro.
|
||||
explicit
|
||||
MathMacro(MathMacro const &);
|
||||
///
|
||||
void draw(Painter &, int, int);
|
||||
///
|
||||
|
@ -29,12 +29,6 @@ MathedInset * MathMacroArgument::Clone()
|
||||
}
|
||||
|
||||
|
||||
void MathMacroArgument::setNumber(int n)
|
||||
{
|
||||
number_ = n;
|
||||
}
|
||||
|
||||
|
||||
void MathMacroArgument::setExpand(bool e)
|
||||
{
|
||||
expnd_mode_ = e;
|
||||
|
@ -26,8 +26,6 @@ public:
|
||||
void draw(Painter &, int x, int baseline);
|
||||
///
|
||||
void Write(std::ostream &, bool fragile);
|
||||
///
|
||||
void setNumber(int n);
|
||||
/// Is expanded or not
|
||||
void setExpand(bool e);
|
||||
/// Is expanded or not
|
||||
|
@ -20,9 +20,8 @@ MathMacroTemplate::MathMacroTemplate(string const & nm, int na):
|
||||
{
|
||||
if (nargs_ > 0) {
|
||||
tcode_ = LM_TC_ACTIVE_INSET;
|
||||
args_.resize(nargs_);
|
||||
for (int i = 0; i < nargs_; ++i) {
|
||||
args_[i].setNumber(i + 1);
|
||||
args_.push_back(MathMacroArgument(i + 1));
|
||||
}
|
||||
} else {
|
||||
tcode_ = LM_TC_INSET;
|
||||
|
Loading…
Reference in New Issue
Block a user