summaryrefslogtreecommitdiffstats
path: root/src/text-chemistry.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-10-02 22:15:00 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-10-02 22:15:00 +0000
commitaa6d389286f6402ef393015b000755bc3124362a (patch)
tree81e17d682f5aade76e44bc8809e751b42dd5f773 /src/text-chemistry.cpp
parentFixed a bug editing paths in others LPE -envelope- (diff)
parentFix segment welding in the node tool hanging when a two-point segment (diff)
downloadinkscape-aa6d389286f6402ef393015b000755bc3124362a.tar.gz
inkscape-aa6d389286f6402ef393015b000755bc3124362a.zip
update to trunk
(bzr r11950.1.158)
Diffstat (limited to 'src/text-chemistry.cpp')
-rw-r--r--src/text-chemistry.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp
index 8a3fede0f..532d19e02 100644
--- a/src/text-chemistry.cpp
+++ b/src/text-chemistry.cpp
@@ -152,7 +152,9 @@ text_put_on_path()
// create textPath and put it into the text
Inkscape::XML::Node *textpath = xml_doc->createElement("svg:textPath");
// reference the shape
- textpath->setAttribute("xlink:href", g_strdup_printf("#%s", shape->getRepr()->attribute("id")));
+ gchar *href_str = g_strdup_printf("#%s", shape->getRepr()->attribute("id"));
+ textpath->setAttribute("xlink:href", href_str);
+ g_free(href_str);
if (text_alignment == Inkscape::Text::Layout::RIGHT) {
textpath->setAttribute("startOffset", "100%");
} else if (text_alignment == Inkscape::Text::Layout::CENTER) {
@@ -234,9 +236,9 @@ text_remove_all_kerns_recursively(SPObject *o)
gchar **xa_space = g_strsplit(x, " ", 0);
gchar **xa_comma = g_strsplit(x, ",", 0);
if (xa_space && *xa_space && *(xa_space + 1)) {
- o->getRepr()->setAttribute("x", g_strdup(*xa_space));
+ o->getRepr()->setAttribute("x", *xa_space);
} else if (xa_comma && *xa_comma && *(xa_comma + 1)) {
- o->getRepr()->setAttribute("x", g_strdup(*xa_comma));
+ o->getRepr()->setAttribute("x", *xa_comma);
}
g_strfreev(xa_space);
g_strfreev(xa_comma);
@@ -331,7 +333,9 @@ text_flow_into_shape()
Inkscape::XML::Node *clone = xml_doc->createElement("svg:use");
clone->setAttribute("x", "0");
clone->setAttribute("y", "0");
- clone->setAttribute("xlink:href", g_strdup_printf("#%s", item->getRepr()->attribute("id")));
+ gchar *href_str = g_strdup_printf("#%s", item->getRepr()->attribute("id"));
+ clone->setAttribute("xlink:href", href_str);
+ g_free(href_str);
// add the new clone to the region
region_repr->appendChild(clone);