From 1497d669b9d07989ca22ccac02424d4e0f4e8889 Mon Sep 17 00:00:00 2001 From: Aaron Spike Date: Mon, 22 Jan 2007 03:26:44 +0000 Subject: continue switching sp_repr_new* over to XML::Document::create* (bzr r2257) --- src/sp-rect.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sp-rect.cpp') diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index edcea21a2..6823f2122 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -22,6 +22,7 @@ #include #include +#include "document.h" #include "attributes.h" #include "style.h" #include "sp-rect.h" @@ -210,7 +211,8 @@ sp_rect_write(SPObject *object, Inkscape::XML::Node *repr, guint flags) SPRect *rect = SP_RECT(object); if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { - repr = sp_repr_new("svg:rect"); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object)); + repr = xml_doc->createElement("svg:rect"); } sp_repr_set_svg_double(repr, "width", rect->width.computed); -- cgit v1.2.3