summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b420c5)
raw | patch | inline | side by side (parent: 1b420c5)
author | Jon A. Cruz <jon@joncruz.org> | |
Fri, 19 Mar 2010 06:21:16 +0000 (23:21 -0700) | ||
committer | Jon A. Cruz <jon@joncruz.org> | |
Fri, 19 Mar 2010 06:21:16 +0000 (23:21 -0700) |
index ba6c067c0eb7513c8f708813a106c6d688af5667..b0e19219039824807761ce3bcb00470e5f6ae5d4 100644 (file)
@@ -233,6 +233,9 @@ static void shape_event_attr_changed(Inkscape::XML::Node *repr, gchar const *nam
gpointer data);
+static char* cc_knot_tips[] = { _("<b>Connection point</b>: click or drag to create a new connector"),
+ _("<b>Connection point</b>: click to select, drag to move") };
+
/*static Geom::Point connector_drag_origin_w(0, 0);
static bool connector_within_tolerance = false;*/
static SPEventContextClass *parent_class;
index bc16609de61165387aa22e1e5f8451348da88dab..bd3805e9603ad797976c40255cb1e55cd24bf3b5 100644 (file)
--- a/src/connector-context.h
+++ b/src/connector-context.h
SP_CONNECTOR_CONTEXT_DRAWING_MODE,
SP_CONNECTOR_CONTEXT_EDITING_MODE
};
-static char* cc_knot_tips[] = { _("<b>Connection point</b>: click or drag to create a new connector"),
- _("<b>Connection point</b>: click to select, drag to move") };
typedef std::map<SPKnot *, ConnectionPoint> ConnectionPointMap;
SPCanvasItem *red_bpath;
SPCurve *red_curve;
guint32 red_color;
-
+
// Green curve
SPCurve *green_curve;
-
+
// The new connector
SPItem *newconn;
Avoid::ConnRef *newConnRef;
gdouble curvature;
bool isOrthogonal;
-
+
// The active shape
SPItem *active_shape;
Inkscape::XML::Node *active_shape_repr;
Inkscape::XML::Node *active_conn_repr;
sigc::connection sel_changed_connection;
-
+
// The activehandle
SPKnot *active_handle;
SPItem *clickeditem;
SPKnot *clickedhandle;
-
+
ConnectionPointMap connpthandles;
SPKnot *endpt_handle[2];
guint endpt_handler_id[2];
index 94540a25523325831e6a88be3846cf2db8b0f25a..d8d5b0a7ccbba05e80a89c3cc23c516ebd707098 100644 (file)
PathParam::on_paste_button_click()
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
- Glib::ustring svgd = cm->getPathParameter();
+ Glib::ustring svgd = cm->getPathParameter(SP_ACTIVE_DESKTOP);
paste_param_path(svgd.data());
sp_document_done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
_("Paste path parameter"));
PathParam::on_link_button_click()
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
- Glib::ustring pathid = cm->getShapeOrTextObjectId();
+ Glib::ustring pathid = cm->getShapeOrTextObjectId(SP_ACTIVE_DESKTOP);
if (pathid == "") {
return;
index 5d63943160656b7e43be059719fc6264747c4148..17875075e0d5d2d8008152d012db00d762c05c91 100644 (file)
void sp_selection_group_impl(GSList const *reprs_to_group, Inkscape::XML::Node *group, Inkscape::XML::Document *xml_doc, SPDocument *doc) {
GSList *p = g_slist_copy((GSList *) reprs_to_group);
-
+
p = g_slist_sort(p, (GCompareFunc) sp_repr_compare_position);
-
+
// Remember the position and parent of the topmost object.
gint topmost = ((Inkscape::XML::Node *) g_slist_last(p)->data)->position();
Inkscape::XML::Node *topmost_parent = ((Inkscape::XML::Node *) g_slist_last(p)->data)->parent();
-
+
while (p) {
Inkscape::XML::Node *current = (Inkscape::XML::Node *) p->data;
GSList const *l = (GSList *) selection->reprList();
-
+
Inkscape::XML::Node *group = xml_doc->createElement("svg:g");
-
- sp_selection_group_impl(l, group, xml_doc, doc);
+
+ sp_selection_group_impl(l, group, xml_doc, doc);
sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_GROUP,
_("Group"));
void sp_selection_cut(SPDesktop *desktop)
{
- sp_selection_copy();
+ sp_selection_copy(desktop);
sp_selection_delete(desktop);
}
}
-void sp_selection_copy()
+void sp_selection_copy(SPDesktop *desktop)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
- cm->copy();
+ cm->copy(desktop);
}
void sp_selection_paste(SPDesktop *desktop, bool in_place)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
- if (cm->paste(in_place))
+ if (cm->paste(desktop, in_place)) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_PASTE, _("Paste"));
+ }
}
void sp_selection_paste_style(SPDesktop *desktop)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
- if (cm->pasteStyle())
+ if (cm->pasteStyle(desktop)) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_PASTE_STYLE, _("Paste style"));
+ }
}
void sp_selection_paste_livepatheffect(SPDesktop *desktop)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
- if (cm->pastePathEffect())
+ if (cm->pastePathEffect(desktop)) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_PASTE_LIVEPATHEFFECT,
_("Paste live path effect"));
+ }
}
void sp_selection_paste_size(SPDesktop *desktop, bool apply_x, bool apply_y)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
- if (cm->pasteSize(false, apply_x, apply_y))
+ if (cm->pasteSize(desktop, false, apply_x, apply_y)) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_PASTE_SIZE,
_("Paste size"));
+ }
}
void sp_selection_paste_size_separately(SPDesktop *desktop, bool apply_x, bool apply_y)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
- if (cm->pasteSize(true, apply_x, apply_y))
+ if (cm->pasteSize(desktop, true, apply_x, apply_y)) {
sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_PASTE_SIZE_SEPARATELY,
_("Paste size separately"));
+ }
}
void sp_selection_to_next_layer(SPDesktop *dt, bool suppressDone)
@@ -2907,34 +2912,34 @@ sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_to_la
g_slist_free(items);
items = NULL;
-
+
if (apply_to_items && grouping == PREFS_MASKOBJECT_GROUPING_ALL) {
// group all those objects into one group
// and apply mask to that
Inkscape::XML::Node *group = xml_doc->createElement("svg:g");
-
+
// make a note we should ungroup this when unsetting mask
group->setAttribute("inkscape:groupmode", "maskhelper");
-
+
GSList *reprs_to_group = NULL;
-
+
for (GSList *i = apply_to_items ; NULL != i ; i = i->next) {
reprs_to_group = g_slist_prepend(reprs_to_group, SP_OBJECT_REPR(i->data));
selection->remove(SP_OBJECT(i->data));
}
reprs_to_group = g_slist_reverse(reprs_to_group);
-
+
sp_selection_group_impl(reprs_to_group, group, xml_doc, doc);
-
+
g_slist_free(reprs_to_group);
-
+
// apply clip/mask only to newly created group
g_slist_free(apply_to_items);
apply_to_items = NULL;
apply_to_items = g_slist_prepend(apply_to_items, doc->getObjectByRepr(group));
-
+
selection->add(group);
-
+
Inkscape::GC::release(group);
}
@@ -2964,13 +2969,13 @@ sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_to_la
Inkscape::XML::Node *current = SP_OBJECT_REPR(i->data);
// Node to apply mask to
Inkscape::XML::Node *apply_mask_to = current;
-
+
if (grouping == PREFS_MASKOBJECT_GROUPING_SEPARATE) {
// enclose current node in group, and apply crop/mask on that
Inkscape::XML::Node *group = xml_doc->createElement("svg:g");
// make a note we should ungroup this when unsetting mask
group->setAttribute("inkscape:groupmode", "maskhelper");
-
+
Inkscape::XML::Node *spnew = current->duplicate(xml_doc);
gint position = current->position();
selection->remove(current);
@@ -2978,17 +2983,17 @@ sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_to_la
sp_repr_unparent(current);
group->appendChild(spnew);
group->setPosition(position);
-
+
// Apply clip/mask to group instead
apply_mask_to = group;
-
+
selection->add(group);
- Inkscape::GC::release(spnew);
+ Inkscape::GC::release(spnew);
Inkscape::GC::release(group);
}
-
+
apply_mask_to->setAttribute(attributeName, g_strdup_printf("url(#%s)", mask_id));
-
+
}
g_slist_free(mask_items);
gchar const *attributeName = apply_clip_path ? "clip-path" : "mask";
std::map<SPObject*,SPItem*> referenced_objects;
-
+
GSList *items_to_ungroup = NULL;
-
+
// SPObject* refers to a group containing the clipped path or mask itself,
// whereas SPItem* refers to the item being clipped or masked
for (GSList const *i = selection->itemList(); NULL != i; i = i->next) {
}
SP_OBJECT_REPR(i->data)->setAttribute(attributeName, "none");
-
+
if (ungroup_masked && SP_IS_GROUP(i->data)) {
// if we had previously enclosed masked object in group,
// add it to list so we can ungroup it later
SPGroup *item = SP_GROUP(i->data);
-
+
// ungroup only groups we created when setting clip/mask
if (item->layerMode() == SPGroup::MASK_HELPER) {
items_to_ungroup = g_slist_prepend(items_to_ungroup, item);
}
-
+
}
}
g_slist_free(items_to_move);
}
-
+
// ungroup marked groups added when setting mask
for (GSList *i = items_to_ungroup ; NULL != i ; i = i->next) {
selection->remove(SP_GROUP(i->data));
selection->addList(children);
g_slist_free(children);
}
-
+
g_slist_free(items_to_ungroup);
if (apply_clip_path)
index e06c32e725e422c459e53e32ac8a7d6d8ed429db..1f975975a6abc696f22199aaa9dfdc923b5392d7 100644 (file)
SPCSSAttr *take_style_from_item (SPItem *item);
void sp_selection_cut(SPDesktop *desktop);
-void sp_selection_copy();
+void sp_selection_copy(SPDesktop *desktop);
void sp_selection_paste(SPDesktop *desktop, bool in_place);
void sp_selection_paste_style(SPDesktop *desktop);
void sp_selection_paste_livepatheffect(SPDesktop *desktop);
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index d0b555f84dcaef1e39ebb34e61846506dbf245ee..dd1f981b5dd8d1de2adae5520dceaf73911ea6ec 100644 (file)
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
*/
class ClipboardManagerImpl : public ClipboardManager {
public:
- virtual void copy();
+ virtual void copy(SPDesktop *desktop);
virtual void copyPathParameter(Inkscape::LivePathEffect::PathParam *);
- virtual bool paste(bool in_place);
- virtual bool pasteStyle();
- virtual bool pasteSize(bool, bool, bool);
- virtual bool pastePathEffect();
- virtual Glib::ustring getPathParameter();
- virtual Glib::ustring getShapeOrTextObjectId();
+ virtual bool paste(SPDesktop *desktop, bool in_place);
+ virtual bool pasteStyle(SPDesktop *desktop);
+ virtual bool pasteSize(SPDesktop *desktop, bool separately, bool apply_x, bool apply_y);
+ virtual bool pastePathEffect(SPDesktop *desktop);
+ virtual Glib::ustring getPathParameter(SPDesktop* desktop);
+ virtual Glib::ustring getShapeOrTextObjectId(SPDesktop *desktop);
virtual const gchar *getFirstObjectID();
ClipboardManagerImpl();
void _copyTextPath(SPTextPath *);
Inkscape::XML::Node *_copyNode(Inkscape::XML::Node *, Inkscape::XML::Document *, Inkscape::XML::Node *);
- void _pasteDocument(SPDocument *, bool in_place);
- void _pasteDefs(SPDocument *);
- bool _pasteImage();
- bool _pasteText();
+ void _pasteDocument(SPDesktop *desktop, SPDocument *clipdoc, bool in_place);
+ void _pasteDefs(SPDesktop *desktop, SPDocument *clipdoc);
+ bool _pasteImage(SPDocument *doc);
+ bool _pasteText(SPDesktop *desktop);
SPCSSAttr *_parseColor(const Glib::ustring &);
void _applyPathEffect(SPItem *, gchar const *);
SPDocument *_retrieveClipboard(Glib::ustring = "");
void _createInternalClipboard();
void _discardInternalClipboard();
Inkscape::XML::Node *_createClipNode();
- Geom::Scale _getScale(Geom::Point const &, Geom::Point const &, Geom::Rect const &, bool, bool);
+ Geom::Scale _getScale(SPDesktop *desktop, Geom::Point const &min, Geom::Point const &max, Geom::Rect const &obj_rect, bool apply_x, bool apply_y);
Glib::ustring _getBestTarget();
void _setClipboardTargets();
void _setClipboardColor(guint32);
/**
* @brief Copy selection contents to the clipboard
*/
-void ClipboardManagerImpl::copy()
+void ClipboardManagerImpl::copy(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if ( desktop == NULL ) {
return;
}
@@ -303,10 +302,9 @@ void ClipboardManagerImpl::copyPathParameter(Inkscape::LivePathEffect::PathParam
* @brief Paste from the system clipboard into the active desktop
* @param in_place Whether to put the contents where they were when copied
*/
-bool ClipboardManagerImpl::paste(bool in_place)
+bool ClipboardManagerImpl::paste(SPDesktop *desktop, bool in_place)
{
// do any checking whether we really are able to paste before requesting the contents
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if ( desktop == NULL ) {
return false;
}
// if there is an image on the clipboard, paste it
if ( target == CLIPBOARD_GDK_PIXBUF_TARGET ) {
- return _pasteImage();
+ return _pasteImage(desktop->doc());
}
// if there's only text, paste it into a selected text object or create a new one
if ( target == CLIPBOARD_TEXT_TARGET ) {
- return _pasteText();
+ return _pasteText(desktop);
}
// otherwise, use the import extensions
return false;
}
- _pasteDocument(tempdoc, in_place);
+ _pasteDocument(desktop, tempdoc, in_place);
sp_document_unref(tempdoc);
return true;
/**
* @brief Implements the Paste Style action
*/
-bool ClipboardManagerImpl::pasteStyle()
+bool ClipboardManagerImpl::pasteStyle(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL) {
return false;
}
bool pasted = false;
if (clipnode) {
- _pasteDefs(tempdoc);
+ _pasteDefs(desktop, tempdoc);
SPCSSAttr *style = sp_repr_css_attr(clipnode, "style");
sp_desktop_set_style(desktop, style);
pasted = true;
* @param apply_x Whether to scale the width of objects / selection
* @param apply_y Whether to scale the height of objects / selection
*/
-bool ClipboardManagerImpl::pasteSize(bool separately, bool apply_x, bool apply_y)
+bool ClipboardManagerImpl::pasteSize(SPDesktop *desktop, bool separately, bool apply_x, bool apply_y)
{
if (!apply_x && !apply_y) {
return false; // pointless parameters
}
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if ( desktop == NULL ) {
return false;
}
@@ -475,7 +471,7 @@ bool ClipboardManagerImpl::pasteSize(bool separately, bool apply_x, bool apply_y
if ( !obj_size ) {
continue;
}
- sp_item_scale_rel(item, _getScale(min, max, *obj_size, apply_x, apply_y));
+ sp_item_scale_rel(item, _getScale(desktop, min, max, *obj_size, apply_x, apply_y));
}
}
// resize the selection as a whole
@@ -483,7 +479,7 @@ bool ClipboardManagerImpl::pasteSize(bool separately, bool apply_x, bool apply_y
Geom::OptRect sel_size = selection->bounds();
if ( sel_size ) {
sp_selection_scale_relative(selection, sel_size->midpoint(),
- _getScale(min, max, *sel_size, apply_x, apply_y));
+ _getScale(desktop, min, max, *sel_size, apply_x, apply_y));
}
}
pasted = true;
@@ -496,12 +492,11 @@ bool ClipboardManagerImpl::pasteSize(bool separately, bool apply_x, bool apply_y
/**
* @brief Applies a path effect from the clipboard to the selected path
*/
-bool ClipboardManagerImpl::pastePathEffect()
+bool ClipboardManagerImpl::pastePathEffect(SPDesktop *desktop)
{
/** @todo FIXME: pastePathEffect crashes when moving the path with the applied effect,
segfaulting in fork_private_if_necessary(). */
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if ( desktop == NULL ) {
return false;
}
if ( clipnode ) {
gchar const *effectstack = clipnode->attribute("inkscape:path-effect");
if ( effectstack ) {
- _pasteDefs(tempdoc);
+ _pasteDefs(desktop, tempdoc);
// make sure all selected items are converted to paths first (i.e. rectangles)
sp_selected_to_lpeitems(desktop);
for (GSList *itemptr = const_cast<GSList *>(selection->itemList()) ; itemptr ; itemptr = itemptr->next) {
* @brief Get LPE path data from the clipboard
* @return The retrieved path data (contents of the d attribute), or "" if no path was found
*/
-Glib::ustring ClipboardManagerImpl::getPathParameter()
+Glib::ustring ClipboardManagerImpl::getPathParameter(SPDesktop* desktop)
{
SPDocument *tempdoc = _retrieveClipboard(); // any target will do here
if ( tempdoc == NULL ) {
- _userWarn(SP_ACTIVE_DESKTOP, _("Nothing on the clipboard."));
+ _userWarn(desktop, _("Nothing on the clipboard."));
return "";
}
Inkscape::XML::Node
*root = sp_document_repr_root(tempdoc),
*path = sp_repr_lookup_name(root, "svg:path", -1); // unlimited search depth
if ( path == NULL ) {
- _userWarn(SP_ACTIVE_DESKTOP, _("Clipboard does not contain a path."));
+ _userWarn(desktop, _("Clipboard does not contain a path."));
sp_document_unref(tempdoc);
return "";
}
* @brief Get object id of a shape or text item from the clipboard
* @return The retrieved id string (contents of the id attribute), or "" if no shape or text item was found
*/
-Glib::ustring ClipboardManagerImpl::getShapeOrTextObjectId()
+Glib::ustring ClipboardManagerImpl::getShapeOrTextObjectId(SPDesktop *desktop)
{
SPDocument *tempdoc = _retrieveClipboard(); // any target will do here
if ( tempdoc == NULL ) {
- _userWarn(SP_ACTIVE_DESKTOP, _("Nothing on the clipboard."));
+ _userWarn(desktop, _("Nothing on the clipboard."));
return "";
}
Inkscape::XML::Node *root = sp_document_repr_root(tempdoc);
}
if ( repr == NULL ) {
- _userWarn(SP_ACTIVE_DESKTOP, _("Clipboard does not contain a path."));
+ _userWarn(desktop, _("Clipboard does not contain a path."));
sp_document_unref(tempdoc);
return "";
}
* @param in_place Whether to paste the selection where it was when copied
* @pre @c clipdoc is not empty and items can be added to the current layer
*/
-void ClipboardManagerImpl::_pasteDocument(SPDocument *clipdoc, bool in_place)
+void ClipboardManagerImpl::_pasteDocument(SPDesktop *desktop, SPDocument *clipdoc, bool in_place)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
SPDocument *target_document = sp_desktop_document(desktop);
Inkscape::XML::Node
*root = sp_document_repr_root(clipdoc),
Inkscape::XML::Document *target_xmldoc = sp_document_repr_doc(target_document);
// copy definitions
- _pasteDefs(clipdoc);
+ _pasteDefs(desktop, clipdoc);
// copy objects
GSList *pasted_objects = NULL;
* @param clipdoc The document to paste
* @pre @c clipdoc != NULL and pasting into the active document is possible
*/
-void ClipboardManagerImpl::_pasteDefs(SPDocument *clipdoc)
+void ClipboardManagerImpl::_pasteDefs(SPDesktop *desktop, SPDocument *clipdoc)
{
// boilerplate vars copied from _pasteDocument
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
SPDocument *target_document = sp_desktop_document(desktop);
Inkscape::XML::Node
*root = sp_document_repr_root(clipdoc),
/**
* @brief Retrieve a bitmap image from the clipboard and paste it into the active document
*/
-bool ClipboardManagerImpl::_pasteImage()
+bool ClipboardManagerImpl::_pasteImage(SPDocument *doc)
{
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
if ( doc == NULL ) {
return false;
}
/**
* @brief Paste text into the selected text object or create a new one to hold it
*/
-bool ClipboardManagerImpl::_pasteText()
+bool ClipboardManagerImpl::_pasteText(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if ( desktop == NULL ) {
return false;
}
/**
* @brief Get the scale to resize an item, based on the command and desktop state
*/
-Geom::Scale ClipboardManagerImpl::_getScale(Geom::Point const &min, Geom::Point const &max, Geom::Rect const &obj_rect, bool apply_x, bool apply_y)
+Geom::Scale ClipboardManagerImpl::_getScale(SPDesktop *desktop, Geom::Point const &min, Geom::Point const &max, Geom::Rect const &obj_rect, bool apply_x, bool apply_y)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
double scale_x = 1.0;
double scale_y = 1.0;
diff --git a/src/ui/clipboard.h b/src/ui/clipboard.h
index 54c05ac0def1f16419b74c559e7c3d25d81ad495..6020ecdd858a5f7cd29eaaf133bbba835ef37144 100644 (file)
--- a/src/ui/clipboard.h
+++ b/src/ui/clipboard.h
*/
/* Authors:
* Krzysztof KosiĆski <tweenk@o2.pl>
+ * Jon A. Cruz <jon@joncruz.org>
*
* Copyright (C) 2008 authors
+ * Copyright (C) 2010 Jon A. Cruz
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
class ClipboardManager {
public:
- virtual void copy() = 0;
+ virtual void copy(SPDesktop *desktop) = 0;
virtual void copyPathParameter(Inkscape::LivePathEffect::PathParam *) = 0;
- virtual bool paste(bool in_place = false) = 0;
- virtual bool pasteStyle() = 0;
- virtual bool pasteSize(bool separately, bool apply_x, bool apply_y) = 0;
- virtual bool pastePathEffect() = 0;
- virtual Glib::ustring getPathParameter() = 0;
- virtual Glib::ustring getShapeOrTextObjectId() = 0;
+ virtual bool paste(SPDesktop *desktop, bool in_place = false) = 0;
+ virtual bool pasteStyle(SPDesktop *desktop) = 0;
+ virtual bool pasteSize(SPDesktop *desktop, bool separately, bool apply_x, bool apply_y) = 0;
+ virtual bool pastePathEffect(SPDesktop *desktop) = 0;
+ virtual Glib::ustring getPathParameter(SPDesktop* desktop) = 0;
+ virtual Glib::ustring getShapeOrTextObjectId(SPDesktop *desktop) = 0;
virtual const gchar *getFirstObjectID() = 0;
-
+
static ClipboardManager *get();
protected:
ClipboardManager(); // singleton
private:
ClipboardManager(const ClipboardManager &); ///< no copy
ClipboardManager &operator=(const ClipboardManager &); ///< no assign
-
+
static ClipboardManager *_instance;
};
diff --git a/src/verbs.cpp b/src/verbs.cpp
index f9a544186e633051a665c69843a7cf2325043000..dc1116953c8dc86b5b5d8cfc0614270f1464ff0d 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
sp_selection_cut(dt);
break;
case SP_VERB_EDIT_COPY:
- sp_selection_copy();
+ sp_selection_copy(dt);
break;
case SP_VERB_EDIT_PASTE:
sp_selection_paste(dt, false);