Code

Merge and cleanup of GSoC C++-ification project.
[inkscape.git] / src / svg-view.cpp
index 6d989a8f5188e6ba0f3f64a651ceecf231bcb1e6..ef87b38efecbf8dd5fac4887b7252091d6c81661 100644 (file)
@@ -1,11 +1,11 @@
-#define __SP_SVG_VIEW_C__
-
 /** \file
  * Functions and callbacks for generic SVG view and widget
  *
  * Authors:
  *   Lauris Kaplinski <lauris@kaplinski.com>
  *   Ralf Stephan <ralf@ark.in-berlin.de>
+ *   Jon A. Cruz <jon@joncruz.org>
+ *   Abhishek Sharma
  *
  * Copyright (C) 2001-2002 Lauris Kaplinski
  * Copyright (C) 2001 Ximian, Inc.
@@ -41,7 +41,7 @@ SPSVGView::~SPSVGView()
 {
     if (doc() && _drawing)
     {
-        SP_ITEM (sp_document_root (doc()))->invoke_hide (_dkey);
+        SP_ITEM( doc()->getRoot() )->invoke_hide(_dkey);
         _drawing = NULL;
     }
 }
@@ -191,7 +191,7 @@ void
 SPSVGView::setDocument (SPDocument *document)
 {
     if (doc()) {
-        SP_ITEM (sp_document_root (doc()))->invoke_hide (_dkey);
+        SP_ITEM( doc()->getRoot() )->invoke_hide(_dkey);
     }
 
     if (!_drawing) {
@@ -200,7 +200,7 @@ SPSVGView::setDocument (SPDocument *document)
     }
 
     if (document) {
-        NRArenaItem *ai = SP_ITEM (sp_document_root (document))->invoke_show (
+        NRArenaItem *ai = SP_ITEM( document->getRoot() )->invoke_show(
                 SP_CANVAS_ARENA (_drawing)->arena,
                 _dkey,
                 SP_ITEM_SHOW_DISPLAY);