diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2014-12-25 11:40:35 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2014-12-25 11:40:35 +0000 |
| commit | 9a8bd0c8c29161a2fd91ccb48a3a813d4a45ac99 (patch) | |
| tree | ff76ccc40eff6789fba245ff1c8ee15d5b5303da /src/sp-object.cpp | |
| parent | Remove sp_style_read_from_object() (diff) | |
| download | inkscape-9a8bd0c8c29161a2fd91ccb48a3a813d4a45ac99.tar.gz inkscape-9a8bd0c8c29161a2fd91ccb48a3a813d4a45ac99.zip | |
Remove sp_style_write_string() and sp_style_write_difference().
(bzr r13822.1.4)
Diffstat (limited to 'src/sp-object.cpp')
| -rw-r--r-- | src/sp-object.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 124471545..d492e7817 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -1007,9 +1007,8 @@ Inkscape::XML::Node* SPObject::write(Inkscape::XML::Document *doc, Inkscape::XML repr->setAttribute("inkscape:collect", NULL); } - SPStyle const *const obj_style = this->style; - if (obj_style) { - gchar *s = sp_style_write_string(obj_style, SP_STYLE_FLAG_IFSET); + if (style) { + Glib::ustring s = style->write(SP_STYLE_FLAG_IFSET); // Check for valid attributes. This may be time consuming. // It is useful, though, for debugging Inkscape code. @@ -1017,17 +1016,14 @@ Inkscape::XML::Node* SPObject::write(Inkscape::XML::Document *doc, Inkscape::XML if( prefs->getBool("/options/svgoutput/check_on_editing") ) { unsigned int flags = sp_attribute_clean_get_prefs(); - Glib::ustring s_cleaned = sp_attribute_clean_style( repr, s, flags ); - g_free( s ); - s = (s_cleaned.empty() ? NULL : g_strdup (s_cleaned.c_str())); + Glib::ustring s_cleaned = sp_attribute_clean_style( repr, s.c_str(), flags ); } - if( s == NULL || strcmp(s,"") == 0 ) { + if( s.empty() ) { repr->setAttribute("style", NULL); } else { - repr->setAttribute("style", s); + repr->setAttribute("style", s.c_str()); } - g_free(s); } else { /** \todo I'm not sure what to do in this case. Bug #1165868 |
