]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloat.cpp
Compute and output numbers for numerical citations.
[lyx.git] / src / insets / InsetFloat.cpp
index 99d6c43402dd73f7d23380eeb678f604dfa5b8da..5121d7263f66c42d5e8634d74a22fda8a694563e 100644 (file)
@@ -389,11 +389,11 @@ void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) const
 }
 
 
-int InsetFloat::plaintext(odocstream & os, OutputParams const & runparams) const
+int InsetFloat::plaintext(odocstringstream & os, OutputParams const & runparams, size_t max_length) const
 {
        os << '[' << buffer().B_("float") << ' '
                << floatName(params_.type) << ":\n";
-       InsetText::plaintext(os, runparams);
+       InsetText::plaintext(os, runparams, max_length);
        os << "\n]";
 
        return PLAINTEXT_NEWLINE + 1; // one char on a separate line
@@ -470,6 +470,12 @@ void InsetFloat::setNewLabel()
 }
 
 
+bool InsetFloat::allowsCaptionVariation(std::string const & newtype) const
+{
+       return !params_.subfloat && newtype != "LongTableNoNumber";
+}
+
+
 docstring InsetFloat::getCaption(OutputParams const & runparams) const
 {
        if (paragraphs().empty())
@@ -482,7 +488,7 @@ docstring InsetFloat::getCaption(OutputParams const & runparams) const
        TexRow texrow;
        odocstringstream ods;
        otexstream os(ods, texrow);
-       ins->getOptArg(os, runparams);
+       ins->getArgs(os, runparams);
        ods << '[';
        odocstringstream odss;
        otexstream oss(odss, texrow);