These don't seem to be causing crashes at the moment, but as a matter of long-term stability, it seems worth cloning them the "canonical" way.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23360 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-02-29 20:16:04 +00:00
parent 7b09292cb0
commit 1becd75946
6 changed files with 5 additions and 19 deletions

View File

@ -45,7 +45,7 @@ public:
///
void validate(LaTeXFeatures & features) const;
private:
Inset * clone() const { return new InsetLine; }
Inset * clone() const { return new InsetLine(*this); }
};

View File

@ -54,7 +54,7 @@ public:
virtual ColorCode ColorName() const { return Color_eolmarker; }
private:
Inset * clone() const { return new InsetNewline; }
Inset * clone() const { return new InsetNewline(*this); }
};
class InsetLinebreak : public InsetNewline {
@ -70,10 +70,7 @@ public:
ColorCode ColorName() const { return Color_pagebreak; }
private:
virtual Inset * clone() const
{
return new InsetLinebreak;
}
virtual Inset * clone() const { return new InsetLinebreak(*this); }
};

View File

@ -228,9 +228,4 @@ void InsetSpace::textString(odocstream & os) const
}
Inset * InsetSpace::clone() const
{
return new InsetSpace(kind_);
}
} // namespace lyx

View File

@ -84,7 +84,7 @@ public:
// a line separator)?
bool isSpace() const { return true; }
private:
virtual Inset * clone() const;
virtual Inset * clone() const { return new InsetSpace(*this); }
/// And which kind is this?
Kind kind_;

View File

@ -291,12 +291,6 @@ void InsetSpecialChar::textString(odocstream & os) const
}
Inset * InsetSpecialChar::clone() const
{
return new InsetSpecialChar(kind_);
}
void InsetSpecialChar::validate(LaTeXFeatures & features) const
{
if (kind_ == MENU_SEPARATOR)

View File

@ -80,7 +80,7 @@ public:
// should we break lines after this inset?
bool isLineSeparator() const;
private:
Inset * clone() const;
Inset * clone() const { return new InsetSpecialChar(*this); };
/// And which kind is this?
Kind kind_;