summaryrefslogtreecommitdiffstats
path: root/src/attribute-rel-util.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-09-23 17:24:25 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-09-23 17:24:25 +0000
commitac16411f213f98407fc42c1d04eb4ae6c187e4a6 (patch)
treeb8fd94caee6b202043810a7366ab3f032882a48f /src/attribute-rel-util.cpp
parentadd newly linked-in m4 files to .bzrignore (diff)
parentFix for 170395 : Add Trace Bitmap to context menu of images : Focus fix (diff)
downloadinkscape-ac16411f213f98407fc42c1d04eb4ae6c187e4a6.tar.gz
inkscape-ac16411f213f98407fc42c1d04eb4ae6c187e4a6.zip
merge from trunk (r11698)
(bzr r11668.1.10)
Diffstat (limited to 'src/attribute-rel-util.cpp')
-rw-r--r--src/attribute-rel-util.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/attribute-rel-util.cpp b/src/attribute-rel-util.cpp
index 239e359e2..cf94c0c1e 100644
--- a/src/attribute-rel-util.cpp
+++ b/src/attribute-rel-util.cpp
@@ -128,17 +128,13 @@ void sp_attribute_clean_style(Node *repr, unsigned int flags) {
// Find element's style
SPCSSAttr *css = sp_repr_css_attr( repr, "style" );
-
sp_attribute_clean_style(repr, css, flags);
- // g_warning( "sp_repr_write_stream_element(): Final style:" );
- //sp_repr_css_print( css );
-
// Convert css node's properties data to string and set repr node's attribute "style" to that string.
// sp_repr_css_set( repr, css, "style"); // Don't use as it will cause loop.
- gchar *value = sp_repr_css_write_string(css);
- repr->setAttribute("style", value);
- if (value) g_free (value);
+ Glib::ustring value;
+ sp_repr_css_write_string(css, value);
+ repr->setAttribute("style", value.c_str());
sp_repr_css_attr_unref( css );
}
@@ -147,7 +143,7 @@ void sp_attribute_clean_style(Node *repr, unsigned int flags) {
/**
* Clean CSS style on an element.
*/
-gchar * sp_attribute_clean_style(Node *repr, gchar const *string, unsigned int flags) {
+Glib::ustring sp_attribute_clean_style(Node *repr, gchar const *string, unsigned int flags) {
g_return_val_if_fail (repr != NULL, NULL);
g_return_val_if_fail (repr->type() == Inkscape::XML::ELEMENT_NODE, NULL);
@@ -155,11 +151,12 @@ gchar * sp_attribute_clean_style(Node *repr, gchar const *string, unsigned int f
SPCSSAttr *css = sp_repr_css_attr_new();
sp_repr_css_attr_add_from_string( css, string );
sp_attribute_clean_style(repr, css, flags);
- gchar* string_cleaned = sp_repr_css_write_string( css );
+ Glib::ustring string_cleaned;
+ sp_repr_css_write_string (css, string_cleaned);
sp_repr_css_attr_unref( css );
- return string_cleaned;
+ return string_cleaned;
}