mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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:
parent
52cf28be89
commit
e4a160c6cf
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 &,
|
||||
|
Loading…
Reference in New Issue
Block a user