]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcollapsable.C
ws changes only
[lyx.git] / src / insets / insetcollapsable.C
index f6e4ccd06bc5757185531b0a61c7c628dd84fb60..c54f763e4f6276e70768b281545467d9ba0fb6fa 100644 (file)
 #include "frontends/Painter.h"
 #include "frontends/LyXView.h"
 
+
 using lyx::graphics::PreviewLoader;
 
 using std::endl;
-
+using std::string;
 using std::max;
 using std::ostream;
 
@@ -60,7 +61,6 @@ InsetCollapsable::InsetCollapsable(InsetCollapsable const & in)
 #endif
          in_update(false), first_after_edit(false)
 {
-       inset.init(&(in.inset));
        inset.setOwner(this);
 }
 
@@ -138,9 +138,6 @@ void InsetCollapsable::draw_collapsed(PainterInfo & pi, int x, int y) const
 
 void InsetCollapsable::draw(PainterInfo & pi, int x, int y, bool inlined) const
 {
-       BOOST_ASSERT(pi.base.bv);
-       cache(pi.base.bv);
-
        Dimension dim_collapsed;
        dimension_collapsed(dim_collapsed);
 
@@ -274,7 +271,7 @@ bool InsetCollapsable::hitButton(FuncRequest const & cmd) const
 }
 
 
-InsetOld::RESULT InsetCollapsable::localDispatch(FuncRequest const & cmd)
+dispatch_result InsetCollapsable::localDispatch(FuncRequest const & cmd)
 {
        //lyxerr << "InsetCollapsable::localDispatch: "
        //      << cmd.action << " '" << cmd.argument << "'\n";
@@ -346,7 +343,7 @@ InsetOld::RESULT InsetCollapsable::localDispatch(FuncRequest const & cmd)
                        return DISPATCHED;
 
                default:
-                       UpdatableInset::RESULT result = inset.localDispatch(cmd);
+                       dispatch_result result = inset.localDispatch(cmd);
                        if (result >= FINISHED)
                                bv->unlockInset(this);
                        first_after_edit = false;
@@ -562,15 +559,3 @@ void InsetCollapsable::addPreview(PreviewLoader & loader) const
 {
        inset.addPreview(loader);
 }
-
-
-void InsetCollapsable::cache(BufferView * bv) const
-{
-       view_ = bv->owner()->view();
-}
-
-
-BufferView * InsetCollapsable::view() const
-{
-       return view_.lock().get();
-}