From 5865f0044d4d75a2d988a8bf2ea3bc65ed6f4c18 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 25 Feb 2015 17:24:47 -0500 Subject: Isolate components of libgc (bzr r13946) --- src/xml/attribute-record.h | 2 +- src/xml/composite-node-observer.h | 2 +- src/xml/event.h | 2 +- src/xml/log-builder.h | 2 +- src/xml/subtree.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/xml') diff --git a/src/xml/attribute-record.h b/src/xml/attribute-record.h index a61329b83..70691005e 100644 --- a/src/xml/attribute-record.h +++ b/src/xml/attribute-record.h @@ -6,7 +6,7 @@ #define SEEN_XML_SP_REPR_ATTR_H #include -#include "gc-managed.h" +#include "libgc/gc-managed.h" #include "util/share.h" #define SP_REPR_ATTRIBUTE_KEY(a) g_quark_to_string((a)->key) diff --git a/src/xml/composite-node-observer.h b/src/xml/composite-node-observer.h index 3e4b1673a..968fe20dd 100644 --- a/src/xml/composite-node-observer.h +++ b/src/xml/composite-node-observer.h @@ -15,7 +15,7 @@ #ifndef SEEN_INKSCAPE_XML_COMPOSITE_NODE_OBSERVER_H #define SEEN_INKSCAPE_XML_COMPOSITE_NODE_OBSERVER_H -#include "gc-managed.h" +#include "libgc/gc-managed.h" #include "xml/node-observer.h" #include "util/list-container.h" diff --git a/src/xml/event.h b/src/xml/event.h index d25ea0e07..bc63ca504 100644 --- a/src/xml/event.h +++ b/src/xml/event.h @@ -24,7 +24,7 @@ typedef unsigned int GQuark; #include #include "util/share.h" #include "util/forward-pointer-iterator.h" -#include "gc-managed.h" +#include "libgc/gc-managed.h" #include "xml/node.h" namespace Inkscape { diff --git a/src/xml/log-builder.h b/src/xml/log-builder.h index aa8f2c1c6..e27a5e5ac 100644 --- a/src/xml/log-builder.h +++ b/src/xml/log-builder.h @@ -14,7 +14,7 @@ #ifndef SEEN_INKSCAPE_XML_LOG_BUILDER_H #define SEEN_INKSCAPE_XML_LOG_BUILDER_H -#include "gc-managed.h" +#include "libgc/gc-managed.h" #include "xml/node-observer.h" namespace Inkscape { diff --git a/src/xml/subtree.h b/src/xml/subtree.h index 11bf515f1..7b154bd65 100644 --- a/src/xml/subtree.h +++ b/src/xml/subtree.h @@ -15,7 +15,7 @@ #ifndef SEEN_INKSCAPE_XML_SUBTREE_H #define SEEN_INKSCAPE_XML_SUBTREE_H -#include "gc-managed.h" +#include "libgc/gc-managed.h" #include "xml/composite-node-observer.h" namespace Inkscape { -- cgit v1.2.3 From 3b0e6ebad7223a61510fad03e241ceadfae961f0 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 25 Feb 2015 21:49:35 -0500 Subject: Rename libgc/ => inkgc/ to reflect difference from Boehm GC (bzr r13950) --- src/xml/attribute-record.h | 2 +- src/xml/composite-node-observer.h | 2 +- src/xml/event.h | 2 +- src/xml/log-builder.h | 2 +- src/xml/subtree.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/xml') diff --git a/src/xml/attribute-record.h b/src/xml/attribute-record.h index 70691005e..7caeab6b6 100644 --- a/src/xml/attribute-record.h +++ b/src/xml/attribute-record.h @@ -6,7 +6,7 @@ #define SEEN_XML_SP_REPR_ATTR_H #include -#include "libgc/gc-managed.h" +#include "inkgc/gc-managed.h" #include "util/share.h" #define SP_REPR_ATTRIBUTE_KEY(a) g_quark_to_string((a)->key) diff --git a/src/xml/composite-node-observer.h b/src/xml/composite-node-observer.h index 968fe20dd..6e93a57da 100644 --- a/src/xml/composite-node-observer.h +++ b/src/xml/composite-node-observer.h @@ -15,7 +15,7 @@ #ifndef SEEN_INKSCAPE_XML_COMPOSITE_NODE_OBSERVER_H #define SEEN_INKSCAPE_XML_COMPOSITE_NODE_OBSERVER_H -#include "libgc/gc-managed.h" +#include "inkgc/gc-managed.h" #include "xml/node-observer.h" #include "util/list-container.h" diff --git a/src/xml/event.h b/src/xml/event.h index bc63ca504..73e68daeb 100644 --- a/src/xml/event.h +++ b/src/xml/event.h @@ -24,7 +24,7 @@ typedef unsigned int GQuark; #include #include "util/share.h" #include "util/forward-pointer-iterator.h" -#include "libgc/gc-managed.h" +#include "inkgc/gc-managed.h" #include "xml/node.h" namespace Inkscape { diff --git a/src/xml/log-builder.h b/src/xml/log-builder.h index e27a5e5ac..e94dd1daa 100644 --- a/src/xml/log-builder.h +++ b/src/xml/log-builder.h @@ -14,7 +14,7 @@ #ifndef SEEN_INKSCAPE_XML_LOG_BUILDER_H #define SEEN_INKSCAPE_XML_LOG_BUILDER_H -#include "libgc/gc-managed.h" +#include "inkgc/gc-managed.h" #include "xml/node-observer.h" namespace Inkscape { diff --git a/src/xml/subtree.h b/src/xml/subtree.h index 7b154bd65..bc6ae913a 100644 --- a/src/xml/subtree.h +++ b/src/xml/subtree.h @@ -15,7 +15,7 @@ #ifndef SEEN_INKSCAPE_XML_SUBTREE_H #define SEEN_INKSCAPE_XML_SUBTREE_H -#include "libgc/gc-managed.h" +#include "inkgc/gc-managed.h" #include "xml/composite-node-observer.h" namespace Inkscape { -- cgit v1.2.3 From 772eb991389fc1b8bdbf7cabb4ecde1be3243e3c Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sat, 14 Mar 2015 13:02:49 +0100 Subject: Partial fix for bug 1430873. Rectangles should behave properly with % values. (bzr r14004) --- src/xml/repr-util.cpp | 15 +++++++++++++++ src/xml/repr.h | 2 ++ 2 files changed, 17 insertions(+) (limited to 'src/xml') diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp index 12280ea5a..7c5d2d6fc 100644 --- a/src/xml/repr-util.cpp +++ b/src/xml/repr-util.cpp @@ -32,6 +32,7 @@ #include <2geom/point.h> #include "svg/stringstream.h" #include "svg/css-ostringstream.h" +#include "svg/svg-length.h" #include "xml/repr.h" #include "xml/repr-sorting.h" @@ -502,6 +503,20 @@ unsigned int sp_repr_set_svg_double(Inkscape::XML::Node *repr, gchar const *key, return true; } +/** + * For attributes where an exponent is allowed. + * + * Not suitable for property attributes. + */ +unsigned int sp_repr_set_svg_length(Inkscape::XML::Node *repr, gchar const *key, SVGLength &val) +{ + g_return_val_if_fail(repr != NULL, FALSE); + g_return_val_if_fail(key != NULL, FALSE); + + repr->setAttribute(key, val.write()); + return true; +} + unsigned sp_repr_set_point(Inkscape::XML::Node *repr, gchar const *key, Geom::Point const & val) { g_return_val_if_fail(repr != NULL, FALSE); diff --git a/src/xml/repr.h b/src/xml/repr.h index e1d7fdfd6..c3ba40e45 100644 --- a/src/xml/repr.h +++ b/src/xml/repr.h @@ -30,6 +30,7 @@ #define SP_DC_NS_URI "http://purl.org/dc/elements/1.1/" class SPCSSAttr; +class SVGLength; namespace Inkscape { namespace IO { @@ -115,6 +116,7 @@ unsigned sp_repr_set_boolean(Inkscape::XML::Node *repr, char const *key, unsigne unsigned sp_repr_set_int(Inkscape::XML::Node *repr, char const *key, int val); unsigned sp_repr_set_css_double(Inkscape::XML::Node *repr, char const *key, double val); unsigned sp_repr_set_svg_double(Inkscape::XML::Node *repr, char const *key, double val); +unsigned sp_repr_set_svg_length(Inkscape::XML::Node *repr, char const *key, SVGLength &val); 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); -- cgit v1.2.3