Merge lp:~inkscape+alexander/inkscape/move-boolops into lp:~inkscape.dev/inkscape/trunk

Proposed by Alexander Brock on 2016-11-09
Status: Merged
Approved by: Mc on 2016-11-09
Approved revision: no longer in the source branch.
Merged at revision: 15232
Proposed branch: lp:~inkscape+alexander/inkscape/move-boolops
Merge into: lp:~inkscape.dev/inkscape/trunk
Diff against target: 545 lines (+128/-171)
11 files modified
src/livarot/LivarotDefs.h (+0/-12)
src/livarot/Shape.h (+1/-0)
src/livarot/int-line.h (+1/-0)
src/object-set.h (+36/-1)
src/splivarot.cpp (+72/-121)
src/splivarot.h (+1/-20)
src/ui/tools/calligraphic-tool.cpp (+2/-2)
src/ui/tools/eraser-tool.cpp (+6/-6)
src/ui/tools/flood-tool.cpp (+1/-1)
src/ui/tools/spray-tool.cpp (+2/-2)
src/verbs.cpp (+6/-6)
To merge this branch: bzr merge lp:~inkscape+alexander/inkscape/move-boolops
Reviewer Review Type Date Requested Status
Mc 2016-11-09 Pending
Review via email: mp+310388@code.launchpad.net

Description of the change

Move boolop functions from sp_selected_path_<op> to ObjectSet::path<op>

To post a comment you must log in.
15230. By Tavmjong Bah on 2016-11-09

Enable swapping of fill and stroke when one is a mesh.

15231. By Tavmjong Bah on 2016-11-09

Click-drag selects nodes rather than creates new mesh if mesh already exists.

15232. By Mc on 2016-11-09

merge boolop branch: Move boolop functions from sp_selected_path_<op> to ObjectSet::path<op>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/livarot/LivarotDefs.h'
2--- src/livarot/LivarotDefs.h 2016-04-11 12:56:03 +0000
3+++ src/livarot/LivarotDefs.h 2016-11-09 00:34:30 +0000
4@@ -40,18 +40,6 @@
5 found_between = 4
6 };
7
8-// boolean operation
9-enum bool_op
10-{
11- bool_op_union, // A OR B
12- bool_op_inters, // A AND B
13- bool_op_diff, // A \ B
14- bool_op_symdiff, // A XOR B
15- bool_op_cut, // coupure (pleines)
16- bool_op_slice // coupure (contour)
17-};
18-typedef enum bool_op BooleanOp;
19-
20 // types of cap for stroking polylines
21 enum butt_typ
22 {
23
24=== modified file 'src/livarot/Shape.h'
25--- src/livarot/Shape.h 2014-03-30 22:08:13 +0000
26+++ src/livarot/Shape.h 2016-11-09 00:34:30 +0000
27@@ -17,6 +17,7 @@
28 #include <2geom/point.h>
29
30 #include "livarot/LivarotDefs.h"
31+#include "object-set.h"
32
33 class Path;
34 class FloatLigne;
35
36=== modified file 'src/livarot/int-line.h'
37--- src/livarot/int-line.h 2011-10-04 05:43:09 +0000
38+++ src/livarot/int-line.h 2016-11-09 00:34:30 +0000
39@@ -2,6 +2,7 @@
40 #define INKSCAPE_LIVAROT_INT_LINE_H
41
42 #include "livarot/LivarotDefs.h"
43+#include "object-set.h"
44
45 /** \file
46 * Coverage with integer boundaries.
47
48=== modified file 'src/object-set.h'
49--- src/object-set.h 2016-11-06 22:07:52 +0000
50+++ src/object-set.h 2016-11-09 00:34:30 +0000
51@@ -33,6 +33,29 @@
52 #include "sp-item-group.h"
53 #include "desktop.h"
54 #include "document.h"
55+#include "verbs.h"
56+
57+enum BoolOpErrors {
58+ DONE,
59+ DONE_NO_PATH,
60+ DONE_NO_ACTION,
61+ ERR_TOO_LESS_PATHS_1,
62+ ERR_TOO_LESS_PATHS_2,
63+ ERR_NO_PATHS,
64+ ERR_Z_ORDER
65+};
66+
67+// boolean operation
68+enum bool_op
69+{
70+ bool_op_union, // A OR B
71+ bool_op_inters, // A AND B
72+ bool_op_diff, // A \ B
73+ bool_op_symdiff, // A XOR B
74+ bool_op_cut, // coupure (pleines)
75+ bool_op_slice // coupure (contour)
76+};
77+typedef enum bool_op BooleanOp;
78
79 class SPBox3D;
80 class Persp3D;
81@@ -376,7 +399,16 @@
82 void toCurves(bool skip_undo = false);
83 void toLPEItems();
84 void pathReverse();
85-
86+
87+ // Boolean operations
88+ // in splivarot.cpp
89+ bool pathUnion(const bool skip_undo = false);
90+ bool pathIntersect(const bool skip_undo = false);
91+ bool pathDiff(const bool skip_undo = false);
92+ bool pathSymDiff(const bool skip_undo = false);
93+ bool pathCut(const bool skip_undo = false);
94+ bool pathSlice(const bool skip_undo = false);
95+
96 //Other path operations
97 //in selection-chemistry.cpp
98 void toMarker(bool apply = true);
99@@ -438,6 +470,9 @@
100 std::list<SPBox3D *> _3dboxes;
101 std::unordered_map<SPObject*, sigc::connection> _releaseConnections;
102
103+private:
104+ BoolOpErrors pathBoolOp(bool_op bop, const bool skip_undo, const unsigned int verb = SP_VERB_NONE, const Glib::ustring description = "");
105+
106 };
107
108 typedef ObjectSet::SPItemRange SPItemRange;
109
110=== modified file 'src/splivarot.cpp'
111--- src/splivarot.cpp 2016-09-02 19:32:55 +0000
112+++ src/splivarot.cpp 2016-11-09 00:34:30 +0000
113@@ -47,96 +47,51 @@
114 #include "verbs.h"
115 #include "2geom/svg-path-parser.h" // to get from SVG on boolean to Geom::Path
116
117-enum BoolOpErrors {
118- DONE,
119- DONE_NO_PATH,
120- DONE_NO_ACTION,
121- ERR_TOO_LESS_PATHS_1,
122- ERR_TOO_LESS_PATHS_2,
123- ERR_NO_PATHS,
124- ERR_Z_ORDER
125-};
126-
127 using Inkscape::DocumentUndo;
128
129 bool Ancetre(Inkscape::XML::Node *a, Inkscape::XML::Node *who);
130
131-void sp_selected_path_boolop_ui(Inkscape::Selection *selection, SPDesktop *desktop, bool_op bop,
132- const unsigned int verb = SP_VERB_NONE, const Glib::ustring description = "");
133-BoolOpErrors sp_selected_path_boolop(Inkscape::ObjectSet *set, bool_op bop);
134 void sp_selected_path_do_offset(SPDesktop *desktop, bool expand, double prefOffset);
135 void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool updating);
136
137-void
138-sp_selected_path_union(Inkscape::Selection *selection, SPDesktop *desktop)
139-{
140- sp_selected_path_boolop_ui(selection, desktop, bool_op_union, SP_VERB_SELECTION_UNION, _("Union"));
141-}
142-
143-void
144-sp_selected_path_union_skip_undo(Inkscape::ObjectSet *set)
145-{
146- sp_selected_path_boolop(set, bool_op_union);
147-}
148-
149-void
150-sp_selected_path_intersect(Inkscape::Selection *selection, SPDesktop *desktop)
151-{
152- sp_selected_path_boolop_ui(selection, desktop, bool_op_inters, SP_VERB_SELECTION_INTERSECT, _("Intersection"));
153-}
154-
155-void
156-sp_selected_path_intersect_skip_undo(Inkscape::ObjectSet *set)
157-{
158- sp_selected_path_boolop(set, bool_op_inters);
159-}
160-
161-void
162-sp_selected_path_diff(Inkscape::Selection *selection, SPDesktop *desktop)
163-{
164- sp_selected_path_boolop_ui(selection, desktop, bool_op_diff, SP_VERB_SELECTION_DIFF, _("Difference"));
165-}
166-
167-void
168-sp_selected_path_diff_skip_undo(Inkscape::ObjectSet *set)
169-{
170- sp_selected_path_boolop(set, bool_op_diff);
171-}
172-
173-void
174-sp_selected_path_symdiff(Inkscape::Selection *selection, SPDesktop *desktop)
175-{
176- sp_selected_path_boolop_ui(selection, desktop, bool_op_symdiff, SP_VERB_SELECTION_SYMDIFF, _("Exclusion"));
177-}
178-
179-void
180-sp_selected_path_symdiff_skip_undo(Inkscape::ObjectSet *set)
181-{
182- sp_selected_path_boolop(set, bool_op_symdiff);
183-}
184-
185-void
186-sp_selected_path_cut(Inkscape::Selection *selection, SPDesktop *desktop)
187-{
188- sp_selected_path_boolop_ui(selection, desktop, bool_op_cut, SP_VERB_SELECTION_CUT, _("Division"));
189-}
190-
191-void
192-sp_selected_path_cut_skip_undo(Inkscape::ObjectSet *set)
193-{
194- sp_selected_path_boolop(set, bool_op_cut);
195-}
196-
197-void
198-sp_selected_path_slice(Inkscape::Selection *selection, SPDesktop *desktop)
199-{
200- sp_selected_path_boolop_ui(selection, desktop, bool_op_slice, SP_VERB_SELECTION_SLICE, _("Cut path"));
201-}
202-
203-void
204-sp_selected_path_slice_skip_undo(Inkscape::ObjectSet *set)
205-{
206- sp_selected_path_boolop(set, bool_op_slice);
207+bool Inkscape::ObjectSet::pathUnion(const bool skip_undo) {
208+ BoolOpErrors result = pathBoolOp(bool_op_union, skip_undo, SP_VERB_SELECTION_UNION, _("Union"));
209+ return DONE == result;
210+}
211+
212+bool
213+Inkscape::ObjectSet::pathIntersect(const bool skip_undo)
214+{
215+ BoolOpErrors result = pathBoolOp(bool_op_inters, skip_undo, SP_VERB_SELECTION_INTERSECT, _("Intersection"));
216+ return DONE == result;
217+}
218+
219+bool
220+Inkscape::ObjectSet::pathDiff(const bool skip_undo)
221+{
222+ BoolOpErrors result = pathBoolOp(bool_op_diff, skip_undo, SP_VERB_SELECTION_DIFF, _("Difference"));
223+ return DONE == result;
224+}
225+
226+bool
227+Inkscape::ObjectSet::pathSymDiff(const bool skip_undo)
228+{
229+ BoolOpErrors result = pathBoolOp(bool_op_symdiff, skip_undo, SP_VERB_SELECTION_SYMDIFF, _("Exclusion"));
230+ return DONE == result;
231+}
232+
233+bool
234+Inkscape::ObjectSet::pathCut(const bool skip_undo)
235+{
236+ BoolOpErrors result = pathBoolOp(bool_op_cut, skip_undo, SP_VERB_SELECTION_CUT, _("Division"));
237+ return DONE == result;
238+}
239+
240+bool
241+Inkscape::ObjectSet::pathSlice(const bool skip_undo)
242+{
243+ BoolOpErrors result = pathBoolOp(bool_op_slice, skip_undo, SP_VERB_SELECTION_SLICE, _("Cut path"));
244+ return DONE == result;
245 }
246
247 // helper for printing error messages, regardless of whether we have a GUI or not
248@@ -352,10 +307,36 @@
249
250 // boolean operations on the desktop
251 // take the source paths from the file, do the operation, delete the originals and add the results
252-BoolOpErrors sp_selected_path_boolop(Inkscape::ObjectSet * set, bool_op bop)
253+BoolOpErrors Inkscape::ObjectSet::pathBoolOp(bool_op bop, const bool skip_undo, const unsigned int verb, const Glib::ustring description)
254 {
255- SPDocument *doc = set->desktop()->getDocument();
256- std::vector<SPItem*> il(set->items().begin(), set->items().end());
257+ if (nullptr != desktop() && !skip_undo) {
258+ SPDocument *doc = desktop()->getDocument();
259+ BoolOpErrors returnCode = ObjectSet::pathBoolOp(bop, true);
260+ switch(returnCode) {
261+ case ERR_TOO_LESS_PATHS_1:
262+ boolop_display_error_message(desktop(), _("Select <b>at least 1 path</b> to perform a boolean union."));
263+ break;
264+ case ERR_TOO_LESS_PATHS_2:
265+ boolop_display_error_message(desktop(), _("Select <b>at least 2 paths</b> to perform a boolean operation."));
266+ break;
267+ case ERR_NO_PATHS:
268+ boolop_display_error_message(desktop(), _("One of the objects is <b>not a path</b>, cannot perform boolean operation."));
269+ break;
270+ case ERR_Z_ORDER:
271+ boolop_display_error_message(desktop(), _("Unable to determine the <b>z-order</b> of the objects selected for difference, XOR, division, or path cut."));
272+ break;
273+ case DONE_NO_PATH:
274+ DocumentUndo::done(doc, SP_VERB_NONE, description);
275+ break;
276+ case DONE:
277+ DocumentUndo::done(doc, verb, description);
278+ break;
279+ }
280+ return returnCode;
281+ }
282+
283+ SPDocument *doc = document();
284+ std::vector<SPItem*> il(items().begin(), items().end());
285
286 // allow union on a single object for the purpose of removing self overlapse (svn log, revision 13334)
287 if (il.size() < 2 && bop != bool_op_union) {
288@@ -687,7 +668,7 @@
289 for (std::vector<SPItem*>::const_iterator l = il.begin(); l != il.end(); l++){
290 (*l)->deleteObject();
291 }
292- set->clear();
293+ clear();
294
295 delete res;
296 return DONE_NO_PATH;
297@@ -703,7 +684,7 @@
298 }
299 } else {
300 // find out the bottom object
301- std::vector<Inkscape::XML::Node*> sorted(set->xmlNodes().begin(), set->xmlNodes().end());
302+ std::vector<Inkscape::XML::Node*> sorted(xmlNodes().begin(), xmlNodes().end());
303
304 sort(sorted.begin(),sorted.end(),sp_repr_compare_position_bool);
305
306@@ -731,7 +712,7 @@
307 gchar *title = source->title();
308 gchar *desc = source->desc();
309 // remove source paths
310- set->clear();
311+ clear();
312 for (std::vector<SPItem*>::const_iterator l = il.begin(); l != il.end(); l++){
313 // if this is the bottommost object,
314 if (!strcmp(reinterpret_cast<SPObject *>(*l)->getRepr()->attribute("id"), id)) {
315@@ -810,7 +791,7 @@
316 // move to the saved position
317 repr->setPosition(pos > 0 ? pos : 0);
318
319- set->add(doc->getObjectByRepr(repr));
320+ add(doc->getObjectByRepr(repr));
321 Inkscape::GC::release(repr);
322
323 delete resPath[i];
324@@ -845,7 +826,7 @@
325 }
326 repr->setPosition(pos > 0 ? pos : 0);
327
328- set->add(doc->getObjectByRepr(repr));
329+ add(doc->getObjectByRepr(repr));
330 Inkscape::GC::release(repr);
331 }
332
333@@ -858,36 +839,6 @@
334 return DONE;
335 }
336
337-void sp_selected_path_boolop_ui(Inkscape::Selection *selection, SPDesktop *desktop, bool_op bop, const unsigned int verb,
338- const Glib::ustring description)
339-{
340- SPDocument *doc = selection->desktop()->getDocument();
341- BoolOpErrors returnCode = sp_selected_path_boolop(selection, bop);
342- switch(returnCode) {
343- case ERR_TOO_LESS_PATHS_1:
344- boolop_display_error_message(desktop, _("Select <b>at least 1 path</b> to perform a boolean union."));
345- return;
346- case ERR_TOO_LESS_PATHS_2:
347- boolop_display_error_message(desktop, _("Select <b>at least 2 paths</b> to perform a boolean operation."));
348- return;
349- case ERR_NO_PATHS:
350- boolop_display_error_message(desktop, _("One of the objects is <b>not a path</b>, cannot perform boolean operation."));
351- return;
352- case ERR_Z_ORDER:
353- boolop_display_error_message(desktop, _("Unable to determine the <b>z-order</b> of the objects selected for difference, XOR, division, or path cut."));
354- return;
355- case DONE_NO_PATH:
356- DocumentUndo::done(doc, SP_VERB_NONE, description);
357- return;
358- case DONE:
359- DocumentUndo::done(doc, verb, description);
360- return;
361- case DONE_NO_ACTION:
362- default:
363- return;
364- }
365-}
366-
367 static
368 void sp_selected_path_outline_add_marker( SPObject *marker_object, Geom::Affine marker_transform,
369 Geom::Scale stroke_scale, Geom::Affine transform,
370
371=== modified file 'src/splivarot.h'
372--- src/splivarot.h 2016-08-09 09:33:34 +0000
373+++ src/splivarot.h 2016-11-09 00:34:30 +0000
374@@ -10,6 +10,7 @@
375 #include <2geom/forward.h>
376 #include <2geom/path.h>
377 #include "livarot/Path.h"
378+#include "object-set.h"
379
380 class SPCurve;
381 class SPDesktop;
382@@ -20,26 +21,6 @@
383 class ObjectSet;
384 }
385
386-// boolean operations
387-// work on the current selection
388-// selection has 2 contain exactly 2 items
389-
390-// UPDATE: these signatures have been modified so they may work in
391-// command-line mode, i.e. without a desktop. If a desktop is not
392-// provided (desktop == NULL), error messages will be shown on stderr.
393-void sp_selected_path_union (Inkscape::Selection *selection, SPDesktop *desktop);
394-void sp_selected_path_union_skip_undo (Inkscape::ObjectSet *set);
395-void sp_selected_path_intersect (Inkscape::Selection *selection, SPDesktop *desktop);
396-void sp_selected_path_intersect_skip_undo (Inkscape::ObjectSet *set);
397-void sp_selected_path_diff (Inkscape::Selection *selection, SPDesktop *desktop);
398-void sp_selected_path_diff_skip_undo (Inkscape::ObjectSet *set);
399-void sp_selected_path_symdiff (Inkscape::Selection *selection, SPDesktop *desktop);
400-void sp_selected_path_symdiff_skip_undo (Inkscape::ObjectSet *set);
401-void sp_selected_path_cut (Inkscape::Selection *selection, SPDesktop *desktop);
402-void sp_selected_path_cut_skip_undo (Inkscape::ObjectSet *set);
403-void sp_selected_path_slice (Inkscape::Selection *selection, SPDesktop *desktop);
404-void sp_selected_path_slice_skip_undo (Inkscape::ObjectSet *set);
405-
406 // offset/inset of a curve
407 // takes the fill-rule in consideration
408 // offset amount is the stroke-width of the curve
409
410=== modified file 'src/ui/tools/calligraphic-tool.cpp'
411--- src/ui/tools/calligraphic-tool.cpp 2016-08-29 20:39:07 +0000
412+++ src/ui/tools/calligraphic-tool.cpp 2016-11-09 00:34:30 +0000
413@@ -921,10 +921,10 @@
414
415 if (unionize) {
416 desktop->getSelection()->add(this->repr);
417- sp_selected_path_union_skip_undo(desktop->getSelection());
418+ desktop->getSelection()->pathUnion(true);
419 } else if (subtract) {
420 desktop->getSelection()->add(this->repr);
421- sp_selected_path_diff_skip_undo(desktop->getSelection());
422+ desktop->getSelection()->pathDiff(true);
423 } else {
424 if (this->keep_selected) {
425 desktop->getSelection()->set(this->repr);
426
427=== modified file 'src/ui/tools/eraser-tool.cpp'
428--- src/ui/tools/eraser-tool.cpp 2016-10-24 22:58:43 +0000
429+++ src/ui/tools/eraser-tool.cpp 2016-11-09 00:34:30 +0000
430@@ -714,7 +714,7 @@
431 Inkscape::GC::release(dup); // parent takes over
432 selection->set(dup);
433 if (!this->nowidth) {
434- sp_selected_path_union_skip_undo(selection);
435+ selection->pathUnion(true);
436 }
437 selection->add(item);
438 if(item->style->fill_rule.value == SP_WIND_RULE_EVENODD){
439@@ -725,9 +725,9 @@
440 css = 0;
441 }
442 if (this->nowidth) {
443- sp_selected_path_cut_skip_undo(selection);
444+ selection->pathCut(true);
445 } else {
446- sp_selected_path_diff_skip_undo(selection);
447+ selection->pathDiff(true);
448 }
449 workDone = true; // TODO set this only if something was cut.
450 bool break_apart = prefs->getBool("/tools/eraser/break_apart", false);
451@@ -762,7 +762,7 @@
452 this->repr->parent()->appendChild(dup);
453 Inkscape::GC::release(dup); // parent takes over
454 selection->set(dup);
455- sp_selected_path_union_skip_undo(selection);
456+ selection->pathUnion(true);
457 if (bbox && bbox->intersects(*eraserBbox)) {
458 SPClipPath *clip_path = item->clip_ref->getObject();
459 if (clip_path) {
460@@ -786,7 +786,7 @@
461 sp_object_unref(clip_path);
462 selection->raiseToTop(true);
463 selection->add(dup_clip);
464- sp_selected_path_diff_skip_undo(selection);
465+ selection->pathDiff(true);
466 SPItem * clip = SP_ITEM(*(selection->items().begin()));
467 }
468 }
469@@ -802,7 +802,7 @@
470 rect->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
471 selection->raiseToTop(true);
472 selection->add(rect);
473- sp_selected_path_diff_skip_undo(selection);
474+ selection->pathDiff(true);
475 }
476 selection->raiseToTop(true);
477 selection->add(item);
478
479=== modified file 'src/ui/tools/flood-tool.cpp'
480--- src/ui/tools/flood-tool.cpp 2016-08-03 14:56:48 +0000
481+++ src/ui/tools/flood-tool.cpp 2016-11-09 00:34:30 +0000
482@@ -446,7 +446,7 @@
483 ngettext("Area filled, path with <b>%d</b> node created and unioned with selection.","Area filled, path with <b>%d</b> nodes created and unioned with selection.",
484 SP_PATH(reprobj)->nodesInPath()), SP_PATH(reprobj)->nodesInPath() );
485 selection->add(reprobj);
486- sp_selected_path_union_skip_undo(desktop->getSelection());
487+ selection->pathUnion(true);
488 } else {
489 desktop->messageStack()->flashF( Inkscape::WARNING_MESSAGE,
490 ngettext("Area filled, path with <b>%d</b> node created.","Area filled, path with <b>%d</b> nodes created.",
491
492=== modified file 'src/ui/tools/spray-tool.cpp'
493--- src/ui/tools/spray-tool.cpp 2016-08-03 14:56:48 +0000
494+++ src/ui/tools/spray-tool.cpp 2016-11-09 00:34:30 +0000
495@@ -1026,7 +1026,7 @@
496 if (unionResult) { // No need to add the very first item (initialized with NULL).
497 set->add(unionResult);
498 }
499- sp_selected_path_union_skip_undo(set);
500+ set->pathUnion(true);
501 set->add(parent_item);
502 Inkscape::GC::release(copy);
503 did = true;
504@@ -1364,7 +1364,7 @@
505 SP_VERB_CONTEXT_SPRAY, _("Spray with clones"));
506 break;
507 case SPRAY_MODE_SINGLE_PATH:
508- sp_selected_path_union_skip_undo(objectSet());
509+ objectSet()->pathUnion(true);
510 desktop->getSelection()->add(object_set.objects().begin(), object_set.objects().end());
511 DocumentUndo::done(this->desktop->getDocument(),
512 SP_VERB_CONTEXT_SPRAY, _("Spray in single path"));
513
514=== modified file 'src/verbs.cpp'
515--- src/verbs.cpp 2016-11-06 22:07:52 +0000
516+++ src/verbs.cpp 2016-11-09 00:34:30 +0000
517@@ -1115,22 +1115,22 @@
518 bool handled = true;
519 switch (reinterpret_cast<std::size_t>(data)) {
520 case SP_VERB_SELECTION_UNION:
521- sp_selected_path_union(selection, dt);
522+ selection->pathUnion();
523 break;
524 case SP_VERB_SELECTION_INTERSECT:
525- sp_selected_path_intersect(selection, dt);
526+ selection->pathIntersect();
527 break;
528 case SP_VERB_SELECTION_DIFF:
529- sp_selected_path_diff(selection, dt);
530+ selection->pathDiff();
531 break;
532 case SP_VERB_SELECTION_SYMDIFF:
533- sp_selected_path_symdiff(selection, dt);
534+ selection->pathSymDiff();
535 break;
536 case SP_VERB_SELECTION_CUT:
537- sp_selected_path_cut(selection, dt);
538+ selection->pathCut();
539 break;
540 case SP_VERB_SELECTION_SLICE:
541- sp_selected_path_slice(selection, dt);
542+ selection->pathSlice();
543 break;
544 case SP_VERB_SELECTION_GROW:
545 {