summaryrefslogtreecommitdiffstats
path: root/src/sp-flowregion.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-10-03 20:51:05 +0000
committerjabiertxof <info@marker.es>2016-10-03 20:51:05 +0000
commit4db35e8a6706ddece9e977e5f26d4a6867ff8cbe (patch)
treef9711f260f694d96e26bf3216fb64f2b38611b2b /src/sp-flowregion.cpp
parentupdate to trunk (diff)
parentMerge in jabiertxof's hover information for measure tool (diff)
downloadinkscape-4db35e8a6706ddece9e977e5f26d4a6867ff8cbe.tar.gz
inkscape-4db35e8a6706ddece9e977e5f26d4a6867ff8cbe.zip
Update to trunk
(bzr r15017.1.35)
Diffstat (limited to 'src/sp-flowregion.cpp')
-rw-r--r--src/sp-flowregion.cpp57
1 files changed, 27 insertions, 30 deletions
diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp
index 5715e5eb1..4064c12f1 100644
--- a/src/sp-flowregion.cpp
+++ b/src/sp-flowregion.cpp
@@ -2,7 +2,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include <config.h>
#endif
#include <glibmm/i18n.h>
@@ -18,8 +18,6 @@
#include "sp-flowregion.h"
-#include "display/canvas-bpath.h"
-
#include "livarot/Path.h"
#include "livarot/Shape.h"
@@ -63,9 +61,9 @@ void SPFlowregion::update(SPCtx *ctx, unsigned int flags) {
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -102,9 +100,9 @@ void SPFlowregion::UpdateComputed(void)
}
computed.clear();
- for (SPObject* child = firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: children) {
Shape *shape = 0;
- GetDest(child, &shape);
+ GetDest(&child, &shape);
computed.push_back(shape);
}
}
@@ -118,9 +116,9 @@ void SPFlowregion::modified(guint flags) {
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -145,9 +143,9 @@ Inkscape::XML::Node *SPFlowregion::write(Inkscape::XML::Document *xml_doc, Inksc
}
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- if ( !dynamic_cast<SPTitle *>(child) && !dynamic_cast<SPDesc *>(child) ) {
- Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
+ for (auto& child: children) {
+ if ( !dynamic_cast<SPTitle *>(&child) && !dynamic_cast<SPDesc *>(&child) ) {
+ Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags);
if (crepr) {
l = g_slist_prepend(l, crepr);
@@ -161,10 +159,9 @@ Inkscape::XML::Node *SPFlowregion::write(Inkscape::XML::Document *xml_doc, Inksc
l = g_slist_remove(l, l->data);
}
- } else {
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- if ( !dynamic_cast<SPTitle *>(child) && !dynamic_cast<SPDesc *>(child) ) {
- child->updateRepr(flags);
+ for (auto& child: children) {
+ if ( !dynamic_cast<SPTitle *>(&child) && !dynamic_cast<SPDesc *>(&child) ) {
+ child.updateRepr(flags);
}
}
}
@@ -221,9 +218,9 @@ void SPFlowregionExclude::update(SPCtx *ctx, unsigned int flags) {
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse (l);
@@ -259,8 +256,8 @@ void SPFlowregionExclude::UpdateComputed(void)
computed = NULL;
}
- for ( SPObject* child = firstChild() ; child ; child = child->getNext() ) {
- GetDest(child, &computed);
+ for (auto& child: children) {
+ GetDest(&child, &computed);
}
}
@@ -273,9 +270,9 @@ void SPFlowregionExclude::modified(guint flags) {
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse (l);
@@ -301,8 +298,8 @@ Inkscape::XML::Node *SPFlowregionExclude::write(Inkscape::XML::Document *xml_doc
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
+ for (auto& child: children) {
+ Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags);
if (crepr) {
l = g_slist_prepend(l, crepr);
@@ -316,8 +313,8 @@ Inkscape::XML::Node *SPFlowregionExclude::write(Inkscape::XML::Document *xml_doc
}
} else {
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- child->updateRepr(flags);
+ for (auto& child: children) {
+ child.updateRepr(flags);
}
}