]> 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 daded4b9a92b80a27cb8b5aed6acc051ffff7a47..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,10 +330,10 @@ int Inset::docbook(odocstream &, OutputParams const &) const
 }
 
 
-int Inset::xhtml(odocstream & od, OutputParams const &) const
+docstring Inset::xhtml(odocstream & od, OutputParams const &) const
 {
        od << "[[Inset: " << from_ascii(insetName(lyxCode())) << "]]";
-       return 0;
+       return docstring();
 }
 
 bool Inset::directWrite() const
@@ -448,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());
 }
 
 
@@ -466,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);