}
+void switchBetweenClasses(DocumentClassConstPtr oldone,
+ DocumentClassConstPtr newone, InsetText & in) {
+ ErrorList el = {};
+ switchBetweenClasses(oldone, newone, in, el);
+}
+
+
void switchBetweenClasses(DocumentClassConstPtr oldone,
DocumentClassConstPtr newone, InsetText & in, ErrorList & errorlist)
{
docstring const & n = newone->insetLayout(layoutName).name();
bool const is_undefined = n.empty() ||
n == DocumentClass::plainInsetLayout().name();
- if (!is_undefined)
+ docstring const & oldn = oldone->insetLayout(layoutName).name();
+ bool const was_undefined = oldn.empty() ||
+ oldn == DocumentClass::plainInsetLayout().name();
+ if (!is_undefined || was_undefined)
continue;
// The flex inset is undefined in newtc