diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:01:17 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:01:17 +0000 |
| commit | 509ca3687330fea576ea67ae6c7f31d16e66b800 (patch) | |
| tree | 9097520c54e355ded9bd0b4d6618af4e8dacdd91 /src/sp-flowregion.cpp | |
| parent | updated to latest trunk (diff) | |
| parent | [Bug #1695016] Xaml export misses some radialGradients. (diff) | |
| download | inkscape-509ca3687330fea576ea67ae6c7f31d16e66b800.tar.gz inkscape-509ca3687330fea576ea67ae6c7f31d16e66b800.zip | |
updated to latest trunk
(bzr r14876.2.4)
Diffstat (limited to 'src/sp-flowregion.cpp')
| -rw-r--r-- | src/sp-flowregion.cpp | 57 |
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); } } |
