diff options
| author | Aaron Spike <aaron@ekips.org> | 2007-01-22 15:27:37 +0000 |
|---|---|---|
| committer | acspike <acspike@users.sourceforge.net> | 2007-01-22 15:27:37 +0000 |
| commit | 213fae3a4d759f8cc9830fec13f643e13560c3a7 (patch) | |
| tree | 0ffb1d7754a9cac212033d8d69dd3ca355db6f3f /src | |
| parent | continue switching sp_repr_new* over to XML::Document::create* (diff) | |
| download | inkscape-213fae3a4d759f8cc9830fec13f643e13560c3a7.tar.gz inkscape-213fae3a4d759f8cc9830fec13f643e13560c3a7.zip | |
continue switching sp_repr_new* over to XML::Document::create*
(bzr r2258)
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-style-elem.cpp | 2 | ||||
| -rw-r--r-- | src/splivarot.cpp | 21 |
2 files changed, 15 insertions, 8 deletions
diff --git a/src/sp-style-elem.cpp b/src/sp-style-elem.cpp index 4408f7ce8..d713a518b 100644 --- a/src/sp-style-elem.cpp +++ b/src/sp-style-elem.cpp @@ -131,7 +131,7 @@ sp_style_elem_write(SPObject *const object, Inkscape::XML::Node *repr, guint con if (flags & SP_OBJECT_WRITE_BUILD) { g_warning("nyi: Forming <style> content for SP_OBJECT_WRITE_BUILD."); /* fixme: Consider having the CRStyleSheet be a member of SPStyleElem, and then - pretty-print to a string s, then repr->addChild(sp_repr_new_text(s), NULL). */ + pretty-print to a string s, then repr->addChild(xml_doc->createTextNode(s), NULL). */ } if (style_elem.is_css) { repr->setAttribute("type", "text/css"); diff --git a/src/splivarot.cpp b/src/splivarot.cpp index f4f43fd49..58adee3a2 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -506,7 +506,8 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin for (int i=0;i<nbRP;i++) { gchar *d = resPath[i]->svg_dump_path(); - Inkscape::XML::Node *repr = sp_repr_new("svg:path"); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); + Inkscape::XML::Node *repr = xml_doc->createElement("svg:path"); repr->setAttribute("style", style); if (mask) repr->setAttribute("mask", mask); @@ -551,7 +552,8 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin } else { gchar *d = res->svg_dump_path(); - Inkscape::XML::Node *repr = sp_repr_new("svg:path"); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); + Inkscape::XML::Node *repr = xml_doc->createElement("svg:path"); repr->setAttribute("style", style); if ( mask ) @@ -769,7 +771,8 @@ sp_selected_path_outline() if (res->descr_cmd.size() > 1) { // if there's 0 or 1 node left, drop this path altogether - Inkscape::XML::Node *repr = sp_repr_new("svg:path"); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); + Inkscape::XML::Node *repr = xml_doc->createElement("svg:path"); // restore old style repr->setAttribute("style", style); @@ -790,7 +793,8 @@ sp_selected_path_outline() if (SP_IS_SHAPE(item) && sp_shape_has_markers (SP_SHAPE(item))) { - Inkscape::XML::Node *g_repr = sp_repr_new("svg:g"); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); + Inkscape::XML::Node *g_repr = xml_doc->createElement("svg:g"); // add the group to the parent parent->appendChild(g_repr); @@ -1091,7 +1095,8 @@ sp_selected_path_create_offset_object(int expand, bool updating) tstr[79] = '\0'; - repr = sp_repr_new("svg:path"); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); + repr = xml_doc->createElement("svg:path"); repr->setAttribute("sodipodi:type", "inkscape:offset"); sp_repr_set_svg_double(repr, "inkscape:radius", ( expand > 0 ? o_width @@ -1356,7 +1361,8 @@ sp_selected_path_do_offset(bool expand, double prefOffset) tstr[79] = '\0'; - Inkscape::XML::Node *repr = sp_repr_new("svg:path"); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); + Inkscape::XML::Node *repr = xml_doc->createElement("svg:path"); repr->setAttribute("style", style); @@ -1483,7 +1489,8 @@ sp_selected_path_simplify_item(SPDesktop *desktop, orig->Simplify(threshold * size); } - Inkscape::XML::Node *repr = sp_repr_new("svg:path"); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); + Inkscape::XML::Node *repr = xml_doc->createElement("svg:path"); // restore style, mask and clip-path repr->setAttribute("style", style); |
