diff options
| author | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-07-14 11:17:21 +0000 |
|---|---|---|
| committer | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-07-14 11:17:21 +0000 |
| commit | 24d3f50003ca3cec6a03a7f5267cc4fe5588c69f (patch) | |
| tree | 31b18bad74998d7b7042e737d28c08b063a8d383 /src | |
| parent | Last part of new SPObject children list (diff) | |
| download | inkscape-24d3f50003ca3cec6a03a7f5267cc4fe5588c69f.tar.gz inkscape-24d3f50003ca3cec6a03a7f5267cc4fe5588c69f.zip | |
Renamed children list in SPObject
(bzr r14954.1.21)
Diffstat (limited to 'src')
75 files changed, 308 insertions, 308 deletions
diff --git a/src/box3d.cpp b/src/box3d.cpp index 0a33ee306..f8ef158b2 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -259,7 +259,7 @@ void box3d_position_set(SPBox3D *box) { /* This draws the curve and calls requestDisplayUpdate() for each side (the latter is done in box3d_side_position_set() to avoid update conflicts with the parent box) */ - for (auto& obj: box->_children) { + for (auto& obj: box->children) { Box3DSide *side = dynamic_cast<Box3DSide *>(&obj); if (side) { box3d_side_position_set(side); @@ -275,7 +275,7 @@ Geom::Affine SPBox3D::set_transform(Geom::Affine const &xform) { gdouble const sw = hypot(ret[0], ret[1]); gdouble const sh = hypot(ret[2], ret[3]); - for (auto& child: _children) { + for (auto& child: children) { SPItem *childitem = dynamic_cast<SPItem *>(&child); if (childitem) { // Adjust stroke width @@ -1074,7 +1074,7 @@ box3d_recompute_z_orders (SPBox3D *box) { static std::map<int, Box3DSide *> box3d_get_sides(SPBox3D *box) { std::map<int, Box3DSide *> sides; - for (auto& obj: box->_children) { + for (auto& obj: box->children) { Box3DSide *side = dynamic_cast<Box3DSide *>(&obj); if (side) { sides[Box3D::face_to_int(side->getFaceId())] = side; @@ -1217,7 +1217,7 @@ static void box3d_extract_boxes_rec(SPObject *obj, std::list<SPBox3D *> &boxes) if (box) { boxes.push_back(box); } else if (dynamic_cast<SPGroup *>(obj)) { - for (auto& child: obj->_children) { + for (auto& child: obj->children) { box3d_extract_boxes_rec(&child, boxes); } } @@ -1276,7 +1276,7 @@ SPGroup *box3d_convert_to_group(SPBox3D *box) // create a new group and add the sides (converted to ordinary paths) as its children Inkscape::XML::Node *grepr = xml_doc->createElement("svg:g"); - for (auto& obj: box->_children) { + for (auto& obj: box->children) { Box3DSide *side = dynamic_cast<Box3DSide *>(&obj); if (side) { Inkscape::XML::Node *repr = box3d_side_convert_to_path(side); diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index 638ba48e3..560f660b2 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -334,7 +334,7 @@ static Avoid::Polygon avoid_item_poly(SPItem const *item) std::vector<SPItem *> get_avoided_items(std::vector<SPItem *> &list, SPObject *from, SPDesktop *desktop, bool initialised) { - for (auto& child: from->_children) { + for (auto& child: from->children) { if (SP_IS_ITEM(&child) && !desktop->isLayer(SP_ITEM(&child)) && !SP_ITEM(&child)->isLocked() && diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp index e4b7c6a83..01586096c 100644 --- a/src/desktop-style.cpp +++ b/src/desktop-style.cpp @@ -163,7 +163,7 @@ sp_desktop_apply_css_recursive(SPObject *o, SPCSSAttr *css, bool skip_lines) return; } - for (auto& child: o->_children) { + for (auto& child: o->children) { if (sp_repr_css_property(css, "opacity", NULL) != NULL) { // Unset properties which are accumulating and thus should not be set recursively. // For example, setting opacity 0.5 on a group recursively would result in the visible opacity of 0.25 for an item in the group. @@ -1714,7 +1714,7 @@ objects_query_blend (const std::vector<SPItem*> &objects, SPStyle *style_res) int blendcount = 0; // determine whether filter is simple (blend and/or blur) or complex - for(auto& primitive_obj: style->getFilter()->_children) { + for(auto& primitive_obj: style->getFilter()->children) { SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(&primitive_obj); if (!primitive) { break; @@ -1731,7 +1731,7 @@ objects_query_blend (const std::vector<SPItem*> &objects, SPStyle *style_res) // simple filter if(blurcount == 1 || blendcount == 1) { - for(auto& primitive_obj: style->getFilter()->_children) { + for(auto& primitive_obj: style->getFilter()->children) { SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(&primitive_obj); if (!primitive) { break; @@ -1810,7 +1810,7 @@ objects_query_blur (const std::vector<SPItem*> &objects, SPStyle *style_res) //if object has a filter if (style->filter.set && style->getFilter()) { //cycle through filter primitives - for(auto& primitive_obj: style->getFilter()->_children) { + for(auto& primitive_obj: style->getFilter()->children) { SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(&primitive_obj); if (primitive) { diff --git a/src/display/nr-svgfonts.cpp b/src/display/nr-svgfonts.cpp index 927093ef4..53a5cba49 100644 --- a/src/display/nr-svgfonts.cpp +++ b/src/display/nr-svgfonts.cpp @@ -203,7 +203,7 @@ SvgFont::scaled_font_text_to_glyphs (cairo_scaled_font_t */*scaled_font*/, //check whether is there a glyph declared on the SVG document // that matches with the text string in its current position if ( (len = size_of_substring(this->glyphs[i]->unicode.c_str(), _utf8)) ){ - for(auto& node: font->_children) { + for(auto& node: font->children) { if (!previous_unicode) { break; } @@ -276,7 +276,7 @@ SvgFont::glyph_modified(SPObject* /* blah */, unsigned int /* bleh */){ Geom::PathVector SvgFont::flip_coordinate_system(SPFont* spfont, Geom::PathVector pathv){ double units_per_em = 1000; - for(auto& obj: spfont->_children) { + for(auto& obj: spfont->children) { if (dynamic_cast<SPFontFace *>(&obj)) { //XML Tree being directly used here while it shouldn't be. sp_repr_get_double(obj.getRepr(), "units_per_em", &units_per_em); @@ -344,7 +344,7 @@ SvgFont::scaled_font_render_glyph (cairo_scaled_font_t */*scaled_font*/, if (node->hasChildren()){ //render the SVG described on this glyph's child nodes. - for(auto& child: node->_children) { + for(auto& child: node->children) { { SPPath *path = dynamic_cast<SPPath *>(&child); if (path) { @@ -379,7 +379,7 @@ SvgFont::scaled_font_render_glyph (cairo_scaled_font_t */*scaled_font*/, cairo_font_face_t* SvgFont::get_font_face(){ if (!this->userfont) { - for(auto& node: font->_children) { + for(auto& node: font->children) { SPGlyph *glyph = dynamic_cast<SPGlyph *>(&node); if (glyph) { glyphs.push_back(glyph); diff --git a/src/document.cpp b/src/document.cpp index 3dcec4795..aebb7829f 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -257,7 +257,7 @@ void SPDocument::setCurrentPersp3D(Persp3D * const persp) { void SPDocument::getPerspectivesInDefs(std::vector<Persp3D*> &list) const { - for (auto& i: root->defs->_children) { + for (auto& i: root->defs->children) { if (SP_IS_PERSP3D(&i)) { list.push_back(SP_PERSP3D(&i)); } @@ -1256,7 +1256,7 @@ static std::vector<SPItem*> &find_items_in_area(std::vector<SPItem*> &s, SPGroup { g_return_val_if_fail(SP_IS_GROUP(group), s); - for (auto& o: group->_children) { + for (auto& o: group->children) { if ( SP_IS_ITEM(&o) ) { if (SP_IS_GROUP(&o) && (SP_GROUP(&o)->effectiveLayerMode(dkey) == SPGroup::LAYER || into_groups)) { s = find_items_in_area(s, SP_GROUP(&o), dkey, area, test, take_insensitive, into_groups); @@ -1278,7 +1278,7 @@ Returns true if an item is among the descendants of group (recursively). */ static bool item_is_in_group(SPItem *item, SPGroup *group) { - for (auto& o: group->_children) { + for (auto& o: group->children) { if ( SP_IS_ITEM(&o) ) { if (SP_ITEM(&o) == item) { return true; @@ -1298,7 +1298,7 @@ SPItem *SPDocument::getItemFromListAtPointBottom(unsigned int dkey, SPGroup *gro Inkscape::Preferences *prefs = Inkscape::Preferences::get(); gdouble delta = prefs->getDouble("/options/cursortolerance/value", 1.0); - for (auto& o: group->_children) { + for (auto& o: group->children) { if (bottomMost) { break; } @@ -1328,7 +1328,7 @@ The list can be persisted, which improves "find at multiple points" speed. */ void SPDocument::build_flat_item_list(unsigned int dkey, SPGroup *group, gboolean into_groups) const { - for (auto& o: group->_children) { + for (auto& o: group->children) { if (!SP_IS_ITEM(&o)) { continue; } @@ -1392,7 +1392,7 @@ static SPItem *find_group_at_point(unsigned int dkey, SPGroup *group, Geom::Poin Inkscape::Preferences *prefs = Inkscape::Preferences::get(); gdouble delta = prefs->getDouble("/options/cursortolerance/value", 1.0); - for (auto& o: group->_children) { + for (auto& o: group->children) { if (!SP_IS_ITEM(&o)) { continue; } @@ -1597,7 +1597,7 @@ static unsigned int count_objects_recursive(SPObject *obj, unsigned int count) { count++; // obj itself - for (auto& i: obj->_children) { + for (auto& i: obj->children) { count = count_objects_recursive(&i, count); } @@ -1623,12 +1623,12 @@ static unsigned int objects_in_document(SPDocument *document) static void vacuum_document_recursive(SPObject *obj) { if (SP_IS_DEFS(obj)) { - for (auto& def: obj->_children) { + for (auto& def: obj->children) { // fixme: some inkscape-internal nodes in the future might not be collectable def.requestOrphanCollection(); } } else { - for (auto& i: obj->_children) { + for (auto& i: obj->children) { vacuum_document_recursive(&i); } } @@ -1757,7 +1757,7 @@ void SPDocument::importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, I // Prevent duplicates of solid swatches by checking if equivalent swatch already exists if (src && SP_IS_GRADIENT(src)) { SPGradient *s_gr = SP_GRADIENT(src); - for (auto& trg: getDefs()->_children) { + for (auto& trg: getDefs()->children) { if (&trg && (src != &trg) && SP_IS_GRADIENT(&trg)) { SPGradient *t_gr = SP_GRADIENT(&trg); if (t_gr && s_gr->isEquivalent(t_gr)) { @@ -1828,7 +1828,7 @@ void SPDocument::importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, I id.erase( pos ); // Check that it really is a duplicate - for (auto& trg: getDefs()->_children) { + for (auto& trg: getDefs()->children) { if(&trg && SP_IS_SYMBOL(&trg) && src != &trg ) { std::string id2 = trg.getRepr()->attribute("id"); diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index bedf2fa7f..1310bb343 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -986,7 +986,7 @@ void CairoRenderContext::popState(void) static bool pattern_hasItemChildren(SPPattern *pat) { - for (auto& child: pat->_children) { + for (auto& child: pat->children) { if (SP_IS_ITEM (&child)) { return true; } @@ -1086,7 +1086,7 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver // show items and render them for (SPPattern *pat_i = pat; pat_i != NULL; pat_i = pat_i->ref ? pat_i->ref->getObject() : NULL) { if (pat_i && SP_IS_OBJECT(pat_i) && pattern_hasItemChildren(pat_i)) { // find the first one with item children - for (auto& child: pat_i->_children) { + for (auto& child: pat_i->children) { if (SP_IS_ITEM(&child)) { SP_ITEM(&child)->invoke_show(drawing, dkey, SP_ITEM_REFERENCE_FLAGS); _renderer->renderItem(pattern_ctx, SP_ITEM(&child)); @@ -1115,7 +1115,7 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver // hide all items for (SPPattern *pat_i = pat; pat_i != NULL; pat_i = pat_i->ref ? pat_i->ref->getObject() : NULL) { if (pat_i && SP_IS_OBJECT(pat_i) && pattern_hasItemChildren(pat_i)) { // find the first one with item children - for (auto& child: pat_i->_children) { + for (auto& child: pat_i->children) { if (SP_IS_ITEM(&child)) { SP_ITEM(&child)->invoke_hide(dkey); } diff --git a/src/extension/internal/cairo-renderer.cpp b/src/extension/internal/cairo-renderer.cpp index 088eaf11d..cd96a7f58 100644 --- a/src/extension/internal/cairo-renderer.cpp +++ b/src/extension/internal/cairo-renderer.cpp @@ -741,7 +741,7 @@ CairoRenderer::applyClipPath(CairoRenderContext *ctx, SPClipPath const *cp) TRACE(("BEGIN clip\n")); SPObject const *co = cp; - for (auto& child: co->_children) { + for (auto& child: co->children) { SPItem const *item = dynamic_cast<SPItem const *>(&child); if (item) { @@ -800,7 +800,7 @@ CairoRenderer::applyMask(CairoRenderContext *ctx, SPMask const *mask) TRACE(("BEGIN mask\n")); SPObject const *co = mask; - for (auto& child: co->_children) { + for (auto& child: co->children) { SPItem const *item = dynamic_cast<SPItem const *>(&child); if (item) { // TODO fix const correctness: diff --git a/src/extension/internal/emf-print.cpp b/src/extension/internal/emf-print.cpp index c0c086c7a..d4c5d95a3 100644 --- a/src/extension/internal/emf-print.cpp +++ b/src/extension/internal/emf-print.cpp @@ -1042,7 +1042,7 @@ void PrintEmf::do_clip_if_present(SPStyle const *style){ /* find the clipping path */ Geom::PathVector combined_pathvector; Geom::Affine tfc; // clipping transform, generally not the same as item transform - for (auto& child: scp->_children) { + for (auto& child: scp->children) { item = SP_ITEM(&child); if (!item) { break; @@ -1085,7 +1085,7 @@ Geom::PathVector PrintEmf::merge_PathVector_with_group(Geom::PathVector const &c new_combined_pathvector = combined_pathvector; SPGroup *group = SP_GROUP(item); Geom::Affine tfc = item->transform * transform; - for (auto& child: group->_children) { + for (auto& child: group->children) { item = SP_ITEM(&child); if (!item) { break; diff --git a/src/extension/internal/javafx-out.cpp b/src/extension/internal/javafx-out.cpp index 51608e4fa..d7ad7e6f7 100644 --- a/src/extension/internal/javafx-out.cpp +++ b/src/extension/internal/javafx-out.cpp @@ -732,7 +732,7 @@ bool JavaFXOutput::doTreeRecursive(SPDocument *doc, SPObject *obj) /** * Descend into children */ - for (auto &child: obj->_children) + for (auto &child: obj->children) { if (!doTreeRecursive(doc, &child)) { return false; @@ -804,7 +804,7 @@ bool JavaFXOutput::doBody(SPDocument *doc, SPObject *obj) /** * Descend into children */ - for (auto &child: obj->_children) + for (auto &child: obj->children) { if (!doBody(doc, &child)) { return false; diff --git a/src/extension/internal/metafile-print.cpp b/src/extension/internal/metafile-print.cpp index 5c10f7dd9..061eb634d 100644 --- a/src/extension/internal/metafile-print.cpp +++ b/src/extension/internal/metafile-print.cpp @@ -293,7 +293,7 @@ void PrintMetafile::brush_classify(SPObject *parent, int depth, Inkscape::Pixbuf } // still looking? Look at this pattern's children, if there are any - for (auto& child: pat_i->_children) { + for (auto& child: pat_i->children) { if (*epixbuf || *hatchType != -1) { break; } @@ -304,7 +304,7 @@ void PrintMetafile::brush_classify(SPObject *parent, int depth, Inkscape::Pixbuf *epixbuf = ((SPImage *)parent)->pixbuf; return; } else { // some inkscape rearrangements pass through nodes between pattern and image which are not classified as either. - for (auto& child: parent->_children) { + for (auto& child: parent->children) { if (*epixbuf || *hatchType != -1) { break; } diff --git a/src/extension/internal/pov-out.cpp b/src/extension/internal/pov-out.cpp index 08f533010..8df883069 100644 --- a/src/extension/internal/pov-out.cpp +++ b/src/extension/internal/pov-out.cpp @@ -479,7 +479,7 @@ bool PovOutput::doTreeRecursive(SPDocument *doc, SPObject *obj) /** * Descend into children */ - for (auto &child: obj->_children) + for (auto &child: obj->children) { if (!doTreeRecursive(doc, &child)) return false; diff --git a/src/file.cpp b/src/file.cpp index 11e5f0a42..9ba180cb4 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1204,7 +1204,7 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri, // Count the number of top-level items in the imported document. guint items_count = 0; - for (auto& child: doc->getRoot()->_children) { + for (auto& child: doc->getRoot()->children) { if (SP_IS_ITEM(&child)) { items_count++; } @@ -1234,7 +1234,7 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri, // Construct a new object representing the imported image, // and insert it into the current document. SPObject *new_obj = NULL; - for (auto& child: doc->getRoot()->_children) { + for (auto& child: doc->getRoot()->children) { if (SP_IS_ITEM(&child)) { Inkscape::XML::Node *newitem = child.getRepr()->duplicate(xml_in_doc); diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp index 2e99842ec..3255bfb70 100644 --- a/src/filter-chemistry.cpp +++ b/src/filter-chemistry.cpp @@ -51,7 +51,7 @@ static guint count_filter_hrefs(SPObject *o, SPFilter *filter) i ++; } - for (auto& child: o->_children) { + for (auto& child: o->children) { i += count_filter_hrefs(&child, filter); } @@ -491,14 +491,14 @@ void remove_filter_gaussian_blur (SPObject *item) bool filter_is_single_gaussian_blur(SPFilter *filter) { - return (filter->_children.size() == 1 && - SP_IS_GAUSSIANBLUR(&filter->_children.front())); + return (filter->children.size() == 1 && + SP_IS_GAUSSIANBLUR(&filter->children.front())); } double get_single_gaussian_blur_radius(SPFilter *filter) { - if (filter->_children.size() == 1 && - SP_IS_GAUSSIANBLUR(&filter->_children.front())) { + if (filter->children.size() == 1 && + SP_IS_GAUSSIANBLUR(&filter->children.front())) { SPGaussianBlur *gb = SP_GAUSSIANBLUR(filter->firstChild()); double x = gb->stdDeviation.getNumber(); diff --git a/src/filters/componenttransfer.cpp b/src/filters/componenttransfer.cpp index e52f6d478..bc91e58a7 100644 --- a/src/filters/componenttransfer.cpp +++ b/src/filters/componenttransfer.cpp @@ -49,7 +49,7 @@ static void sp_feComponentTransfer_children_modified(SPFeComponentTransfer *sp_c { if (sp_componenttransfer->renderer) { bool set[4] = {false, false, false, false}; - for(auto& node: sp_componenttransfer->_children) { + for(auto& node: sp_componenttransfer->children) { int i = 4; SPFeFuncNode *funcNode = SP_FEFUNCNODE(&node); diff --git a/src/filters/merge.cpp b/src/filters/merge.cpp index 6af1e8115..8ec40cb46 100644 --- a/src/filters/merge.cpp +++ b/src/filters/merge.cpp @@ -94,7 +94,7 @@ void SPFeMerge::build_renderer(Inkscape::Filters::Filter* filter) { int in_nr = 0; - for(auto& input: _children) { + for(auto& input: children) { if (SP_IS_FEMERGENODE(&input)) { SPFeMergeNode *node = SP_FEMERGENODE(&input); nr_merge->set_input(in_nr, node->input); diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp index 9c46a2efb..b6ea0d8c1 100644 --- a/src/gradient-chemistry.cpp +++ b/src/gradient-chemistry.cpp @@ -199,7 +199,7 @@ static guint count_gradient_hrefs(SPObject *o, SPGradient *gr) i ++; } - for (auto& child: o->_children) { + for (auto& child: o->children) { i += count_gradient_hrefs(&child, gr); } @@ -926,7 +926,7 @@ void sp_item_gradient_reverse_vector(SPItem *item, Inkscape::PaintTarget fill_or GSList *child_objects = NULL; std::vector<double> offsets; double offset; - for (auto& child: vector->_children) { + for (auto& child: vector->children) { child_reprs = g_slist_prepend (child_reprs, child.getRepr()); child_objects = g_slist_prepend (child_objects, &child); offset=0; @@ -979,7 +979,7 @@ void sp_item_gradient_invert_vector_color(SPItem *item, Inkscape::PaintTarget fi sp_gradient_repr_set_link(gradient->getRepr(), vector); } - for (auto& child: vector->_children) { + for (auto& child: vector->children) { if (SP_IS_STOP(&child)) { guint32 color = SP_STOP(&child)->get_rgba32(); //g_message("Stop color %d", color); diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp index b9d1fe109..fd2f4b33b 100644 --- a/src/gradient-drag.cpp +++ b/src/gradient-drag.cpp @@ -2539,7 +2539,7 @@ void GrDrag::deleteSelected(bool just_one) // cannot use vector->vector.stops.size() because the vector might be invalidated by deletion of a midstop // manually count the children, don't know if there already exists a function for this... int len = 0; - for (auto& child: stopinfo->vector->_children) + for (auto& child: stopinfo->vector->children) { if ( SP_IS_STOP(&child) ) { len ++; diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index fb1740fc5..24d2d7f1e 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -53,7 +53,7 @@ static void hide_other_items_recursively(SPObject *o, GSList *list, unsigned dke // recurse if (!g_slist_find(list, o)) { - for (auto& child: o->_children) { + for (auto& child: o->children) { hide_other_items_recursively(&child, list, dkey); } } diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp index c59db9df6..2255157e2 100644 --- a/src/helper/png-write.cpp +++ b/src/helper/png-write.cpp @@ -374,7 +374,7 @@ static void hide_other_items_recursively(SPObject *o, const std::vector<SPItem*> // recurse if (list.end()==find(list.begin(),list.end(),o)) { - for (auto& child: o->_children) { + for (auto& child: o->children) { hide_other_items_recursively(&child, list, dkey); } } diff --git a/src/helper/stock-items.cpp b/src/helper/stock-items.cpp index cf10a6c4d..647e42916 100644 --- a/src/helper/stock-items.cpp +++ b/src/helper/stock-items.cpp @@ -204,7 +204,7 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock) } SPObject *object = NULL; if (!strcmp(base, "marker") && !stock) { - for (auto& child: defs->_children) + for (auto& child: defs->children) { if (child.getRepr()->attribute("inkscape:stockid") && !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) && @@ -216,7 +216,7 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock) } else if (!strcmp(base,"pattern") && !stock) { - for (auto& child: defs->_children) + for (auto& child: defs->children) { if (child.getRepr()->attribute("inkscape:stockid") && !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) && @@ -228,7 +228,7 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock) } else if (!strcmp(base,"gradient") && !stock) { - for (auto& child: defs->_children) + for (auto& child: defs->children) { if (child.getRepr()->attribute("inkscape:stockid") && !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) && diff --git a/src/id-clash.cpp b/src/id-clash.cpp index fecad9eee..cb5893133 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -187,7 +187,7 @@ find_references(SPObject *elem, refmap_type &refmap) } // recurse - for (auto& child: elem->_children) + for (auto& child: elem->children) { find_references(&child, refmap); } @@ -242,7 +242,7 @@ change_clashing_ids(SPDocument *imported_doc, SPDocument *current_doc, // recurse - for (auto& child: elem->_children) + for (auto& child: elem->children) { change_clashing_ids(imported_doc, current_doc, &child, refmap, id_changes); } diff --git a/src/layer-fns.cpp b/src/layer-fns.cpp index d149089db..030ebc07e 100644 --- a/src/layer-fns.cpp +++ b/src/layer-fns.cpp @@ -36,7 +36,7 @@ bool is_layer(SPObject &object) { * @returns NULL if there are no further layers under a parent */ SPObject *next_sibling_layer(SPObject *layer) { - SPObject::ChildrenList &list = layer->parent->_children; + SPObject::ChildrenList &list = layer->parent->children; auto l = std::find_if(++list.iterator_to(*layer), list.end(), &is_layer); return l != list.end() ? &*l : nullptr; } @@ -48,7 +48,7 @@ SPObject *next_sibling_layer(SPObject *layer) { SPObject *previous_sibling_layer(SPObject *layer) { using Inkscape::Algorithms::find_last_if; - SPObject::ChildrenList &list = layer->parent->_children; + SPObject::ChildrenList &list = layer->parent->children; auto l = find_last_if(list.begin(), list.iterator_to(*layer), &is_layer); return l != list.iterator_to(*layer) ? &*(l) : nullptr; } @@ -60,8 +60,8 @@ SPObject *previous_sibling_layer(SPObject *layer) { SPObject *first_descendant_layer(SPObject *layer) { SPObject *first_descendant = nullptr; while (true) { - auto tmp = std::find_if(layer->_children.begin(), layer->_children.end(), &is_layer); - if (tmp != layer->_children.end()) { + auto tmp = std::find_if(layer->children.begin(), layer->children.end(), &is_layer); + if (tmp != layer->children.end()) { first_descendant = layer; } else { break; @@ -79,8 +79,8 @@ SPObject *first_descendant_layer(SPObject *layer) { SPObject *last_child_layer(SPObject *layer) { using Inkscape::Algorithms::find_last_if; - auto l = find_last_if(layer->_children.begin(), layer->_children.end(), &is_layer); - return l != layer->_children.end() ? &*l : nullptr; + auto l = find_last_if(layer->children.begin(), layer->children.end(), &is_layer); + return l != layer->children.end() ? &*l : nullptr; } SPObject *last_elder_layer(SPObject *root, SPObject *layer) { diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp index 937d67895..4deae821a 100644 --- a/src/libnrtype/font-lister.cpp +++ b/src/libnrtype/font-lister.cpp @@ -298,7 +298,7 @@ void FontLister::update_font_list_recursive(SPObject *r, std::list<Glib::ustring l->push_back(Glib::ustring(font_family)); } - for (auto& child: r->_children) { + for (auto& child: r->children) { update_font_list_recursive(&child, l); } } diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index c62ead2b3..049e10f0f 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -107,7 +107,7 @@ void LPEPerspectivePath::refresh(Gtk::Entry* perspective) { perspectiveID = perspective->get_text(); Persp3D *first = 0; Persp3D *persp = 0; - for (auto& child: lpeobj->document->getDefs()->_children) { + for (auto& child: lpeobj->document->getDefs()->children) { if (SP_IS_PERSP3D(&child) && first == 0) { first = SP_PERSP3D(&child); } diff --git a/src/main.cpp b/src/main.cpp index 7ab27dcb2..c01c4ee46 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1228,7 +1228,7 @@ static int sp_process_file_list(GSList *fl) std::vector<SPItem*> items; SPRoot *root = doc->getRoot(); doc->ensureUpToDate(); - for (auto& iter: root->_children) { + for (auto& iter: root->children) { SPItem* item = (SPItem*) &iter; if (! (SP_IS_TEXT(item) || SP_IS_FLOWTEXT(item) || SP_IS_GROUP(item))) { continue; @@ -1483,7 +1483,7 @@ do_query_all_recurse (SPObject *o) } } - for(auto& child: o->_children) { + for(auto& child: o->children) { do_query_all_recurse (&child); } } diff --git a/src/object-set.cpp b/src/object-set.cpp index b7b84e163..1b994106a 100644 --- a/src/object-set.cpp +++ b/src/object-set.cpp @@ -93,7 +93,7 @@ bool ObjectSet::_anyAncestorIsInSet(SPObject *object) { } void ObjectSet::_removeDescendantsFromSet(SPObject *object) { - for (auto& child: object->_children) { + for (auto& child: object->children) { if (includes(&child)) { _remove(&child); // there is certainly no children of this child in the set @@ -130,7 +130,7 @@ SPObject *ObjectSet::_getMutualAncestor(SPObject *object) { bool flag = true; while (o->parent != nullptr) { - for (auto &child: o->parent->_children) { + for (auto &child: o->parent->children) { if(&child != o && !includes(&child)) { flag = false; break; @@ -147,7 +147,7 @@ SPObject *ObjectSet::_getMutualAncestor(SPObject *object) { void ObjectSet::_removeAncestorsFromSet(SPObject *object) { SPObject* o = object; while (o->parent != nullptr) { - for (auto &child: o->parent->_children) { + for (auto &child: o->parent->children) { if (&child != o) { _add(&child); } diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 580fb5fc7..307dcf062 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -90,7 +90,7 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent, Geom::Rect bbox_to_snap_incl = bbox_to_snap; // _incl means: will include the snapper tolerance bbox_to_snap_incl.expandBy(getSnapperTolerance()); // see? - for (auto& o: parent->_children) { + for (auto& o: parent->children) { g_assert(dt != NULL); SPItem *item = dynamic_cast<SPItem *>(&o); if (item && !(dt->itemIsHidden(item) && !clip_or_mask)) { diff --git a/src/persp3d.cpp b/src/persp3d.cpp index 849e332bf..e260af8e5 100644 --- a/src/persp3d.cpp +++ b/src/persp3d.cpp @@ -215,7 +215,7 @@ Persp3D *persp3d_create_xml_element(SPDocument *document, Persp3DImpl *dup) {// Persp3D *persp3d_document_first_persp(SPDocument *document) { Persp3D *first = 0; - for (auto& child: document->getDefs()->_children) { + for (auto& child: document->getDefs()->children) { if (SP_IS_PERSP3D(&child)) { first = SP_PERSP3D(&child); break; @@ -534,7 +534,7 @@ persp3d_print_debugging_info (Persp3D *persp) { void persp3d_print_debugging_info_all(SPDocument *document) { - for (auto& child: document->getDefs()->_children) { + for (auto& child: document->getDefs()->children) { if (SP_IS_PERSP3D(&child)) { persp3d_print_debugging_info(SP_PERSP3D(&child)); } diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 28bcadef5..81d711e77 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -433,7 +433,7 @@ static void add_ids_recursive(std::vector<const gchar *> &ids, SPObject *obj) ids.push_back(obj->getId()); if (dynamic_cast<SPGroup *>(obj)) { - for (auto& child: obj->_children) { + for (auto& child: obj->children) { add_ids_recursive(ids, &child); } } @@ -587,7 +587,7 @@ void sp_edit_clear_all(Inkscape::Selection *selection) */ std::vector<SPItem*> &get_all_items(std::vector<SPItem*> &list, SPObject *from, SPDesktop *desktop, bool onlyvisible, bool onlysensitive, bool ingroups, std::vector<SPItem*> const &exclude) { - for (auto& child: from->_children) { + for (auto& child: from->children) { SPItem *item = dynamic_cast<SPItem *>(&child); if (item && !desktop->isLayer(item) && @@ -1143,7 +1143,7 @@ void sp_selection_lower_to_bottom(Inkscape::Selection *selection, SPDesktop *des pp = document->getObjectByRepr(repr->parent()); minpos = 0; g_assert(dynamic_cast<SPGroup *>(pp)); - for (auto& pc: pp->_children) { + for (auto& pc: pp->children) { if(dynamic_cast<SPItem *>(&pc)) { break; } @@ -1202,7 +1202,7 @@ take_style_from_item(SPObject *object) (dynamic_cast<SPText *>(object) && object->firstChild() && object->firstChild()->getNext() == NULL)) { // if this is a text with exactly one tspan child, merge the style of that tspan as well // If this is a group, merge the style of its topmost (last) child with style - auto list = object->_children | boost::adaptors::reversed; + auto list = object->children | boost::adaptors::reversed; for (auto& element: list) { if (element.style ) { SPCSSAttr *temp = sp_css_attr_from_object(&element, SP_STYLE_FLAG_IFSET); @@ -1624,9 +1624,9 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine cons } else if (transform_flowtext_with_frame) { // apply the inverse of the region's transform to the <use> so that the flow remains // the same (even though the output itself gets transformed) - for (auto& region: item->_children) { + for (auto& region: item->children) { if (dynamic_cast<SPFlowregion *>(®ion) || dynamic_cast<SPFlowregionExclude *>(®ion)) { - for (auto& itm: region._children) { + for (auto& itm: region.children) { SPUse *use = dynamic_cast<SPUse *>(&itm); if ( use ) { use->doWriteTransform(use->getRepr(), use->transform.inverse(), NULL, compensate); @@ -2348,7 +2348,7 @@ typedef struct ListReverse { private: static GSList *make_list(SPObject *object, SPObject *limit) { GSList *list = NULL; - for (auto &child: object->_children) { + for (auto &child: object->children) { if (&child == limit) { break; } @@ -3435,7 +3435,7 @@ void sp_selection_untile(SPDesktop *desktop) Geom::Affine pat_transform = basePat->getTransform(); pat_transform *= item->transform; - for (auto& child: pattern->_children) { + for (auto& child: pattern->children) { if (dynamic_cast<SPItem *>(&child)) { Inkscape::XML::Node *copy = child.getRepr()->duplicate(xml_doc); SPItem *i = dynamic_cast<SPItem *>(desktop->currentLayer()->appendChildRepr(copy)); @@ -4103,7 +4103,7 @@ void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path) { for ( std::map<SPObject*,SPItem*>::iterator it = referenced_objects.begin() ; it != referenced_objects.end() ; ++it) { SPObject *obj = (*it).first; // Group containing the clipped paths or masks GSList *items_to_move = NULL; - for (auto& child: obj->_children) { + for (auto& child: obj->children) { // Collect all clipped paths and masks within a single group Inkscape::XML::Node *copy = child.getRepr()->duplicate(xml_doc); if(copy->attribute("inkscape:original-d") && copy->attribute("inkscape:path-effect")) @@ -4264,7 +4264,7 @@ static void itemtree_map(void (*f)(SPItem *, SPDesktop *), SPObject *root, SPDes f(item, desktop); } } - for (auto& child: root->_children) { + for (auto& child: root->children) { //don't recurse into locked layers SPItem *item = dynamic_cast<SPItem *>(&child); if (!(item && desktop->isLayer(item) && item->isLocked())) { diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index 25bf77f00..c0c848bbd 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -128,7 +128,7 @@ void SPClipPath::update(SPCtx* ctx, unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -167,7 +167,7 @@ void SPClipPath::modified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -200,7 +200,7 @@ Inkscape::DrawingItem *SPClipPath::show(Inkscape::Drawing &drawing, unsigned int Inkscape::DrawingGroup *ai = new Inkscape::DrawingGroup(drawing); display = sp_clippath_view_new_prepend(display, key, ai); - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_ITEM(&child)) { Inkscape::DrawingItem *ac = SP_ITEM(&child)->invoke_show(drawing, key, SP_ITEM_REFERENCE_FLAGS); @@ -223,7 +223,7 @@ Inkscape::DrawingItem *SPClipPath::show(Inkscape::Drawing &drawing, unsigned int } void SPClipPath::hide(unsigned int key) { - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_ITEM(&child)) { SP_ITEM(&child)->invoke_hide(key); } @@ -252,7 +252,7 @@ void SPClipPath::setBBox(unsigned int key, Geom::OptRect const &bbox) { Geom::OptRect SPClipPath::geometricBounds(Geom::Affine const &transform) { Geom::OptRect bbox; - for (auto& i: _children) { + for (auto& i: children) { if (SP_IS_ITEM(&i)) { Geom::OptRect tmp = SP_ITEM(&i)->geometricBounds(Geom::Affine(SP_ITEM(&i)->transform) * transform); bbox.unionWith(tmp); diff --git a/src/sp-defs.cpp b/src/sp-defs.cpp index af4ea96d7..865c6891e 100644 --- a/src/sp-defs.cpp +++ b/src/sp-defs.cpp @@ -54,7 +54,7 @@ void SPDefs::modified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -79,7 +79,7 @@ Inkscape::XML::Node* SPDefs::write(Inkscape::XML::Document *xml_doc, Inkscape::X } GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags); if (crepr) { l = g_slist_prepend(l, crepr); @@ -93,7 +93,7 @@ Inkscape::XML::Node* SPDefs::write(Inkscape::XML::Document *xml_doc, Inkscape::X } } else { - for (auto& child: _children) { + for (auto& child: children) { child.updateRepr(flags); } } diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp index 170847c0b..9ecee6a5f 100644 --- a/src/sp-filter.cpp +++ b/src/sp-filter.cpp @@ -268,7 +268,7 @@ Inkscape::XML::Node* SPFilter::write(Inkscape::XML::Document *doc, Inkscape::XML } GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node *crepr = child.updateRepr(doc, NULL, flags); if (crepr) { @@ -282,7 +282,7 @@ Inkscape::XML::Node* SPFilter::write(Inkscape::XML::Document *doc, Inkscape::XML l = g_slist_remove (l, l->data); } } else { - for (auto& child: _children) { + for (auto& child: children) { child.updateRepr(flags); } } @@ -420,7 +420,7 @@ void sp_filter_build_renderer(SPFilter *sp_filter, Inkscape::Filters::Filter *nr } nr_filter->clear_primitives(); - for(auto& primitive_obj: sp_filter->_children) { + for(auto& primitive_obj: sp_filter->children) { if (SP_IS_FILTER_PRIMITIVE(&primitive_obj)) { SPFilterPrimitive *primitive = SP_FILTER_PRIMITIVE(&primitive_obj); g_assert(primitive != NULL); @@ -439,7 +439,7 @@ int sp_filter_primitive_count(SPFilter *filter) { g_assert(filter != NULL); int count = 0; - for(auto& primitive_obj: filter->_children) { + for(auto& primitive_obj: filter->children) { if (SP_IS_FILTER_PRIMITIVE(&primitive_obj)) { count++; } @@ -512,7 +512,7 @@ Glib::ustring sp_filter_get_new_result_name(SPFilter *filter) { g_assert(filter != NULL); int largest = 0; - for(auto& primitive_obj: filter->_children) { + for(auto& primitive_obj: filter->children) { if (SP_IS_FILTER_PRIMITIVE(&primitive_obj)) { Inkscape::XML::Node *repr = primitive_obj.getRepr(); char const *result = repr->attribute("result"); diff --git a/src/sp-flowdiv.cpp b/src/sp-flowdiv.cpp index ad04f0d78..17b841e37 100644 --- a/src/sp-flowdiv.cpp +++ b/src/sp-flowdiv.cpp @@ -27,7 +27,7 @@ void SPFlowdiv::update(SPCtx *ctx, unsigned int flags) { childflags &= SP_OBJECT_MODIFIED_CASCADE; GSList* l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -65,7 +65,7 @@ void SPFlowdiv::modified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -104,7 +104,7 @@ Inkscape::XML::Node* SPFlowdiv::write(Inkscape::XML::Document *xml_doc, Inkscape GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node* c_repr = NULL; if ( SP_IS_FLOWTSPAN (&child) ) { @@ -126,7 +126,7 @@ Inkscape::XML::Node* SPFlowdiv::write(Inkscape::XML::Document *xml_doc, Inkscape l = g_slist_remove(l, l->data); } } else { - for (auto& child: _children) { + for (auto& child: children) { if ( SP_IS_FLOWTSPAN (&child) ) { child.updateRepr(flags); } else if ( SP_IS_FLOWPARA(&child) ) { @@ -168,7 +168,7 @@ void SPFlowtspan::update(SPCtx *ctx, unsigned int flags) { childflags &= SP_OBJECT_MODIFIED_CASCADE; GSList* l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -206,7 +206,7 @@ void SPFlowtspan::modified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -242,7 +242,7 @@ Inkscape::XML::Node *SPFlowtspan::write(Inkscape::XML::Document *xml_doc, Inksca GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node* c_repr = NULL; if ( SP_IS_FLOWTSPAN(&child) ) { @@ -264,7 +264,7 @@ Inkscape::XML::Node *SPFlowtspan::write(Inkscape::XML::Document *xml_doc, Inksca l = g_slist_remove(l, l->data); } } else { - for (auto& child: _children) { + for (auto& child: children) { if ( SP_IS_FLOWTSPAN(&child) ) { child.updateRepr(flags); } else if ( SP_IS_FLOWPARA(&child) ) { @@ -307,7 +307,7 @@ void SPFlowpara::update(SPCtx *ctx, unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; GSList* l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -343,7 +343,7 @@ void SPFlowpara::modified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -379,7 +379,7 @@ Inkscape::XML::Node *SPFlowpara::write(Inkscape::XML::Document *xml_doc, Inkscap GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node* c_repr = NULL; if ( SP_IS_FLOWTSPAN(&child) ) { @@ -401,7 +401,7 @@ Inkscape::XML::Node *SPFlowpara::write(Inkscape::XML::Document *xml_doc, Inkscap l = g_slist_remove(l, l->data); } } else { - for (auto& child: _children) { + for (auto& child: children) { if ( SP_IS_FLOWTSPAN(&child) ) { child.updateRepr(flags); } else if ( SP_IS_FLOWPARA(&child) ) { diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp index 71e029072..716a09914 100644 --- a/src/sp-flowregion.cpp +++ b/src/sp-flowregion.cpp @@ -63,7 +63,7 @@ void SPFlowregion::update(SPCtx *ctx, unsigned int flags) { GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -102,7 +102,7 @@ void SPFlowregion::UpdateComputed(void) } computed.clear(); - for (auto& child: _children) { + for (auto& child: children) { Shape *shape = 0; GetDest(&child, &shape); computed.push_back(shape); @@ -118,7 +118,7 @@ void SPFlowregion::modified(guint flags) { GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -145,7 +145,7 @@ Inkscape::XML::Node *SPFlowregion::write(Inkscape::XML::Document *xml_doc, Inksc } GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { if ( !dynamic_cast<SPTitle *>(&child) && !dynamic_cast<SPDesc *>(&child) ) { Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags); @@ -161,7 +161,7 @@ Inkscape::XML::Node *SPFlowregion::write(Inkscape::XML::Document *xml_doc, Inksc l = g_slist_remove(l, l->data); } - for (auto& child: _children) { + for (auto& child: children) { if ( !dynamic_cast<SPTitle *>(&child) && !dynamic_cast<SPDesc *>(&child) ) { child.updateRepr(flags); } @@ -220,7 +220,7 @@ void SPFlowregionExclude::update(SPCtx *ctx, unsigned int flags) { GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -258,7 +258,7 @@ void SPFlowregionExclude::UpdateComputed(void) computed = NULL; } - for (auto& child: _children) { + for (auto& child: children) { GetDest(&child, &computed); } } @@ -272,7 +272,7 @@ void SPFlowregionExclude::modified(guint flags) { GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -300,7 +300,7 @@ Inkscape::XML::Node *SPFlowregionExclude::write(Inkscape::XML::Document *xml_doc GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags); if (crepr) { @@ -315,7 +315,7 @@ Inkscape::XML::Node *SPFlowregionExclude::write(Inkscape::XML::Document *xml_doc } } else { - for (auto& child: _children) { + for (auto& child: children) { child.updateRepr(flags); } } diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp index 83fa5a1b4..79988bdc2 100644 --- a/src/sp-flowtext.cpp +++ b/src/sp-flowtext.cpp @@ -72,7 +72,7 @@ void SPFlowtext::update(SPCtx* ctx, unsigned int flags) { GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -135,7 +135,7 @@ void SPFlowtext::modified(unsigned int flags) { } } - for (auto& o: _children) { + for (auto& o: children) { if (dynamic_cast<SPFlowregion *>(&o)) { region = &o; break; @@ -223,7 +223,7 @@ Inkscape::XML::Node* SPFlowtext::write(Inkscape::XML::Document* doc, Inkscape::X GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node *c_repr = NULL; if ( dynamic_cast<SPFlowdiv *>(&child) || dynamic_cast<SPFlowpara *>(&child) || dynamic_cast<SPFlowregion *>(&child) || dynamic_cast<SPFlowregionExclude *>(&child)) { @@ -241,7 +241,7 @@ Inkscape::XML::Node* SPFlowtext::write(Inkscape::XML::Document* doc, Inkscape::X l = g_slist_remove(l, l->data); } } else { - for (auto& child: _children) { + for (auto& child: children) { if ( dynamic_cast<SPFlowdiv *>(&child) || dynamic_cast<SPFlowpara *>(&child) || dynamic_cast<SPFlowregion *>(&child) || dynamic_cast<SPFlowregionExclude *>(&child)) { child.updateRepr(flags); } @@ -390,7 +390,7 @@ void SPFlowtext::_buildLayoutInput(SPObject *root, Shape const *exclusion_shape, *pending_line_break_object = NULL; } - for (auto& child: root->_children) { + for (auto& child: root->children) { SPString *str = dynamic_cast<SPString *>(&child); if (str) { if (*pending_line_break_object) { @@ -440,7 +440,7 @@ Shape* SPFlowtext::_buildExclusionShape() const Shape *shape = new Shape(); Shape *shape_temp = new Shape(); - for (auto& child: _children) { + for (auto& child: children) { // RH: is it right that this shouldn't be recursive? SPFlowregionExclude *c_child = dynamic_cast<SPFlowregionExclude *>(const_cast<SPObject*>(&child)); if ( c_child && c_child->computed && c_child->computed->hasEdges() ) { @@ -593,7 +593,7 @@ SPItem *SPFlowtext::get_frame(SPItem const *after) SPItem *frame = 0; SPObject *region = 0; - for (auto& o: _children) { + for (auto& o: children) { if (dynamic_cast<SPFlowregion *>(&o)) { region = &o; break; @@ -603,7 +603,7 @@ SPItem *SPFlowtext::get_frame(SPItem const *after) if (region) { bool past = false; - for (auto& o: region->_children) { + for (auto& o: region->children) { SPItem *item = dynamic_cast<SPItem *>(&o); if (item) { if ( (after == NULL) || past ) { @@ -707,7 +707,7 @@ Geom::Affine SPFlowtext::set_transform (Geom::Affine const &xform) } SPObject *region = NULL; - for (auto& o: _children) { + for (auto& o: children) { if (dynamic_cast<SPFlowregion *>(&o)) { region = &o; break; diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp index abfae1a1f..afa209dbe 100644 --- a/src/sp-gradient.cpp +++ b/src/sp-gradient.cpp @@ -276,7 +276,7 @@ void SPGradient::build(SPDocument *document, Inkscape::XML::Node *repr) SPPaintServer::build(document, repr); - for (auto& ochild: _children) { + for (auto& ochild: children) { if (SP_IS_STOP(&ochild)) { this->has_stops = TRUE; break; @@ -481,7 +481,7 @@ void SPGradient::remove_child(Inkscape::XML::Node *child) SPPaintServer::remove_child(child); this->has_stops = FALSE; - for (auto& ochild: _children) { + for (auto& ochild: children) { if (SP_IS_STOP(&ochild)) { this->has_stops = TRUE; break; @@ -536,7 +536,7 @@ void SPGradient::modified(guint flags) // FIXME: climb up the ladder of hrefs GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -558,7 +558,7 @@ void SPGradient::modified(guint flags) SPStop* SPGradient::getFirstStop() { SPStop* first = nullptr; - for (auto& ochild: _children) { + for (auto& ochild: children) { if (SP_IS_STOP(&ochild)) { first = SP_STOP(&ochild); break; @@ -588,7 +588,7 @@ Inkscape::XML::Node *SPGradient::write(Inkscape::XML::Document *xml_doc, Inkscap if (flags & SP_OBJECT_WRITE_BUILD) { GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags); if (crepr) { @@ -916,7 +916,7 @@ bool SPGradient::invalidateArray() void SPGradient::rebuildVector() { gint len = 0; - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_STOP(&child)) { len ++; } @@ -938,7 +938,7 @@ void SPGradient::rebuildVector() } } - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_STOP(&child)) { SPStop *stop = SP_STOP(&child); @@ -1023,7 +1023,7 @@ void SPGradient::rebuildArray() array.read( SP_MESH( this ) ); has_patches = false; - for (auto& ro: _children) { + for (auto& ro: children) { if (SP_IS_MESHROW(&ro)) { has_patches = true; // std::cout << " Has Patches" << std::endl; diff --git a/src/sp-hatch.cpp b/src/sp-hatch.cpp index c06045e8f..f667017fa 100644 --- a/src/sp-hatch.cpp +++ b/src/sp-hatch.cpp @@ -233,7 +233,7 @@ void SPHatch::set(unsigned int key, const gchar* value) bool SPHatch::_hasHatchPatchChildren(SPHatch const *hatch) { - for (auto& child: hatch->_children) { + for (auto& child: hatch->children) { SPHatchPath const *hatchPath = dynamic_cast<SPHatchPath const *>(&child); if (hatchPath) { return true; @@ -248,7 +248,7 @@ std::vector<SPHatchPath*> SPHatch::hatchPaths() SPHatch *src = chase_hrefs<SPHatch>(this, sigc::ptr_fun(&_hasHatchPatchChildren)); if (src) { - for (auto& child: src->_children) { + for (auto& child: src->children) { SPHatchPath *hatchPath = dynamic_cast<SPHatchPath *>(&child); if (hatchPath) { list.push_back(hatchPath); @@ -264,7 +264,7 @@ std::vector<SPHatchPath const*> SPHatch::hatchPaths() const SPHatch const *src = chase_hrefs<SPHatch const>(this, sigc::ptr_fun(&_hasHatchPatchChildren)); if (src) { - for (auto& child: src->_children) { + for (auto& child: src->children) { SPHatchPath const *hatchPath = dynamic_cast<SPHatchPath const*>(&child); if (hatchPath) { list.push_back(hatchPath); diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index 8d482d9b1..63edb3c84 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -235,7 +235,7 @@ Inkscape::XML::Node* SPGroup::write(Inkscape::XML::Document *xml_doc, Inkscape:: l = NULL; - for (auto& child: _children) { + for (auto& child: children) { if ( !dynamic_cast<SPTitle *>(&child) && !dynamic_cast<SPDesc *>(&child) ) { Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags); @@ -251,7 +251,7 @@ Inkscape::XML::Node* SPGroup::write(Inkscape::XML::Document *xml_doc, Inkscape:: l = g_slist_remove (l, l->data); } } else { - for (auto& child: _children) { + for (auto& child: children) { if ( !dynamic_cast<SPTitle *>(&child) && !dynamic_cast<SPDesc *>(&child) ) { child.updateRepr(flags); } @@ -297,7 +297,7 @@ Geom::OptRect SPGroup::bbox(Geom::Affine const &transform, SPItem::BBoxType bbox } void SPGroup::print(SPPrintContext *ctx) { - for(auto& child: _children){ + for(auto& child: children){ SPObject *o = &child; SPItem *item = dynamic_cast<SPItem *>(o); if (item) { @@ -365,7 +365,7 @@ void SPGroup::hide (unsigned int key) { void SPGroup::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const { - for (auto& o: _children) + for (auto& o: children) { SPItem const *item = dynamic_cast<SPItem const *>(&o); if (item) { @@ -511,13 +511,13 @@ sp_item_group_ungroup (SPGroup *group, std::vector<SPItem*> &children, bool do_d GSList *objects = NULL; Geom::Affine const g(group->transform); - for (auto& child: group->_children) { + for (auto& child: group->children) { if (SPItem *citem = dynamic_cast<SPItem *>(&child)) { sp_item_group_ungroup_handle_clones(citem, g); } } - for (auto& child: group->_children) { + for (auto& child: group->children) { SPItem *citem = dynamic_cast<SPItem *>(&child); if (citem) { /* Merging of style */ @@ -662,7 +662,7 @@ std::vector<SPItem*> sp_item_group_item_list(SPGroup * group) std::vector<SPItem*> s; g_return_val_if_fail(group != NULL, s); - for (auto& o: group->_children) { + for (auto& o: group->children) { if ( dynamic_cast<SPItem *>(&o) ) { s.push_back((SPItem*)&o); } @@ -735,7 +735,7 @@ void SPGroup::_updateLayerMode(unsigned int display_key) { void SPGroup::translateChildItems(Geom::Translate const &tr) { if ( hasChildren() ) { - for (auto& o: _children) { + for (auto& o: children) { SPItem *item = dynamic_cast<SPItem *>(&o); if ( item ) { sp_item_move_rel(item, tr); @@ -748,9 +748,9 @@ void SPGroup::translateChildItems(Geom::Translate const &tr) void SPGroup::scaleChildItemsRec(Geom::Scale const &sc, Geom::Point const &p, bool noRecurse) { if ( hasChildren() ) { - for (auto& o: _children) { + for (auto& o: children) { if ( SPDefs *defs = dynamic_cast<SPDefs *>(&o) ) { // select symbols from defs, ignore clips, masks, patterns - for (auto& defschild: defs->_children) { + for (auto& defschild: defs->children) { SPGroup *defsgroup = dynamic_cast<SPGroup *>(&defschild); if (defsgroup) defsgroup->scaleChildItemsRec(sc, p, false); @@ -871,7 +871,7 @@ void SPGroup::scaleChildItemsRec(Geom::Scale const &sc, Geom::Point const &p, bo gint SPGroup::getItemCount() const { gint len = 0; - for (auto& child: _children) { + for (auto& child: children) { if (dynamic_cast<SPItem const *>(&child)) { len++; } diff --git a/src/sp-item.cpp b/src/sp-item.cpp index 53b4c0879..69da28c66 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -308,15 +308,15 @@ bool is_item(SPObject const &object) { void SPItem::raiseToTop() { using Inkscape::Algorithms::find_last_if; - auto topmost = find_last_if(++parent->_children.iterator_to(*this), parent->_children.end(), &is_item); - if (topmost != parent->_children.end()) { + auto topmost = find_last_if(++parent->children.iterator_to(*this), parent->children.end(), &is_item); + if (topmost != parent->children.end()) { getRepr()->parent()->changeOrder( getRepr(), topmost->getRepr() ); } } void SPItem::raiseOne() { - auto next_higher = std::find_if(++parent->_children.iterator_to(*this), parent->_children.end(), &is_item); - if (next_higher != parent->_children.end()) { + auto next_higher = std::find_if(++parent->children.iterator_to(*this), parent->children.end(), &is_item); + if (next_higher != parent->children.end()) { Inkscape::XML::Node *ref = next_higher->getRepr(); getRepr()->parent()->changeOrder(getRepr(), ref); } @@ -325,8 +325,8 @@ void SPItem::raiseOne() { void SPItem::lowerOne() { using Inkscape::Algorithms::find_last_if; - auto next_lower = find_last_if(parent->_children.begin(), parent->_children.iterator_to(*this), &is_item); - if (next_lower != parent->_children.iterator_to(*this)) { + auto next_lower = find_last_if(parent->children.begin(), parent->children.iterator_to(*this), &is_item); + if (next_lower != parent->children.iterator_to(*this)) { next_lower--; Inkscape::XML::Node *ref = next_lower->getRepr(); getRepr()->parent()->changeOrder(getRepr(), ref); @@ -334,8 +334,8 @@ void SPItem::lowerOne() { } void SPItem::lowerToBottom() { - auto bottom = std::find_if(parent->_children.begin(), parent->_children.iterator_to(*this), &is_item); - if (bottom != parent->_children.iterator_to(*this)) { + auto bottom = std::find_if(parent->children.begin(), parent->children.iterator_to(*this), &is_item); + if (bottom != parent->children.iterator_to(*this)) { bottom--; Inkscape::XML::Node *ref = bottom->getRepr() ; parent->getRepr()->changeOrder(getRepr(), ref); @@ -705,7 +705,7 @@ Inkscape::XML::Node* SPItem::write(Inkscape::XML::Document *xml_doc, Inkscape::X // so we need to add any children from the underlying object to the new repr if (flags & SP_OBJECT_WRITE_BUILD) { GSList *l = NULL; - for (auto& child: object->_children) { + for (auto& child: object->children) { if (dynamic_cast<SPTitle *>(&child) || dynamic_cast<SPDesc *>(&child)) { Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags); if (crepr) { @@ -719,7 +719,7 @@ Inkscape::XML::Node* SPItem::write(Inkscape::XML::Document *xml_doc, Inkscape::X l = g_slist_remove (l, l->data); } } else { - for (auto& child: object->_children) { + for (auto& child: object->children) { if (dynamic_cast<SPTitle *>(&child) || dynamic_cast<SPDesc *>(&child)) { child.updateRepr(flags); } @@ -928,7 +928,7 @@ unsigned int SPItem::pos_in_parent() const { unsigned int pos = 0; - for (auto& iter: parent->_children) { + for (auto& iter: parent->children) { if (&iter == this) { return pos; } @@ -974,7 +974,7 @@ void SPItem::getSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscap for (std::list<SPObject const *>::const_iterator o = clips_and_masks.begin(); o != clips_and_masks.end(); ++o) { if (*o) { // obj is a group object, the children are the actual clippers - for(auto& child: (*o)->_children) { + for(auto& child: (*o)->children) { SPItem *item = dynamic_cast<SPItem *>(const_cast<SPObject*>(&child)); if (item) { std::vector<Inkscape::SnapCandidatePoint> p_clip_or_mask; @@ -1302,7 +1302,7 @@ void SPItem::adjust_stroke_width_recursive(double expansion) // A clone's child is the ghost of its original - we must not touch it, skip recursion if ( !dynamic_cast<SPUse *>(this) ) { - for (auto& o: _children) { + for (auto& o: children) { SPItem *item = dynamic_cast<SPItem *>(&o); if (item) { item->adjust_stroke_width_recursive(expansion); @@ -1317,7 +1317,7 @@ void SPItem::freeze_stroke_width_recursive(bool freeze) // A clone's child is the ghost of its original - we must not touch it, skip recursion if ( !dynamic_cast<SPUse *>(this) ) { - for (auto& o: _children) { + for (auto& o: children) { SPItem *item = dynamic_cast<SPItem *>(&o); if (item) { item->freeze_stroke_width_recursive(freeze); @@ -1337,7 +1337,7 @@ sp_item_adjust_rects_recursive(SPItem *item, Geom::Affine advertized_transform) rect->compensateRxRy(advertized_transform); } - for(auto& o: item->_children) { + for(auto& o: item->children) { SPItem *itm = dynamic_cast<SPItem *>(&o); if (itm) { sp_item_adjust_rects_recursive(itm, advertized_transform); @@ -1357,7 +1357,7 @@ void SPItem::adjust_paint_recursive (Geom::Affine advertized_transform, Geom::Af // also we do not recurse into clones, because a clone's child is the ghost of its original - // we must not touch it if (!(this && (dynamic_cast<SPText *>(this) || dynamic_cast<SPUse *>(this)))) { - for (auto& o: _children) { + for (auto& o: children) { SPItem *item = dynamic_cast<SPItem *>(&o); if (item) { // At the level of the transformed item, t_ancestors is identity; @@ -1666,7 +1666,7 @@ SPItem const *sp_item_first_item_child(SPObject const *obj) SPItem *sp_item_first_item_child(SPObject *obj) { SPItem *child = 0; - for (auto& iter: obj->_children) { + for (auto& iter: obj->children) { SPItem *tmp = dynamic_cast<SPItem *>(&iter); if ( tmp ) { child = tmp; diff --git a/src/sp-mask.cpp b/src/sp-mask.cpp index e643cc9bd..1b44c26ff 100644 --- a/src/sp-mask.cpp +++ b/src/sp-mask.cpp @@ -227,7 +227,7 @@ Inkscape::DrawingItem *SPMask::sp_mask_show(Inkscape::Drawing &drawing, unsigned Inkscape::DrawingGroup *ai = new Inkscape::DrawingGroup(drawing); this->display = sp_mask_view_new_prepend (this->display, key, ai); - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_ITEM (&child)) { Inkscape::DrawingItem *ac = SP_ITEM (&child)->invoke_show (drawing, key, SP_ITEM_REFERENCE_FLAGS); @@ -250,7 +250,7 @@ void SPMask::sp_mask_hide(unsigned int key) { g_return_if_fail (this != NULL); g_return_if_fail (SP_IS_MASK (this)); - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_ITEM (&child)) { SP_ITEM(&child)->invoke_hide (key); } diff --git a/src/sp-mesh-array.cpp b/src/sp-mesh-array.cpp index 20d6d0d85..6bd5c85d7 100644 --- a/src/sp-mesh-array.cpp +++ b/src/sp-mesh-array.cpp @@ -632,12 +632,12 @@ void SPMeshNodeArray::read( SPMesh *mg_in ) { guint max_column = 0; guint irow = 0; // Corresponds to top of patch being read in. - for (auto& ro: mg->_children) { + for (auto& ro: mg->children) { if (SP_IS_MESHROW(&ro)) { guint icolumn = 0; // Corresponds to left of patch being read in. - for (auto& po: ro._children) { + for (auto& po: ro.children) { if (SP_IS_MESHPATCH(&po)) { @@ -652,7 +652,7 @@ void SPMeshNodeArray::read( SPMesh *mg_in ) { // Only 'top' side defined for first row. if( irow != 0 ) ++istop; - for (auto& so: po._children) { + for (auto& so: po.children) { if (SP_IS_STOP(&so)) { if( istop > 3 ) { @@ -848,13 +848,13 @@ void SPMeshNodeArray::write( SPMesh *mg ) { // First we must delete reprs for old mesh rows and patches. GSList *descendant_reprs = NULL; GSList *descendant_objects = NULL; - for (auto& row: mg->_children) { + for (auto& row: mg->children) { descendant_reprs = g_slist_prepend (descendant_reprs, row.getRepr()); descendant_objects = g_slist_prepend (descendant_objects, &row); - for (auto& patch: row._children) { + for (auto& patch: row.children) { descendant_reprs = g_slist_prepend (descendant_reprs, patch.getRepr()); descendant_objects = g_slist_prepend (descendant_objects, &patch); - for (auto& stop: patch._children) { + for (auto& stop: patch.children) { descendant_reprs = g_slist_prepend (descendant_reprs, stop.getRepr()); descendant_objects = g_slist_prepend (descendant_objects, &stop); } diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index 173055dbd..e1d69e297 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -248,7 +248,7 @@ void SPNamedView::build(SPDocument *document, Inkscape::XML::Node *repr) { this->readAttr( "inkscape:lockguides" ); /* Construct guideline list */ - for (auto& o: _children) { + for (auto& o: children) { if (SP_IS_GUIDE(&o)) { SPGuide * g = SP_GUIDE(&o); this->guides.push_back(g); @@ -858,7 +858,7 @@ void sp_namedview_update_layers_from_document (SPDesktop *desktop) } // if that didn't work out, look for the topmost layer if (!layer) { - for (auto& iter: document->getRoot()->_children) { + for (auto& iter: document->getRoot()->children) { if (desktop->isLayer(&iter)) { layer = &iter; } diff --git a/src/sp-object-group.cpp b/src/sp-object-group.cpp index bfed08218..62c6f7a87 100644 --- a/src/sp-object-group.cpp +++ b/src/sp-object-group.cpp @@ -50,7 +50,7 @@ Inkscape::XML::Node *SPObjectGroup::write(Inkscape::XML::Document *xml_doc, Inks } GSList *l = 0; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags); if (crepr) { @@ -64,7 +64,7 @@ Inkscape::XML::Node *SPObjectGroup::write(Inkscape::XML::Document *xml_doc, Inks l = g_slist_remove(l, l->data); } } else { - for (auto& child: _children) { + for (auto& child: children) { child.updateRepr(flags); } } diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 587efd4f6..ccd70f4cb 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -400,7 +400,7 @@ void SPObject::changeCSS(SPCSSAttr *css, gchar const *attr) std::vector<SPObject*> SPObject::childList(bool add_ref, Action) { std::vector<SPObject*> l; - for (auto& child: _children) { + for (auto& child: children) { if (add_ref) { sp_object_ref(&child); } @@ -467,7 +467,7 @@ void SPObject::requestOrphanCollection() { } void SPObject::_sendDeleteSignalRecursive() { - for (auto& child: _children) { + for (auto& child: children) { child._delete_signal.emit(&child); child._sendDeleteSignalRecursive(); } @@ -497,7 +497,7 @@ void SPObject::deleteObject(bool propagate, bool propagate_descendants) void SPObject::cropToObject(SPObject *except) { std::vector<SPObject*> toDelete; - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_ITEM(&child)) { if (child.isAncestorOf(except)) { child.cropToObject(except); @@ -525,11 +525,11 @@ void SPObject::attach(SPObject *object, SPObject *prev) object->parent = this; this->_updateTotalHRefCount(object->_total_hrefcount); - auto it = _children.begin(); + auto it = children.begin(); if (prev != nullptr) { - it = ++_children.iterator_to(*prev); + it = ++children.iterator_to(*prev); } - _children.insert(it, *object); + children.insert(it, *object); if (!object->xml_space.set) object->xml_space.value = this->xml_space.value; @@ -542,12 +542,12 @@ void SPObject::reorder(SPObject* obj, SPObject* prev) { g_return_if_fail(obj != prev); g_return_if_fail(!prev || prev->parent == obj->parent); - auto it = _children.begin(); + auto it = children.begin(); if (prev != nullptr) { - it = ++_children.iterator_to(*prev); + it = ++children.iterator_to(*prev); } - _children.splice(it, _children, _children.iterator_to(*obj)); + children.splice(it, children, children.iterator_to(*obj)); } void SPObject::detach(SPObject *object) @@ -558,7 +558,7 @@ void SPObject::detach(SPObject *object) g_return_if_fail(SP_IS_OBJECT(object)); g_return_if_fail(object->parent == this); - _children.erase(_children.iterator_to(*object)); + children.erase(children.iterator_to(*object)); object->releaseReferences(); object->parent = NULL; @@ -572,10 +572,10 @@ SPObject *SPObject::get_child_by_repr(Inkscape::XML::Node *repr) g_return_val_if_fail(repr != NULL, NULL); SPObject *result = nullptr; - if (_children.size() > 0 && _children.back().getRepr() == repr) { - result = &_children.back(); // optimization for common scenario + if (children.size() > 0 && children.back().getRepr() == repr) { + result = &children.back(); // optimization for common scenario } else { - for (auto& child: _children) { + for (auto& child: children) { if (child.getRepr() == repr) { result = &child; break; @@ -609,7 +609,7 @@ void SPObject::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) void SPObject::release() { SPObject* object = this; debug("id=%p, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object)); - auto tmp = _children | boost::adaptors::transformed([](SPObject& obj){return &obj;}); + auto tmp = children | boost::adaptors::transformed([](SPObject& obj){return &obj;}); std::vector<SPObject *> toRelease(tmp.begin(), tmp.end()); for (auto& p: toRelease) { @@ -797,8 +797,8 @@ void SPObject::releaseReferences() { SPObject *SPObject::getPrev() { SPObject *prev = nullptr; - if (parent && !parent->_children.empty() && &parent->_children.front() != this) { - prev = &*(--parent->_children.iterator_to(*this)); + if (parent && !parent->children.empty() && &parent->children.front() != this) { + prev = &*(--parent->children.iterator_to(*this)); } return prev; } @@ -806,8 +806,8 @@ SPObject *SPObject::getPrev() SPObject* SPObject::getNext() { SPObject *next = nullptr; - if (parent && !parent->_children.empty() && &parent->_children.back() != this) { - next = &*(++parent->_children.iterator_to(*this)); + if (parent && !parent->children.empty() && &parent->children.back() != this) { + next = &*(++parent->children.iterator_to(*this)); } return next; } @@ -1475,7 +1475,7 @@ bool SPObject::setTitleOrDesc(gchar const *value, gchar const *svg_tagname, bool } else { // remove the current content of the 'text' or 'desc' element - auto tmp = elem->_children | boost::adaptors::transformed([](SPObject& obj) { return &obj; }); + auto tmp = elem->children | boost::adaptors::transformed([](SPObject& obj) { return &obj; }); std::vector<SPObject*> vec(tmp.begin(), tmp.end()); for (auto &child: vec) { child->deleteObject(); @@ -1489,7 +1489,7 @@ bool SPObject::setTitleOrDesc(gchar const *value, gchar const *svg_tagname, bool SPObject* SPObject::findFirstChild(gchar const *tagname) const { - for (auto& child: const_cast<SPObject*>(this)->_children) + for (auto& child: const_cast<SPObject*>(this)->children) { if (child.repr->type() == Inkscape::XML::ELEMENT_NODE && !strcmp(child.repr->name(), tagname)) { @@ -1503,7 +1503,7 @@ char* SPObject::textualContent() const { GString* text = g_string_new(""); - for (auto& child: _children) + for (auto& child: children) { Inkscape::XML::NodeType child_type = child.repr->type(); @@ -1530,7 +1530,7 @@ void SPObject::recursivePrintTree( unsigned level ) std::cout << " "; } std::cout << (getId()?getId():"No object id") << std::endl; - for (auto& child: _children) { + for (auto& child: children) { child.recursivePrintTree(level + 1); } } diff --git a/src/sp-object.h b/src/sp-object.h index 94c9d5629..1c6212664 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -306,13 +306,13 @@ public: */ SPObject *getPrev(); - bool hasChildren() const { return ( _children.size() > 0 ); } + bool hasChildren() const { return ( children.size() > 0 ); } - SPObject *firstChild() { return _children.empty() ? nullptr : &_children.front(); } - SPObject const *firstChild() const { return _children.empty() ? nullptr : &_children.front(); } + SPObject *firstChild() { return children.empty() ? nullptr : &children.front(); } + SPObject const *firstChild() const { return children.empty() ? nullptr : &children.front(); } - SPObject *lastChild() { return _children.empty() ? nullptr : &_children.back(); } - SPObject const *lastChild() const { return _children.empty() ? nullptr : &_children.back(); } + SPObject *lastChild() { return children.empty() ? nullptr : &children.back(); } + SPObject const *lastChild() const { return children.empty() ? nullptr : &children.back(); } enum Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow }; @@ -857,7 +857,7 @@ public: ListHook, &SPObject::_child_hook >> ChildrenList; - ChildrenList _children; + ChildrenList children; virtual void read_content(); void recursivePrintTree(unsigned level = 0); // For debugging diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp index fde9f90f1..3b1ae3f0b 100644 --- a/src/sp-pattern.cpp +++ b/src/sp-pattern.cpp @@ -223,7 +223,7 @@ void SPPattern::_getChildren(std::list<SPObject *> &l) { for (SPPattern *pat_i = this; pat_i != NULL; pat_i = pat_i->ref ? pat_i->ref->getObject() : NULL) { if (pat_i->firstChild()) { // find the first one with children - for (auto& child: pat_i->_children) { + for (auto& child: pat_i->children) { l.push_back(&child); } break; // do not go further up the chain if children are found @@ -319,7 +319,7 @@ guint SPPattern::_countHrefs(SPObject *o) const i++; } - for (auto& child: o->_children) { + for (auto& child: o->children) { i += _countHrefs(&child); } @@ -508,7 +508,7 @@ Geom::OptRect SPPattern::viewbox() const bool SPPattern::_hasItemChildren() const { - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_ITEM(&child)) { return true; } @@ -558,7 +558,7 @@ cairo_pattern_t *SPPattern::pattern_new(cairo_t *base_ct, Geom::OptRect const &b Inkscape::DrawingGroup *root = new Inkscape::DrawingGroup(drawing); drawing.setRoot(root); - for (auto& child: shown->_children) { + for (auto& child: shown->children) { if (SP_IS_ITEM(&child)) { // for each item in pattern, show it on our drawing, add to the group, // and connect to the release signal in case the item gets deleted @@ -654,7 +654,7 @@ cairo_pattern_t *SPPattern::pattern_new(cairo_t *base_ct, Geom::OptRect const &b // Render drawing to pattern_surface via drawing context, this calls root->render // which is really DrawingItem->render(). drawing.render(dc, one_tile); - for (auto& child: shown->_children) { + for (auto& child: shown->children) { if (SP_IS_ITEM(&child)) { SP_ITEM(&child)->invoke_hide(dkey); } diff --git a/src/sp-root.cpp b/src/sp-root.cpp index cfd0ced10..34047054a 100644 --- a/src/sp-root.cpp +++ b/src/sp-root.cpp @@ -73,7 +73,7 @@ void SPRoot::build(SPDocument *document, Inkscape::XML::Node *repr) SPGroup::build(document, repr); // Search for first <defs> node - for (auto& o: _children) { + for (auto& o: children) { if (SP_IS_DEFS(&o)) { this->defs = SP_DEFS(&o); break; @@ -174,7 +174,7 @@ void SPRoot::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) if (co && SP_IS_DEFS(co)) { // We search for first <defs> node - it is not beautiful, but works - for (auto& c: _children) { + for (auto& c: children) { if (SP_IS_DEFS(&c)) { this->defs = SP_DEFS(&c); break; @@ -189,7 +189,7 @@ void SPRoot::remove_child(Inkscape::XML::Node *child) SPObject *iter = 0; // We search for first remaining <defs> node - it is not beautiful, but works - for (auto& child: _children) { + for (auto& child: children) { iter = &child; if (SP_IS_DEFS(iter) && (SPDefs *)iter != this->defs) { this->defs = (SPDefs *)iter; diff --git a/src/sp-switch.cpp b/src/sp-switch.cpp index 7679cc31e..971583a9a 100644 --- a/src/sp-switch.cpp +++ b/src/sp-switch.cpp @@ -32,7 +32,7 @@ SPSwitch::~SPSwitch() { SPObject *SPSwitch::_evaluateFirst() { SPObject *first = 0; - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_ITEM(&child) && sp_item_evaluate(SP_ITEM(&child))) { first = &child; break; diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 193289c2b..e52869942 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -155,7 +155,7 @@ void SPText::update(SPCtx *ctx, guint flags) { // Create temporary list of children GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child, this); l = g_slist_prepend (l, &child); } @@ -235,7 +235,7 @@ void SPText::modified(guint flags) { // Create temporary list of children GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child, this); l = g_slist_prepend (l, &child); } @@ -262,7 +262,7 @@ Inkscape::XML::Node *SPText::write(Inkscape::XML::Document *xml_doc, Inkscape::X GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_TITLE(&child) || SP_IS_DESC(&child)) { continue; } @@ -286,7 +286,7 @@ Inkscape::XML::Node *SPText::write(Inkscape::XML::Document *xml_doc, Inkscape::X l = g_slist_remove (l, l->data); } } else { - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_TITLE(&child) || SP_IS_DESC(&child)) { continue; } @@ -606,7 +606,7 @@ unsigned SPText::_buildLayoutInput(SPObject *root, Inkscape::Text::Layout::Optio } } - for (auto& child: root->_children) { + for (auto& child: root->children) { SPString *str = dynamic_cast<SPString *>(&child); if (str) { Glib::ustring const &string = str->string; @@ -628,7 +628,7 @@ void SPText::rebuildLayout() Inkscape::Text::Layout::OptionalTextTagAttrs optional_attrs; _buildLayoutInput(this, optional_attrs, 0, false); layout.calculateFlow(); - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_TEXTPATH(&child)) { SPTextPath const *textpath = SP_TEXTPATH(&child); if (textpath->originalPath != NULL) { @@ -640,7 +640,7 @@ void SPText::rebuildLayout() //g_print("%s", layout.dumpAsText().c_str()); // set the x,y attributes on role:line spans - for (auto& child: _children) { + for (auto& child: children) { if (SP_IS_TSPAN(&child)) { SPTSpan *tspan = SP_TSPAN(&child); if ( (tspan->role != SP_TSPAN_ROLE_UNSPECIFIED) @@ -676,7 +676,7 @@ void SPText::_adjustFontsizeRecursive(SPItem *item, double ex, bool is_root) item->updateRepr(); } - for(auto& o: item->_children) { + for(auto& o: item->children) { if (SP_IS_ITEM(&o)) _adjustFontsizeRecursive(SP_ITEM(&o), ex, false); } @@ -695,7 +695,7 @@ void SPText::_adjustCoordsRecursive(SPItem *item, Geom::Affine const &m, double SP_TREF(item)->attributes.transform(m, ex, ex, is_root); } - for(auto& o: item->_children) { + for(auto& o: item->children) { if (SP_IS_ITEM(&o)) _adjustCoordsRecursive(SP_ITEM(&o), m, ex, false); } diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp index 66866c9f7..48e2b41f6 100644 --- a/src/sp-tref.cpp +++ b/src/sp-tref.cpp @@ -506,7 +506,7 @@ sp_tref_convert_to_tspan(SPObject *obj) //////////////////// else { GSList *l = NULL; - for (auto& child: obj->_children) { + for (auto& child: obj->children) { sp_object_ref(&child, obj); l = g_slist_prepend (l, &child); } diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp index 23df18503..5a82f2c05 100644 --- a/src/sp-tspan.cpp +++ b/src/sp-tspan.cpp @@ -96,7 +96,7 @@ void SPTSpan::update(SPCtx *ctx, guint flags) { } childflags &= SP_OBJECT_MODIFIED_CASCADE; - for (auto& ochild: _children) { + for (auto& ochild: children) { if ( flags || ( ochild.uflags & SP_OBJECT_MODIFIED_FLAG )) { ochild.updateDisplay(ctx, childflags); } @@ -128,7 +128,7 @@ void SPTSpan::modified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; - for (auto& ochild: _children) { + for (auto& ochild: children) { if (flags || (ochild.mflags & SP_OBJECT_MODIFIED_FLAG)) { ochild.emitModified(flags); } @@ -175,7 +175,7 @@ Inkscape::XML::Node* SPTSpan::write(Inkscape::XML::Document *xml_doc, Inkscape:: if ( flags&SP_OBJECT_WRITE_BUILD ) { GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node* c_repr=NULL; if ( SP_IS_TSPAN(&child) || SP_IS_TREF(&child) ) { @@ -197,7 +197,7 @@ Inkscape::XML::Node* SPTSpan::write(Inkscape::XML::Document *xml_doc, Inkscape:: l = g_slist_remove(l, l->data); } } else { - for (auto& child: _children) { + for (auto& child: children) { if ( SP_IS_TSPAN(&child) || SP_IS_TREF(&child) ) { child.updateRepr(flags); } else if ( SP_IS_TEXTPATH(&child) ) { @@ -313,7 +313,7 @@ void SPTextPath::update(SPCtx *ctx, guint flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; - for (auto& ochild: _children) { + for (auto& ochild: children) { if ( flags || ( ochild.uflags & SP_OBJECT_MODIFIED_FLAG )) { ochild.updateDisplay(ctx, flags); } @@ -367,7 +367,7 @@ void SPTextPath::modified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; - for (auto& ochild: _children) { + for (auto& ochild: children) { if (flags || (ochild.mflags & SP_OBJECT_MODIFIED_FLAG)) { ochild.emitModified(flags); } @@ -399,7 +399,7 @@ Inkscape::XML::Node* SPTextPath::write(Inkscape::XML::Document *xml_doc, Inkscap if ( flags & SP_OBJECT_WRITE_BUILD ) { GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node* c_repr=NULL; if ( SP_IS_TSPAN(&child) || SP_IS_TREF(&child) ) { @@ -421,7 +421,7 @@ Inkscape::XML::Node* SPTextPath::write(Inkscape::XML::Document *xml_doc, Inkscap l = g_slist_remove(l, l->data); } } else { - for (auto& child: _children) { + for (auto& child: children) { if ( SP_IS_TSPAN(&child) || SP_IS_TREF(&child) ) { child.updateRepr(flags); } else if ( SP_IS_TEXTPATH(&child) ) { @@ -466,7 +466,7 @@ void sp_textpath_to_text(SPObject *tp) // make a list of textpath children GSList *tp_reprs = NULL; - for (auto& o: tp->_children) { + for (auto& o: tp->children) { tp_reprs = g_slist_prepend(tp_reprs, o.getRepr()); } diff --git a/src/sp-use.cpp b/src/sp-use.cpp index cef967c90..b24363278 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -436,7 +436,7 @@ void SPUse::move_compensate(Geom::Affine const *mp) { //BUT move clippaths accordingly. //if clone has a clippath, move it accordingly if(clip_ref->getObject()){ - for(auto& clip: clip_ref->getObject()->_children){ + for(auto& clip: clip_ref->getObject()->children){ SPItem *item = (SPItem*) &clip; if(item){ item->transform *= m; @@ -446,7 +446,7 @@ void SPUse::move_compensate(Geom::Affine const *mp) { } } if(mask_ref->getObject()){ - for(auto& mask: mask_ref->getObject()->_children){ + for(auto& mask: mask_ref->getObject()->children){ SPItem *item = (SPItem*) &mask; if(item){ item->transform *= m; @@ -476,7 +476,7 @@ void SPUse::move_compensate(Geom::Affine const *mp) { //if clone has a clippath, move it accordingly if(clip_ref->getObject()){ - for(auto& clip: clip_ref->getObject()->_children){ + for(auto& clip: clip_ref->getObject()->children){ SPItem *item = (SPItem*) &clip; if(item){ item->transform *= clone_move.inverse(); @@ -486,7 +486,7 @@ void SPUse::move_compensate(Geom::Affine const *mp) { } } if(mask_ref->getObject()){ - for(auto& mask: mask_ref->getObject()->_children){ + for(auto& mask: mask_ref->getObject()->children){ SPItem *item = (SPItem*) &mask; if(item){ item->transform *= clone_move.inverse(); diff --git a/src/splivarot.cpp b/src/splivarot.cpp index 4ac9143f0..a4c4ac6cd 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -883,7 +883,7 @@ void item_outline_add_marker_child( SPItem const *item, Geom::Affine marker_tran // note: a marker child item can be an item group! if (SP_IS_GROUP(item)) { // recurse through all childs: - for (auto& o: item->_children) { + for (auto& o: item->children) { if ( SP_IS_ITEM(&o) ) { item_outline_add_marker_child(SP_ITEM(&o), tr, pathv_in); } diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp index 56048d1f7..a950dfebe 100644 --- a/src/text-chemistry.cpp +++ b/src/text-chemistry.cpp @@ -142,7 +142,7 @@ text_put_on_path() // make a list of text children GSList *text_reprs = NULL; - for(auto& o: text->_children) { + for(auto& o: text->children) { text_reprs = g_slist_prepend(text_reprs, o.getRepr()); } @@ -240,7 +240,7 @@ text_remove_all_kerns_recursively(SPObject *o) g_strfreev(xa_comma); } - for (auto& i: o->_children) { + for (auto& i: o->children) { text_remove_all_kerns_recursively(&i); i.requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_TEXT_LAYOUT_MODIFIED_FLAG); } @@ -353,7 +353,7 @@ text_flow_into_shape() Inkscape::GC::release(text_repr); } else { // reflow an already flowed text, preserving paras - for(auto& o: text->_children) { + for(auto& o: text->children) { if (SP_IS_FLOWPARA(&o)) { Inkscape::XML::Node *para_repr = o.getRepr()->duplicate(xml_doc); root_repr->appendChild(para_repr); diff --git a/src/text-editing.cpp b/src/text-editing.cpp index 6ca2fe948..658cdf816 100644 --- a/src/text-editing.cpp +++ b/src/text-editing.cpp @@ -91,7 +91,7 @@ bool sp_te_input_is_empty(SPObject const *item) if (SP_IS_STRING(item)) { empty = SP_STRING(item)->string.empty(); } else { - for (auto& child: item->_children) { + for (auto& child: item->children) { if (!sp_te_input_is_empty(&child)) { empty = false; break; @@ -237,7 +237,7 @@ unsigned sp_text_get_length(SPObject const *item) length++; } - for (auto& child: item->_children) { + for (auto& child: item->children) { if (SP_IS_STRING(&child)) { length += SP_STRING(&child)->string.length(); } else { @@ -267,7 +267,7 @@ unsigned sp_text_get_length_upto(SPObject const *item, SPObject const *upto) } // Count the length of the children - for (auto& child: item->_children) { + for (auto& child: item->children) { if (upto && &child == upto) { // hit upto, return immediately return length; @@ -323,7 +323,7 @@ to \a item at the same level. */ static unsigned sum_sibling_text_lengths_before(SPObject const *item) { unsigned char_index = 0; - for (auto& sibling: item->parent->_children) { + for (auto& sibling: item->parent->children) { if (&sibling == item) { break; } @@ -860,7 +860,7 @@ static void sp_te_get_ustring_multiline(SPObject const *root, Glib::ustring *str if (*pending_line_break) { *string += '\n'; } - for (auto& child: root->_children) { + for (auto& child: root->children) { if (SP_IS_STRING(&child)) { *string += SP_STRING(&child)->string; } else { @@ -944,7 +944,7 @@ sp_te_set_repr_text_multiline(SPItem *text, gchar const *str) gchar *content = g_strdup (str); repr->setContent(""); - for (auto& child: object->_children) { + for (auto& child: object->children) { if (!SP_IS_FLOWREGION(&child) && !SP_IS_FLOWREGIONEXCLUDE(&child)) { repr->removeChild(child.getRepr()); } @@ -1405,7 +1405,7 @@ static void apply_css_recursive(SPObject *o, SPCSSAttr const *css) { sp_repr_css_change(o->getRepr(), const_cast<SPCSSAttr*>(css), "style"); - for (auto& child: o->_children) { + for (auto& child: o->children) { if (sp_repr_css_property(const_cast<SPCSSAttr*>(css), "opacity", NULL) != NULL) { // Unset properties which are accumulating and thus should not be set recursively. // For example, setting opacity 0.5 on a group recursively would result in the visible opacity of 0.25 for an item in the group. @@ -2073,7 +2073,7 @@ bool has_visible_text(SPObject *obj) if (SP_IS_STRING(obj) && !SP_STRING(obj)->string.empty()) { hasVisible = true; // maybe we should also check that it's not all whitespace? } else { - for (auto& child: obj->_children) { + for (auto& child: obj->children) { if (has_visible_text(const_cast<SPObject *>(&child))) { hasVisible = true; break; diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 48d53857b..b25a70b15 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -839,7 +839,7 @@ void ClipboardManagerImpl::_copyUsedDefs(SPItem *item) SPObject *mask = item->mask_ref->getObject(); _copyNode(mask->getRepr(), _doc, _defs); // recurse into the mask for its gradients etc. - for(auto& o: mask->_children) { + for(auto& o: mask->children) { SPItem *childItem = dynamic_cast<SPItem *>(&o); if (childItem) { _copyUsedDefs(childItem); @@ -857,7 +857,7 @@ void ClipboardManagerImpl::_copyUsedDefs(SPItem *item) } // recurse - for(auto& o: item->_children) { + for(auto& o: item->children) { SPItem *childItem = dynamic_cast<SPItem *>(&o); if (childItem) { _copyUsedDefs(childItem); @@ -894,7 +894,7 @@ void ClipboardManagerImpl::_copyPattern(SPPattern *pattern) _copyNode(pattern->getRepr(), _doc, _defs); // items in the pattern may also use gradients and other patterns, so recurse - for (auto& child: pattern->_children) { + for (auto& child: pattern->children) { SPItem *childItem = dynamic_cast<SPItem *>(&child); if (childItem) { _copyUsedDefs(childItem); diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp index 11af02e3c..1e8ca4405 100644 --- a/src/ui/dialog/clonetiler.cpp +++ b/src/ui/dialog/clonetiler.cpp @@ -2042,7 +2042,7 @@ void CloneTiler::clonetiler_trace_hide_tiled_clones_recursively(SPObject *from) if (!trace_drawing) return; - for (auto& o: from->_children) { + for (auto& o: from->children) { SPItem *item = dynamic_cast<SPItem *>(&o); if (item && clonetiler_is_a_clone_of(&o, NULL)) { item->invoke_hide(trace_visionkey); // FIXME: hide each tiled clone's original too! @@ -2123,7 +2123,7 @@ void CloneTiler::clonetiler_unclump(GtkWidget */*widget*/, void *) std::vector<SPItem*> to_unclump; // not including the original - for (auto& child: parent->_children) { + for (auto& child: parent->children) { if (clonetiler_is_a_clone_of (&child, obj)) { to_unclump.push_back((SPItem*)&child); } @@ -2143,7 +2143,7 @@ guint CloneTiler::clonetiler_number_of_clones(SPObject *obj) guint n = 0; - for (auto& child: parent->_children) { + for (auto& child: parent->children) { if (clonetiler_is_a_clone_of (&child, obj)) { n ++; } @@ -2172,7 +2172,7 @@ void CloneTiler::clonetiler_remove(GtkWidget */*widget*/, GtkWidget *dlg, bool d // remove old tiling GSList *to_delete = NULL; - for (auto& child: parent->_children) { + for (auto& child: parent->children) { if (clonetiler_is_a_clone_of (&child, obj)) { to_delete = g_slist_prepend (to_delete, &child); } diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index df37eb005..6f5f14d80 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -1315,7 +1315,7 @@ void DocumentProperties::changeEmbeddedScript(){ for (std::vector<SPObject *>::const_iterator it = current.begin(); it != current.end(); ++it) { SPObject* obj = *it; if (id == obj->getId()){ - int count = (int) obj->_children.size(); + int count = (int) obj->children.size(); if (count>1) g_warning("TODO: Found a script element with multiple (%d) child nodes! We must implement support for that!", count); @@ -1359,7 +1359,7 @@ void DocumentProperties::editEmbeddedScript(){ //XML Tree being used directly here while it shouldn't be. Inkscape::XML::Node *repr = obj->getRepr(); if (repr){ - auto tmp = obj->_children | boost::adaptors::transformed([](SPObject& o) { return &o; }); + auto tmp = obj->children | boost::adaptors::transformed([](SPObject& o) { return &o; }); std::vector<SPObject*> vec(tmp.begin(), tmp.end()); for (auto &child: vec) { child->deleteObject(); diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 1be5d540a..3e3ede019 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -103,7 +103,7 @@ static int input_count(const SPFilterPrimitive* prim) return 2; else if(SP_IS_FEMERGE(prim)) { // Return the number of feMergeNode connections plus an extra - return (int) (prim->_children.size() + 1); + return (int) (prim->children.size() + 1); } else return 1; @@ -1060,7 +1060,7 @@ public: { SPFeFuncNode* funcNode = NULL; bool found = false; - for(auto& node: ct->_children) { + for(auto& node: ct->children) { funcNode = SP_FEFUNCNODE(&node); if( funcNode->channel == _channel ) { found = true; @@ -1868,7 +1868,7 @@ void FilterEffectsDialog::PrimitiveList::update() bool active_found = false; _dialog._primitive_box->set_sensitive(true); _dialog.update_filter_general_settings_view(); - for(auto& prim_obj: f->_children) { + for(auto& prim_obj: f->children) { SPFilterPrimitive *prim = SP_FILTER_PRIMITIVE(&prim_obj); if(!prim) { break; @@ -2339,7 +2339,7 @@ const Gtk::TreeIter FilterEffectsDialog::PrimitiveList::find_result(const Gtk::T if(SP_IS_FEMERGE(prim)) { int c = 0; bool found = false; - for (auto& o: prim->_children) { + for (auto& o: prim->children) { if(c == attr && SP_IS_FEMERGENODE(&o)) { image = SP_FEMERGENODE(&o)->input; found = true; @@ -2531,7 +2531,7 @@ bool FilterEffectsDialog::PrimitiveList::on_button_release_event(GdkEventButton* if(SP_IS_FEMERGE(prim)) { int c = 1; bool handled = false; - for (auto& o: prim->_children) { + for (auto& o: prim->children) { if(c == _in_drag && SP_IS_FEMERGENODE(&o)) { // If input is null, delete it if(!in_val) { diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp index e156dfa13..b09ce6078 100644 --- a/src/ui/dialog/find.cpp +++ b/src/ui/dialog/find.cpp @@ -747,7 +747,7 @@ std::vector<SPItem*> &Find::all_items (SPObject *r, std::vector<SPItem*> &l, boo return l; // we're not interested in metadata } - for (auto& child: r->_children) { + for (auto& child: r->children) { SPItem *item = dynamic_cast<SPItem *>(&child); if (item && !child.cloned && !desktop->isLayer(item)) { if ((hidden || !desktop->itemIsHidden(item)) && (locked || !item->isLocked())) { diff --git a/src/ui/dialog/font-substitution.cpp b/src/ui/dialog/font-substitution.cpp index eafe5566a..b927096ab 100644 --- a/src/ui/dialog/font-substitution.cpp +++ b/src/ui/dialog/font-substitution.cpp @@ -182,7 +182,7 @@ std::vector<SPItem*> FontSubstitution::getFontReplacedItems(SPDocument* doc, Gli family = SP_TEXT(parent_text)->layout.getFontFamily(0); // Add all the spans fonts to the set gint ii = 0; - for (auto& child: parent_text->_children) { + for (auto& child: parent_text->children) { family = SP_TEXT(parent_text)->layout.getFontFamily(ii); setFontSpans.insert(family); ii++; diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp index e4639745f..f4d3a3f70 100644 --- a/src/ui/dialog/objects.cpp +++ b/src/ui/dialog/objects.cpp @@ -340,7 +340,7 @@ void ObjectsPanel::_objectsChanged(SPObject */*obj*/) void ObjectsPanel::_addObject(SPObject* obj, Gtk::TreeModel::Row* parentRow) { if ( _desktop && obj ) { - for(auto& child: obj->_children) { + for(auto& child: obj->children) { if (SP_IS_ITEM(&child)) { SPItem * item = SP_ITEM(&child); @@ -398,7 +398,7 @@ void ObjectsPanel::_updateObject( SPObject *obj, bool recurse ) { //end mark if (recurse) { - for (auto& iter: obj->_children) { + for (auto& iter: obj->children) { _updateObject(&iter, recurse); } } @@ -518,7 +518,7 @@ void ObjectsPanel::_setCompositingValues(SPItem *item) SPGaussianBlur *spblur = NULL; if (item->style->getFilter()) { - for (auto& primitive_obj: item->style->getFilter()->_children) { + for (auto& primitive_obj: item->style->getFilter()->children) { if (!SP_IS_FILTER_PRIMITIVE(&primitive_obj)) { break; } @@ -1293,7 +1293,7 @@ bool ObjectsPanel::_executeAction() break; case BUTTON_COLLAPSE_ALL: { - for (auto& obj: _document->getRoot()->_children) { + for (auto& obj: _document->getRoot()->children) { if (SP_IS_GROUP(&obj)) { _setCollapsed(SP_GROUP(&obj)); } @@ -1405,7 +1405,7 @@ void ObjectsPanel::_setCollapsed(SPGroup * group) { group->setExpanded(false); group->updateRepr(SP_OBJECT_WRITE_NO_CHILDREN | SP_OBJECT_WRITE_EXT); - for (auto& iter: group->_children) { + for (auto& iter: group->children) { if (SP_IS_GROUP(&iter)) { _setCollapsed(SP_GROUP(&iter)); } @@ -1523,7 +1523,7 @@ void ObjectsPanel::_blendChangedIter(const Gtk::TreeIter& iter, Glib::ustring bl if (blendmode != "normal") { gdouble radius = 0; if (item->style->getFilter()) { - for (auto& primitive: item->style->getFilter()->_children) { + for (auto& primitive: item->style->getFilter()->children) { if (!SP_IS_FILTER_PRIMITIVE(&primitive)) { break; } @@ -1538,7 +1538,7 @@ void ObjectsPanel::_blendChangedIter(const Gtk::TreeIter& iter, Glib::ustring bl SPFilter *filter = new_filter_simple_from_item(_document, item, blendmode.c_str(), radius); sp_style_set_property_url(item, "filter", filter, false); } else { - for (auto& primitive: item->style->getFilter()->_children) { + for (auto& primitive: item->style->getFilter()->children) { if (!SP_IS_FILTER_PRIMITIVE(&primitive)) { break; } @@ -1598,7 +1598,7 @@ void ObjectsPanel::_blurChangedIter(const Gtk::TreeIter& iter, double blur) SPFilter *filter = modify_filter_gaussian_blur_from_item(_document, item, radius); sp_style_set_property_url(item, "filter", filter, false); } else if (item->style->filter.set && item->style->getFilter()) { - for (auto& primitive: item->style->getFilter()->_children) { + for (auto& primitive: item->style->getFilter()->children) { if (!SP_IS_FILTER_PRIMITIVE(&primitive)) { break; } diff --git a/src/ui/dialog/spellcheck.cpp b/src/ui/dialog/spellcheck.cpp index 9338a4e8c..ac8ef5c15 100644 --- a/src/ui/dialog/spellcheck.cpp +++ b/src/ui/dialog/spellcheck.cpp @@ -234,7 +234,7 @@ GSList *SpellCheck::allTextItems (SPObject *r, GSList *l, bool hidden, bool lock return l; // we're not interested in metadata } - for (auto& child: r->_children) { + for (auto& child: r->children) { if (SP_IS_ITEM (&child) && !child.cloned && !desktop->isLayer(SP_ITEM(&child))) { if ((hidden || !desktop->itemIsHidden(SP_ITEM(&child))) && (locked || !SP_ITEM(&child)->isLocked())) { if (SP_IS_TEXT(&child) || SP_IS_FLOWTEXT(&child)) diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index 93bd67a3d..a723c86d8 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -115,7 +115,7 @@ void SvgFontsDialog::AttrEntry::set_text(char* t){ void SvgFontsDialog::AttrEntry::on_attr_changed(){ SPObject* o = NULL; - for (auto& node: dialog->get_selected_spfont()->_children) { + for (auto& node: dialog->get_selected_spfont()->children) { switch(this->attr){ case SP_PROP_FONT_FAMILY: if (SP_IS_FONTFACE(&node)){ @@ -170,7 +170,7 @@ void GlyphComboBox::update(SPFont* spfont){ this->append(""); //Gtk is refusing to clear the combobox when I comment out this line this->remove_all(); - for (auto& node: spfont->_children) { + for (auto& node: spfont->children) { if (SP_IS_GLYPH(&node)){ this->append((static_cast<SPGlyph*>(&node))->unicode); } @@ -308,7 +308,7 @@ void SvgFontsDialog::update_global_settings_tab(){ SPFont* font = get_selected_spfont(); if (!font) return; - for (auto& obj: font->_children) { + for (auto& obj: font->children) { if (SP_IS_FONTFACE(&obj)){ _familyname_entry->set_text((SP_FONTFACE(&obj))->font_family); } @@ -413,7 +413,7 @@ SvgFontsDialog::populate_glyphs_box() SPFont* spfont = this->get_selected_spfont(); _glyphs_observer.set(spfont); - for (auto& node: spfont->_children) { + for (auto& node: spfont->children) { if (SP_IS_GLYPH(&node)){ Gtk::TreeModel::Row row = *(_GlyphsListStore->append()); row[_GlyphsListColumns.glyph_node] = static_cast<SPGlyph*>(&node); @@ -431,7 +431,7 @@ SvgFontsDialog::populate_kerning_pairs_box() SPFont* spfont = this->get_selected_spfont(); - for (auto& node: spfont->_children) { + for (auto& node: spfont->children) { if (SP_IS_HKERN(&node)){ Gtk::TreeModel::Row row = *(_KerningPairsListStore->append()); row[_KerningPairsListColumns.first_glyph] = (static_cast<SPGlyphKerning*>(&node))->u1->attribute_string().c_str(); @@ -492,7 +492,7 @@ void SvgFontsDialog::add_glyph(){ Geom::PathVector SvgFontsDialog::flip_coordinate_system(Geom::PathVector pathv){ double units_per_em = 1000; - for (auto& obj: get_selected_spfont()->_children) { + for (auto& obj: get_selected_spfont()->children) { if (SP_IS_FONTFACE(&obj)){ //XML Tree being directly used here while it shouldn't be. sp_repr_get_double(obj.getRepr(), "units-per-em", &units_per_em); @@ -574,7 +574,7 @@ void SvgFontsDialog::missing_glyph_description_from_selected_path(){ Geom::PathVector pathv = sp_svg_read_pathv(node->attribute("d")); - for (auto& obj: get_selected_spfont()->_children) { + for (auto& obj: get_selected_spfont()->children) { if (SP_IS_MISSING_GLYPH(&obj)){ //XML Tree being directly used here while it shouldn't be. @@ -596,7 +596,7 @@ void SvgFontsDialog::reset_missing_glyph_description(){ } SPDocument* doc = desktop->getDocument(); - for (auto& obj: get_selected_spfont()->_children) { + for (auto& obj: get_selected_spfont()->children) { if (SP_IS_MISSING_GLYPH(&obj)){ //XML Tree being directly used here while it shouldn't be. obj.getRepr()->setAttribute("d", (char*) "M0,0h1000v1024h-1000z"); @@ -734,7 +734,7 @@ void SvgFontsDialog::add_kerning_pair(){ //look for this kerning pair on the currently selected font this->kerning_pair = NULL; - for (auto& node: get_selected_spfont()->_children) { + for (auto& node: get_selected_spfont()->children) { //TODO: It is not really correct to get only the first byte of each string. //TODO: We should also support vertical kerning if (SP_IS_HKERN(&node) && (static_cast<SPGlyphKerning*>(&node))->u1->contains((gchar) first_glyph.get_active_text().c_str()[0]) @@ -848,7 +848,7 @@ SPFont *new_font(SPDocument *document) void set_font_family(SPFont* font, char* str){ if (!font) return; - for (auto& obj: font->_children) { + for (auto& obj: font->children) { if (SP_IS_FONTFACE(&obj)){ //XML Tree being directly used here while it shouldn't be. obj.getRepr()->setAttribute("font-family", str); @@ -868,7 +868,7 @@ void SvgFontsDialog::add_font(){ font->setLabel(os.str().c_str()); os2 << "SVGFont " << count; - for (auto& obj: font->_children) { + for (auto& obj: font->children) { if (SP_IS_FONTFACE(&obj)){ //XML Tree being directly used here while it shouldn't be. obj.getRepr()->setAttribute("font-family", os2.str().c_str()); diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp index 1fdce34a5..84088052e 100644 --- a/src/ui/dialog/symbols.cpp +++ b/src/ui/dialog/symbols.cpp @@ -658,7 +658,7 @@ GSList* SymbolsDialog::symbols_in_doc_recursive (SPObject *r, GSList *l) l = g_slist_prepend (l, r); } - for (auto& child: r->_children) { + for (auto& child: r->children) { l = symbols_in_doc_recursive( &child, l ); } @@ -680,7 +680,7 @@ GSList* SymbolsDialog::use_in_doc_recursive (SPObject *r, GSList *l) l = g_slist_prepend (l, r); } - for (auto& child: r->_children) { + for (auto& child: r->children) { l = use_in_doc_recursive( &child, l ); } diff --git a/src/ui/dialog/tags.cpp b/src/ui/dialog/tags.cpp index 61c8b5d37..fcc9b804c 100644 --- a/src/ui/dialog/tags.cpp +++ b/src/ui/dialog/tags.cpp @@ -399,7 +399,7 @@ void TagsPanel::_objectsChanged(SPObject* root) void TagsPanel::_addObject( SPDocument* doc, SPObject* obj, Gtk::TreeModel::Row* parentRow ) { if ( _desktop && obj ) { - for (auto& child: obj->_children) { + for (auto& child: obj->children) { if (SP_IS_TAG(&child)) { Gtk::TreeModel::iterator iter = parentRow ? _store->prepend(parentRow->children()) : _store->prepend(); @@ -430,7 +430,7 @@ void TagsPanel::_addObject( SPDocument* doc, SPObject* obj, Gtk::TreeModel::Row* _tree.expand_to_path( _store->get_path(iteritems) ); - for (auto& child: obj->_children) { + for (auto& child: obj->children) { if (SP_IS_TAG_USE(&child)) { SPItem *item = SP_TAG_USE(&child)->ref->getObject(); @@ -459,7 +459,7 @@ void TagsPanel::_addObject( SPDocument* doc, SPObject* obj, Gtk::TreeModel::Row* void TagsPanel::_select_tag( SPTag * tag ) { - for (auto& child: tag->_children) { + for (auto& child: tag->children) { if (SP_IS_TAG(&child)) { _select_tag(SP_TAG(&child)); } else if (SP_IS_TAG_USE(&child)) { @@ -649,7 +649,7 @@ bool TagsPanel::_handleButtonEvent(GdkEventButton* event) for(auto i=items.begin();i!=items.end();++i){ SPObject *newobj = *i; bool addchild = true; - for (auto& child: obj->_children) { + for (auto& child: obj->children) { if (SP_IS_TAG_USE(&child) && SP_TAG_USE(&child)->ref->getObject() == newobj) { addchild = false; } diff --git a/src/ui/tools/box3d-tool.cpp b/src/ui/tools/box3d-tool.cpp index 2adba38c5..9a0b37913 100644 --- a/src/ui/tools/box3d-tool.cpp +++ b/src/ui/tools/box3d-tool.cpp @@ -118,7 +118,7 @@ static void sp_box3d_context_ensure_persp_in_defs(SPDocument *document) { SPDefs *defs = document->getDefs(); bool has_persp = false; - for (auto& child: defs->_children) { + for (auto& child: defs->children) { if (SP_IS_PERSP3D(&child)) { has_persp = true; break; diff --git a/src/ui/tools/connector-tool.cpp b/src/ui/tools/connector-tool.cpp index be8ce6d0c..11752726b 100644 --- a/src/ui/tools/connector-tool.cpp +++ b/src/ui/tools/connector-tool.cpp @@ -1114,7 +1114,7 @@ void ConnectorTool::_setActiveShape(SPItem *item) { // The idea here is to try and add a group's children to solidify // connection handling. We react to path objects with only one node. - for (auto& child: item->_children) { + for (auto& child: item->children) { if (SP_IS_PATH(&child) && SP_PATH(&child)->nodesInPath() == 1) { this->_activeShapeAddKnot((SPItem *) &child); } diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp index 3dfac5e3d..87b7bf7e3 100644 --- a/src/ui/tools/node-tool.cpp +++ b/src/ui/tools/node-tool.cpp @@ -378,7 +378,7 @@ void gather_items(NodeTool *nt, SPItem *base, SPObject *obj, Inkscape::UI::Shape r.role = role; s.insert(r); } else if (role != SHAPE_ROLE_NORMAL && (SP_IS_GROUP(obj) || SP_IS_OBJECTGROUP(obj))) { - for (auto& c: obj->_children) { + for (auto& c: obj->children) { gather_items(nt, base, &c, role, s); } } else if (SP_IS_ITEM(obj)) { diff --git a/src/ui/tools/tweak-tool.cpp b/src/ui/tools/tweak-tool.cpp index 7da0973d5..361986d0c 100644 --- a/src/ui/tools/tweak-tool.cpp +++ b/src/ui/tools/tweak-tool.cpp @@ -385,7 +385,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P if (dynamic_cast<SPGroup *>(item) && !dynamic_cast<SPBox3D *>(item)) { GSList *children = NULL; - for (auto& child: item->_children) { + for (auto& child: item->children) { if (dynamic_cast<SPItem *>(static_cast<SPObject *>(&child))) { children = g_slist_prepend(children, &child); } @@ -832,7 +832,7 @@ static void tweak_colors_in_gradient(SPItem *item, Inkscape::PaintTarget fill_or double offset_l = 0; double offset_h = 0; SPObject *child_prev = NULL; - for (auto& child: vector->_children) { + for (auto& child: vector->children) { SPStop *stop = dynamic_cast<SPStop *>(&child); if (!stop) { continue; @@ -894,7 +894,7 @@ sp_tweak_color_recursive (guint mode, SPItem *item, SPItem *item_at_point, bool did = false; if (dynamic_cast<SPGroup *>(item)) { - for (auto& child: item->_children) { + for (auto& child: item->children) { SPItem *childItem = dynamic_cast<SPItem *>(&child); if (childItem) { if (sp_tweak_color_recursive (mode, childItem, item_at_point, @@ -951,7 +951,7 @@ sp_tweak_color_recursive (guint mode, SPItem *item, SPItem *item_at_point, Geom::Affine i2dt = item->i2dt_affine (); if (style->filter.set && style->getFilter()) { //cycle through filter primitives - for (auto& primitive_obj: style->getFilter()->_children) { + for (auto& primitive_obj: style->getFilter()->children) { SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(&primitive_obj); if (primitive) { //if primitive is gaussianblur diff --git a/src/ui/widget/layer-selector.cpp b/src/ui/widget/layer-selector.cpp index 46a0b3547..c080579f1 100644 --- a/src/ui/widget/layer-selector.cpp +++ b/src/ui/widget/layer-selector.cpp @@ -352,7 +352,7 @@ void LayerSelector::_buildSiblingEntries( ) { using Inkscape::Util::rest; - auto siblings = parent._children | boost::adaptors::filtered(is_layer(_desktop)) | boost::adaptors::reversed; + auto siblings = parent.children | boost::adaptors::filtered(is_layer(_desktop)) | boost::adaptors::reversed; SPObject *layer( hierarchy ? &*hierarchy : NULL ); diff --git a/src/uri-references.cpp b/src/uri-references.cpp index 23802ae65..6ef933982 100644 --- a/src/uri-references.cpp +++ b/src/uri-references.cpp @@ -76,7 +76,7 @@ bool URIReference::_acceptObject(SPObject *obj) const std::vector<int> positions; while (owner->cloned) { int position = 0; - for (auto &child: owner->parent->_children) { + for (auto &child: owner->parent->children) { if(&child == owner) { break; } diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index c4b2ed59a..1565e16f3 100644 --- a/src/widgets/gradient-toolbar.cpp +++ b/src/widgets/gradient-toolbar.cpp @@ -720,7 +720,7 @@ static void select_stop_by_drag(GtkWidget *combo_box, SPGradient *gradient, Tool static void select_stop_in_list( GtkWidget *combo_box, SPGradient *gradient, SPStop *new_stop, GtkWidget *data, gboolean block) { int i = 0; - for (auto& ochild: gradient->_children) { + for (auto& ochild: gradient->children) { if (SP_IS_STOP(&ochild)) { if (&ochild == new_stop) { blocked = block; @@ -765,7 +765,7 @@ static gboolean update_stop_list( GtkWidget *stop_combo, SPGradient *gradient, S /* Populate the combobox store */ std::vector<SPObject *> sl; if ( gradient->hasStops() ) { - for (auto& ochild: gradient->_children) { + for (auto& ochild: gradient->children) { if (SP_IS_STOP(&ochild)) { sl.push_back(&ochild); } diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index 813a2d28e..5f549a77c 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -363,7 +363,7 @@ unsigned long sp_gradient_to_hhssll(SPGradient *gr) static GSList *get_all_doc_items(GSList *list, SPObject *from, bool onlyvisible, bool onlysensitive, bool ingroups, GSList const *exclude) { - for (auto& child: from->_children) { + for (auto& child: from->children) { if (SP_IS_ITEM(&child)) { list = g_slist_prepend(list, SP_ITEM(&child)); } @@ -525,7 +525,7 @@ static void verify_grad(SPGradient *gradient) int i = 0; SPStop *stop = NULL; /* count stops */ - for (auto& ochild: gradient->_children) { + for (auto& ochild: gradient->children) { if (SP_IS_STOP(&ochild)) { i++; stop = SP_STOP(&ochild); @@ -568,7 +568,7 @@ static void select_stop_in_list( GtkWidget *vb, SPGradient *gradient, SPStop *ne GtkWidget *combo_box = static_cast<GtkWidget *>(g_object_get_data(G_OBJECT(vb), "combo_box")); int i = 0; - for (auto& ochild: gradient->_children) { + for (auto& ochild: gradient->children) { if (SP_IS_STOP(&ochild)) { if (&ochild == new_stop) { gtk_combo_box_set_active (GTK_COMBO_BOX(combo_box) , i); @@ -603,7 +603,7 @@ static void update_stop_list( GtkWidget *vb, SPGradient *gradient, SPStop *new_s /* Populate the combobox store */ GSList *sl = NULL; if ( gradient->hasStops() ) { - for (auto& ochild: gradient->_children) { + for (auto& ochild: gradient->children) { if (SP_IS_STOP(&ochild)) { sl = g_slist_append(sl, &ochild); } diff --git a/src/widgets/stroke-marker-selector.cpp b/src/widgets/stroke-marker-selector.cpp index fd7b5f6cd..af3f03420 100644 --- a/src/widgets/stroke-marker-selector.cpp +++ b/src/widgets/stroke-marker-selector.cpp @@ -335,7 +335,7 @@ GSList *MarkerComboBox::get_marker_list (SPDocument *source) return NULL; } - for (auto& child: defs->_children) + for (auto& child: defs->children) { if (SP_IS_MARKER(&child)) { ml = g_slist_prepend (ml, &child); |
