Minor InsetLayout cleanup.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33039 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-01-14 21:31:27 +00:00
parent 8d1bc0dedc
commit e0eaa73224
4 changed files with 11 additions and 9 deletions

View File

@ -622,8 +622,7 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
InsetLayout & il = insetlayoutlist_[name];
error = !il.read(lexrc, *this);
} else {
InsetLayout il;
il.setName(name);
InsetLayout il(name);
error = !il.read(lexrc, *this);
if (!error)
insetlayoutlist_[name] = il;

View File

@ -322,8 +322,6 @@ private:
///
void readClassOptions(Lexer &);
///
void readCharStyle(Lexer &, std::string const &);
///
void readFloat(Lexer &);
};

View File

@ -29,8 +29,12 @@ using std::vector;
namespace lyx {
InsetLayout::InsetLayout() :
name_(from_ascii("undefined")), lyxtype_(STANDARD),
InsetLayout::InsetLayout()
{}
InsetLayout::InsetLayout(docstring const & name) :
name_(name), lyxtype_(STANDARD),
labelstring_(from_ascii("UNDEFINED")), contentaslabel_(false),
decoration_(DEFAULT), latextype_(NOLATEXTYPE), font_(sane_font),
labelfont_(sane_font), bgcolor_(Color_error),

View File

@ -30,9 +30,12 @@ class TextClass;
///
class InsetLayout {
public:
///
// just so these can be put in containers
// it should not really be used
InsetLayout();
///
InsetLayout(docstring const & name);
///
enum InsetDecoration {
CLASSIC,
MINIMALISTIC,
@ -60,8 +63,6 @@ public:
///
docstring name() const { return name_; }
///
void setName(docstring const & n) { name_ = n; }
///
InsetLyXType lyxtype() const { return lyxtype_; }
///
docstring labelstring() const { return labelstring_; }