one less explicit test against FLEX_CODE

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30543 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2009-07-13 14:06:05 +00:00
parent 58182c5860
commit 9d857249b0
3 changed files with 10 additions and 11 deletions

View File

@ -875,17 +875,7 @@ docstring InsetCollapsable::floatName(string const & type) const
InsetLayout::InsetDecoration InsetCollapsable::decoration() const
{
InsetLayout::InsetDecoration const dec = getLayout().decoration();
switch (dec) {
case InsetLayout::CLASSIC:
case InsetLayout::MINIMALISTIC:
case InsetLayout::CONGLOMERATE:
return dec;
case InsetLayout::DEFAULT:
break;
}
if (lyxCode() == FLEX_CODE)
return InsetLayout::CONGLOMERATE;
return InsetLayout::CLASSIC;
return dec == InsetLayout::DEFAULT ? InsetLayout::CLASSIC : dec;
}

View File

@ -41,6 +41,13 @@ InsetFlex::InsetFlex(InsetFlex const & in)
{}
InsetLayout::InsetDecoration InsetFlex::decoration() const
{
InsetLayout::InsetDecoration const dec = getLayout().decoration();
return dec == InsetLayout::DEFAULT ? InsetLayout::CONGLOMERATE : dec;
}
docstring InsetFlex::editMessage() const
{
return _("Opened Flex Inset");

View File

@ -30,6 +30,8 @@ public:
docstring editMessage() const;
///
InsetCode lyxCode() const { return FLEX_CODE; }
/// Default looks
InsetLayout::InsetDecoration decoration() const;
///
void write(std::ostream &) const;
/// should paragraph indendation be ommitted in any case?