]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetSpecialChar.cpp
* src/paragraph_funcs.cpp (breakParagraph): change parameter 'flag' to
[lyx.git] / src / insets / InsetSpecialChar.cpp
index 178034136d3bd5819e5c39d2910608bda1aa0ea0..e1d176638f172d8adfa0ebad4432243ddbcfae82 100644 (file)
@@ -27,7 +27,6 @@
 namespace lyx {
 
 using std::string;
-using std::auto_ptr;
 using std::ostream;
 
 
@@ -42,7 +41,7 @@ InsetSpecialChar::Kind InsetSpecialChar::kind() const
 }
 
 
-bool InsetSpecialChar::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetSpecialChar::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        frontend::FontMetrics const & fm =
                theFontMetrics(mi.base.font);
@@ -61,9 +60,8 @@ bool InsetSpecialChar::metrics(MetricsInfo & mi, Dimension & dim) const
        dim.wid = fm.width(ds);
        if (kind_ == HYPHENATION && dim.wid > 5)
                dim.wid -= 2; // to make it look shorter
-       bool const changed = dim_ != dim;
-       dim_ = dim;
-       return changed;
+       
+       setDimCache(mi, dim);
 }
 
 
@@ -240,17 +238,16 @@ int InsetSpecialChar::textString(Buffer const & buf, odocstream & os,
 }
 
 
-auto_ptr<Inset> InsetSpecialChar::doClone() const
+Inset * InsetSpecialChar::clone() const
 {
-       return auto_ptr<Inset>(new InsetSpecialChar(kind_));
+       return new InsetSpecialChar(kind_);
 }
 
 
 void InsetSpecialChar::validate(LaTeXFeatures & features) const
 {
-       if (kind_ == MENU_SEPARATOR) {
+       if (kind_ == MENU_SEPARATOR)
                features.require("lyxarrow");
-       }
 }