X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsettheorem.C;h=4273ffecf65e073fa74eccfabdf872efcd66b21f;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=92e1f7789fd04867b51138ae802e29e247350b13;hpb=59413be9a0b999c17784d1abad01e55819ecd27a;p=lyx.git diff --git a/src/insets/insettheorem.C b/src/insets/insettheorem.C index 92e1f7789f..4273ffecf6 100644 --- a/src/insets/insettheorem.C +++ b/src/insets/insettheorem.C @@ -14,7 +14,6 @@ #include "insets/insettext.h" #include "debug.h" -#include "BufferView.h" #include "gettext.h" #include "lyxfont.h" #include "lyxtext.h" @@ -22,6 +21,9 @@ #include "support/std_ostream.h" + +namespace lyx { + using std::endl; using std::ostream; @@ -67,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; } @@ -88,7 +92,7 @@ string const InsetTheorem::editMessage() const } -int InsetTheorem::latex(Buffer const * buf, ostream & os, +int InsetTheorem::latex(Buffer const * buf, odocstream & os, OutputParams const & runparams) const { os << "\\begin{theorem}%\n"; @@ -98,3 +102,6 @@ int InsetTheorem::latex(Buffer const * buf, ostream & os, return i + 2; } + + +} // namespace lyx