]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBox.cpp
Fix text frame drawing.
[lyx.git] / src / insets / InsetBox.cpp
index 581bd57e111219a6de772dccfa1411e6e2c7129a..893946372701d2fad019c50110c54de28695709c 100644 (file)
@@ -25,7 +25,6 @@
 #include "Color.h"
 #include "Lexer.h"
 #include "MetricsInfo.h"
-#include "Paragraph.h"
 #include "TextMetrics.h"
 
 #include "support/Translator.h"
@@ -35,7 +34,6 @@
 
 namespace lyx {
 
-using std::auto_ptr;
 using std::string;
 using std::istringstream;
 using std::ostream;
@@ -90,7 +88,6 @@ BoxTranslatorLoc const & boxtranslator_loc()
 
 void InsetBox::init()
 {
-       setInsetName(from_ascii("Box"));
        setButtonLabel();
 }
 
@@ -115,9 +112,9 @@ InsetBox::~InsetBox()
 }
 
 
-auto_ptr<InsetBase> InsetBox::doClone() const
+Inset * InsetBox::clone() const
 {
-       return auto_ptr<InsetBase>(new InsetBox(*this));
+       return new InsetBox(*this);
 }
 
 
@@ -144,7 +141,7 @@ void InsetBox::read(Buffer const & buf, Lexer & lex)
 
 void InsetBox::setButtonLabel()
 {
-       LyXFont font(LyXFont::ALL_SANE);
+       Font font(Font::ALL_SANE);
        font.decSize();
        font.decSize();
 
@@ -165,7 +162,6 @@ void InsetBox::setButtonLabel()
        setLabel(label);
 
        font.setColor(Color::foreground);
-       setBackgroundColor(Color::background);
        setLabelFont(font);
 }
 
@@ -260,7 +256,7 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd,
 
 
 int InsetBox::latex(Buffer const & buf, odocstream & os,
-                    OutputParams const & runparams) const
+                   OutputParams const & runparams) const
 {
        BoxType btype = boxtranslator().find(params_.type);
 
@@ -397,7 +393,7 @@ int InsetBox::latex(Buffer const & buf, odocstream & os,
 
 
 int InsetBox::plaintext(Buffer const & buf, odocstream & os,
-                        OutputParams const & runparams) const
+                       OutputParams const & runparams) const
 {
        BoxType const btype = boxtranslator().find(params_.type);
 
@@ -427,7 +423,7 @@ int InsetBox::plaintext(Buffer const & buf, odocstream & os,
 
 
 int InsetBox::docbook(Buffer const & buf, odocstream & os,
-                      OutputParams const & runparams) const
+                     OutputParams const & runparams) const
 {
        return InsetText::docbook(buf, os, runparams);
 }
@@ -494,7 +490,7 @@ void InsetBoxMailer::string2params(string const & in,
                return print_mailer_error("InsetBoxMailer", 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 != "Box")