Make Richard happy, add inset layout parm 'Decoration'

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19786 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2007-08-25 09:57:32 +00:00
parent 52cf28be89
commit e4a160c6cf
4 changed files with 22 additions and 1 deletions

View File

@ -598,6 +598,7 @@ void TextClass::readClassOptions(Lexer & lexrc)
enum InsetLayoutTags {
IL_FONT = 1,
IL_DECORATION,
IL_LABELFONT,
IL_LABELSTRING,
IL_LATEXNAME,
@ -612,6 +613,7 @@ enum InsetLayoutTags {
void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
{
keyword_item elementTags[] = {
{ "decoration", IL_DECORATION },
{ "end", IL_END },
{ "font", IL_FONT },
{ "labelfont", IL_LABELFONT },
@ -628,6 +630,7 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
string lyxtype;
docstring labelstring;
string latextype;
string decoration;
string latexname;
string latexparam;
Font font(Font::ALL_INHERIT);
@ -656,6 +659,10 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
lexrc.next();
labelstring = lexrc.getDocString();
break;
case IL_DECORATION:
lexrc.next();
decoration = lexrc.getString();
break;
case IL_LATEXNAME:
lexrc.next();
latexname = lexrc.getString();
@ -689,6 +696,7 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
il.name = to_ascii(name);
il.lyxtype = lyxtype;
il.labelstring = labelstring;
il.decoration = decoration;
il.latextype = latextype;
il.latexname = latexname;
il.latexparam = latexparam;

View File

@ -34,6 +34,7 @@ public:
std::string name;
std::string lyxtype;
docstring labelstring;
std::string decoration;
std::string latextype;
std::string latexname;
std::string latexparam;

View File

@ -203,6 +203,18 @@ bool InsetCharStyle::getStatus(Cursor & cur, FuncRequest const & cmd,
}
InsetCollapsable::Decoration InsetCharStyle::decoration() const
{
if (layout_.decoration == "classic")
return Classic;
if (layout_.decoration == "minimalistic")
return Minimalistic;
if (layout_.decoration == "conglomerate")
return Conglomerate;
return Conglomerate;
}
int InsetCharStyle::plaintext(Buffer const & buf, odocstream & os,
OutputParams const & runparams) const
{

View File

@ -66,7 +66,7 @@ public:
///
bool forceDefaultParagraphs(idx_type) const { return true; }
///
virtual Decoration decoration() const { return Conglomerate; }
virtual Decoration decoration() const;
///
int plaintext(Buffer const &, odocstream &,