summaryrefslogtreecommitdiffstats
path: root/src/filter-chemistry.cpp
diff options
context:
space:
mode:
authorMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:01:17 +0000
committerMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:01:17 +0000
commite7248b2fa042f42a5c4dd14cd86ab6a5b4524059 (patch)
tree9097520c54e355ded9bd0b4d6618af4e8dacdd91 /src/filter-chemistry.cpp
parentupdated to latest trunk (diff)
parent[Bug #1695016] Xaml export misses some radialGradients. (diff)
downloadinkscape-e7248b2fa042f42a5c4dd14cd86ab6a5b4524059.tar.gz
inkscape-e7248b2fa042f42a5c4dd14cd86ab6a5b4524059.zip
updated to latest trunk
(bzr r14876.2.4)
Diffstat (limited to 'src/filter-chemistry.cpp')
-rw-r--r--src/filter-chemistry.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp
index 9298a1ffc..560e73322 100644
--- a/src/filter-chemistry.cpp
+++ b/src/filter-chemistry.cpp
@@ -26,11 +26,6 @@
#include "filters/blend.h"
#include "filters/gaussian-blur.h"
-#include "sp-filter.h"
-#include "sp-filter-reference.h"
-#include "svg/css-ostringstream.h"
-
-#include "xml/repr.h"
/**
* Count how many times the filter is used by the styles of o and its
@@ -51,8 +46,8 @@ static guint count_filter_hrefs(SPObject *o, SPFilter *filter)
i ++;
}
- for ( SPObject *child = o->firstChild(); child; child = child->getNext() ) {
- i += count_filter_hrefs(child, filter);
+ for (auto& child: o->children) {
+ i += count_filter_hrefs(&child, filter);
}
return i;
@@ -491,16 +486,14 @@ void remove_filter_gaussian_blur (SPObject *item)
bool filter_is_single_gaussian_blur(SPFilter *filter)
{
- return (filter->firstChild() &&
- (filter->firstChild() == filter->lastChild()) &&
- SP_IS_GAUSSIANBLUR(filter->firstChild()));
+ return (filter->children.size() == 1 &&
+ SP_IS_GAUSSIANBLUR(&filter->children.front()));
}
double get_single_gaussian_blur_radius(SPFilter *filter)
{
- if (filter->firstChild() &&
- (filter->firstChild() == filter->lastChild()) &&
- SP_IS_GAUSSIANBLUR(filter->firstChild())) {
+ if (filter->children.size() == 1 &&
+ SP_IS_GAUSSIANBLUR(&filter->children.front())) {
SPGaussianBlur *gb = SP_GAUSSIANBLUR(filter->firstChild());
double x = gb->stdDeviation.getNumber();