index 34c60b140e0382f4d37544ef3198f08561bdd4e3..5892e1dc736dfb11b89fdba115c308ec7ce867ed 100644 (file)
*/
/* Copyright (C) Johan Engelen 2006-2007 <johan@shouraizou.nl>
* Copyright (C) Lauris Kaplinski 2000
+ * Abhishek Sharma
*/
/* As a general comment, I am not exactly proud of how things are done.
* Don't be shy to correct things.
*/
-#define INKSCAPE_CANVAS_GRID_C
-
+#include "sp-canvas-group.h"
#include "sp-canvas-util.h"
#include "util/mathfns.h"
-#include "display-forward.h"
-#include <libnr/nr-pixops.h>
+#include "libnr/nr-pixops.h"
#include "desktop-handles.h"
#include "helper/units.h"
#include "svg/svg-color.h"
#include "canvas-grid.h"
#include "canvas-axonomgrid.h"
+using Inkscape::DocumentUndo;
+
namespace Inkscape {
static gchar const *const grid_name[] = {
@@ -247,7 +248,7 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, Gri
// first create the child xml node, then hook it to repr. This order is important, to not set off listeners to repr before the new node is complete.
- Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
+ Inkscape::XML::Document *xml_doc = doc->getReprDoc();
Inkscape::XML::Node *newnode;
newnode = xml_doc->createElement("inkscape:grid");
newnode->setAttribute("type", getSVGName(gridtype));
@@ -255,7 +256,7 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, Gri
repr->appendChild(newnode);
Inkscape::GC::release(newnode);
- sp_document_done(doc, SP_VERB_DIALOG_NAMEDVIEW, _("Create new grid"));
+ DocumentUndo::done(doc, SP_VERB_DIALOG_NAMEDVIEW, _("Create new grid"));
}
/*