From: mental Date: Tue, 23 Jan 2007 01:39:49 +0000 (+0000) Subject: replace use of sp_repr_new in gradient-vector X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ae022474668502f99d6ac9322bf67d1caad15718;p=inkscape.git replace use of sp_repr_new in gradient-vector --- diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index 0bacfa01b..5a0b5c35e 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -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);