- if (lexrc.next())
- category_ = lexrc.getDocString();
- break;
-
- case LT_COPYSTYLE: // initialize with a known style
- if (lexrc.next()) {
- docstring const style = subst(lexrc.getDocString(),
- '_', ' ');
-
- if (tclass.hasLayout(style)) {
- docstring const tmpname = name_;
- this->operator=(tclass[style]);
- name_ = tmpname;
- } else {
- lyxerr << "Cannot copy unknown style `"
- << to_utf8(style) << "'\n"
- << "All layouts so far:"
- << endl;
- DocumentClass::const_iterator lit = tclass.begin();
- DocumentClass::const_iterator len = tclass.end();
- for (; lit != len; ++lit)
- lyxerr << to_utf8(lit->name()) << endl;
-
- //lexrc.printError("Cannot copy known "
- // "style `$$Token'");
- }
+ lex >> category_;
+ break;
+
+ case LT_COPYSTYLE: { // initialize with a known style
+ docstring style;
+ lex >> style;
+ style = subst(style, '_', ' ');
+
+ if (tclass.hasLayout(style)) {
+ docstring const tmpname = name_;
+ this->operator=(tclass[style]);
+ name_ = tmpname;
+ } else {
+ lyxerr << "Cannot copy unknown style `"
+ << to_utf8(style) << "'\n"
+ << "All layouts so far:"
+ << endl;
+ DocumentClass::const_iterator lit = tclass.begin();
+ DocumentClass::const_iterator len = tclass.end();
+ for (; lit != len; ++lit)
+ lyxerr << to_utf8(lit->name()) << endl;
+
+ //lex.printError("Cannot copy known "
+ // "style `$$Token'");