]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inset.C
more changes...read the Changelog
[lyx.git] / src / insets / inset.C
index 775921433e9afea85d8af2deb37a569acbd90df0..333c1a6b2c6dd91db3bba031e1f99187c78efe8e 100644 (file)
@@ -58,9 +58,9 @@ void Inset::Edit(BufferView *, int, int, unsigned int)
 }
 
 
-LyXFont Inset::ConvertFont(LyXFont font)
+LyXFont Inset::ConvertFont(LyXFont const & font) const
 {
-  return font;
+       return LyXFont(font);
 }
 
 
@@ -69,6 +69,16 @@ char const * Inset::EditMessage() const
        return _("Opened inset");
 }
 
+
+LyXText * Inset::getLyXText(BufferView * bv) const
+{
+    if (owner())
+           return owner()->getLyXText(bv);
+    else
+           return bv->text;
+}
+
+
  /* some stuff for inset locking */
 
 void UpdatableInset::InsetButtonPress(BufferView *, int x, int y, int button)
@@ -132,7 +142,7 @@ void UpdatableInset::Edit(BufferView * bv, int, int, unsigned int)
 
     scx = 0;
 
-    mx_scx = abs((width(bv->painter(), font) - bv->workWidth()) / 2);
+    mx_scx = abs((width(bv, font) - bv->workWidth()) / 2);
 }