Code

Merge and cleanup of GSoC C++-ification project.
[inkscape.git] / src / ui / widget / ruler.cpp
index 9fac481456d979702924d4e5d9e829df9bb1207b..107f4e8c6ef248088299a21f9094b280f5b2dee1 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
  *
@@ -145,15 +147,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);
-            SPDocumentUndo::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 +199,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 :