]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloatList.cpp
InsetTabular.cpp: fix #6585 also for wrapped floats - thanks Vincent
[lyx.git] / src / insets / InsetFloatList.cpp
index fba5e40dfb22222835522549c72ad6abdc3d4379..a0d29d0ffb5e807313efe8eb71b4489f5b2d21a3 100644 (file)
 #include "DispatchResult.h"
 #include "Floating.h"
 #include "FloatList.h"
-#include "FuncRequest.h"
 #include "Language.h"
 #include "LaTeXFeatures.h"
 #include "Lexer.h"
-#include "MetricsInfo.h"
 #include "Paragraph.h"
 #include "output_xhtml.h"
 #include "TextClass.h"
@@ -40,12 +38,12 @@ namespace lyx {
 
 
 InsetFloatList::InsetFloatList(Buffer * buf)
-       : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE), "toc")
+       : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE))
 {}
 
 
 InsetFloatList::InsetFloatList(Buffer * buf, string const & type)
-       : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE), "toc")
+       : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE))
 {
        setParam("type", from_ascii(type));
 }
@@ -124,8 +122,14 @@ int InsetFloatList::latex(odocstream & os, OutputParams const &) const
                if (fl.needsFloatPkg())
                        os << "\\listof{" << getParam("type") << "}{"
                           << buffer().B_(fl.listName()) << "}\n"; 
-               else
-                       os << "\\" << from_ascii(fl.listCommand()) << "\n";
+               else {
+                       if (!fl.listCommand().empty())
+                               os << "\\" << from_ascii(fl.listCommand()) << "\n";
+                       else 
+                               os << "%% "
+                                  << bformat(_("LyX cannot generate a list of %1$s"), getParam("type"))
+                                  << "\n";
+               }
        } else {
                os << "%%\\listof{" << getParam("type") << "}{"
                   << bformat(_("List of %1$s"), getParam("type"))
@@ -230,7 +234,7 @@ docstring InsetFloatList::xhtml(XHTMLStream &, OutputParams const &) const {
                   << html::StartTag("a", parattr)
                   // FIXME XHTML 
                   // There ought to be a simple way to customize this.
-                  << XHTMLStream::NextRaw() << "&seArr;"
+                  << XHTMLStream::NextRaw() << "&gt;"
                   << html::EndTag("a");
                xs << html::EndTag("div");
        }