]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.cpp
Remove all BufferParam arguments in InsetXXX methods (since insets know about their...
[lyx.git] / src / insets / Inset.cpp
index 94d547e28706d45d4c73729b42ebdd875c1390e7..dbefc1279dbab1415c91227004d7931343676bf0 100644 (file)
@@ -210,6 +210,7 @@ string insetName(InsetCode c)
 
 void Inset::dispatch(Cursor & cur, FuncRequest & cmd)
 {
+       LASSERT(cur.buffer() == &buffer(), return);
        cur.updateFlags(Update::Force | Update::FitCursor);
        cur.dispatched();
        doDispatch(cur, cmd);
@@ -329,6 +330,12 @@ int Inset::docbook(odocstream &, OutputParams const &) const
 }
 
 
+docstring Inset::xhtml(odocstream & od, OutputParams const &) const
+{
+       od << "[[Inset: " << from_ascii(insetName(lyxCode())) << "]]";
+       return docstring();
+}
+
 bool Inset::directWrite() const
 {
        return false;
@@ -442,9 +449,9 @@ bool Inset::covers(BufferView const & bv, int x, int y) const
 }
 
 
-InsetLayout const & Inset::getLayout(BufferParams const & bp) const
+InsetLayout const & Inset::getLayout() const
 {
-       return bp.documentClass().insetLayout(name());
+       return buffer().params().documentClass().insetLayout(name());
 }
 
 
@@ -460,6 +467,12 @@ ColorCode Inset::backgroundColor() const
 }
 
 
+ColorCode Inset::labelColor() const
+{
+       return Color_foreground;
+}
+
+
 void Inset::setPosCache(PainterInfo const & pi, int x, int y) const
 {
        //LYXERR("Inset: set position cache to " << x << " " << y);