]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloat.cpp
Revert "Do not crash is release mode if we stumble across an unrealized font."
[lyx.git] / src / insets / InsetFloat.cpp
index cfd40026777413c2b71a910e57297ef6cb1754ce..8d35c646cc5d582360e8d9ac47cbd60b3380cd00 100644 (file)
@@ -29,6 +29,8 @@
 #include "Lexer.h"
 #include "output_xhtml.h"
 #include "ParIterator.h"
+#include "TexRow.h"
+#include "texstream.h"
 #include "TextClass.h"
 
 #include "support/debug.h"
@@ -487,15 +489,14 @@ void InsetFloat::setNewLabel()
 
 bool InsetFloat::allowsCaptionVariation(std::string const & newtype) const
 {
-       return !params_.subfloat && newtype != "LongTableNoNumber";
+       return !params_.subfloat && newtype != "Unnumbered";
 }
 
 
 docstring InsetFloat::getCaption(OutputParams const & runparams) const
 {
-       TexRow texrow(false);
        odocstringstream ods;
-       otexstream os(ods, texrow);
+       otexstream os(ods, false);
        getCaption(os, runparams);
        return ods.str();
 }
@@ -514,15 +515,14 @@ void InsetFloat::getCaption(otexstream & os,
        ins->getArgs(os, runparams);
 
        os << '[';
-       TexRow texrow;
        odocstringstream ods;
-       otexstream oss(ods, texrow);
+       otexstream oss(ods);
        ins->getArgument(oss, runparams);
        docstring arg = ods.str();
        // Protect ']'
        if (arg.find(']') != docstring::npos)
                arg = '{' + arg + '}';
-       os.append(arg, texrow);
+       os.append(arg, move(oss.texrow()));
        os << ']';
 }