summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3caca4f)
raw | patch | inline | side by side (parent: 3caca4f)
author | acspike <acspike@users.sourceforge.net> | |
Sun, 21 Jan 2007 20:15:12 +0000 (20:15 +0000) | ||
committer | acspike <acspike@users.sourceforge.net> | |
Sun, 21 Jan 2007 20:15:12 +0000 (20:15 +0000) |
diff --git a/src/arc-context.cpp b/src/arc-context.cpp
index c0f8dd75c73e09127a020fc9eee3b1911f4b40eb..c682677a69c1c001d39bc423cd9ec79da2dae4cc 100644 (file)
--- a/src/arc-context.cpp
+++ b/src/arc-context.cpp
}
/* Create object */
- 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("sodipodi:type", "arc");
/* Set style */
index 7285f7b370cb4c14872526e897b3261b87cb029e..5c60eeb412ba2ff508ce6e1ef2ada80d0179834c 100644 (file)
if (!dc->repr) {
/* Create object */
- 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");
/* Set style */
sp_desktop_apply_style_tool (desktop, repr, "tools.calligraphic", false);
index b9d626f783b379779603b46883f7bea189ee7191..05c6bc4c956640cd8293e0a079fd3f6157862655 100644 (file)
@@ -130,8 +130,9 @@ Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *doc
// std::cout << "Path Data: " << path_data << std::endl;
+ Inkscape::XML::Document * xml_doc = sp_document_repr_doc(document->doc());
Inkscape::XML::Node * current_layer = ((SPDesktop *)document)->currentLayer()->repr;
- Inkscape::XML::Node * path = sp_repr_new("svg:path");
+ Inkscape::XML::Node * path = xml_doc->createElement("svg:path");
path->setAttribute("d", path_data.c_str());
diff --git a/src/layer-fns.cpp b/src/layer-fns.cpp
index 2d58796af59edf222146080c8ab6b5543e36a7af..75bb89bcf65f49f1d07d542a94839adc7f98f178 100644 (file)
--- a/src/layer-fns.cpp
+++ b/src/layer-fns.cpp
@@ -174,7 +174,8 @@ SPObject *create_layer(SPObject *root, SPObject *layer, LayerRelativePosition po
id = g_strdup_printf("layer%d", layer_suffix++);
} while (document->getObjectById(id));
- Inkscape::XML::Node *repr=sp_repr_new("svg:g");
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
+ Inkscape::XML::Node *repr = xml_doc->createElement("svg:g");
repr->setAttribute("inkscape:groupmode", "layer");
repr->setAttribute("id", id);
g_free(id);
diff --git a/src/sp-anchor.cpp b/src/sp-anchor.cpp
index 4b93f7cf03d723640c400c8a84712330d096b579..e168369577eb0bce1c8d2cb87365a9dda09a2f37 100644 (file)
--- a/src/sp-anchor.cpp
+++ b/src/sp-anchor.cpp
#include "attributes.h"
#include "sp-anchor.h"
#include "ui/view/view.h"
+#include "document.h"
static void sp_anchor_class_init(SPAnchorClass *ac);
static void sp_anchor_init(SPAnchor *anchor);
@@ -147,7 +148,8 @@ static Inkscape::XML::Node *sp_anchor_write(SPObject *object, Inkscape::XML::Nod
SPAnchor *anchor = SP_ANCHOR(object);
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
- repr = sp_repr_new("svg:a");
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
+ repr = xml_doc->createElement("svg:a");
}
repr->setAttribute("xlink:href", anchor->href);
diff --git a/src/sp-line.cpp b/src/sp-line.cpp
index cca470530a8f8412ddc5642e8a75cac92ed52b95..f63dfd3236d0f276483836a4a4ffdaa083621f56 100644 (file)
--- a/src/sp-line.cpp
+++ b/src/sp-line.cpp
#include <glibmm/i18n.h>
#include <libnr/nr-matrix-fns.h>
#include <xml/repr.h>
+#include "document.h"
static void sp_line_class_init (SPLineClass *klass);
static void sp_line_init (SPLine *line);
SPLine *line = SP_LINE (object);
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
- repr = sp_repr_new ("svg:line");
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
+ repr = xml_doc->createElement("svg:line");
}
if (repr != SP_OBJECT_REPR (object)) {