]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetlatexaccent.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetlatexaccent.C
index a41deb33a93c89991d4de394becf876a1d6a67b7..d12c85ba60bcb3445226baebf86f87a8af089b9a 100644 (file)
@@ -26,6 +26,7 @@ using namespace lyx::support;
 
 using std::ostream;
 using std::endl;
+using std::auto_ptr;
 
 
 /* LatexAccent. Proper handling of accented characters */
@@ -359,7 +360,6 @@ void InsetLatexAccent::draw(PainterInfo & pi, int x, int baseline) const
        // overhaul. Different ways of drawing (what metrics to use)
        // should also be considered.
 
-       BufferView * bv = pi.base.bv;
        LyXFont font = pi.base.font;
        if (lyxrc.font_norm_type == LyXRC::ISO_10646_1)
                font.setLanguage(english_language);
@@ -650,15 +650,15 @@ bool InsetLatexAccent::directWrite() const
 }
 
 
-InsetBase * InsetLatexAccent::clone() const
+auto_ptr<InsetBase> InsetLatexAccent::clone() const
 {
-       return new InsetLatexAccent(contents);
+       return auto_ptr<InsetBase>(new InsetLatexAccent(contents));
 }
 
 
-Inset::Code InsetLatexAccent::lyxCode() const
+InsetOld::Code InsetLatexAccent::lyxCode() const
 {
-       return Inset::ACCENT_CODE;
+       return InsetOld::ACCENT_CODE;
 }