// development/tools/updatelayouts.sh script, to update the format of
// all of our layout files.
//
-int const LAYOUT_FORMAT = 44; // rgh: change LabelType declarations
+int const LAYOUT_FORMAT = 45; // rgh: New Tag "NoInsetLayout"
namespace {
TC_IFSTYLE,
TC_DEFAULTSTYLE,
TC_INSETLAYOUT,
+ TC_NOINSETLAYOUT,
TC_NOSTYLE,
TC_COLUMNS,
TC_SIDES,
{ "leftmargin", TC_LEFTMARGIN },
{ "nocounter", TC_NOCOUNTER },
{ "nofloat", TC_NOFLOAT },
+ { "noinsetlayout", TC_NOINSETLAYOUT },
{ "nostyle", TC_NOSTYLE },
{ "outputformat", TC_OUTPUTFORMAT },
{ "outputtype", TC_OUTPUTTYPE },
}
break;
+ case TC_NOINSETLAYOUT:
+ if (lexrc.next()) {
+ docstring const style = from_utf8(subst(lexrc.getString(),
+ '_', ' '));
+ if (!deleteInsetLayout(style))
+ LYXERR0("Style `" << style << "' cannot be removed\n"
+ "because it was not found!");
+ }
+ break;
+
case TC_COLUMNS:
if (lexrc.next())
columns_ = lexrc.getInteger();
{
if (n.empty())
return false;
- InsetLayouts::const_iterator it = insetlayoutlist_.begin();
- InsetLayouts::const_iterator en = insetlayoutlist_.end();
- for (; it != en; ++it)
- if (n == it->first)
- return true;
- return false;
+ InsetLayouts::const_iterator it = insetlayoutlist_.find(n);
+ return it != insetlayoutlist_.end();
}
}
+bool TextClass::deleteInsetLayout(docstring const & name)
+{
+ return insetlayoutlist_.erase(name);
+}
+
+
// Load textclass info if not loaded yet
bool TextClass::load(string const & path) const
{