More related to #7224: It's OK for layouts not to provide a ListCommand

if a float writes to the same auxfile as an existing float. E.g., in the
aguplus classes, we have a plate float that writes to lof and so is just
treated as a figure, for TOC purposes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37427 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-02-02 17:32:59 +00:00
parent c29fdcb0a7
commit a5b01f8f96

View File

@ -1040,10 +1040,23 @@ bool TextClass::readFloat(Lexer & lexrc)
// Here we have a full float if getout == true
if (getout) {
if (!needsfloat && listcommand.empty())
if (!needsfloat && listcommand.empty()) {
// if this float uses the same auxfile as an existing one,
// there is no need for it to provide a list command.
FloatList::const_iterator it = floatlist_.begin();
FloatList::const_iterator en = floatlist_.end();
bool found_ext = false;
for (; it != en; ++it) {
if (it->second.ext() == ext) {
found_ext = true;
break;
}
}
if (!found_ext)
LYXERR0("The layout does not provide a list command " <<
"for the builtin float `" << type << "'. LyX will " <<
"not be able to produce a float list.");
}
Floating fl(type, placement, ext, within, style, name,
listname, listcommand, refprefix,
htmltag, htmlattr, htmlstyle, needsfloat);