]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettheorem.C
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insettheorem.C
index 100330498f347142bb76a7fa250c19ddd65da9e6..4273ffecf65e073fa74eccfabdf872efcd66b21f 100644 (file)
@@ -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;
 
@@ -56,7 +58,7 @@ void InsetTheorem::write(Buffer const * buf, ostream & os) const
 }
 
 
-auto_ptr<InsetBase> InsetTheorem::clone() const
+auto_ptr<InsetBase> InsetTheorem::doClone() const
 {
 #ifdef WITH_WARNINGS
 #warning Is this inset used? If YES this is WRONG!!! (Jug)
@@ -67,12 +69,14 @@ auto_ptr<InsetBase> InsetTheorem::clone() 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,8 +92,8 @@ string const InsetTheorem::editMessage() const
 }
 
 
-int InsetTheorem::latex(Buffer const * buf, ostream & os,
-                       LatexRunParams const & runparams) const
+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