LT_MARGIN,
LT_BOTTOMSEP,
LT_COPYSTYLE,
+ LT_DEPENDSON,
LT_OBSOLETEDBY,
//LT_EMPTY,
LT_END,
{
// This table is sorted alphabetically [asierra 30March96]
keyword_item layoutTags[] = {
- { "align", LT_ALIGN },
- { "alignpossible", LT_ALIGNPOSSIBLE },
- { "bottomsep", LT_BOTTOMSEP },
- { "copystyle", LT_COPYSTYLE },
- { "end", LT_END },
+ { "align", LT_ALIGN },
+ { "alignpossible", LT_ALIGNPOSSIBLE },
+ { "bottomsep", LT_BOTTOMSEP },
+ { "copystyle", LT_COPYSTYLE },
+ { "dependson", LT_DEPENDSON },
+ { "end", LT_END },
{ "endlabelstring", LT_ENDLABELSTRING },
{ "endlabeltype", LT_ENDLABELTYPE },
- { "fill_bottom", LT_FILL_BOTTOM },
- { "fill_top", LT_FILL_TOP },
- { "font", LT_FONT },
- { "freespacing", LT_FREE_SPACING },
- { "intitle", LT_INTITLE },
- { "itemsep", LT_ITEMSEP },
- { "keepempty", LT_KEEPEMPTY },
- { "labelbottomsep", LT_LABEL_BOTTOMSEP },
- { "labelfont", LT_LABELFONT },
+ { "fill_bottom", LT_FILL_BOTTOM },
+ { "fill_top", LT_FILL_TOP },
+ { "font", LT_FONT },
+ { "freespacing", LT_FREE_SPACING },
+ { "intitle", LT_INTITLE },
+ { "itemsep", LT_ITEMSEP },
+ { "keepempty", LT_KEEPEMPTY },
+ { "labelbottomsep", LT_LABEL_BOTTOMSEP },
+ { "labelfont", LT_LABELFONT },
{ "labelindent", LT_LABELINDENT },
- { "labelsep", LT_LABELSEP },
+ { "labelsep", LT_LABELSEP },
{ "labelstring", LT_LABELSTRING },
- { "labelstringappendix", LT_LABELSTRING_APPENDIX },
- { "labeltype", LT_LABELTYPE },
- { "latexname", LT_LATEXNAME },
- { "latexparam", LT_LATEXPARAM },
- { "latextype", LT_LATEXTYPE },
- { "leftmargin", LT_LEFTMARGIN },
- { "margin", LT_MARGIN },
- { "needprotect", LT_NEED_PROTECT },
- { "newline", LT_NEWLINE },
- { "nextnoindent", LT_NEXTNOINDENT },
- { "obsoletedby", LT_OBSOLETEDBY },
- { "parindent", LT_PARINDENT },
- { "parsep", LT_PARSEP },
- { "parskip", LT_PARSKIP },
- { "passthru", LT_PASS_THRU },
- { "preamble", LT_PREAMBLE },
- { "rightmargin", LT_RIGHTMARGIN },
- { "spacing", LT_SPACING },
- { "textfont", LT_TEXTFONT },
- { "topsep", LT_TOPSEP }
+ { "labelstringappendix", LT_LABELSTRING_APPENDIX },
+ { "labeltype", LT_LABELTYPE },
+ { "latexname", LT_LATEXNAME },
+ { "latexparam", LT_LATEXPARAM },
+ { "latextype", LT_LATEXTYPE },
+ { "leftmargin", LT_LEFTMARGIN },
+ { "margin", LT_MARGIN },
+ { "needprotect", LT_NEED_PROTECT },
+ { "newline", LT_NEWLINE },
+ { "nextnoindent", LT_NEXTNOINDENT },
+ { "obsoletedby", LT_OBSOLETEDBY },
+ { "parindent", LT_PARINDENT },
+ { "parsep", LT_PARSEP },
+ { "parskip", LT_PARSKIP },
+ { "passthru", LT_PASS_THRU },
+ { "preamble", LT_PREAMBLE },
+ { "rightmargin", LT_RIGHTMARGIN },
+ { "spacing", LT_SPACING },
+ { "textfont", LT_TEXTFONT },
+ { "topsep", LT_TOPSEP }
};
bool error = false;
if (tclass.hasLayout(style)) {
string const tmpname = name_;
- this->operator=(tclass[style]);
+ this->operator=(*tclass[style]);
name_ = tmpname;
} else {
- lyxerr << "Cannot copy unknown style `" << style << "'" << endl;
- LyXTextClass::const_iterator it = tclass.begin();
- LyXTextClass::const_iterator end = tclass.end();
- lyxerr << "All layouts so far:" << endl;
+ lyxerr << "Cannot copy unknown style `"
+ << style << "'\n"
+ << "All layouts so far:"
+ << endl;
+ LyXTextClass::const_iterator it =
+ tclass.begin();
+ LyXTextClass::const_iterator end =
+ tclass.end();
for (; it != end; ++it) {
- lyxerr << it->name() << endl;
+ lyxerr << (*it)->name()
+ << endl;
}
//lexrc.printError("Cannot copy known "
if (tclass.hasLayout(style)) {
string const tmpname = name_;
- this->operator=(tclass[style]);
+ this->operator=(*tclass[style]);
name_ = tmpname;
if (obsoleted_by().empty())
obsoleted_by_ = style;
}
break;
+ case LT_DEPENDSON:
+ if (lexrc.next()) {
+ depends_on_ = lexrc.getString();
+ }
+ break;
+
case LT_MARGIN: // Margin style definition.
readMargin(lexrc);
break;
{
return obsoleted_by_;
}
+
+
+string const & LyXLayout::depends_on() const
+{
+ return depends_on_;
+}