X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetFloat.cpp;h=e966bb5d6c7b9a0c1f2720cc7e163a1d19e2cdda;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=b710d9ae8c9e5a3e8135a33cb8f7f0cee61b2a64;hpb=12a3c703d16d64c5897c228dadc3cb179eafdf87;p=lyx.git diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp index b710d9ae8c..e966bb5d6c 100644 --- a/src/insets/InsetFloat.cpp +++ b/src/insets/InsetFloat.cpp @@ -18,30 +18,26 @@ #include "BufferView.h" #include "Counters.h" #include "Cursor.h" -#include "debug.h" #include "DispatchResult.h" #include "Floating.h" #include "FloatList.h" #include "FuncRequest.h" #include "FuncStatus.h" -#include "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" +using namespace std; namespace lyx { -using std::endl; -using std::string; -using std::istringstream; -using std::ostream; -using std::ostringstream; - // With this inset it will be possible to support the latex package // float.sty, and I am sure that with this and some additional support @@ -265,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); @@ -288,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