summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-06-27 16:28:46 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-06-27 16:28:46 +0000
commit6829ce76e2ab77859c1a5fdacbb2fa71109d65b0 (patch)
treef25b1a6a9fe6bedcceb1866ca3e81be6bd9bb2b0 /src
parentExtensions. Fix for Bug #1332461 (Datamatrix 22x22 is always incorrect). (diff)
downloadinkscape-6829ce76e2ab77859c1a5fdacbb2fa71109d65b0.tar.gz
inkscape-6829ce76e2ab77859c1a5fdacbb2fa71109d65b0.zip
Remove the incorrect fix for the bug 1241902
(bzr r13441)
Diffstat (limited to 'src')
-rw-r--r--src/box3d-side.cpp2
-rw-r--r--src/selection-chemistry.cpp4
-rw-r--r--src/sp-ellipse.cpp2
-rw-r--r--src/sp-item-group.cpp36
-rw-r--r--src/sp-item-group.h2
-rw-r--r--src/sp-lpe-item.cpp35
-rw-r--r--src/sp-path.cpp2
-rw-r--r--src/sp-spiral.cpp2
-rw-r--r--src/sp-star.cpp2
9 files changed, 11 insertions, 76 deletions
diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp
index a5e7eaa94..dfccb63bf 100644
--- a/src/box3d-side.cpp
+++ b/src/box3d-side.cpp
@@ -213,8 +213,6 @@ void Box3DSide::set_shape() {
bool success = this->performPathEffect(c_lpe);
if (success) {
- sp_lpe_item_apply_to_mask(this);
- sp_lpe_item_apply_to_clippath(this);
this->setCurveInsync(c_lpe, TRUE);
}
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index a350dd7a7..868a9d743 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -3950,10 +3950,6 @@ void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path) {
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);
- if(copy->attribute("inkscape:original-d"))
- {
- copy->setAttribute("d", copy->attribute("inkscape:original-d"));
- }
items_to_move = g_slist_prepend(items_to_move, copy);
}
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp
index 428e0e3dd..cda59e057 100644
--- a/src/sp-ellipse.cpp
+++ b/src/sp-ellipse.cpp
@@ -467,8 +467,6 @@ void SPGenericEllipse::set_shape()
bool success = this->performPathEffect(c_lpe);
if (success) {
- sp_lpe_item_apply_to_mask(this);
- sp_lpe_item_apply_to_clippath(this);
this->setCurveInsync(c_lpe, TRUE);
}
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index b3db0c1d7..2cfe97db8 100644
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
@@ -778,31 +778,17 @@ void SPGroup::update_patheffect(bool write) {
}
}
-
-void
-sp_gslist_update_by_clip_or_mask(GSList *item_list,SPItem * item)
-{
- if(item->mask_ref->getObject()) {
- SPObject * clipormask = item->mask_ref->getObject()->firstChild();
- item_list = g_slist_append(item_list,clipormask);
- }
- if(item->clip_ref->getObject()) {
- SPObject * clipormask = item->clip_ref->getObject()->firstChild();
- item_list = g_slist_append(item_list,clipormask);
- }
-}
-
static void
sp_group_perform_patheffect(SPGroup *group, SPGroup *topgroup, bool write)
{
- GSList *item_list = sp_item_group_item_list(group);
- sp_gslist_update_by_clip_or_mask(item_list,group);
- for ( GSList *iter = item_list; iter; iter = iter->next ) {
+ GSList const *item_list = sp_item_group_item_list(SP_GROUP(group));
+
+ for ( GSList const *iter = item_list; iter; iter = iter->next ) {
SPObject *subitem = static_cast<SPObject *>(iter->data);
+
if (SP_IS_GROUP(subitem)) {
sp_group_perform_patheffect(SP_GROUP(subitem), topgroup, write);
} else if (SP_IS_SHAPE(subitem)) {
- sp_gslist_update_by_clip_or_mask(item_list,SP_ITEM(subitem));
SPCurve * c = NULL;
if (SP_IS_PATH(subitem)) {
@@ -813,17 +799,9 @@ sp_group_perform_patheffect(SPGroup *group, SPGroup *topgroup, bool write)
// only run LPEs when the shape has a curve defined
if (c) {
- if(SP_IS_MASK(subitem->parent) || SP_IS_CLIPPATH(subitem->parent)) {
- c->transform(i2anc_affine(group, topgroup));
- } else {
- c->transform(i2anc_affine(subitem, topgroup));
- }
+ c->transform(i2anc_affine(subitem, topgroup));
SP_LPE_ITEM(topgroup)->performPathEffect(c);
- if(SP_IS_MASK(subitem->parent) || SP_IS_CLIPPATH(subitem->parent)) {
- c->transform(i2anc_affine(group, topgroup).inverse());
- } else {
- c->transform(i2anc_affine(subitem, topgroup).inverse());
- }
+ c->transform(i2anc_affine(subitem, topgroup).inverse());
SP_SHAPE(subitem)->setCurve(c, TRUE);
if (write) {
@@ -831,7 +809,7 @@ sp_group_perform_patheffect(SPGroup *group, SPGroup *topgroup, bool write)
gchar *str = sp_svg_write_path(c->get_pathvector());
repr->setAttribute("d", str);
#ifdef GROUP_VERBOSE
- g_message("sp_group_perform_patheffect writes 'd' attribute");
+g_message("sp_group_perform_patheffect writes 'd' attribute");
#endif
g_free(str);
}
diff --git a/src/sp-item-group.h b/src/sp-item-group.h
index adec35571..2004a72b8 100644
--- a/src/sp-item-group.h
+++ b/src/sp-item-group.h
@@ -88,7 +88,7 @@ public:
void sp_item_group_ungroup (SPGroup *group, GSList **children, bool do_done = true);
-void sp_gslist_update_by_clip_or_mask(GSList *item_list, SPItem * item);
+
GSList *sp_item_group_item_list (SPGroup *group);
SPObject *sp_item_group_get_child_by_name (SPGroup *group, SPObject *ref, const gchar *name);
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index a5d70d573..321d2fc42 100644
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
@@ -340,22 +340,6 @@ static void
sp_lpe_item_create_original_path_recursive(SPLPEItem *lpeitem)
{
g_return_if_fail(lpeitem != NULL);
- SPMask * mask = lpeitem->mask_ref->getObject();
-
- if (mask)
- {
- if (SPLPEItem* maskChild = dynamic_cast<SPLPEItem*>(mask->firstChild())) {
- sp_lpe_item_create_original_path_recursive(maskChild);
- }
- }
-
- SPClipPath * clipPath = lpeitem->clip_ref->getObject();
- if (clipPath)
- {
- if (SPLPEItem* clipChild = dynamic_cast<SPLPEItem*>(clipPath->firstChild())) {
- sp_lpe_item_create_original_path_recursive(clipChild);
- }
- }
if (SP_IS_GROUP(lpeitem)) {
GSList const *item_list = sp_item_group_item_list(SP_GROUP(lpeitem));
@@ -378,22 +362,6 @@ static void
sp_lpe_item_cleanup_original_path_recursive(SPLPEItem *lpeitem)
{
g_return_if_fail(lpeitem != NULL);
- SPMask * mask = lpeitem->mask_ref->getObject();
-
- if (mask)
- {
- if (SPLPEItem* maskChild = dynamic_cast<SPLPEItem*>(mask->firstChild())) {
- sp_lpe_item_cleanup_original_path_recursive(maskChild);
- }
- }
-
- SPClipPath * clipPath = lpeitem->clip_ref->getObject();
- if (clipPath)
- {
- if (SPLPEItem* clipChild = dynamic_cast<SPLPEItem*>(clipPath->firstChild())) {
- sp_lpe_item_cleanup_original_path_recursive(clipChild);
- }
- }
if (SP_IS_GROUP(lpeitem)) {
GSList const *item_list = sp_item_group_item_list(SP_GROUP(lpeitem));
@@ -640,6 +608,9 @@ bool SPLPEItem::hasPathEffectRecursive() const
}
}
+//The next 3 functions are because the revert of the bug 1241902
+//for the moment not used
+
void
sp_lpe_item_apply_to_clippath(SPItem * item)
{
diff --git a/src/sp-path.cpp b/src/sp-path.cpp
index 4a68b82c7..cbb61b0f6 100644
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
@@ -310,8 +310,6 @@ g_message("sp_path_update_patheffect");
bool success = this->performPathEffect(curve);
if (success && write) {
- sp_lpe_item_apply_to_mask(this);
- sp_lpe_item_apply_to_clippath(this);
// could also do this->getRepr()->updateRepr(); but only the d attribute needs updating.
#ifdef PATH_VERBOSE
g_message("sp_path_update_patheffect writes 'd' attribute");
diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp
index 8d4a37bf0..9ef73d56d 100644
--- a/src/sp-spiral.cpp
+++ b/src/sp-spiral.cpp
@@ -385,8 +385,6 @@ void SPSpiral::set_shape() {
bool success = this->performPathEffect(c_lpe);
if (success) {
- sp_lpe_item_apply_to_mask(this);
- sp_lpe_item_apply_to_clippath(this);
this->setCurveInsync( c_lpe, TRUE);
}
diff --git a/src/sp-star.cpp b/src/sp-star.cpp
index 170a863b5..eac33ed7b 100644
--- a/src/sp-star.cpp
+++ b/src/sp-star.cpp
@@ -465,8 +465,6 @@ void SPStar::set_shape() {
bool success = this->performPathEffect(c_lpe);
if (success) {
- sp_lpe_item_apply_to_mask(this);
- sp_lpe_item_apply_to_clippath(this);
this->setCurveInsync( c_lpe, TRUE);
}