summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2013-08-15 19:13:44 +0000
committertavmjong-free <tavmjong@free.fr>2013-08-15 19:13:44 +0000
commit451210ce988fb6e6964bd4869f74ffa7fb2c462d (patch)
treecd9a7e65bbf1a0586e67dd0f636b8c4a99401674
parentAdd option to write out path data using only relative coordinates (diff)
downloadinkscape-451210ce988fb6e6964bd4869f74ffa7fb2c462d.tar.gz
inkscape-451210ce988fb6e6964bd4869f74ffa7fb2c462d.zip
Prevent writing out empty style strings.
(bzr r12481)
-rw-r--r--src/attribute-rel-util.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/attribute-rel-util.cpp b/src/attribute-rel-util.cpp
index 933339632..15c71daa7 100644
--- a/src/attribute-rel-util.cpp
+++ b/src/attribute-rel-util.cpp
@@ -141,7 +141,11 @@ void sp_attribute_clean_style(Node *repr, unsigned int flags) {
// sp_repr_css_set( repr, css, "style"); // Don't use as it will cause loop.
Glib::ustring value;
sp_repr_css_write_string(css, value);
- repr->setAttribute("style", value.c_str());
+ if( value.empty() ) {
+ repr->setAttribute("style", NULL );
+ } else {
+ repr->setAttribute("style", value.c_str());
+ }
sp_repr_css_attr_unref( css );
}