diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 1415f85e6138ffba4ab87f7164783d2dbc39a45a..9a8eb3e9237b16ed1318d8aa5cca929b9ce2270b 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
#include "text-editing.h"
#include "style.h"
#include "inkscape.h"
#include "text-editing.h"
#include "style.h"
#include "inkscape.h"
+#include "desktop.h"
#include "document.h"
#include "message-stack.h"
#include "selection.h"
#include "document.h"
#include "message-stack.h"
#include "selection.h"
g_slist_free(items);
g_slist_free(items);
- 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 id
repr->setAttribute("id", id);
// restore id
repr->setAttribute("id", id);
for (GSList *l = list; l != NULL; l = l->next) {
curve = (SPCurve *) l->data;
for (GSList *l = list; l != NULL; l = l->next) {
curve = (SPCurve *) l->data;
- Inkscape::XML::Node *repr = sp_repr_new("svg:path");
+ Inkscape::XML::Node *repr = parent->document()->createElement("svg:path");
repr->setAttribute("style", style);
gchar *str = sp_svg_write_path(SP_CURVE_BPATH(curve));
repr->setAttribute("style", style);
gchar *str = sp_svg_write_path(SP_CURVE_BPATH(curve));
if (did) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_BREAK_APART,
if (did) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_BREAK_APART,
- _("Break Apart"));
+ _("Break apart"));
} else {
sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No path(s)</b> to break apart in the selection."));
return;
} else {
sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No path(s)</b> to break apart in the selection."));
return;
if (interactive) {
if (did) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_OBJECT_TO_CURVE,
if (interactive) {
if (did) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_OBJECT_TO_CURVE,
- _("Object to Path"));
+ _("Object to path"));
} else {
sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No objects</b> to convert to path in the selection."));
return;
} else {
sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No objects</b> to convert to path in the selection."));
return;
if (!curve)
return NULL;
if (!curve)
return NULL;
- Inkscape::XML::Node *repr = sp_repr_new("svg:path");
+ Inkscape::XML::Document *xml_doc = SP_OBJECT_REPR(item)->document();
+ Inkscape::XML::Node *repr = xml_doc->createElement("svg:path");
/* Transformation */
repr->setAttribute("transform", SP_OBJECT_REPR(item)->attribute("transform"));
/* Style */
/* Transformation */
repr->setAttribute("transform", SP_OBJECT_REPR(item)->attribute("transform"));
/* Style */
if (did) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_REVERSE,
if (did) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_REVERSE,
- /* TODO: annotate */ "path-chemistry.cpp:378");
+ _("Reverse path"));
} else {
sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No paths</b> to reverse in the selection."));
}
} else {
sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No paths</b> to reverse in the selection."));
}