From a9cd48f40e48a0e7c00f2bf9d33f01f19a0d83db Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Thu, 27 Nov 2003 16:57:12 +0000 Subject: [PATCH] This was forgotten git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8143 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 3 ++- src/lyxtextclass.C | 12 ++++++++++++ src/lyxtextclass.h | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9fcd6b6435..71da3c8e5d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,8 @@ 2003-11-27 Martin Vermeer - * buffer.C: parametrize SGML document header + * buffer.C: + * lyxtextclass.[Ch]: parametrize SGML document header 2003-11-27 Martin Vermeer diff --git a/src/lyxtextclass.C b/src/lyxtextclass.C index 058db9e893..6a5d6fc688 100644 --- a/src/lyxtextclass.C +++ b/src/lyxtextclass.C @@ -470,6 +470,7 @@ enum ClassOptionsTags { CO_FONTSIZE = 1, CO_PAGESTYLE, CO_OTHER, + CO_HEADER, CO_END }; @@ -479,6 +480,7 @@ void LyXTextClass::readClassOptions(LyXLex & lexrc) keyword_item classOptionsTags[] = { {"end", CO_END }, {"fontsize", CO_FONTSIZE }, + {"header", CO_HEADER }, {"other", CO_OTHER }, {"pagestyle", CO_PAGESTYLE } }; @@ -506,6 +508,10 @@ void LyXTextClass::readClassOptions(LyXLex & lexrc) lexrc.next(); options_ = lexrc.getString(); break; + case CO_HEADER: + lexrc.next(); + class_header_ = subst(lexrc.getString(), """, "\""); + break; case CO_END: getout = true; break; @@ -926,6 +932,12 @@ string const & LyXTextClass::options() const } +string const & LyXTextClass::class_header() const +{ + return class_header_; +} + + string const & LyXTextClass::pagestyle() const { return pagestyle_; diff --git a/src/lyxtextclass.h b/src/lyxtextclass.h index 9a526ae281..e190af915e 100644 --- a/src/lyxtextclass.h +++ b/src/lyxtextclass.h @@ -111,6 +111,8 @@ public: /// std::string const & options() const; /// + std::string const & class_header() const; + /// std::string const & pagestyle() const; /// std::string const & preamble() const; @@ -186,6 +188,8 @@ private: /// std::string pagestyle_; /// + std::string class_header_; + /// std::string defaultlayout_; /// preamble text to support layout styles std::string preamble_;