Code

Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
[inkscape.git] / src / ui / widget / ruler.cpp
index 0afc0da3e642da4a6d532867c1b9a9ce933dfa1d..1a6455ca0a37492dc36f7bc64721e3fb6c989bfd 100644 (file)
@@ -6,6 +6,8 @@
  * Authors:
  *   Ralf Stephan <ralf@ark.in-berlin.de>
  *   Lauris Kaplinski
+ *   Jon A. Cruz <jon@joncruz.org>
+ *   Abhishek Sharma
  *
  * Copyright (C) 2005 Ralf Stephan
  *
@@ -24,6 +26,7 @@
 #include "ui/widget/ruler.h"
 
 #include "xml/repr.h"
+#include "display/sp-canvas.h"
 #include "display/guideline.h"
 #include "desktop.h"
 #include "desktop-handles.h"
@@ -145,15 +148,15 @@ Ruler::on_button_release_event(GdkEventButton *evb)
         _dragging = false;
 
         if ( (_horiz_f ? wy : wx ) >= 0 ) {
-            Inkscape::XML::Document *xml_doc = sp_document_repr_doc(_dt->doc());
+            Inkscape::XML::Document *xml_doc = _dt->doc()->getReprDoc();
             Inkscape::XML::Node *repr = xml_doc->createElement("sodipodi:guide");
             repr->setAttribute("orientation", _horiz_f ? "horizontal" : "vertical");
             double const guide_pos_dt = event_dt[ _horiz_f ? Geom::Y : Geom::X ];
             sp_repr_set_svg_double(repr, "position", guide_pos_dt);
             SP_OBJECT_REPR(_dt->namedview)->appendChild(repr);
             Inkscape::GC::release(repr);
-            sp_document_done(sp_desktop_document(_dt), SP_VERB_NONE, 
-                             /* TODO: annotate */ "ruler.cpp:157");
+            DocumentUndo::done(sp_desktop_document(_dt), SP_VERB_NONE, 
+                               /* TODO: annotate */ "ruler.cpp:157");
         }
         _dt->set_coordinate_status(event_dt);
     }
@@ -197,4 +200,4 @@ VRuler::~VRuler()
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :