]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetWrap.cpp
InsetListings: change the interface of diaplay function and allow AlignLeft. Applied...
[lyx.git] / src / insets / InsetWrap.cpp
index 7290a4bbc46331c6726cd76c179e3eb2de40747d..10d12d096703bd0cb4a7a90541e1e33230c89c94 100644 (file)
@@ -44,17 +44,16 @@ using std::ostringstream;
 
 
 InsetWrap::InsetWrap(BufferParams const & bp, string const & type)
-       : InsetCollapsable(bp)
+       : InsetCollapsable(bp), name_(from_utf8(type))
 {
        setLabel(_("wrap: ") + floatName(type, bp));
-       LyXFont font(LyXFont::ALL_SANE);
+       Font font(Font::ALL_SANE);
        font.decSize();
        font.decSize();
        font.setColor(Color::collapsable);
        setLabelFont(font);
        params_.type = type;
        params_.width = Length(50, Length::PCW);
-       setInsetName(from_utf8(type));
 }
 
 
@@ -167,9 +166,9 @@ void InsetWrap::validate(LaTeXFeatures & features) const
 }
 
 
-auto_ptr<InsetBase> InsetWrap::doClone() const
+auto_ptr<Inset> InsetWrap::doClone() const
 {
-       return auto_ptr<InsetBase>(new InsetWrap(*this));
+       return auto_ptr<Inset>(new InsetWrap(*this));
 }
 
 
@@ -195,7 +194,7 @@ int InsetWrap::latex(Buffer const & buf, odocstream & os,
 int InsetWrap::plaintext(Buffer const & buf, odocstream & os,
                          OutputParams const & runparams) const
 {
-       os << '[' << _("wrap") << ' ' << floatName(params_.type, buf.params()) << ":\n";
+       os << '[' << buf.B_("wrap") << ' ' << floatName(params_.type, buf.params()) << ":\n";
        InsetText::plaintext(buf, os, runparams);
        os << "\n]";
 
@@ -214,7 +213,7 @@ int InsetWrap::docbook(Buffer const & buf, odocstream & os,
 }
 
 
-bool InsetWrap::insetAllowed(InsetBase::Code code) const
+bool InsetWrap::insetAllowed(Inset::Code code) const
 {
        switch(code) {
        case FLOAT_CODE:
@@ -271,7 +270,7 @@ void InsetWrapMailer::string2params(string const & in, InsetWrapParams & params)
                return print_mailer_error("InsetWrapMailer", in, 1, name_);
 
        // This is part of the inset proper that is usually swallowed
-       // by LyXText::readInset
+       // by Text::readInset
        string id;
        lex >> id;
        if (!lex || id != "Wrap")