Code

replace use of sp_repr_new in gradient-vector
authormental <mental@users.sourceforge.net>
Tue, 23 Jan 2007 01:39:49 +0000 (01:39 +0000)
committermental <mental@users.sourceforge.net>
Tue, 23 Jan 2007 01:39:49 +0000 (01:39 +0000)
src/widgets/gradient-vector.cpp

index 0bacfa01b69cb269e64b181dbf446b0e2bc3b2b6..5a0b5c35e98d7747bdc41a65d10ad49f2446dfac 100644 (file)
@@ -464,6 +464,9 @@ verify_grad(SPGradient *gradient)
                }
        }
 
+        Inkscape::XML::Document *xml_doc;
+        xml_doc = SP_OBJECT_REPR(gradient)->document();
+
        if (i < 1) {
                gchar c[64];
                sp_svg_write_color (c, 64, 0x00000000);
@@ -473,12 +476,12 @@ verify_grad(SPGradient *gradient)
 
                Inkscape::XML::Node *child;
 
-               child = sp_repr_new ("svg:stop");
+               child = xml_doc->createElement("svg:stop");
                sp_repr_set_css_double(child, "offset", 0.0);
                child->setAttribute("style", os.str().c_str());
                SP_OBJECT_REPR (gradient)->addChild(child, NULL);
 
-               child = sp_repr_new ("svg:stop");
+               child = xml_doc->createElement("svg:stop");
                sp_repr_set_css_double(child, "offset", 1.0);
                child->setAttribute("style", os.str().c_str());
                SP_OBJECT_REPR (gradient)->addChild(child, NULL);