]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetvspace.C
insetcharstyle drawing cosmetics
[lyx.git] / src / insets / insetvspace.C
index 6cac2c883f58de61e98b6d9a380d5c150d055211..5946dd70e26f6cf58b4dfe07fe9ba0091fba01c9 100644 (file)
@@ -27,7 +27,7 @@
 #include "frontends/font_metrics.h"
 #include "frontends/Painter.h"
 
-#include "support/std_sstream.h"
+#include <sstream>
 
 using std::istringstream;
 using std::ostream;
@@ -60,22 +60,22 @@ std::auto_ptr<InsetBase> InsetVSpace::clone() const
 }
 
 
-DispatchResult
-InsetVSpace::priv_dispatch(LCursor & cur, FuncRequest const & cmd)
+void InsetVSpace::priv_dispatch(LCursor & cur, FuncRequest & cmd)
 {
        switch (cmd.action) {
 
        case LFUN_INSET_MODIFY: {
                InsetVSpaceMailer::string2params(cmd.argument, space_);
-               return DispatchResult(true, true);
+               break;
        }
 
        case LFUN_MOUSE_PRESS:
                InsetVSpaceMailer(*this).showDialog(&cur.bv());
-               return DispatchResult(true, true);
+               break;
 
        default:
-               return InsetOld::priv_dispatch(cur, cmd);
+               InsetOld::priv_dispatch(cur, cmd);
+               break;
        }
 }
 
@@ -129,8 +129,7 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
 {
        static std::string const label = _("Vertical Space");
 
-       xo_ = x;
-       yo_ = y;
+       setPosCache(pi, x, y);
 
        x += ADD_TO_VSPACE_WIDTH;