diff --git a/src/Layout.cpp b/src/Layout.cpp index d92345eed1..95d9cb944f 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -758,30 +758,6 @@ void Layout::readSpacing(Lexer & lex) } -docstring const & Layout::name() const -{ - return name_; -} - - -void Layout::setName(docstring const & name) -{ - name_ = name; -} - - -docstring const & Layout::obsoleted_by() const -{ - return obsoleted_by_; -} - - -docstring const & Layout::depends_on() const -{ - return depends_on_; -} - - namespace { docstring const i18npreamble(Language const * lang, docstring const & templ) diff --git a/src/Layout.h b/src/Layout.h index d251d292c2..3c1d0847d6 100644 --- a/src/Layout.h +++ b/src/Layout.h @@ -73,16 +73,18 @@ public: /// void readSpacing(Lexer &); /// - docstring const & name() const; + docstring const & name() const { return name_; }; /// - void setName(docstring const & n); + void setName(docstring const & n) { name_ = n; } /// - docstring const & obsoleted_by() const; + docstring const & obsoleted_by() const { return obsoleted_by_; } /// - docstring const & depends_on() const; + docstring const & depends_on() const { return depends_on_; } /// std::string const & latexname() const { return latexname_; } /// + void setLatexName(std::string const & n) { latexname_ = n; } + /// docstring const & labelstring() const { return labelstring_; } /// docstring const & endlabelstring() const { return endlabelstring_; } @@ -131,11 +133,6 @@ public: //////////////////////////////////////////////////////////////// // members //////////////////////////////////////////////////////////////// - /** Is this layout the default layout for an unknown layout? If - * so, its name will be displayed as xxx (unknown). - */ - bool unknown_; - /** Default font for this layout/environment. The main font for this kind of environment. If an attribute has INHERITED_*, it means that the value is specified by @@ -235,12 +232,19 @@ public: /// until it has proper support for the caption inset (JMarc) static Layout * forCaption(); + +private: /// Name of the layout/paragraph environment docstring name_; + /// LaTeX name for environment std::string latexname_; -private: + /** Is this layout the default layout for an unknown layout? If + * so, its name will be displayed as xxx (unknown). + */ + bool unknown_; + /** Name of an layout that has replaced this layout. This is used to rename a layout, while keeping backward compatibility diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 732fa97161..b56b56b9df 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -441,8 +441,8 @@ Layout * captionlayout() static Layout * lay = 0; if (!lay) { lay = new Layout; - lay->name_ = from_ascii("Caption"); - lay->latexname_ = "caption"; + lay->setName(from_ascii("Caption")); + lay->setLatexName("caption"); lay->latextype = LATEX_COMMAND; lay->optionalargs = 1; }