X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsettheorem.C;h=4273ffecf65e073fa74eccfabdf872efcd66b21f;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=ceb90555ba3f6f804755e0157ad7641587b30cc9;hpb=8b67659646c6850377cb9f44a2a0a22c0e80840c;p=lyx.git diff --git a/src/insets/insettheorem.C b/src/insets/insettheorem.C index ceb90555ba..4273ffecf6 100644 --- a/src/insets/insettheorem.C +++ b/src/insets/insettheorem.C @@ -21,6 +21,9 @@ #include "support/std_ostream.h" + +namespace lyx { + using std::endl; using std::ostream; @@ -66,12 +69,14 @@ auto_ptr InsetTheorem::doClone() const return result; } -void InsetTheorem::metrics(MetricsInfo & mi, Dimension & dim) const +bool InsetTheorem::metrics(MetricsInfo & mi, Dimension & dim) const { InsetCollapsable::metrics(mi, dim); center_indent_ = (mi.base.textwidth - dim.wid) / 2; dim.wid = mi.base.textwidth; + bool const changed = dim_ != dim; dim_ = dim; + return changed; } @@ -97,3 +102,6 @@ int InsetTheorem::latex(Buffer const * buf, odocstream & os, return i + 2; } + + +} // namespace lyx