summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5096472)
raw | patch | inline | side by side (parent: 5096472)
author | mental <mental@users.sourceforge.net> | |
Wed, 24 Jan 2007 04:49:08 +0000 (04:49 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Wed, 24 Jan 2007 04:49:08 +0000 (04:49 +0000) |
src/sp-tspan.cpp | patch | blob | history |
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index 3b5780721dda18940d5f295947f3eee01b4b6dd1..3339b2377e65ecf2d5638be2786593feffaac379 100644 (file)
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
#include "style.h"
#include "libnr/nr-matrix-fns.h"
#include "xml/repr.h"
+#include "document.h"
/*#####################################################
sp_tspan_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
{
SPTSpan *tspan = SP_TSPAN(object);
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
- repr = sp_repr_new("svg:tspan");
+ repr = xml_doc->createElement("svg:tspan");
}
tspan->attributes.writeTo(repr);
} else if ( SP_IS_TEXTPATH(child) ) {
//c_repr = child->updateRepr(NULL, flags); // shouldn't happen
} else if ( SP_IS_STRING(child) ) {
- c_repr = sp_repr_new_text(SP_STRING(child)->string.c_str());
+ c_repr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
}
if ( c_repr ) l = g_slist_prepend(l, c_repr);
}
}
if ( no_content ) {
- Inkscape::XML::Node* rch = sp_repr_new_text("");
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
+ Inkscape::XML::Node* rch = xml_doc->createTextNode("");
repr->addChild(rch, NULL);
}
sp_textpath_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
{
SPTextPath *textpath = SP_TEXTPATH(object);
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
- repr = sp_repr_new("svg:textPath");
+ repr = xml_doc->createElement("svg:textPath");
}
textpath->attributes.writeTo(repr);
} else if ( SP_IS_TEXTPATH(child) ) {
//c_repr = child->updateRepr(NULL, flags); // shouldn't happen
} else if ( SP_IS_STRING(child) ) {
- c_repr = sp_repr_new_text(SP_STRING(child)->string.c_str());
+ c_repr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
}
if ( c_repr ) l = g_slist_prepend(l, c_repr);
}