summaryrefslogtreecommitdiffstats
path: root/src/sp-rect.cpp
diff options
context:
space:
mode:
authorAaron Spike <aaron@ekips.org>2007-01-22 03:26:44 +0000
committeracspike <acspike@users.sourceforge.net>2007-01-22 03:26:44 +0000
commit1497d669b9d07989ca22ccac02424d4e0f4e8889 (patch)
tree33db56b6a87a3d32b2fb727aed090cfd81694371 /src/sp-rect.cpp
parentrefactor grid extension to reduce amount of redundant code (diff)
downloadinkscape-1497d669b9d07989ca22ccac02424d4e0f4e8889.tar.gz
inkscape-1497d669b9d07989ca22ccac02424d4e0f4e8889.zip
continue switching sp_repr_new* over to XML::Document::create*
(bzr r2257)
Diffstat (limited to 'src/sp-rect.cpp')
-rw-r--r--src/sp-rect.cpp4
1 files changed, 3 insertions, 1 deletions
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 <libnr/nr-matrix-div.h>
#include <libnr/nr-matrix-fns.h>
+#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);