summaryrefslogtreecommitdiffstats
path: root/src/helper
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/Makefile_insert45
-rw-r--r--src/helper/action-context.cpp1
-rw-r--r--src/helper/action.cpp2
-rw-r--r--src/helper/geom-nodetype.cpp2
-rw-r--r--src/helper/geom-pathstroke.cpp4
-rw-r--r--src/helper/geom.cpp7
-rw-r--r--src/helper/pixbuf-ops.cpp10
-rw-r--r--src/helper/png-write.cpp8
-rw-r--r--src/helper/stock-items.cpp30
9 files changed, 21 insertions, 88 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/action-context.cpp b/src/helper/action-context.cpp
index d52e43d96..1ea12776b 100644
--- a/src/helper/action-context.cpp
+++ b/src/helper/action-context.cpp
@@ -14,7 +14,6 @@
#include "layer-model.h"
#include "selection.h"
#include "helper/action-context.h"
-#include "ui/view/view.h"
namespace Inkscape {
diff --git a/src/helper/action.cpp b/src/helper/action.cpp
index 060bf317c..e37575a9c 100644
--- a/src/helper/action.cpp
+++ b/src/helper/action.cpp
@@ -9,8 +9,6 @@
* This code is in public domain
*/
-#include <string.h>
-
#include "debug/logger.h"
#include "debug/timestamp.h"
#include "debug/simple-event.h"
diff --git a/src/helper/geom-nodetype.cpp b/src/helper/geom-nodetype.cpp
index fe8e8af0e..da620b3fd 100644
--- a/src/helper/geom-nodetype.cpp
+++ b/src/helper/geom-nodetype.cpp
@@ -12,8 +12,6 @@
#include "helper/geom-nodetype.h"
#include <2geom/curve.h>
-#include <2geom/point.h>
-#include <vector>
namespace Geom {
diff --git a/src/helper/geom-pathstroke.cpp b/src/helper/geom-pathstroke.cpp
index d2e9f9a1b..10641692d 100644
--- a/src/helper/geom-pathstroke.cpp
+++ b/src/helper/geom-pathstroke.cpp
@@ -9,13 +9,9 @@
#include <iomanip>
#include <2geom/path-sink.h>
-#include <2geom/point.h>
-#include <2geom/bezier-curve.h>
-#include <2geom/elliptical-arc.h>
#include <2geom/sbasis-to-bezier.h> // cubicbezierpath_from_sbasis
#include <2geom/path-intersection.h>
#include <2geom/circle.h>
-#include <math.h>
#include "helper/geom-pathstroke.h"
diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp
index ecb330b01..42c494c00 100644
--- a/src/helper/geom.cpp
+++ b/src/helper/geom.cpp
@@ -12,15 +12,8 @@
#include <algorithm>
#include "helper/geom.h"
#include "helper/geom-curves.h"
-#include <typeinfo>
-#include <2geom/pathvector.h>
-#include <2geom/path.h>
#include <2geom/curves.h>
-#include <2geom/transforms.h>
-#include <2geom/rect.h>
-#include <2geom/coord.h>
#include <2geom/sbasis-to-bezier.h>
-#include <math.h> // for M_PI
using Geom::X;
using Geom::Y;
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp
index 9639096fb..bab998fdb 100644
--- a/src/helper/pixbuf-ops.cpp
+++ b/src/helper/pixbuf-ops.cpp
@@ -12,10 +12,9 @@
*/
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include <config.h>
#endif
-#include <png.h>
#include <boost/scoped_ptr.hpp>
#include <2geom/transforms.h>
@@ -24,11 +23,8 @@
#include "display/cairo-utils.h"
#include "display/drawing.h"
#include "display/drawing-context.h"
-#include "display/drawing-item.h"
#include "document.h"
-#include "sp-item.h"
#include "sp-root.h"
-#include "sp-use.h"
#include "sp-defs.h"
#include "util/units.h"
@@ -53,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 9430feeff..682aee9b2 100644
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
@@ -14,19 +14,17 @@
*/
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include <config.h>
#endif
#include <png.h>
#include "ui/interface.h"
#include <2geom/rect.h>
#include <2geom/transforms.h>
-#include <glib.h>
#include "png-write.h"
#include "io/sys.h"
#include "display/drawing.h"
#include "display/drawing-context.h"
-#include "display/drawing-item.h"
#include "document.h"
#include "sp-item.h"
#include "sp-root.h"
@@ -374,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;
}
}