summaryrefslogtreecommitdiffstats
path: root/src/helper
diff options
context:
space:
mode:
authorkamalpreetgrewal <grewalkamal005@gmail.com>2016-08-15 03:59:18 +0000
committerkamalpreetgrewal <grewalkamal005@gmail.com>2016-08-15 03:59:18 +0000
commit25a9ed4f38121eeb59cf15dbf19391aaef45bba3 (patch)
treee123aeae50d98a52e1ad4575b29bf3c199619e33 /src/helper
parentSolve crash when deleting CSS property (diff)
parentinkview: Convert to ApplicationWindow (diff)
downloadinkscape-25a9ed4f38121eeb59cf15dbf19391aaef45bba3.tar.gz
inkscape-25a9ed4f38121eeb59cf15dbf19391aaef45bba3.zip
Merge changes from trunk
(bzr r14949.1.64)
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/Makefile_insert45
-rw-r--r--src/helper/pixbuf-ops.cpp4
-rw-r--r--src/helper/png-write.cpp4
-rw-r--r--src/helper/stock-items.cpp30
4 files changed, 19 insertions, 64 deletions
diff --git a/src/helper/Makefile_insert b/src/helper/Makefile_insert
deleted file mode 100644
index e59fcfb70..000000000
--- a/src/helper/Makefile_insert
+++ /dev/null
@@ -1,45 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-helper/unit-menu.$(OBJEXT): helper/sp-marshal.h
-
-ink_common_sources += \
- helper/action.cpp \
- helper/action.h \
- helper/action-context.cpp \
- helper/action-context.h \
- helper/geom.cpp \
- helper/geom.h \
- helper/geom-curves.h \
- helper/geom-nodetype.cpp \
- helper/geom-nodetype.h \
- helper/geom-pathstroke.cpp \
- helper/geom-pathstroke.h \
- helper/gnome-utils.cpp \
- helper/gnome-utils.h \
- helper/mathfns.h \
- helper/png-write.cpp \
- helper/png-write.h \
- helper/sp-marshal.cpp \
- helper/sp-marshal.h \
- helper/window.cpp \
- helper/window.h \
- helper/stock-items.cpp \
- helper/stock-items.h
-
-# cmp exits with status 0 when there are no differences. "if" executes the commands
-# after "then" when the exit status of the if command is 0 (this is crazy).
-helper/sp-marshal.h: helper/sp-marshal.list
- glib-genmarshal --prefix=sp_marshal --header $(srcdir)/helper/sp-marshal.list > helper/tmp.sp-marshal.h
- if cmp -s helper/sp-marshal.h helper/tmp.sp-marshal.h; \
- then rm helper/tmp.sp-marshal.h; \
- else mv helper/tmp.sp-marshal.h helper/sp-marshal.h; fi
-
-helper/sp-marshal.cpp: helper/sp-marshal.list helper/sp-marshal.h
- ( echo '#include "helper/sp-marshal.h"' && \
- glib-genmarshal --prefix=sp_marshal --body $(srcdir)/helper/sp-marshal.list ) \
- > helper/tmp.sp-marshal.cpp; \
- if cmp -s helper/sp-marshal.cpp helper/tmp.sp-marshal.cpp; \
- then rm helper/tmp.sp-marshal.cpp; \
- else mv helper/tmp.sp-marshal.cpp helper/sp-marshal.cpp; fi
-
-helper/sp-marshal.cpp helper/sp-marshal.h: helper/sp-marshal.list
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp
index 8a363d736..bab998fdb 100644
--- a/src/helper/pixbuf-ops.cpp
+++ b/src/helper/pixbuf-ops.cpp
@@ -49,8 +49,8 @@ static void hide_other_items_recursively(SPObject *o, GSList *list, unsigned dke
// recurse
if (!g_slist_find(list, o)) {
- for ( SPObject *child = o->firstChild() ; child; child = child->getNext() ) {
- hide_other_items_recursively(child, list, dkey);
+ 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 e2b7e5b8c..682aee9b2 100644
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
@@ -372,8 +372,8 @@ static void hide_other_items_recursively(SPObject *o, const std::vector<SPItem*>
// recurse
if (list.end()==find(list.begin(),list.end(),o)) {
- for ( SPObject *child = o->firstChild() ; child; child = child->getNext() ) {
- hide_other_items_recursively(child, list, dkey);
+ 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 5a56b89ff..647e42916 100644
--- a/src/helper/stock-items.cpp
+++ b/src/helper/stock-items.cpp
@@ -204,37 +204,37 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock)
}
SPObject *object = NULL;
if (!strcmp(base, "marker") && !stock) {
- for ( SPObject *child = defs->firstChild(); child; child = child->getNext() )
+ for (auto& child: defs->children)
{
- if (child->getRepr()->attribute("inkscape:stockid") &&
- !strcmp(name_p, child->getRepr()->attribute("inkscape:stockid")) &&
- SP_IS_MARKER(child))
+ if (child.getRepr()->attribute("inkscape:stockid") &&
+ !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) &&
+ SP_IS_MARKER(&child))
{
- object = child;
+ object = &child;
}
}
}
else if (!strcmp(base,"pattern") && !stock) {
- for ( SPObject *child = defs->firstChild() ; child; child = child->getNext() )
+ for (auto& child: defs->children)
{
- if (child->getRepr()->attribute("inkscape:stockid") &&
- !strcmp(name_p, child->getRepr()->attribute("inkscape:stockid")) &&
- SP_IS_PATTERN(child))
+ if (child.getRepr()->attribute("inkscape:stockid") &&
+ !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) &&
+ SP_IS_PATTERN(&child))
{
- object = child;
+ object = &child;
}
}
}
else if (!strcmp(base,"gradient") && !stock) {
- for ( SPObject *child = defs->firstChild(); child; child = child->getNext() )
+ for (auto& child: defs->children)
{
- if (child->getRepr()->attribute("inkscape:stockid") &&
- !strcmp(name_p, child->getRepr()->attribute("inkscape:stockid")) &&
- SP_IS_GRADIENT(child))
+ if (child.getRepr()->attribute("inkscape:stockid") &&
+ !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) &&
+ SP_IS_GRADIENT(&child))
{
- object = child;
+ object = &child;
}
}