X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetfloat.C;h=e31523429f107f9da5c754b0923f0d5a92981d9b;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=16d47652bdc14a68dae1c7b5fe206d50ef53c8bf;hpb=8075064372c5361f2dfd91860003f0cb317b4e39;p=lyx.git diff --git a/src/insets/insetfloat.C b/src/insets/insetfloat.C index 16d47652bd..e31523429f 100644 --- a/src/insets/insetfloat.C +++ b/src/insets/insetfloat.C @@ -185,10 +185,10 @@ void InsetFloat::read(Buffer const * buf, LyXLex & lex) void InsetFloat::validate(LaTeXFeatures & features) const { if (contains(placement(), "H")) { - features.floats = true; + features.require("float"); } - features.usedFloats.insert(floatType_); + features.useFloat(floatType_); InsetCollapsable::validate(features); } @@ -240,10 +240,10 @@ int InsetFloat::latex(Buffer const * buf, } -int InsetFloat::docBook(Buffer const * buf, ostream & os) const +int InsetFloat::docbook(Buffer const * buf, ostream & os) const { os << "<" << floatType_ << ">"; - int const i = inset.docBook(buf, os); + int const i = inset.docbook(buf, os); os << ""; return i; @@ -271,26 +271,6 @@ bool InsetFloat::showInsetDialog(BufferView * bv) const } -void InsetFloat::insetButtonRelease(BufferView * bv, int x, int y, int button) -{ -#if 1 - if ((x >= 0) && (x < button_length) && - (y >= button_top_y) && (y <= button_bottom_y) && - (button == 3)) - { - showInsetDialog(bv); - return; - } -#else - if (button == 3) { - showInsetDialog(bv); - return; - } -#endif - InsetCollapsable::insetButtonRelease(bv, x, y, button); -} - - string const & InsetFloat::type() const { return floatType_; @@ -299,11 +279,8 @@ string const & InsetFloat::type() const void InsetFloat::placement(string const & p) { - // Here we should only allow the placement to be set + // FIX: Here we should only allow the placement to be set // if a valid value. -#ifdef WITH_WARNINGS -#warning FIX! -#endif floatPlacement_ = p; }