X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetFloat.cpp;h=e966bb5d6c7b9a0c1f2720cc7e163a1d19e2cdda;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=8b4e9b28e400335e96d111b4200868a2f8e03a02;hpb=efbd1d30cb119692dd11276cd01e9399ee9d124c;p=lyx.git diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp index 8b4e9b28e4..e966bb5d6c 100644 --- a/src/insets/InsetFloat.cpp +++ b/src/insets/InsetFloat.cpp @@ -18,18 +18,18 @@ #include "BufferView.h" #include "Counters.h" #include "Cursor.h" -#include "support/debug.h" #include "DispatchResult.h" #include "Floating.h" #include "FloatList.h" #include "FuncRequest.h" #include "FuncStatus.h" -#include "support/gettext.h" #include "LaTeXFeatures.h" #include "Lexer.h" #include "OutputParams.h" #include "TextClass.h" +#include "support/debug.h" +#include "support/gettext.h" #include "support/lstrings.h" #include "support/docstream.h" #include "support/convert.h" @@ -110,7 +110,6 @@ namespace lyx { InsetFloat::InsetFloat(BufferParams const & bp, string const & type) : InsetCollapsable(bp), name_(from_utf8(type)) { - BOOST_ASSERT(false); setLabel(_("float: ") + floatName(type, bp)); params_.type = type; } @@ -262,7 +261,7 @@ void InsetFloat::validate(LaTeXFeatures & features) const } if (params_.sideways) - features.require("rotating"); + features.require("rotfloat"); features.useFloat(params_.type); InsetCollapsable::validate(features); @@ -285,13 +284,13 @@ int InsetFloat::latex(Buffer const & buf, odocstream & os, OutputParams const & runparams) const { FloatList const & floats = buf.params().getTextClass().floats(); - string tmptype = (params_.wide ? params_.type + "*" : params_.type); - if (params_.sideways) { - if (params_.type == "table") - tmptype = "sidewaystable"; - else if (params_.type == "figure") - tmptype = "sidewaysfigure"; - } + string tmptype = params_.type; + if (params_.sideways) + tmptype = "sideways" + params_.type; + if (params_.wide && (!params_.sideways || + params_.type == "figure" || + params_.type == "table")) + tmptype += "*"; // Figure out the float placement to use. // From lowest to highest: // - float default placement