]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBox.cpp
make code look a bit more uniform
[lyx.git] / src / insets / InsetBox.cpp
index c40c3c54a01eea45ece9cea95321d25b2686622c..b81ac332f25bba197ca0805123bd3558ca353752 100644 (file)
@@ -85,31 +85,20 @@ BoxTranslatorLoc const & boxtranslator_loc()
 } // anon
 
 
-InsetBox::InsetBox(BufferParams const & bp, string const & label)
-       : InsetCollapsable(bp), params_(label)
+InsetBox::InsetBox(Buffer const & buffer, string const & label)
+       : InsetCollapsable(buffer), params_(label)
 {
        if (forceEmptyLayout())
-               paragraphs().back().setLayout(bp.textClass().emptyLayout());
+               paragraphs().back().setLayout(buffer.params().documentClass().emptyLayout());
 }
 
 
-InsetBox::InsetBox(InsetBox const & in)
-       : InsetCollapsable(in), params_(in.params_)
-{}
-
-
 InsetBox::~InsetBox()
 {
        InsetBoxMailer(*this).hideDialog();
 }
 
 
-Inset * InsetBox::clone() const
-{
-       return new InsetBox(*this);
-}
-
-
 docstring InsetBox::editMessage() const
 {
        return _("Opened Box Inset");
@@ -119,7 +108,7 @@ docstring InsetBox::editMessage() const
 docstring InsetBox::name() const 
 {
        // FIXME: UNICODE
-       string name = string("Box");
+       string name = "Box";
        if (boxtranslator().find(params_.type) == Shaded)
                name += string(":Shaded");
        return from_ascii(name);
@@ -162,7 +151,7 @@ void InsetBox::setButtonLabel()
 
 bool InsetBox::hasFixedWidth() const
 {
-      return params_.inner_box || params_.special != "width";
+       return params_.inner_box || params_.special != "width";
 }