X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetFloat.cpp;h=e966bb5d6c7b9a0c1f2720cc7e163a1d19e2cdda;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=edd2da65ad05755ae78fa3861e519aa9e1eed2de;hpb=cdf13782003f6fca74b267c6b23d76bb9edaa65c;p=lyx.git diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp index edd2da65ad..e966bb5d6c 100644 --- a/src/insets/InsetFloat.cpp +++ b/src/insets/InsetFloat.cpp @@ -18,31 +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 @@ -266,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); @@ -289,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