index 1fe70b896cdfd351e22e0f8d9ed6ac1290376f04..f8548cdc4eda0fb199276a687c923b59de6597b8 100644 (file)
#include "helper/units.h"
#include "sp-item.h"
#include "unit-constants.h"
+#include "xml/simple-document.h"
+
using NR::X;
using NR::Y;
#include "selection-chemistry.h"
/* fixme: find a better place */
+Inkscape::XML::Document *clipboard_document = NULL;
GSList *clipboard = NULL;
GSList *defs_clipboard = NULL;
SPCSSAttr *style_clipboard = NULL;
NR::Maybe<NR::Rect> size_clipboard;
-static void sp_copy_stuff_used_by_item(GSList **defs_clip, SPItem *item, const GSList *items);
+static void sp_copy_stuff_used_by_item(GSList **defs_clip, SPItem *item, const GSList *items, Inkscape::XML::Document* xml_doc);
/**
* Copies repr and its inherited css style elements, along with the accumulated transform 'full_t',
* then prepends the copy to 'clip'.
*/
-void sp_selection_copy_one (Inkscape::XML::Node *repr, NR::Matrix full_t, GSList **clip)
+void sp_selection_copy_one (Inkscape::XML::Node *repr, NR::Matrix full_t, GSList **clip, Inkscape::XML::Document* xml_doc)
{
- Inkscape::XML::Node *copy = repr->duplicate();
+ Inkscape::XML::Node *copy = repr->duplicate(xml_doc);
// copy complete inherited style
SPCSSAttr *css = sp_repr_css_attr_inherited(repr, "style");
@@ -108,13 +111,13 @@ void sp_selection_copy_one (Inkscape::XML::Node *repr, NR::Matrix full_t, GSList
*clip = g_slist_prepend(*clip, copy);
}
-void sp_selection_copy_impl (const GSList *items, GSList **clip, GSList **defs_clip, SPCSSAttr **style_clip)
+void sp_selection_copy_impl (const GSList *items, GSList **clip, GSList **defs_clip, SPCSSAttr **style_clip, Inkscape::XML::Document* xml_doc)
{
// Copy stuff referenced by all items to defs_clip:
if (defs_clip) {
for (GSList *i = (GSList *) items; i != NULL; i = i->next) {
- sp_copy_stuff_used_by_item (defs_clip, SP_ITEM (i->data), items);
+ sp_copy_stuff_used_by_item (defs_clip, SP_ITEM (i->data), items, xml_doc);
}
*defs_clip = g_slist_reverse(*defs_clip);
}
@@ -132,7 +135,7 @@ void sp_selection_copy_impl (const GSList *items, GSList **clip, GSList **defs_c
// Copy item reprs:
for (GSList *i = (GSList *) sorted_items; i != NULL; i = i->next) {
- sp_selection_copy_one (SP_OBJECT_REPR (i->data), sp_item_i2doc_affine(SP_ITEM (i->data)), clip);
+ sp_selection_copy_one (SP_OBJECT_REPR (i->data), sp_item_i2doc_affine(SP_ITEM (i->data)), clip, xml_doc);
}
*clip = g_slist_reverse(*clip);
Inkscape::XML::Node *repr = (Inkscape::XML::Node *) gl->data;
gchar const *id = repr->attribute("id");
if (!id || !doc->getObjectById(id)) {
- Inkscape::XML::Node *copy = repr->duplicate();
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
+ Inkscape::XML::Node *copy = repr->duplicate(xml_doc);
SP_OBJECT_REPR(defs)->addChild(copy, NULL);
Inkscape::GC::release(copy);
}
}
}
-GSList *sp_selection_paste_impl (SPDocument *document, SPObject *parent, GSList **clip, GSList **defs_clip)
+GSList *sp_selection_paste_impl (SPDocument *doc, SPObject *parent, GSList **clip, GSList **defs_clip)
{
- paste_defs (defs_clip, document);
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
+ paste_defs (defs_clip, doc);
GSList *copied = NULL;
// add objects to document
for (GSList *l = *clip; l != NULL; l = l->next) {
Inkscape::XML::Node *repr = (Inkscape::XML::Node *) l->data;
- Inkscape::XML::Node *copy = repr->duplicate();
+ Inkscape::XML::Node *copy = repr->duplicate(xml_doc);
// premultiply the item transform by the accumulated parent transform in the paste layer
NR::Matrix local = sp_item_i2doc_affine(SP_ITEM(parent));
if (desktop == NULL)
return;
+ Inkscape::XML::Document* xml_doc = sp_document_repr_doc(desktop->doc());
Inkscape::Selection *selection = sp_desktop_selection(desktop);
// check if something is selected
while (reprs) {
Inkscape::XML::Node *parent = ((Inkscape::XML::Node *) reprs->data)->parent();
- Inkscape::XML::Node *copy = ((Inkscape::XML::Node *) reprs->data)->duplicate();
+ Inkscape::XML::Node *copy = ((Inkscape::XML::Node *) reprs->data)->duplicate(xml_doc);
parent->appendChild(copy);
if (desktop == NULL)
return;
- SPDocument *document = sp_desktop_document (desktop);
- Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
+ SPDocument *doc = sp_desktop_document (desktop);
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
Inkscape::XML::Node *current = (Inkscape::XML::Node *) p->data;
if (current->parent() == topmost_parent) {
- Inkscape::XML::Node *spnew = current->duplicate();
+ Inkscape::XML::Node *spnew = current->duplicate(xml_doc);
sp_repr_unparent(current);
group->appendChild(spnew);
Inkscape::GC::release(spnew);
NR::Matrix item_t (NR::identity());
if (t_str)
sp_svg_transform_read(t_str, &item_t);
- item_t *= sp_item_i2doc_affine(SP_ITEM(document->getObjectByRepr(current->parent())));
+ item_t *= sp_item_i2doc_affine(SP_ITEM(doc->getObjectByRepr(current->parent())));
//FIXME: when moving both clone and original from a transformed group (either by
//grouping into another parent, or by cut/paste) the transform from the original's
//parent becomes embedded into original itself, and this affects its clones. Fix
//then, if this is clone, looking up its original in that array and pre-multiplying
//it by the inverse of that original's transform diff.
- sp_selection_copy_one (current, item_t, &temp_clip);
+ sp_selection_copy_one (current, item_t, &temp_clip, xml_doc);
sp_repr_unparent(current);
// paste into topmost_parent (temporarily)
- GSList *copied = sp_selection_paste_impl (document, document->getObjectByRepr(topmost_parent), &temp_clip, NULL);
+ GSList *copied = sp_selection_paste_impl (doc, doc->getObjectByRepr(topmost_parent), &temp_clip, NULL);
if (temp_clip) g_slist_free (temp_clip);
if (copied) { // if success,
// take pasted object (now in topmost_parent)
Inkscape::XML::Node *in_topmost = (Inkscape::XML::Node *) copied->data;
// make a copy
- Inkscape::XML::Node *spnew = in_topmost->duplicate();
+ Inkscape::XML::Node *spnew = in_topmost->duplicate(xml_doc);
// remove pasted
sp_repr_unparent(in_topmost);
// put its copy into group
return NULL;
}
SPObject *parent = SP_OBJECT_PARENT(items->data);
- /* Strictly speaking this CAN happen, if user selects <svg> from XML editor */
+ /* Strictly speaking this CAN happen, if user selects <svg> from Inkscape::XML editor */
if (!SP_IS_GROUP(parent)) {
return NULL;
}
sp_selection_delete();
}
-void sp_copy_gradient (GSList **defs_clip, SPGradient *gradient)
+void sp_copy_gradient (GSList **defs_clip, SPGradient *gradient, Inkscape::XML::Document* xml_doc)
{
SPGradient *ref = gradient;
while (ref) {
// climb up the refs, copying each one in the chain
- Inkscape::XML::Node *grad_repr = SP_OBJECT_REPR(ref)->duplicate();
+ Inkscape::XML::Node *grad_repr = SP_OBJECT_REPR(ref)->duplicate(xml_doc);
*defs_clip = g_slist_prepend (*defs_clip, grad_repr);
ref = ref->ref->getObject();
}
}
-void sp_copy_pattern (GSList **defs_clip, SPPattern *pattern)
+void sp_copy_pattern (GSList **defs_clip, SPPattern *pattern, Inkscape::XML::Document* xml_doc)
{
SPPattern *ref = pattern;
while (ref) {
// climb up the refs, copying each one in the chain
- Inkscape::XML::Node *pattern_repr = SP_OBJECT_REPR(ref)->duplicate();
+ Inkscape::XML::Node *pattern_repr = SP_OBJECT_REPR(ref)->duplicate(xml_doc);
*defs_clip = g_slist_prepend (*defs_clip, pattern_repr);
// items in the pattern may also use gradients and other patterns, so we need to recurse here as well
for (SPObject *child = sp_object_first_child(SP_OBJECT(ref)) ; child != NULL; child = SP_OBJECT_NEXT(child) ) {
if (!SP_IS_ITEM (child))
continue;
- sp_copy_stuff_used_by_item (defs_clip, (SPItem *) child, NULL);
+ sp_copy_stuff_used_by_item (defs_clip, (SPItem *) child, NULL, xml_doc);
}
ref = ref->ref->getObject();
}
}
-void sp_copy_single (GSList **defs_clip, SPObject *thing)
+void sp_copy_single (GSList **defs_clip, SPObject *thing, Inkscape::XML::Document* xml_doc)
{
- Inkscape::XML::Node *duplicate_repr = SP_OBJECT_REPR(thing)->duplicate();
+ Inkscape::XML::Node *duplicate_repr = SP_OBJECT_REPR(thing)->duplicate(xml_doc);
*defs_clip = g_slist_prepend (*defs_clip, duplicate_repr);
}
-void sp_copy_textpath_path (GSList **defs_clip, SPTextPath *tp, const GSList *items)
+void sp_copy_textpath_path (GSList **defs_clip, SPTextPath *tp, const GSList *items, Inkscape::XML::Document* xml_doc)
{
SPItem *path = sp_textpath_get_path_item (tp);
if (!path)
return;
if (items && g_slist_find ((GSList *) items, path)) // do not copy it to defs if it is already in the list of items copied
return;
- Inkscape::XML::Node *repr = SP_OBJECT_REPR(path)->duplicate();
+ Inkscape::XML::Node *repr = SP_OBJECT_REPR(path)->duplicate(xml_doc);
*defs_clip = g_slist_prepend (*defs_clip, repr);
}
/**
* Copies things like patterns, markers, gradients, etc.
*/
-void sp_copy_stuff_used_by_item (GSList **defs_clip, SPItem *item, const GSList *items)
+void sp_copy_stuff_used_by_item (GSList **defs_clip, SPItem *item, const GSList *items, Inkscape::XML::Document* xml_doc)
{
SPStyle *style = SP_OBJECT_STYLE (item);
if (style && (style->fill.type == SP_PAINT_TYPE_PAINTSERVER)) {
SPObject *server = SP_OBJECT_STYLE_FILL_SERVER(item);
if (SP_IS_LINEARGRADIENT (server) || SP_IS_RADIALGRADIENT (server))
- sp_copy_gradient (defs_clip, SP_GRADIENT(server));
+ sp_copy_gradient (defs_clip, SP_GRADIENT(server), xml_doc);
if (SP_IS_PATTERN (server))
- sp_copy_pattern (defs_clip, SP_PATTERN(server));
+ sp_copy_pattern (defs_clip, SP_PATTERN(server), xml_doc);
}
if (style && (style->stroke.type == SP_PAINT_TYPE_PAINTSERVER)) {
SPObject *server = SP_OBJECT_STYLE_STROKE_SERVER(item);
if (SP_IS_LINEARGRADIENT (server) || SP_IS_RADIALGRADIENT (server))
- sp_copy_gradient (defs_clip, SP_GRADIENT(server));
+ sp_copy_gradient (defs_clip, SP_GRADIENT(server), xml_doc);
if (SP_IS_PATTERN (server))
- sp_copy_pattern (defs_clip, SP_PATTERN(server));
+ sp_copy_pattern (defs_clip, SP_PATTERN(server), xml_doc);
}
// For shapes, copy all of the shape's markers into defs_clip
@@ -923,40 +929,40 @@ void sp_copy_stuff_used_by_item (GSList **defs_clip, SPItem *item, const GSList
SPShape *shape = SP_SHAPE (item);
for (int i = 0 ; i < SP_MARKER_LOC_QTY ; i++) {
if (shape->marker[i]) {
- sp_copy_single (defs_clip, SP_OBJECT (shape->marker[i]));
+ sp_copy_single (defs_clip, SP_OBJECT (shape->marker[i]), xml_doc);
}
}
}
if (SP_IS_TEXT_TEXTPATH (item)) {
- sp_copy_textpath_path (defs_clip, SP_TEXTPATH(sp_object_first_child(SP_OBJECT(item))), items);
+ sp_copy_textpath_path (defs_clip, SP_TEXTPATH(sp_object_first_child(SP_OBJECT(item))), items, xml_doc);
}
if (item->clip_ref->getObject()) {
- sp_copy_single (defs_clip, item->clip_ref->getObject());
+ sp_copy_single (defs_clip, item->clip_ref->getObject(), xml_doc);
}
if (item->mask_ref->getObject()) {
SPObject *mask = item->mask_ref->getObject();
- sp_copy_single (defs_clip, mask);
+ sp_copy_single (defs_clip, mask, xml_doc);
// recurse into the mask for its gradients etc.
for (SPObject *o = SP_OBJECT(mask)->children; o != NULL; o = o->next) {
if (SP_IS_ITEM(o))
- sp_copy_stuff_used_by_item (defs_clip, SP_ITEM (o), items);
+ sp_copy_stuff_used_by_item (defs_clip, SP_ITEM (o), items, xml_doc);
}
}
if (style->filter.filter) {
SPObject *filter = style->filter.filter;
if (SP_IS_FILTER(filter)) {
- sp_copy_single (defs_clip, filter);
+ sp_copy_single (defs_clip, filter, xml_doc);
}
}
// recurse
for (SPObject *o = SP_OBJECT(item)->children; o != NULL; o = o->next) {
if (SP_IS_ITEM(o))
- sp_copy_stuff_used_by_item (defs_clip, SP_ITEM (o), items);
+ sp_copy_stuff_used_by_item (defs_clip, SP_ITEM (o), items, xml_doc);
}
}
if (desktop == NULL)
return;
+ if (!clipboard_document) {
+ clipboard_document = new Inkscape::XML::SimpleDocument();
+ }
+
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (tools_isactive (desktop, TOOLS_DROPPER)) {
const GSList *items = g_slist_copy ((GSList *) selection->itemList());
// 0. Copy text to system clipboard
- // FIXME: for non-texts, put serialized XML as text to the clipboard;
+ // FIXME: for non-texts, put serialized Inkscape::XML as text to the clipboard;
//for this sp_repr_write_stream needs to be rewritten with iostream instead of FILE
Glib::ustring text;
if (tools_isactive (desktop, TOOLS_TEXT)) {
clipboard = g_slist_remove(clipboard, clipboard->data);
}
- sp_selection_copy_impl (items, &clipboard, &defs_clipboard, &style_clipboard);
+ sp_selection_copy_impl (items, &clipboard, &defs_clipboard, &style_clipboard, clipboard_document);
if (tools_isactive (desktop, TOOLS_TEXT)) { // take style from cursor/text selection, overwriting the style just set by copy_impl
SPStyle *const query = sp_style_new();
SPObject *next=Inkscape::next_layer(dt->currentRoot(), dt->currentLayer());
if (next) {
GSList *temp_clip = NULL;
- sp_selection_copy_impl (items, &temp_clip, NULL, NULL); // we're in the same doc, so no need to copy defs
+ sp_selection_copy_impl (items, &temp_clip, NULL, NULL, sp_document_repr_doc(dt->doc())); // we're in the same doc, so no need to copy defs
sp_selection_delete_impl (items);
next=Inkscape::next_layer(dt->currentRoot(), dt->currentLayer()); // Fixes bug 1482973: crash while moving layers
GSList *copied;
SPObject *next=Inkscape::previous_layer(dt->currentRoot(), dt->currentLayer());
if (next) {
GSList *temp_clip = NULL;
- sp_selection_copy_impl (items, &temp_clip, NULL, NULL); // we're in the same doc, so no need to copy defs
+ sp_selection_copy_impl (items, &temp_clip, NULL, NULL, sp_document_repr_doc(dt->doc())); // we're in the same doc, so no need to copy defs
sp_selection_delete_impl (items);
next=Inkscape::previous_layer(dt->currentRoot(), dt->currentLayer()); // Fixes bug 1482973: crash while moving layers
GSList *copied;
if (desktop == NULL)
return;
- SPDocument *document = sp_desktop_document(desktop);
- Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
+ SPDocument *doc = sp_desktop_document(desktop);
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
return;
}
- sp_document_ensure_up_to_date(document);
+ sp_document_ensure_up_to_date(doc);
NR::Maybe<NR::Rect> r = selection->bounds();
if ( !r || r->isEmpty() ) {
return;
}
// calculate the transform to be applied to objects to move them to 0,0
- NR::Point move_p = NR::Point(0, sp_document_height(document)) - (r->min() + NR::Point (0, r->extent(NR::Y)));
+ NR::Point move_p = NR::Point(0, sp_document_height(doc)) - (r->min() + NR::Point (0, r->extent(NR::Y)));
move_p[NR::Y] = -move_p[NR::Y];
NR::Matrix move = NR::Matrix (NR::translate (move_p));
// create a list of duplicates
GSList *repr_copies = NULL;
for (GSList *i = items; i != NULL; i = i->next) {
- Inkscape::XML::Node *dup = (SP_OBJECT_REPR (i->data))->duplicate();
+ Inkscape::XML::Node *dup = (SP_OBJECT_REPR (i->data))->duplicate(xml_doc);
repr_copies = g_slist_prepend (repr_copies, dup);
}
int saved_compensation = prefs_get_int_attribute("options.clonecompensation", "value", SP_CLONE_COMPENSATION_UNMOVED);
prefs_set_int_attribute("options.clonecompensation", "value", SP_CLONE_COMPENSATION_UNMOVED);
- const gchar *pat_id = pattern_tile (repr_copies, bounds, document,
+ const gchar *pat_id = pattern_tile (repr_copies, bounds, doc,
NR::Matrix(NR::translate(desktop->dt2doc(NR::Point(r->min()[NR::X], r->max()[NR::Y])))) * parent_transform.inverse(), parent_transform * move);
// restore compensation setting
g_slist_free (items);
- sp_document_done (document, SP_VERB_EDIT_TILE,
+ sp_document_done (doc, SP_VERB_EDIT_TILE,
_("Objects to pattern"));
}
if (desktop == NULL)
return;
- SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
pat_transform *= item->transform;
for (SPObject *child = sp_object_first_child(SP_OBJECT(pattern)) ; child != NULL; child = SP_OBJECT_NEXT(child) ) {
- Inkscape::XML::Node *copy = SP_OBJECT_REPR(child)->duplicate();
+ Inkscape::XML::Node *copy = SP_OBJECT_REPR(child)->duplicate(xml_doc);
SPItem *i = SP_ITEM (desktop->currentLayer()->appendChildRepr(copy));
// FIXME: relink clones to the new canvas objects
// use SPObject::setid when mental finishes it to steal ids of
// this is needed to make sure the new item has curve (simply requestDisplayUpdate does not work)
- sp_document_ensure_up_to_date (document);
+ sp_document_ensure_up_to_date (doc);
NR::Matrix transform( i->transform * pat_transform );
sp_item_write_transform(i, SP_OBJECT_REPR(i), transform);
if (desktop == NULL)
return;
- SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
}
// /END FIXME
- sp_document_ensure_up_to_date(document);
+ sp_document_ensure_up_to_date(doc);
GSList *items = g_slist_copy((GSList *) selection->itemList());
apply_to_items = g_slist_prepend (apply_to_items, desktop->currentLayer());
for (GSList *i = items; i != NULL; i = i->next) {
- Inkscape::XML::Node *dup = (SP_OBJECT_REPR (i->data))->duplicate();
+ Inkscape::XML::Node *dup = (SP_OBJECT_REPR (i->data))->duplicate(xml_doc);
mask_items = g_slist_prepend (mask_items, dup);
if (remove_original) {
} else if (!topmost) {
// topmost item is used as a mask, which is applied to other items in a selection
GSList *i = items;
- Inkscape::XML::Node *dup = (SP_OBJECT_REPR (i->data))->duplicate();
+ Inkscape::XML::Node *dup = (SP_OBJECT_REPR (i->data))->duplicate(xml_doc);
mask_items = g_slist_prepend (mask_items, dup);
if (remove_original) {
apply_to_items = g_slist_prepend (apply_to_items, i->data);
}
- Inkscape::XML::Node *dup = (SP_OBJECT_REPR (i->data))->duplicate();
+ Inkscape::XML::Node *dup = (SP_OBJECT_REPR (i->data))->duplicate(xml_doc);
mask_items = g_slist_prepend (mask_items, dup);
if (remove_original) {
GSList *mask_items_dup = NULL;
for (GSList *mask_item = mask_items; NULL != mask_item; mask_item = mask_item->next) {
- Inkscape::XML::Node *dup = reinterpret_cast<Inkscape::XML::Node *>(mask_item->data)->duplicate();
+ Inkscape::XML::Node *dup = reinterpret_cast<Inkscape::XML::Node *>(mask_item->data)->duplicate(xml_doc);
mask_items_dup = g_slist_prepend (mask_items_dup, dup);
}
const gchar *mask_id = NULL;
if (apply_clip_path) {
- mask_id = sp_clippath_create(mask_items_dup, document, &maskTransform);
+ mask_id = sp_clippath_create(mask_items_dup, doc, &maskTransform);
} else {
- mask_id = sp_mask_create(mask_items_dup, document, &maskTransform);
+ mask_id = sp_mask_create(mask_items_dup, doc, &maskTransform);
}
g_slist_free (mask_items_dup);
g_slist_free (items_to_delete);
if (apply_clip_path)
- sp_document_done (document, SP_VERB_OBJECT_SET_CLIPPATH, _("Set clipping path"));
+ sp_document_done (doc, SP_VERB_OBJECT_SET_CLIPPATH, _("Set clipping path"));
else
- sp_document_done (document, SP_VERB_OBJECT_SET_MASK, _("Set mask"));
+ sp_document_done (doc, SP_VERB_OBJECT_SET_MASK, _("Set mask"));
}
void sp_selection_unset_mask(bool apply_clip_path) {
if (desktop == NULL)
return;
- SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
// check if something is selected
}
bool remove_original = prefs_get_int_attribute ("options.maskobject", "remove", 1);
- sp_document_ensure_up_to_date(document);
+ sp_document_ensure_up_to_date(doc);
gchar const* attributeName = apply_clip_path ? "clip-path" : "mask";
std::map<SPObject*,SPItem*> referenced_objects;
SPObject *obj = (*it).first;
GSList *items_to_move = NULL;
for (SPObject *child = sp_object_first_child(obj) ; child != NULL; child = SP_OBJECT_NEXT(child) ) {
- Inkscape::XML::Node *copy = SP_OBJECT_REPR(child)->duplicate();
+ Inkscape::XML::Node *copy = SP_OBJECT_REPR(child)->duplicate(xml_doc);
items_to_move = g_slist_prepend (items_to_move, copy);
}
}
if (apply_clip_path)
- sp_document_done (document, SP_VERB_OBJECT_UNSET_CLIPPATH, _("Release clipping path"));
+ sp_document_done (doc, SP_VERB_OBJECT_UNSET_CLIPPATH, _("Release clipping path"));
else
- sp_document_done (document, SP_VERB_OBJECT_UNSET_MASK, _("Release mask"));
+ sp_document_done (doc, SP_VERB_OBJECT_UNSET_MASK, _("Release mask"));
}
void fit_canvas_to_selection(SPDesktop *desktop) {