summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/selection-chemistry.cpp28
-rw-r--r--src/selection.cpp4
-rw-r--r--src/splivarot.cpp4
-rw-r--r--src/ui/dialog/object-attributes.cpp2
-rw-r--r--src/ui/dialog/transformation.cpp2
-rw-r--r--src/ui/tools/gradient-tool.cpp2
-rw-r--r--src/widgets/stroke-style.cpp4
7 files changed, 23 insertions, 23 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index c1d4f58e4..7255e80cb 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -889,14 +889,14 @@ sp_item_list_common_parent_group(std::vector<SPItem*> const items)
if (items.empty()) {
return NULL;
}
- SPObject *parent = SP_OBJECT(items[0])->parent;
+ SPObject *parent = items[0]->parent;
// Strictly speaking this CAN happen, if user selects <svg> from Inkscape::XML editor
if (!dynamic_cast<SPGroup *>(parent)) {
return NULL;
}
for (std::vector<SPItem*>::const_iterator item=items.begin();item!=items.end();item++) {
if((*item)==items[0])continue;
- if (SP_OBJECT(*item)->parent != parent) {
+ if ((*item)->parent != parent) {
return NULL;
}
}
@@ -2896,7 +2896,7 @@ void sp_selection_to_marker(SPDesktop *desktop, bool apply)
//items = g_slist_sort(items, (GCompareFunc) sp_object_compare_position); // Why needed?
// bottommost object, after sorting
- SPObject *parent = SP_OBJECT(items[0])->parent;
+ SPObject *parent = items[0]->parent;
Geom::Affine parent_transform;
{
@@ -2911,7 +2911,7 @@ void sp_selection_to_marker(SPDesktop *desktop, bool apply)
// Create a list of duplicates, to be pasted inside marker element.
std::vector<Inkscape::XML::Node*> repr_copies;
for (std::vector<SPItem*>::const_reverse_iterator i=items.rbegin();i!=items.rend();i++){
- Inkscape::XML::Node *dup = SP_OBJECT(*i)->getRepr()->duplicate(xml_doc);
+ Inkscape::XML::Node *dup = (*i)->getRepr()->duplicate(xml_doc);
repr_copies.push_back(dup);
}
@@ -3248,7 +3248,7 @@ sp_selection_tile(SPDesktop *desktop, bool apply)
sort(items.begin(),items.end(),sp_object_compare_position);
// bottommost object, after sorting
- SPObject *parent = SP_OBJECT(items[0])->parent;
+ SPObject *parent = items[0]->parent;
Geom::Affine parent_transform;
@@ -3262,12 +3262,12 @@ sp_selection_tile(SPDesktop *desktop, bool apply)
}
// remember the position of the first item
- gint pos = SP_OBJECT(items[0])->getRepr()->position();
+ gint pos = items[0]->getRepr()->position();
// create a list of duplicates
std::vector<Inkscape::XML::Node*> repr_copies;
for (std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();i++){
- Inkscape::XML::Node *dup = SP_OBJECT(*i)->getRepr()->duplicate(xml_doc);
+ Inkscape::XML::Node *dup = (*i)->getRepr()->duplicate(xml_doc);
repr_copies.push_back(dup);
}
@@ -3520,7 +3520,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
// Create the filename.
gchar *const basename = g_strdup_printf("%s-%s-%u.png",
document->getName(),
- SP_OBJECT(items[0])->getRepr()->attribute("id"),
+ items[0]->getRepr()->attribute("id"),
current);
// Imagemagick is known not to handle spaces in filenames, so we replace anything but letters,
// digits, and a few other chars, with "_"
@@ -3540,8 +3540,8 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
//g_print("%s\n", filepath);
// Remember parent and z-order of the topmost one
- gint pos = SP_OBJECT(items.back())->getRepr()->position();
- SPObject *parent_object = SP_OBJECT(items.back())->parent;
+ gint pos = items.back()->getRepr()->position();
+ SPObject *parent_object = items.back()->parent;
Inkscape::XML::Node *parent = parent_object->getRepr();
// Calculate resolution
@@ -3857,7 +3857,7 @@ void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_
apply_to_items = g_slist_prepend(apply_to_items, desktop->currentLayer());
for (std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();i++) {
- Inkscape::XML::Node *dup = SP_OBJECT(*i)->getRepr()->duplicate(xml_doc);
+ Inkscape::XML::Node *dup = (*i)->getRepr()->duplicate(xml_doc);
mask_items = g_slist_prepend(mask_items, dup);
SPObject *item = *i;
@@ -3870,7 +3870,7 @@ void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_
}
} else if (!topmost) {
// topmost item is used as a mask, which is applied to other items in a selection
- Inkscape::XML::Node *dup = SP_OBJECT(items[0])->getRepr()->duplicate(xml_doc);
+ Inkscape::XML::Node *dup = items[0]->getRepr()->duplicate(xml_doc);
mask_items = g_slist_prepend(mask_items, dup);
if (remove_original) {
@@ -4049,7 +4049,7 @@ void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path) {
}
}
- SP_OBJECT(*i)->getRepr()->setAttribute(attributeName, "none");
+ (*i)->getRepr()->setAttribute(attributeName, "none");
SPGroup *group = dynamic_cast<SPGroup *>(*i);
if (ungroup_masked && group) {
@@ -4070,7 +4070,7 @@ void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path) {
GSList *items_to_move = NULL;
for ( SPObject *child = obj->firstChild() ; child; child = child->getNext() ) {
// Collect all clipped paths and masks within a single group
- Inkscape::XML::Node *copy = SP_OBJECT(child)->getRepr()->duplicate(xml_doc);
+ Inkscape::XML::Node *copy = child->getRepr()->duplicate(xml_doc);
if(copy->attribute("inkscape:original-d") && copy->attribute("inkscape:path-effect"))
{
copy->setAttribute("d", copy->attribute("inkscape:original-d"));
diff --git a/src/selection.cpp b/src/selection.cpp
index d9266b599..b2fb6447e 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -517,7 +517,7 @@ uint Selection::numberOfLayers() {
std::vector<SPItem*> const items = const_cast<Selection *>(this)->itemList();
std::set<SPObject*> layers;
for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end();iter++ ) {
- SPObject *layer = _layers->layerForObject(SP_OBJECT(*iter));
+ SPObject *layer = _layers->layerForObject(*iter);
layers.insert(layer);
}
return layers.size();
@@ -527,7 +527,7 @@ guint Selection::numberOfParents() {
std::vector<SPItem*> const items = const_cast<Selection *>(this)->itemList();
std::set<SPObject*> parents;
for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end();iter++ ) {
- SPObject *parent = SP_OBJECT(*iter)->parent;
+ SPObject *parent = (*iter)->parent;
parents.insert(parent);
}
return parents.size();
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index a04dedda9..f61a30462 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -354,8 +354,8 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
if (bop == bool_op_diff || bop == bool_op_cut || bop == bool_op_slice) {
// check in the tree to find which element of the selection list is topmost (for 2-operand commands only)
- Inkscape::XML::Node *a = SP_OBJECT(il.front())->getRepr();
- Inkscape::XML::Node *b = SP_OBJECT(il.back())->getRepr();
+ Inkscape::XML::Node *a = il.front()->getRepr();
+ Inkscape::XML::Node *b = il.back()->getRepr();
if (a == NULL || b == NULL) {
boolop_display_error_message(desktop, _("Unable to determine the <b>z-order</b> of the objects selected for difference, XOR, division, or path cut."));
diff --git a/src/ui/dialog/object-attributes.cpp b/src/ui/dialog/object-attributes.cpp
index f43a15225..1bc570f43 100644
--- a/src/ui/dialog/object-attributes.cpp
+++ b/src/ui/dialog/object-attributes.cpp
@@ -127,7 +127,7 @@ void ObjectAttributes::widget_setup (void)
blocked = true;
// CPPIFY
- SPObject *obj = SP_OBJECT(item); //to get the selected item
+ SPObject *obj = item; //to get the selected item
// GObjectClass *klass = G_OBJECT_GET_CLASS(obj); //to deduce the object's type
// GType type = G_TYPE_FROM_CLASS(klass);
const SPAttrDesc *desc;
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index 5bd3cb309..f571828ce 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -1005,7 +1005,7 @@ void Transformation::applyPageTransform(Inkscape::Selection *selection)
for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();i++){
SPItem *item = *i;
item->set_item_transform(displayed);
- SP_OBJECT(item)->updateRepr();
+ item->updateRepr();
}
} else {
sp_selection_apply_affine(selection, displayed); // post-multiply each object's transform
diff --git a/src/ui/tools/gradient-tool.cpp b/src/ui/tools/gradient-tool.cpp
index bf38b5ca5..526671515 100644
--- a/src/ui/tools/gradient-tool.cpp
+++ b/src/ui/tools/gradient-tool.cpp
@@ -913,7 +913,7 @@ static void sp_gradient_drag(GradientTool &rc, Geom::Point const pt, guint /*sta
for (std::vector<SPItem*>::const_iterator i = itemlist.begin();i!=itemlist.end();i++) {
//FIXME: see above
- sp_repr_css_change_recursive(SP_OBJECT(*i)->getRepr(), css, "style");
+ sp_repr_css_change_recursive((*i)->getRepr(), css, "style");
sp_item_set_gradient(*i, vector, (SPGradientType) type, fill_or_stroke);
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index 481fa0609..482ca7af4 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -902,7 +902,7 @@ StrokeStyle::updateLine()
return;
std::vector<SPItem*> const objects = sel->itemList();
- SPObject * const object = SP_OBJECT(objects[0]);
+ SPObject * const object = objects[0];
SPStyle * const style = object->style;
/* Markers */
@@ -1002,7 +1002,7 @@ StrokeStyle::scaleLine()
/* Set dash */
setScaledDash(css, ndash, dash, offset, width);
- sp_desktop_apply_css_recursive (SP_OBJECT(*i), css, true);
+ sp_desktop_apply_css_recursive ((*i), css, true);
}
g_free(dash);