using std::ostream;
using std::endl;
+using std::auto_ptr;
// Some information about Minipages in LaTeX:
{}
-InsetBase * InsetMinipage::clone() const
+auto_ptr<InsetBase> InsetMinipage::clone() const
{
- return new InsetMinipage(*this);
+ return auto_ptr<InsetBase>(new InsetMinipage(*this));
}
}
-bool InsetMinipage::insetAllowed(Inset::Code code) const
+bool InsetMinipage::insetAllowed(InsetOld::Code code) const
{
- if (code == Inset::FLOAT_CODE || code == Inset::MARGIN_CODE)
+ if (code == InsetOld::FLOAT_CODE || code == InsetOld::MARGIN_CODE)
return false;
return InsetCollapsable::insetAllowed(code);
}
-int InsetMinipage::getMaxWidth(BufferView * bv, UpdatableInset const * inset)
- const
-{
- if (owner() &&
- static_cast<UpdatableInset*>(owner())->getMaxWidth(bv, inset) < 0) {
- return -1;
- }
- if (!params_.width.zero()) {
- int ww1 = latexTextWidth(bv);
- int ww2 = InsetCollapsable::getMaxWidth(bv, inset);
- if (ww2 > 0 && ww2 < ww1) {
- return ww2;
- }
- return ww1;
- }
- // this should not happen!
- return InsetCollapsable::getMaxWidth(bv, inset);
-}
-
-
int InsetMinipage::latexTextWidth(BufferView * bv) const
{
return params_.width.inPixels(InsetCollapsable::latexTextWidth(bv));
{}
-string const InsetMinipageMailer::inset2string() const
+string const InsetMinipageMailer::inset2string(Buffer const &) const
{
return params2string(inset_.params());
}