summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/repr-util.cpp5
-rw-r--r--src/xml/repr.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index 7c5d2d6fc..4cbe930a1 100644
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
@@ -310,6 +310,11 @@ int sp_repr_compare_position(Inkscape::XML::Node const *first, Inkscape::XML::No
pjrm */
}
+bool sp_repr_compare_position_bool(Inkscape::XML::Node const *first, Inkscape::XML::Node const *second){
+ return sp_repr_compare_position(first, second)<0;
+}
+
+
/**
* Find an element node using an unique attribute.
*
diff --git a/src/xml/repr.h b/src/xml/repr.h
index c3ba40e45..17763195a 100644
--- a/src/xml/repr.h
+++ b/src/xml/repr.h
@@ -120,7 +120,9 @@ unsigned sp_repr_set_svg_length(Inkscape::XML::Node *repr, char const *key, SVGL
unsigned sp_repr_set_point(Inkscape::XML::Node *repr, char const *key, Geom::Point const & val);
unsigned sp_repr_get_point(Inkscape::XML::Node *repr, char const *key, Geom::Point *val);
+//c++-style comparison : returns (bool)(a<b)
int sp_repr_compare_position(Inkscape::XML::Node const *first, Inkscape::XML::Node const *second);
+bool sp_repr_compare_position_bool(Inkscape::XML::Node const *first, Inkscape::XML::Node const *second);
// Searching
/**